long
2023-09-02 e379948bb83ebcc9ce0c467a7b970f74bc00e9a1
提交 | 用户 | 时间
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.sc.equipmentAlarmConf.mapper.EquipmentAlarmConfMapper">
4
5     <!-- 通用查询映射结果 -->
6     <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.sc.equipmentAlarmConf.entity.EquipmentAlarmConf">
7         <id column="id" property="id" />
8         <result column="equipment_no" property="equipmentNo" />
9         <result column="equipment_name" property="equipmentName" />
10         <result column="plc_code" property="plcCode" />
11         <result column="error_no" property="errorNo" />
12         <result column="error_desc" property="errorDesc" />
13         <result column="spare_field_1" property="spareField1" />
14         <result column="spare_field_2" property="spareField2" />
15         <result column="remarks" property="remarks" />
16         <result column="create_user" property="createUser" />
17         <result column="create_time" property="createTime" />
18         <result column="update_user" property="updateUser" />
19         <result column="update_time" property="updateTime" />
20     </resultMap>
21
22     <!-- 通用查询结果列 -->
23     <sql id="Base_Column_List">
24         id AS "id", equipment_no AS "equipmentNo", equipment_name AS "equipmentName", plc_code AS "plcCode", error_no AS "errorNo", error_desc AS "errorDesc", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", remarks AS "remarks", create_user AS "createUser", create_time AS "createTime", update_user AS "updateUser", update_time AS "updateTime"
25     </sql>
26
27
28     <select id="customList" resultType="cn.stylefeng.guns.modular.sc.equipmentAlarmConf.model.result.EquipmentAlarmConfResult" parameterType="cn.stylefeng.guns.modular.sc.equipmentAlarmConf.model.params.EquipmentAlarmConfParam">
29         select
30         <include refid="Base_Column_List"/>
31         from sc_equipment_alarm_conf where 1 = 1
32     </select>
33
34     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.sc.equipmentAlarmConf.model.params.EquipmentAlarmConfParam">
35         select
36         <include refid="Base_Column_List"/>
37         from sc_equipment_alarm_conf where 1 = 1
38     </select>
39
40     <select id="customPageList" resultType="cn.stylefeng.guns.modular.sc.equipmentAlarmConf.model.result.EquipmentAlarmConfResult" parameterType="cn.stylefeng.guns.modular.sc.equipmentAlarmConf.model.params.EquipmentAlarmConfParam">
41         select
42         <include refid="Base_Column_List"/>
43         from sc_equipment_alarm_conf where 1 = 1
44         <if test="paramCondition.equipmentNo != null and paramCondition.equipmentNo != ''">
45             and equipment_no like CONCAT('%',#{paramCondition.equipmentNo},'%')
46         </if>
47         <if test="paramCondition.equipmentName != null and paramCondition.equipmentName != ''">
48             and equipment_name like CONCAT('%',#{paramCondition.equipmentName},'%')
49         </if>
50         order by id desc
51     </select>
52
53     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.sc.equipmentAlarmConf.model.params.EquipmentAlarmConfParam">
54         select
55         <include refid="Base_Column_List"/>
56         from sc_equipment_alarm_conf where 1 = 1
57     </select>
58
59 </mapper>