shiyunteng
7 天以前 0ad13cb4bf387d4f2db2d62540ebb73a376087f5
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
34
35
36
37
38
39
40
<?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="com.by4cloud.platformx.device.mapper.InspectionPlanMapper">
 
  <resultMap id="inspectionPlanMap" type="com.by4cloud.platformx.device.entity.InspectionPlan">
        <id property="id" column="id"/>
        <result property="compId" column="comp_id"/>
        <result property="endTime" column="end_time"/>
        <result property="inspectionUserId" column="inspection_user_id"/>
        <result property="planName" column="plan_name"/>
        <result property="startTime" column="start_time"/>
        <result property="taskFlag" column="task_flag"/>
        <result property="createBy" column="create_by"/>
        <result property="createTime" column="create_time"/>
        <result property="updateBy" column="update_by"/>
        <result property="updateTime" column="update_time"/>
        <result property="delFlag" column="del_flag"/>
  </resultMap>
    <select id="page" resultType="com.by4cloud.platformx.device.entity.vo.InspectionPlanPageVo">
        select
            ip.id,
            ip.plan_name,
            ip.inspection_user_id,
            ip.start_time,
            ip.end_time,
            ip.task_flag,
            su.name inspectionUserName
        from
            inspection_plan ip
                join platformxx_boot.sys_user su on
                su.user_id = ip.inspection_user_id
        where
            ip.del_flag = '0'
        <if test="queryDTO.planName != null and queryDTO.planName != ''">
            and ip.plan_name like CONCAT('%', #{queryDTO.planName}, '%')
        </if>
            order by ip.create_time desc
    </select>
</mapper>