懒羊羊
2023-08-30 71e81ed1d12e4d69f53c8ad9e066650ad4186293
提交 | 用户 | 时间
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.bs.collectionParamConf.mapper.CollectionParamConfMapper">
4
5     <!-- 通用查询映射结果 -->
6     <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.bs.collectionParamConf.entity.CollectionParamConf">
7         <id column="id" property="id" />
8         <result column="param_code" property="paramCode" />
9         <result column="production_line" property="productionLine" />
10         <result column="location_code" property="locationCode" />
11         <result column="equipment_no" property="equipmentNo" />
12         <result column="data_type" property="dataType" />
13         <result column="unit" property="unit" />
14         <result column="param_upper" property="paramUpper" />
15         <result column="param_lower" property="paramLower" />
16         <result column="param_Central" property="paramCentral" />
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="create_time" property="createTime" />
22         <result column="update_user" property="updateUser" />
23         <result column="update_time" property="updateTime" />
24
25         <result column="product_code" property="productCode" />
26         <result column="gather_address" property="gatherAddress" />
27         <result column="gather_sequence" property="gatherSequence" />
28         <result column="param_name" property="paramName" />
29
30     </resultMap>
31
32     <!-- 通用查询结果列 -->
33     <sql id="Base_Column_List">
34         param_name AS "paramName",gather_sequence AS "gatherSequence",gather_address AS "gatherAddress",product_code AS "productCode",id AS "id", param_code AS "paramCode", production_line AS "productionLine", location_code AS "locationCode", equipment_no AS "equipmentNo", data_type AS "dataType", unit AS "unit", param_upper AS "paramUpper", param_lower AS "paramLower", param_Central AS "paramCentral", 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"
35     </sql>
36
37
38     <select id="customList" resultType="cn.stylefeng.guns.modular.bs.collectionParamConf.model.result.CollectionParamConfResult" parameterType="cn.stylefeng.guns.modular.bs.collectionParamConf.model.params.CollectionParamConfParam">
39         select
40         <include refid="Base_Column_List"/>
41         from bs_collection_param_conf where 1 = 1
42         <if test="paramCondition.paramCode != null and paramCondition.paramCode != ''">
43             and param_code like CONCAT('%',#{paramCondition.paramCode},'%')
44         </if>
45         <if test="paramCondition.productionLine != null and paramCondition.productionLine != ''">
46             and production_line like CONCAT('%',#{paramCondition.productionLine},'%')
47         </if>
48         <if test="paramCondition.equipmentNo != null and paramCondition.equipmentNo != ''">
49             and equipment_no like CONCAT('%',#{paramCondition.equipmentNo},'%')
50         </if>
51         <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
52             and location_code = #{paramCondition.locationCode}
53         </if>
54         <if test="paramCondition.productCode != null and paramCondition.productCode != ''">
55             and product_code like CONCAT('%',#{paramCondition.productCode},'%')
56         </if>
57     </select>
58
59     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.bs.collectionParamConf.model.params.CollectionParamConfParam">
60         select
61         <include refid="Base_Column_List"/>
62         from bs_collection_param_conf where 1 = 1
63     </select>
64
65     <select id="customPageList" resultType="cn.stylefeng.guns.modular.bs.collectionParamConf.model.result.CollectionParamConfResult" parameterType="cn.stylefeng.guns.modular.bs.collectionParamConf.model.params.CollectionParamConfParam">
66         select
67         <include refid="Base_Column_List"/>
68         from bs_collection_param_conf where 1 = 1
69         <if test="paramCondition.paramCode != null and paramCondition.paramCode != ''">
70             and param_code like CONCAT('%',#{paramCondition.paramCode},'%')
71         </if>
72         <if test="paramCondition.productionLine != null and paramCondition.productionLine != ''">
73             and production_line like CONCAT('%',#{paramCondition.productionLine},'%')
74         </if>
75         <if test="paramCondition.equipmentNo != null and paramCondition.equipmentNo != ''">
76             and equipment_no like CONCAT('%',#{paramCondition.equipmentNo},'%')
77         </if>
78         <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
79             and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
80         </if>
81     </select>
82
83     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.bs.collectionParamConf.model.params.CollectionParamConfParam">
84         select
85         <include refid="Base_Column_List"/>
86         from bs_collection_param_conf where 1 = 1
87     </select>
88
89 </mapper>