Lius
2025-01-02 2152f2f0138730c76df82ff947e5aa27e6a2abff
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
<?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.MdcOverrunAlarmMapper">
 
    <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcOverrunAlarm">
        SELECT
            t1.*
        FROM
            mdc_overrun_alarm t1
                LEFT JOIN mdc_equipment t2 ON t1.equipment_id = t2.equipment_id
        <where>
            <if test="mdcEquipment.equipmentId != null and mdcEquipment.equipmentId != '' ">
                AND t1.equipment_id LIKE CONCAT(CONCAT('%',#{mdcEquipment.equipmentId}),'%')
            </if>
            <if test="mdcEquipment.equipmentType != null and mdcEquipment.equipmentType != '' ">
                AND t2.equipment_type = #{mdcEquipment.equipmentType}
            </if>
            <if test="mdcEquipment.driveType != null and mdcEquipment.driveType != '' ">
                AND t2.drive_type = #{mdcEquipment.driveType}
            </if>
        </where>
        ORDER BY
            t1.create_time DESC
    </select>
</mapper>