提交 | 用户 | 时间
|
bf64f6
|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
A |
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.jcdm.main.da.psConf.mapper.DaPsConfMapper"> |
|
6 |
|
|
7 |
<resultMap type="DaPsConf" id="DaPsConfResult"> |
|
8 |
<result property="id" column="id" /> |
|
9 |
<result property="mfCode" column="mf_code" /> |
|
10 |
<result property="proTypeCode" column="pro_type_code" /> |
|
11 |
<result property="batteryTypeCode" column="battery_type_code" /> |
|
12 |
<result property="specificationsCode" column="specifications_code" /> |
|
13 |
<result property="traceInfoCode" column="trace_info_code" /> |
|
14 |
<result property="proDateCode" column="pro_date_code" /> |
|
15 |
<result property="sfcCode" column="sfc_code" /> |
|
16 |
<result property="state" column="state" /> |
|
17 |
<result property="remarks" column="remarks" /> |
|
18 |
<result property="spareField1" column="spare_field1" /> |
|
19 |
<result property="spareField2" column="spare_field2" /> |
|
20 |
<result property="createUser" column="create_user" /> |
|
21 |
<result property="createTime" column="create_time" /> |
|
22 |
<result property="updateUser" column="update_user" /> |
|
23 |
<result property="updateTime" column="update_time" /> |
|
24 |
</resultMap> |
|
25 |
|
|
26 |
<sql id="selectDaPsConfVo"> |
|
27 |
select id, mf_code, pro_type_code, battery_type_code, specifications_code, trace_info_code, pro_date_code, sfc_code, state, remarks, spare_field1, spare_field2, create_user, create_time, update_user, update_time from da_ps_conf |
|
28 |
</sql> |
|
29 |
|
|
30 |
<select id="selectDaPsConfList" parameterType="DaPsConf" resultMap="DaPsConfResult"> |
|
31 |
<include refid="selectDaPsConfVo"/> |
|
32 |
<where> |
|
33 |
<if test="mfCode != null and mfCode != ''"> and mf_code = #{mfCode}</if> |
|
34 |
<if test="proTypeCode != null and proTypeCode != ''"> and pro_type_code = #{proTypeCode}</if> |
|
35 |
<if test="batteryTypeCode != null and batteryTypeCode != ''"> and battery_type_code = #{batteryTypeCode}</if> |
|
36 |
<if test="specificationsCode != null and specificationsCode != ''"> and specifications_code = #{specificationsCode}</if> |
|
37 |
<if test="traceInfoCode != null and traceInfoCode != ''"> and trace_info_code = #{traceInfoCode}</if> |
|
38 |
<if test="proDateCode != null and proDateCode != ''"> and pro_date_code = #{proDateCode}</if> |
|
39 |
<if test="sfcCode != null and sfcCode != ''"> and sfc_code = #{sfcCode}</if> |
|
40 |
<if test="state != null and state != ''"> and state = #{state}</if> |
|
41 |
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> |
|
42 |
<if test="spareField1 != null and spareField1 != ''"> and spare_field1 = #{spareField1}</if> |
|
43 |
<if test="spareField2 != null and spareField2 != ''"> and spare_field2 = #{spareField2}</if> |
|
44 |
<if test="createUser != null and createUser != ''"> and create_user = #{createUser}</if> |
|
45 |
<if test="updateUser != null and updateUser != ''"> and update_user = #{updateUser}</if> |
|
46 |
</where> |
|
47 |
</select> |
|
48 |
|
|
49 |
<select id="selectDaPsConfById" parameterType="Long" resultMap="DaPsConfResult"> |
|
50 |
<include refid="selectDaPsConfVo"/> |
|
51 |
where id = #{id} |
|
52 |
</select> |
|
53 |
|
|
54 |
<insert id="insertDaPsConf" parameterType="DaPsConf" useGeneratedKeys="true" keyProperty="id"> |
|
55 |
insert into da_ps_conf |
|
56 |
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
57 |
<if test="mfCode != null">mf_code,</if> |
|
58 |
<if test="proTypeCode != null">pro_type_code,</if> |
|
59 |
<if test="batteryTypeCode != null">battery_type_code,</if> |
|
60 |
<if test="specificationsCode != null">specifications_code,</if> |
|
61 |
<if test="traceInfoCode != null">trace_info_code,</if> |
|
62 |
<if test="proDateCode != null">pro_date_code,</if> |
|
63 |
<if test="sfcCode != null">sfc_code,</if> |
|
64 |
<if test="state != null">state,</if> |
|
65 |
<if test="remarks != null">remarks,</if> |
|
66 |
<if test="spareField1 != null">spare_field1,</if> |
|
67 |
<if test="spareField2 != null">spare_field2,</if> |
|
68 |
<if test="createUser != null">create_user,</if> |
|
69 |
<if test="createTime != null">create_time,</if> |
|
70 |
<if test="updateUser != null">update_user,</if> |
|
71 |
<if test="updateTime != null">update_time,</if> |
|
72 |
</trim> |
|
73 |
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
74 |
<if test="mfCode != null">#{mfCode},</if> |
|
75 |
<if test="proTypeCode != null">#{proTypeCode},</if> |
|
76 |
<if test="batteryTypeCode != null">#{batteryTypeCode},</if> |
|
77 |
<if test="specificationsCode != null">#{specificationsCode},</if> |
|
78 |
<if test="traceInfoCode != null">#{traceInfoCode},</if> |
|
79 |
<if test="proDateCode != null">#{proDateCode},</if> |
|
80 |
<if test="sfcCode != null">#{sfcCode},</if> |
|
81 |
<if test="state != null">#{state},</if> |
|
82 |
<if test="remarks != null">#{remarks},</if> |
|
83 |
<if test="spareField1 != null">#{spareField1},</if> |
|
84 |
<if test="spareField2 != null">#{spareField2},</if> |
|
85 |
<if test="createUser != null">#{createUser},</if> |
|
86 |
<if test="createTime != null">#{createTime},</if> |
|
87 |
<if test="updateUser != null">#{updateUser},</if> |
|
88 |
<if test="updateTime != null">#{updateTime},</if> |
|
89 |
</trim> |
|
90 |
</insert> |
|
91 |
|
|
92 |
<update id="updateDaPsConf" parameterType="DaPsConf"> |
|
93 |
update da_ps_conf |
|
94 |
<trim prefix="SET" suffixOverrides=","> |
|
95 |
<if test="mfCode != null">mf_code = #{mfCode},</if> |
|
96 |
<if test="proTypeCode != null">pro_type_code = #{proTypeCode},</if> |
|
97 |
<if test="batteryTypeCode != null">battery_type_code = #{batteryTypeCode},</if> |
|
98 |
<if test="specificationsCode != null">specifications_code = #{specificationsCode},</if> |
|
99 |
<if test="traceInfoCode != null">trace_info_code = #{traceInfoCode},</if> |
|
100 |
<if test="proDateCode != null">pro_date_code = #{proDateCode},</if> |
|
101 |
<if test="sfcCode != null">sfc_code = #{sfcCode},</if> |
|
102 |
<if test="state != null">state = #{state},</if> |
|
103 |
<if test="remarks != null">remarks = #{remarks},</if> |
|
104 |
<if test="spareField1 != null">spare_field1 = #{spareField1},</if> |
|
105 |
<if test="spareField2 != null">spare_field2 = #{spareField2},</if> |
|
106 |
<if test="createUser != null">create_user = #{createUser},</if> |
|
107 |
<if test="createTime != null">create_time = #{createTime},</if> |
|
108 |
<if test="updateUser != null">update_user = #{updateUser},</if> |
|
109 |
<if test="updateTime != null">update_time = #{updateTime},</if> |
|
110 |
</trim> |
|
111 |
where id = #{id} |
|
112 |
</update> |
|
113 |
|
|
114 |
<delete id="deleteDaPsConfById" parameterType="Long"> |
|
115 |
delete from da_ps_conf where id = #{id} |
|
116 |
</delete> |
|
117 |
|
|
118 |
<delete id="deleteDaPsConfByIds" parameterType="String"> |
|
119 |
delete from da_ps_conf where id in |
|
120 |
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
121 |
#{id} |
|
122 |
</foreach> |
|
123 |
</delete> |
|
124 |
</mapper> |