懒羊羊
2023-11-14 ee4d94defe7cc7f36f87aebf2e9efed38ba93a40
提交 | 用户 | 时间
1ac2bc 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.codingRule.mapper.CodingRuleMapper">
4
5     <!-- 通用查询映射结果 -->
6     <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.zsx.sys.codingRule.entity.CodingRule">
7         <id column="id" property="id" />
8         <result column="coding_rule_code" property="codingRuleCode" />
9         <result column="coding_rule_desc" property="codingRuleDesc" />
10         <result column="coding_rule_prefix" property="codingRulePrefix" />
11         <result column="enable_date" property="enableDate" />
12         <result column="date_type" property="dateType" />
13         <result column="current_code" property="currentCode" />
14         <result column="code_length" property="codeLength" />
15         <result column="spare_field_1" property="spareField1" />
16         <result column="spare_field_2" property="spareField2" />
17         <result column="remark" property="remark" />
18         <result column="create_user" property="createUser" />
19         <result column="create_time" property="createTime" />
20         <result column="update_user" property="updateUser" />
21         <result column="update_time" property="updateTime" />
22     </resultMap>
23
24     <!-- 通用查询结果列 -->
25     <sql id="Base_Column_List">
26         id AS "id", coding_rule_code AS "codingRuleCode", coding_rule_desc AS "codingRuleDesc", coding_rule_prefix AS "codingRulePrefix", enable_date AS "enableDate", date_type AS "dateType", current_code AS "currentCode", code_length AS "codeLength", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", remark AS "remark", create_user AS "createUser", create_time AS "createTime", update_user AS "updateUser", update_time AS "updateTime"
27     </sql>
28
29
30     <select id="customList" resultType="cn.stylefeng.guns.modular.zsx.sys.codingRule.model.result.CodingRuleResult" parameterType="cn.stylefeng.guns.modular.zsx.sys.codingRule.model.params.CodingRuleParam">
31         select
32         <include refid="Base_Column_List"/>
33         from sys_coding_rule where 1 = 1
34             <if test="paramCondition.codingRuleCode != null and paramCondition.codingRuleCode != ''">
35                 and coding_rule_code like CONCAT('%',#{paramCondition.codingRuleCode},'%')
36             </if>
37             <if test="paramCondition.codingRuleDesc != null and paramCondition.codingRuleDesc != ''">
38                 and coding_rule_desc like CONCAT('%',#{paramCondition.codingRuleDesc},'%')
39             </if>
40             <if test="paramCondition.codingRulePrefix != null and paramCondition.codingRulePrefix != ''">
41                 and coding_rule_prefix like CONCAT('%',#{paramCondition.codingRulePrefix},'%')
42             </if>
43             <if test="paramCondition.enableDate != null and paramCondition.enableDate != ''">
44                 and enable_date like CONCAT('%',#{paramCondition.enableDate},'%')
45             </if>
46     </select>
47
48     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.sys.codingRule.model.params.CodingRuleParam">
49         select
50         <include refid="Base_Column_List"/>
51         from sys_coding_rule where 1 = 1
52             <if test="paramCondition.codingRuleCode != null and paramCondition.codingRuleCode != ''">
53                 and coding_rule_code like CONCAT('%',#{paramCondition.codingRuleCode},'%')
54             </if>
55             <if test="paramCondition.codingRuleDesc != null and paramCondition.codingRuleDesc != ''">
56                 and coding_rule_desc like CONCAT('%',#{paramCondition.codingRuleDesc},'%')
57             </if>
58             <if test="paramCondition.codingRulePrefix != null and paramCondition.codingRulePrefix != ''">
59                 and coding_rule_prefix like CONCAT('%',#{paramCondition.codingRulePrefix},'%')
60             </if>
61             <if test="paramCondition.enableDate != null and paramCondition.enableDate != ''">
62                 and enable_date like CONCAT('%',#{paramCondition.enableDate},'%')
63             </if>
64     </select>
65
66     <select id="customPageList" resultType="cn.stylefeng.guns.modular.zsx.sys.codingRule.model.result.CodingRuleResult" parameterType="cn.stylefeng.guns.modular.zsx.sys.codingRule.model.params.CodingRuleParam">
67         select
68         <include refid="Base_Column_List"/>
69         from sys_coding_rule where 1 = 1
70             <if test="paramCondition.codingRuleCode != null and paramCondition.codingRuleCode != ''">
71                 and coding_rule_code like CONCAT('%',#{paramCondition.codingRuleCode},'%')
72             </if>
73             <if test="paramCondition.codingRuleDesc != null and paramCondition.codingRuleDesc != ''">
74                 and coding_rule_desc like CONCAT('%',#{paramCondition.codingRuleDesc},'%')
75             </if>
76             <if test="paramCondition.codingRulePrefix != null and paramCondition.codingRulePrefix != ''">
77                 and coding_rule_prefix like CONCAT('%',#{paramCondition.codingRulePrefix},'%')
78             </if>
79             <if test="paramCondition.enableDate != null and paramCondition.enableDate != ''">
80                 and enable_date like CONCAT('%',#{paramCondition.enableDate},'%')
81             </if>
82     </select>
83
84     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.sys.codingRule.model.params.CodingRuleParam">
85         select
86         <include refid="Base_Column_List"/>
87         from sys_coding_rule where 1 = 1
88             <if test="paramCondition.codingRuleCode != null and paramCondition.codingRuleCode != ''">
89                 and coding_rule_code like CONCAT('%',#{paramCondition.codingRuleCode},'%')
90             </if>
91             <if test="paramCondition.codingRuleDesc != null and paramCondition.codingRuleDesc != ''">
92                 and coding_rule_desc like CONCAT('%',#{paramCondition.codingRuleDesc},'%')
93             </if>
94             <if test="paramCondition.codingRulePrefix != null and paramCondition.codingRulePrefix != ''">
95                 and coding_rule_prefix like CONCAT('%',#{paramCondition.codingRulePrefix},'%')
96             </if>
97             <if test="paramCondition.enableDate != null and paramCondition.enableDate != ''">
98                 and enable_date like CONCAT('%',#{paramCondition.enableDate},'%')
99             </if>
100     </select>
101
102 </mapper>