OPC
懒羊羊
2023-12-13 21fde820e495c08cfa0ba277685468baa5bf9118
提交 | 用户 | 时间
71e81e 1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 <mapper namespace="cn.stylefeng.guns.modular.em.equipmentMaintainPlan.mapper.EquipmentMaintainPlanMapper">
4
5     <!-- 通用查询映射结果 -->
6     <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.em.equipmentMaintainPlan.entity.EquipmentMaintainPlan">
7         <id column="id" property="id" />
8         <result column="equipment_no" property="equipmentNo" />
9         <result column="equipment_name" property="equipmentName" />
10         <result column="plan_no" property="planNo" />
11         <result column="plan_name" property="planName" />
12         <result column="plan_type" property="planType" />
13         <result column="maintain_type" property="maintainType" />
14         <result column="interval_time" property="intervalTime" />
15         <result column="interval_unit" property="intervalUnit" />
16         <result column="state" property="state" />
17         <result column="spare_field_1" property="spareField1" />
18         <result column="spare_field_2" property="spareField2" />
19         <result column="remarks" property="remarks" />
20         <result column="create_user" property="createUser" />
21         <result column="update_user" property="updateUser" />
22         <result column="maintain_user" property="maintainUser" />
23         <result column="create_time" property="createTime" />
24         <result column="update_time" property="updateTime" />
25         <result column="start_time" property="startTime" />
26         <result column="end_time" property="endTime" />
27     </resultMap>
28
29     <!-- 通用查询结果列 -->
30     <sql id="Base_Column_List">
31         id AS "id", equipment_no AS "equipmentNo", equipment_name AS "equipmentName", plan_no AS "planNo", plan_name AS "planName", plan_type AS "planType", maintain_type AS "maintainType", interval_time AS "intervalTime", interval_unit AS "intervalUnit", state AS "state", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", remarks AS "remarks", create_user AS "createUser", update_user AS "updateUser", create_time AS "createTime", update_time AS "updateTime", start_time AS "startTime", end_time AS "endTime", maintain_user AS "maintainUser"
32     </sql>
33
34
35     <select id="customList" resultType="cn.stylefeng.guns.modular.em.equipmentMaintainPlan.model.result.EquipmentMaintainPlanResult" parameterType="cn.stylefeng.guns.modular.em.equipmentMaintainPlan.model.params.EquipmentMaintainPlanParam">
36         select
37         <include refid="Base_Column_List"/>
38         from em_equipment_maintain_plan where 1 = 1
39     </select>
40
41     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.em.equipmentMaintainPlan.model.params.EquipmentMaintainPlanParam">
42         select
43         <include refid="Base_Column_List"/>
44         from em_equipment_maintain_plan where 1 = 1
45     </select>
46
47     <select id="customPageList" resultType="cn.stylefeng.guns.modular.em.equipmentMaintainPlan.model.result.EquipmentMaintainPlanResult" parameterType="cn.stylefeng.guns.modular.em.equipmentMaintainPlan.model.params.EquipmentMaintainPlanParam">
48         select
49         <include refid="Base_Column_List"/>
50         from em_equipment_maintain_plan where 1 = 1
51         <if test="paramCondition.equipmentNo != null and paramCondition.equipmentNo != ''">
52             and equipment_no like CONCAT('%',#{paramCondition.equipmentNo},'%')
53         </if>
54         <if test="paramCondition.equipmentName != null and paramCondition.equipmentName != ''">
55             and equipment_name like CONCAT('%',#{paramCondition.equipmentName},'%')
56         </if>
57         <if test="paramCondition.planNo != null and paramCondition.planNo != ''">
58             and plan_no like CONCAT('%',#{paramCondition.planNo},'%')
59         </if>
60     </select>
61
62     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.em.equipmentMaintainPlan.model.params.EquipmentMaintainPlanParam">
63         select
64         <include refid="Base_Column_List"/>
65         from em_equipment_maintain_plan where 1 = 1
66     </select>
67
68 </mapper>