懒羊羊
2023-09-19 3d2401cf8ea9ae3d830c0568e7751e2e8cc8db22
提交 | 用户 | 时间
3d2401 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.bs.custom.mapper.CustomInfoMapper">
4
5     <!-- 通用查询映射结果 -->
6     <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.zsx.bs.custom.entity.CustomInfo">
7         <id column="id" property="id" />
8         <result column="customer_code" property="customerCode" />
9         <result column="customer_name" property="customerName" />
10         <result column="customer_type" property="customerType" />
11         <result column="contact" property="contact" />
12         <result column="remarks" property="remarks" />
13         <result column="create_time" property="createTime" />
14         <result column="create_user" property="createUser" />
15         <result column="update_time" property="updateTime" />
16         <result column="update_user" property="updateUser" />
17     </resultMap>
18
19     <!-- 通用查询结果列 -->
20     <sql id="Base_Column_List">
21         id AS "id", customer_code AS "customerCode", customer_name AS "customerName", customer_type AS "customerType", contact AS "contact", remarks AS "remarks", create_time AS "createTime", create_user AS "createUser", update_time AS "updateTime", update_user AS "updateUser"
22     </sql>
23
24
25     <select id="customList" resultType="cn.stylefeng.guns.modular.zsx.bs.custom.model.result.CustomInfoResult" parameterType="cn.stylefeng.guns.modular.zsx.bs.custom.model.params.CustomInfoParam">
26         select
27         <include refid="Base_Column_List"/>
28         from bs_custom_info where 1 = 1
29         <if test="paramCondition.customerCode != null and paramCondition.customerCode != ''">
30             and customer_code like CONCAT('%',#{paramCondition.customerCode},'%')
31         </if>
32         <if test="paramCondition.customerName != null and paramCondition.customerName != ''">
33             and customer_name like CONCAT('%',#{paramCondition.customerName},'%')
34         </if>
35         <if test="paramCondition.customerType != null and paramCondition.customerType != ''">
36             and customer_type like CONCAT('%',#{paramCondition.customerType},'%')
37         </if>
38     </select>
39
40     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.bs.custom.model.params.CustomInfoParam">
41         select
42         <include refid="Base_Column_List"/>
43         from bs_custom_info where 1 = 1
44         <if test="paramCondition.customerCode != null and paramCondition.customerCode != ''">
45             and customer_code like CONCAT('%',#{paramCondition.customerCode},'%')
46         </if>
47         <if test="paramCondition.customerName != null and paramCondition.customerName != ''">
48             and customer_name like CONCAT('%',#{paramCondition.customerName},'%')
49         </if>
50         <if test="paramCondition.customerType != null and paramCondition.customerType != ''">
51             and customer_type like CONCAT('%',#{paramCondition.customerType},'%')
52         </if>
53     </select>
54
55     <select id="customPageList" resultType="cn.stylefeng.guns.modular.zsx.bs.custom.model.result.CustomInfoResult" parameterType="cn.stylefeng.guns.modular.zsx.bs.custom.model.params.CustomInfoParam">
56         select
57         <include refid="Base_Column_List"/>
58         from bs_custom_info where 1 = 1
59         <if test="paramCondition.customerCode != null and paramCondition.customerCode != ''">
60             and customer_code like CONCAT('%',#{paramCondition.customerCode},'%')
61         </if>
62         <if test="paramCondition.customerName != null and paramCondition.customerName != ''">
63             and customer_name like CONCAT('%',#{paramCondition.customerName},'%')
64         </if>
65         <if test="paramCondition.customerType != null and paramCondition.customerType != ''">
66             and customer_type like CONCAT('%',#{paramCondition.customerType},'%')
67         </if>
68     </select>
69
70     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.bs.custom.model.params.CustomInfoParam">
71         select
72         <include refid="Base_Column_List"/>
73         from bs_custom_info where 1 = 1
74         <if test="paramCondition.customerCode != null and paramCondition.customerCode != ''">
75             and customer_code like CONCAT('%',#{paramCondition.customerCode},'%')
76         </if>
77         <if test="paramCondition.customerName != null and paramCondition.customerName != ''">
78             and customer_name like CONCAT('%',#{paramCondition.customerName},'%')
79         </if>
80         <if test="paramCondition.customerType != null and paramCondition.customerType != ''">
81             and customer_type like CONCAT('%',#{paramCondition.customerType},'%')
82         </if>
83     </select>
84
85 </mapper>