懒羊羊
2023-11-14 8286c62256f23bc2367a6729c0f46f84215e380b
提交 | 用户 | 时间
8286c6 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.sm.scrapCategoryConf.mapper.ScrapCategoryConfMapper">
4
5     <!-- 通用查询映射结果 -->
6     <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.sm.scrapCategoryConf.entity.ScrapCategoryConf">
7         <id column="id" property="id" />
8         <result column="line_code" property="lineCode" />
9         <result column="line_name" property="lineName" />
10         <result column="location_code" property="locationCode" />
11         <result column="location_name" property="locationName" />
12         <result column="scrap_category" property="scrapCategory" />
13         <result column="scrap_reason" property="scrapReason" />
14         <result column="state" property="state" />
15         <result column="spare_field_1" property="spareField1" />
16         <result column="spare_field_2" property="spareField2" />
17         <result column="remarks" property="remarks" />
18         <result column="create_user" property="createUser" />
19         <result column="update_user" property="updateUser" />
20         <result column="update_time" property="updateTime" />
21         <result column="create_time" property="createTime" />
22     </resultMap>
23
24     <!-- 通用查询结果列 -->
25     <sql id="Base_Column_List">
26         id AS "id", line_code AS "lineCode", line_name AS "lineName", location_code AS "locationCode", location_name AS "locationName", scrap_category AS "scrapCategory", scrap_reason AS "scrapReason", state AS "state", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", remarks AS "remarks", create_user AS "createUser", update_user AS "updateUser", update_time AS "updateTime", create_time AS "createTime"
27     </sql>
28
29
30     <select id="customList" resultType="cn.stylefeng.guns.modular.sm.scrapCategoryConf.model.result.ScrapCategoryConfResult" parameterType="cn.stylefeng.guns.modular.sm.scrapCategoryConf.model.params.ScrapCategoryConfParam">
31         select
32         <include refid="Base_Column_List"/>
33         from sm_scrap_category_conf where 1 = 1
34             <if test="paramCondition.lineCode != null and paramCondition.lineCode != ''">
35                 and line_code like CONCAT('%',#{paramCondition.lineCode},'%')
36             </if>
37             <if test="paramCondition.lineName != null and paramCondition.lineName != ''">
38                 and line_name like CONCAT('%',#{paramCondition.lineName},'%')
39             </if>
40             <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
41                 and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
42             </if>
43     </select>
44
45     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.sm.scrapCategoryConf.model.params.ScrapCategoryConfParam">
46         select
47         <include refid="Base_Column_List"/>
48         from sm_scrap_category_conf where 1 = 1
49             <if test="paramCondition.lineCode != null and paramCondition.lineCode != ''">
50                 and line_code like CONCAT('%',#{paramCondition.lineCode},'%')
51             </if>
52             <if test="paramCondition.lineName != null and paramCondition.lineName != ''">
53                 and line_name like CONCAT('%',#{paramCondition.lineName},'%')
54             </if>
55             <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
56                 and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
57             </if>
58     </select>
59
60     <select id="customPageList" resultType="cn.stylefeng.guns.modular.sm.scrapCategoryConf.model.result.ScrapCategoryConfResult" parameterType="cn.stylefeng.guns.modular.sm.scrapCategoryConf.model.params.ScrapCategoryConfParam">
61         select
62         <include refid="Base_Column_List"/>
63         from sm_scrap_category_conf where 1 = 1
64             <if test="paramCondition.lineCode != null and paramCondition.lineCode != ''">
65                 and line_code like CONCAT('%',#{paramCondition.lineCode},'%')
66             </if>
67             <if test="paramCondition.lineName != null and paramCondition.lineName != ''">
68                 and line_name like CONCAT('%',#{paramCondition.lineName},'%')
69             </if>
70             <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
71                 and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
72             </if>
73     </select>
74
75     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.sm.scrapCategoryConf.model.params.ScrapCategoryConfParam">
76         select
77         <include refid="Base_Column_List"/>
78         from sm_scrap_category_conf where 1 = 1
79             <if test="paramCondition.lineCode != null and paramCondition.lineCode != ''">
80                 and line_code like CONCAT('%',#{paramCondition.lineCode},'%')
81             </if>
82             <if test="paramCondition.lineName != null and paramCondition.lineName != ''">
83                 and line_name like CONCAT('%',#{paramCondition.lineName},'%')
84             </if>
85             <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
86                 and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
87             </if>
88     </select>
89
90 </mapper>