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