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.kanbanConf.mapper.KanbanConfMapper">
4
5     <!-- 通用查询映射结果 -->
6     <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.sc.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.sc.kanbanConf.model.result.KanbanConfResult" parameterType="cn.stylefeng.guns.modular.sc.kanbanConf.model.params.KanbanConfParam">
28         select
29         <include refid="Base_Column_List"/>
30         from sc_kanban_conf where 1 = 1
31     </select>
32
33     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.sc.kanbanConf.model.params.KanbanConfParam">
34         select
35         <include refid="Base_Column_List"/>
36         from sc_kanban_conf where 1 = 1
37     </select>
38
39     <select id="customPageList" resultType="cn.stylefeng.guns.modular.sc.kanbanConf.model.result.KanbanConfResult" parameterType="cn.stylefeng.guns.modular.sc.kanbanConf.model.params.KanbanConfParam">
40         select
41         <include refid="Base_Column_List"/>
42         from sc_kanban_conf where 1 = 1
43
44         <if test="paramCondition.ipAddress != null and paramCondition.ipAddress != ''">
45             and ip_address = #{paramCondition.ipAddress}
46         </if>
47         <if test="paramCondition.pageCode != null and paramCondition.pageCode != ''">
48             and page_code = #{paramCondition.pageCode}
49         </if>
50         <if test="paramCondition.workshopCode != null and paramCondition.workshopCode != ''">
51             and workshop_code = #{paramCondition.workshopCode}
52         </if>
53         <if test="paramCondition.lineCode != null and paramCondition.lineCode != ''">
54             and line_code = #{paramCondition.pageCode}
55         </if>
56         ORDER BY id desc
57     </select>
58
59     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.sc.kanbanConf.model.params.KanbanConfParam">
60         select
61         <include refid="Base_Column_List"/>
62         from sc_kanban_conf where 1 = 1
63     </select>
64
65 </mapper>