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.equipmentAlarm.mapper.EquipmentAlarmMapper">
4
5     <!-- 通用查询映射结果 -->
6     <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.em.equipmentAlarm.entity.EquipmentAlarm">
7         <id column="id" property="id" />
8         <result column="equipment_no" property="equipmentNo" />
9         <result column="equipment_name" property="equipmentName" />
10         <result column="workshop_code" property="workshopCode" />
11         <result column="production_line_code" property="productionLineCode" />
12         <result column="location_code" property="locationCode" />
13         <result column="error_no" property="errorNo" />
14         <result column="error_desc" property="errorDesc" />
15         <result column="alarm_time" property="alarmTime" />
16         <result column="whether_recovery" property="whetherRecovery" />
17         <result column="recovery_time" property="recoveryTime" />
18         <result column="spare_field_1" property="spareField1" />
19         <result column="spare_field_2" property="spareField2" />
20         <result column="remarks" property="remarks" />
21     </resultMap>
22
23     <!-- 通用查询结果列 -->
24     <sql id="Base_Column_List">
25         id AS "id", equipment_no AS "equipmentNo", equipment_name AS "equipmentName", workshop_code AS "workshopCode", production_line_code AS "productionLineCode", location_code AS "locationCode", error_no AS "errorNo", error_desc AS "errorDesc", alarm_time AS "alarmTime", whether_recovery AS "whetherRecovery", recovery_time AS "recoveryTime", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", remarks AS "remarks"
26     </sql>
27
28
29     <select id="customList" resultType="cn.stylefeng.guns.modular.em.equipmentAlarm.model.result.EquipmentAlarmResult" parameterType="cn.stylefeng.guns.modular.em.equipmentAlarm.model.params.EquipmentAlarmParam">
30         select
31         <include refid="Base_Column_List"/>
32         from em_equipment_alarm where 1 = 1
33     </select>
34
35     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.em.equipmentAlarm.model.params.EquipmentAlarmParam">
36         select
37         <include refid="Base_Column_List"/>
38         from em_equipment_alarm where 1 = 1
39     </select>
40
41     <select id="customPageList" resultType="cn.stylefeng.guns.modular.em.equipmentAlarm.model.result.EquipmentAlarmResult" parameterType="cn.stylefeng.guns.modular.em.equipmentAlarm.model.params.EquipmentAlarmParam">
42         select
43         <include refid="Base_Column_List"/>
44         from em_equipment_alarm where 1 = 1
45         <if test="paramCondition.equipmentNo != null and paramCondition.equipmentNo != ''">
46             and equipment_no like CONCAT('%',#{paramCondition.equipmentNo},'%')
47         </if>
48         <if test="paramCondition.equipmentName != null and paramCondition.equipmentName != ''">
49             and equipment_name like CONCAT('%',#{paramCondition.equipmentName},'%')
50         </if>
51         order by id desc
52     </select>
53
54     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.em.equipmentAlarm.model.params.EquipmentAlarmParam">
55         select
56         <include refid="Base_Column_List"/>
57         from em_equipment_alarm where 1 = 1
58     </select>
59
60 </mapper>