提交 | 用户 | 时间
|
fb3b3e
|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
吴 |
2 |
<!DOCTYPE mapper |
|
3 |
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
4 |
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
5 |
<mapper namespace="com.billion.main.bs.mapper.BsFormulaChildInfoMapper"> |
|
6 |
|
|
7 |
<resultMap type="BsFormulaChildInfo" id="BsFormulaChildInfoResult"> |
|
8 |
<result property="id" column="id" /> |
|
9 |
<result property="lineCode" column="line_code" /> |
|
10 |
<result property="locationCode" column="location_code" /> |
|
11 |
<result property="productCode" column="product_code" /> |
|
12 |
<result property="operationContent" column="operation_content" /> |
|
13 |
<result property="operationType" column="operation_type" /> |
|
14 |
<result property="stepSort" column="step_sort" /> |
|
15 |
<result property="paramCode" column="param_code" /> |
|
16 |
<result property="picture" column="picture" /> |
|
17 |
<result property="remarks" column="remarks" /> |
|
18 |
<result property="createBy" column="create_by" /> |
|
19 |
<result property="createTime" column="create_time" /> |
|
20 |
<result property="updateBy" column="update_by" /> |
|
21 |
<result property="updateTime" column="update_time" /> |
|
22 |
<result property="collectData" column="collect_data" /> |
|
23 |
<result property="results" column="results" /> |
|
24 |
<result property="formulaCode" column="formula_code" /> |
|
25 |
<result property="delFlag" column="del_flag" /> |
|
26 |
</resultMap> |
|
27 |
|
|
28 |
<sql id="selectBsFormulaChildInfoVo"> |
|
29 |
select id, line_code, location_code, product_code, operation_content, operation_type, step_sort, param_code, picture, remarks, create_by, create_time, update_by, update_time, collect_data, results, formula_code, del_flag from bs_formula_child_info |
|
30 |
</sql> |
|
31 |
|
|
32 |
<select id="selectBsFormulaChildInfoList" parameterType="BsFormulaChildInfo" resultMap="BsFormulaChildInfoResult"> |
|
33 |
<include refid="selectBsFormulaChildInfoVo"/> |
|
34 |
<where> |
|
35 |
<if test="lineCode != null and lineCode != ''"> and line_code = #{lineCode}</if> |
|
36 |
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if> |
|
37 |
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if> |
|
38 |
<if test="operationType != null and operationType != ''"> and operation_type = #{operationType}</if> |
|
39 |
<if test="stepSort != null "> and step_sort = #{stepSort}</if> |
|
40 |
<if test="paramCode != null and paramCode != ''"> and param_code = #{paramCode}</if> |
|
41 |
<if test="formulaCode != null and formulaCode != ''"> and formula_code = #{formulaCode}</if> |
|
42 |
and del_flag = "0" |
|
43 |
</where> |
|
44 |
</select> |
|
45 |
|
|
46 |
<select id="selectBsFormulaChildInfoById" parameterType="Long" resultMap="BsFormulaChildInfoResult"> |
|
47 |
<include refid="selectBsFormulaChildInfoVo"/> |
|
48 |
where id = #{id} |
|
49 |
and del_flag = "0" |
|
50 |
</select> |
|
51 |
|
|
52 |
<insert id="insertBsFormulaChildInfo" parameterType="BsFormulaChildInfo"> |
|
53 |
insert into bs_formula_child_info |
|
54 |
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
55 |
<if test="id != null">id,</if> |
|
56 |
<if test="lineCode != null and lineCode != ''">line_code,</if> |
|
57 |
<if test="locationCode != null and locationCode != ''">location_code,</if> |
|
58 |
<if test="productCode != null and productCode != ''">product_code,</if> |
|
59 |
<if test="operationContent != null and operationContent != ''">operation_content,</if> |
|
60 |
<if test="operationType != null and operationType != ''">operation_type,</if> |
|
61 |
<if test="stepSort != null">step_sort,</if> |
|
62 |
<if test="paramCode != null and paramCode != ''">param_code,</if> |
|
63 |
<if test="picture != null">picture,</if> |
|
64 |
<if test="remarks != null">remarks,</if> |
|
65 |
<if test="createBy != null">create_by,</if> |
|
66 |
<if test="createTime != null">create_time,</if> |
|
67 |
<if test="updateBy != null">update_by,</if> |
|
68 |
<if test="updateTime != null">update_time,</if> |
|
69 |
<if test="collectData != null">collect_data,</if> |
|
70 |
<if test="results != null">results,</if> |
|
71 |
<if test="formulaCode != null">formula_code,</if> |
|
72 |
<if test="delFlag != null">del_flag,</if> |
|
73 |
</trim> |
|
74 |
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
75 |
<if test="id != null">#{id},</if> |
|
76 |
<if test="lineCode != null and lineCode != ''">#{lineCode},</if> |
|
77 |
<if test="locationCode != null and locationCode != ''">#{locationCode},</if> |
|
78 |
<if test="productCode != null and productCode != ''">#{productCode},</if> |
|
79 |
<if test="operationContent != null and operationContent != ''">#{operationContent},</if> |
|
80 |
<if test="operationType != null and operationType != ''">#{operationType},</if> |
|
81 |
<if test="stepSort != null">#{stepSort},</if> |
|
82 |
<if test="paramCode != null and paramCode != ''">#{paramCode},</if> |
|
83 |
<if test="picture != null">#{picture},</if> |
|
84 |
<if test="remarks != null">#{remarks},</if> |
|
85 |
<if test="createBy != null">#{createBy},</if> |
|
86 |
<if test="createTime != null">#{createTime},</if> |
|
87 |
<if test="updateBy != null">#{updateBy},</if> |
|
88 |
<if test="updateTime != null">#{updateTime},</if> |
|
89 |
<if test="collectData != null">#{collectData},</if> |
|
90 |
<if test="results != null">#{results},</if> |
|
91 |
<if test="formulaCode != null">#{formulaCode},</if> |
|
92 |
<if test="delFlag != null">#{delFlag},</if> |
|
93 |
</trim> |
|
94 |
</insert> |
|
95 |
|
|
96 |
<update id="updateBsFormulaChildInfo" parameterType="BsFormulaChildInfo"> |
|
97 |
update bs_formula_child_info |
|
98 |
<trim prefix="SET" suffixOverrides=","> |
|
99 |
<if test="lineCode != null and lineCode != ''">line_code = #{lineCode},</if> |
|
100 |
<if test="locationCode != null and locationCode != ''">location_code = #{locationCode},</if> |
|
101 |
<if test="productCode != null and productCode != ''">product_code = #{productCode},</if> |
|
102 |
<if test="operationContent != null and operationContent != ''">operation_content = #{operationContent},</if> |
|
103 |
<if test="operationType != null and operationType != ''">operation_type = #{operationType},</if> |
|
104 |
<if test="stepSort != null">step_sort = #{stepSort},</if> |
|
105 |
<if test="paramCode != null and paramCode != ''">param_code = #{paramCode},</if> |
|
106 |
<if test="picture != null">picture = #{picture},</if> |
|
107 |
<if test="remarks != null">remarks = #{remarks},</if> |
|
108 |
<if test="createBy != null">create_by = #{createBy},</if> |
|
109 |
<if test="createTime != null">create_time = #{createTime},</if> |
|
110 |
<if test="updateBy != null">update_by = #{updateBy},</if> |
|
111 |
<if test="updateTime != null">update_time = #{updateTime},</if> |
|
112 |
<if test="collectData != null">collect_data = #{collectData},</if> |
|
113 |
<if test="results != null">results = #{results},</if> |
|
114 |
<if test="formulaCode != null">formula_code = #{formulaCode},</if> |
|
115 |
<if test="delFlag != null">del_flag = #{delFlag},</if> |
|
116 |
</trim> |
|
117 |
where id = #{id} |
|
118 |
</update> |
|
119 |
|
|
120 |
<update id="deleteBsFormulaChildInfoById" parameterType="Long"> |
|
121 |
update bs_formula_child_info set del_flag = "1" where id = #{id} |
|
122 |
</update> |
|
123 |
|
|
124 |
<update id="deleteBsFormulaChildInfoByIds" parameterType="String"> |
|
125 |
update bs_formula_child_info set del_flag = "1" where id in |
|
126 |
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
127 |
#{id} |
|
128 |
</foreach> |
|
129 |
</update> |
|
130 |
</mapper> |