ZKBH
3 天以前 25a0ff7d2398f5b11b85549097cd20446e51f0ce
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.mdc.mapper.MdcEquipmentMagnificationMapper">
    <select id="getMaxStaticsData" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentMagnification">
        SELECT TOP 1 * FROM mdc_equipment_magnification WHERE equipment_id = #{equipmentId} ORDER BY the_date DESC
    </select>
 
    <!--分页列表查询-->
    <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentMagnification">
        SELECT
            *
        FROM
        mdc_equipment_magnification t1
        WHERE 1=1
        <if test="magnificationVo.equipmentId != null and magnificationVo.equipmentId != ''">
            AND t1.equipment_id = #{ magnificationVo.equipmentId }
        </if>
        <if test="magnificationVo.startTime != null and magnificationVo.startTime != ''">
            AND t1.the_date &gt;= #{ magnificationVo.startTime }
        </if>
        <if test="magnificationVo.endTime != null and magnificationVo.endTime != ''">
            AND t1.the_date &lt;= #{ magnificationVo.endTime }
        </if>
        <if test="magnificationVo.equipmentIdList != null and magnificationVo.equipmentIdList.size() > 0 ">
            AND t1.equipment_id IN
            <foreach collection="magnificationVo.equipmentIdList" item="id" index="index" open="(" close=")" separator=",">
                #{ id }
            </foreach>
        </if>
        ORDER BY t1.the_date ASC
    </select>
 
</mapper>