yantian yue
2023-10-20 4f58ba24b9a7e24dc38aa8eb9ca0b92c83e161ac
提交 | 用户 | 时间
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.formulaChild.mapper.FormulaChildInfoMapper">
4
5     <!-- 通用查询映射结果 -->
6     <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.zsx.bs.formulaChild.entity.FormulaChildInfo">
7         <id column="id" property="id" />
8         <result column="formula_code" property="formulaCode" />
9         <result column="line_code" property="lineCode" />
10         <result column="location_code" property="locationCode" />
11         <result column="product_code" property="productCode" />
12         <result column="operation_steps" property="operationSteps" />
13         <result column="tech_requirement" property="techRequirement" />
14         <result column="operation_type" property="operationType" />
15         <result column="step_sort" property="stepSort" />
16         <result column="param_code" property="paramCode" />
17         <result column="material_code" property="materialCode" />
18         <result column="picture" property="picture" />
19         <result column="remarks" property="remarks" />
20         <result column="spare_field_1" property="spareField1" />
21         <result column="spare_field_2" property="spareField2" />
22         <result column="spare_field_3" property="spareField3" />
23         <result column="spare_field_4" property="spareField4" />
24         <result column="create_user" property="createUser" />
25         <result column="create_time" property="createTime" />
26         <result column="update_user" property="updateUser" />
27         <result column="update_time" property="updateTime" />
28     </resultMap>
29
30     <!-- 通用查询结果列 -->
31     <sql id="Base_Column_List">
32         id AS "id", formula_code AS "formulaCode", line_code AS "lineCode", location_code AS "locationCode", product_code AS "productCode", operation_steps AS "operationSteps", tech_requirement AS "techRequirement", operation_type AS "operationType", step_sort AS "stepSort", param_code AS "paramCode", material_code AS "materialCode", picture AS "picture", remarks AS "remarks", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", spare_field_3 AS "spareField3", spare_field_4 AS "spareField4", create_user AS "createUser", create_time AS "createTime", update_user AS "updateUser", update_time AS "updateTime"
33     </sql>
34
35
36     <select id="customList" resultType="cn.stylefeng.guns.modular.zsx.bs.formulaChild.model.result.FormulaChildInfoResult" parameterType="cn.stylefeng.guns.modular.zsx.bs.formulaChild.model.params.FormulaChildInfoParam">
37         select
38         <include refid="Base_Column_List"/>
39         from bs_formula_child_info where 1 = 1
40             <if test="paramCondition.formulaCode != null and paramCondition.formulaCode != ''">
41                 and formula_code like CONCAT('%',#{paramCondition.formulaCode},'%')
42             </if>
43             <if test="paramCondition.lineCode != null and paramCondition.lineCode != ''">
44                 and line_code like CONCAT('%',#{paramCondition.lineCode},'%')
45             </if>
46             <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
47                 and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
48             </if>
49             <if test="paramCondition.productCode != null and paramCondition.productCode != ''">
50                 and product_code like CONCAT('%',#{paramCondition.productCode},'%')
51             </if>
52             <if test="paramCondition.materialCode != null and paramCondition.materialCode != ''">
53                 and material_code like CONCAT('%',#{paramCondition.materialCode},'%')
54             </if>
55     </select>
56
57     <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.bs.formulaChild.model.params.FormulaChildInfoParam">
58         select
59         <include refid="Base_Column_List"/>
60         from bs_formula_child_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.lineCode != null and paramCondition.lineCode != ''">
65                 and line_code like CONCAT('%',#{paramCondition.lineCode},'%')
66             </if>
67             <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
68                 and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
69             </if>
70             <if test="paramCondition.productCode != null and paramCondition.productCode != ''">
71                 and product_code like CONCAT('%',#{paramCondition.productCode},'%')
72             </if>
73             <if test="paramCondition.materialCode != null and paramCondition.materialCode != ''">
74                 and material_code like CONCAT('%',#{paramCondition.materialCode},'%')
75             </if>
76     </select>
77
78     <select id="customPageList" resultType="cn.stylefeng.guns.modular.zsx.bs.formulaChild.model.result.FormulaChildInfoResult" parameterType="cn.stylefeng.guns.modular.zsx.bs.formulaChild.model.params.FormulaChildInfoParam">
79         select
80         <include refid="Base_Column_List"/>
81         from bs_formula_child_info where 1 = 1
82             <if test="paramCondition.formulaCode != null and paramCondition.formulaCode != ''">
83                 and formula_code like CONCAT('%',#{paramCondition.formulaCode},'%')
84             </if>
85             <if test="paramCondition.lineCode != null and paramCondition.lineCode != ''">
86                 and line_code like CONCAT('%',#{paramCondition.lineCode},'%')
87             </if>
88             <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
89                 and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
90             </if>
91             <if test="paramCondition.productCode != null and paramCondition.productCode != ''">
92                 and product_code like CONCAT('%',#{paramCondition.productCode},'%')
93             </if>
94             <if test="paramCondition.materialCode != null and paramCondition.materialCode != ''">
95                 and material_code like CONCAT('%',#{paramCondition.materialCode},'%')
96             </if>
97     </select>
98
99     <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.bs.formulaChild.model.params.FormulaChildInfoParam">
100         select
101         <include refid="Base_Column_List"/>
102         from bs_formula_child_info where 1 = 1
103             <if test="paramCondition.formulaCode != null and paramCondition.formulaCode != ''">
104                 and formula_code like CONCAT('%',#{paramCondition.formulaCode},'%')
105             </if>
106             <if test="paramCondition.lineCode != null and paramCondition.lineCode != ''">
107                 and line_code like CONCAT('%',#{paramCondition.lineCode},'%')
108             </if>
109             <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''">
110                 and location_code like CONCAT('%',#{paramCondition.locationCode},'%')
111             </if>
112             <if test="paramCondition.productCode != null and paramCondition.productCode != ''">
113                 and product_code like CONCAT('%',#{paramCondition.productCode},'%')
114             </if>
115             <if test="paramCondition.materialCode != null and paramCondition.materialCode != ''">
116                 and material_code like CONCAT('%',#{paramCondition.materialCode},'%')
117             </if>
118     </select>
119
120 </mapper>