yantian yue
2023-10-24 47eb81eebc9a87af5f64dd765dc1a1267317d9a8
提交 | 用户 | 时间
4779be 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.zsx.sys.kanbanConf.mapper.KanbanConfMapper">
4
5     <!-- 通用查询映射结果 -->
6     <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.zsx.sys.kanbanConf.entity.KanbanConf">
7         <id column="id" property="id" />
8         <result column="page_code" property="pageCode" />
9         <result column="ip_address" property="ipAddress" />
10         <result column="mac_address" property="macAddress" />
11         <result column="workshop_code" property="workshopCode" />
12         <result column="workshop_name" property="workshopName" />
13         <result column="line_code" property="lineCode" />
14         <result column="line_name" property="lineName" />
15         <result column="location_code" property="locationCode" />
16         <result column="location_name" property="locationName" />
17         <result column="warehouse_code" property="warehouseCode" />
18         <result column="warehouse_name" property="warehouseName" />
19     </resultMap>
20
21     <!-- 通用查询结果列 -->
22     <sql id="Base_Column_List">
23         id AS "id", page_code AS "pageCode", ip_address AS "ipAddress", mac_address AS "macAddress", workshop_code AS "workshopCode", workshop_name AS "workshopName", line_code AS "lineCode", line_name AS "lineName", location_code AS "locationCode", location_name AS "locationName", warehouse_code AS "warehouseCode", warehouse_name AS "warehouseName"
24     </sql>
25
26
27     <select id="customList" resultType="cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.result.KanbanConfResult" parameterType="cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.params.KanbanConfParam">
28         select
29         <include refid="Base_Column_List"/>
30         from sys_kanban_conf where 1 = 1
31             <if test="paramCondition.ipAddress != null and paramCondition.ipAddress != ''">
32                 and ip_address like CONCAT('%',#{paramCondition.ipAddress},'%')
33             </if>
34             <if test="paramCondition.lineCode != null and paramCondition.lineCode != ''">
35                 and line_code like CONCAT('%',#{paramCondition.lineCode},'%')
36             </if>
37             <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
38                 and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
39             </if>
40     </select>
41
42     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.params.KanbanConfParam">
43         select
44         <include refid="Base_Column_List"/>
45         from sys_kanban_conf where 1 = 1
46             <if test="paramCondition.ipAddress != null and paramCondition.ipAddress != ''">
47                 and ip_address like CONCAT('%',#{paramCondition.ipAddress},'%')
48             </if>
49             <if test="paramCondition.lineCode != null and paramCondition.lineCode != ''">
50                 and line_code like CONCAT('%',#{paramCondition.lineCode},'%')
51             </if>
52             <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
53                 and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
54             </if>
55     </select>
56
57     <select id="customPageList" resultType="cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.result.KanbanConfResult" parameterType="cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.params.KanbanConfParam">
58         select
59         <include refid="Base_Column_List"/>
60         from sys_kanban_conf where 1 = 1
61             <if test="paramCondition.ipAddress != null and paramCondition.ipAddress != ''">
62                 and ip_address like CONCAT('%',#{paramCondition.ipAddress},'%')
63             </if>
64             <if test="paramCondition.lineCode != null and paramCondition.lineCode != ''">
65                 and line_code like CONCAT('%',#{paramCondition.lineCode},'%')
66             </if>
67             <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
68                 and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
69             </if>
70     </select>
71
72     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.sys.kanbanConf.model.params.KanbanConfParam">
73         select
74         <include refid="Base_Column_List"/>
75         from sys_kanban_conf where 1 = 1
76             <if test="paramCondition.ipAddress != null and paramCondition.ipAddress != ''">
77                 and ip_address like CONCAT('%',#{paramCondition.ipAddress},'%')
78             </if>
79             <if test="paramCondition.lineCode != null and paramCondition.lineCode != ''">
80                 and line_code like CONCAT('%',#{paramCondition.lineCode},'%')
81             </if>
82             <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
83                 and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
84             </if>
85     </select>
86
87 </mapper>