提交 | 用户 | 时间
|
20c287
|
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.billion.main.da.mapper.DaTightenCollectionMapper"> |
|
6 |
|
|
7 |
<resultMap type="DaTightenCollection" id="DaTightenCollectionResult"> |
|
8 |
<result property="id" column="id" /> |
|
9 |
<result property="sfcCode" column="sfc_code" /> |
|
10 |
<result property="locationCode" column="location_code" /> |
|
11 |
<result property="paramSetCode" column="param_set_code" /> |
|
12 |
<result property="paramSetName" column="param_set_name" /> |
|
13 |
<result property="torque" column="torque" /> |
|
14 |
<result property="torqueStatus" column="torque_status" /> |
|
15 |
<result property="angle" column="angle" /> |
|
16 |
<result property="angleStatus" column="angle_status" /> |
|
17 |
<result property="collectTime" column="collect_time" /> |
|
18 |
</resultMap> |
|
19 |
|
|
20 |
<sql id="selectDaTightenCollectionVo"> |
|
21 |
select id, sfc_code, location_code, param_set_code, param_set_name, torque, torque_status, angle, angle_status, collect_time from da_tighten_collection |
|
22 |
</sql> |
|
23 |
|
|
24 |
<select id="selectDaTightenCollectionList" parameterType="DaTightenCollection" resultMap="DaTightenCollectionResult"> |
|
25 |
<include refid="selectDaTightenCollectionVo"/> |
|
26 |
<where> |
|
27 |
<if test="sfcCode != null and sfcCode != ''"> and sfc_code = #{sfcCode}</if> |
|
28 |
<if test="locationCode != null and locationCode != ''"> and location_code like concat('%', #{locationCode}, '%')</if> |
|
29 |
<if test="paramSetCode != null and paramSetCode != ''"> and param_set_code like concat('%', #{paramSetCode}, '%')</if> |
|
30 |
<if test="paramSetName != null and paramSetName != ''"> and param_set_name like concat('%', #{paramSetName}, '%')</if> |
|
31 |
<if test="torqueStatus != null and torqueStatus != ''"> and torque_status = #{torqueStatus}</if> |
|
32 |
<if test="angleStatus != null and angleStatus != ''"> and angle_status = #{angleStatus}</if> |
b15739
|
33 |
<if test="startTime != null"> and collect_time BETWEEN #{startTime} and #{stopTime}</if> |
20c287
|
34 |
</where> |
A |
35 |
</select> |
|
36 |
|
|
37 |
<select id="selectDaTightenCollectionById" parameterType="Long" resultMap="DaTightenCollectionResult"> |
|
38 |
<include refid="selectDaTightenCollectionVo"/> |
|
39 |
where id = #{id} |
|
40 |
</select> |
|
41 |
|
|
42 |
<insert id="insertDaTightenCollection" parameterType="DaTightenCollection" useGeneratedKeys="true" keyProperty="id"> |
|
43 |
insert into da_tighten_collection |
|
44 |
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
45 |
<if test="sfcCode != null">sfc_code,</if> |
|
46 |
<if test="locationCode != null">location_code,</if> |
|
47 |
<if test="paramSetCode != null">param_set_code,</if> |
|
48 |
<if test="paramSetName != null">param_set_name,</if> |
|
49 |
<if test="torque != null">torque,</if> |
|
50 |
<if test="torqueStatus != null">torque_status,</if> |
|
51 |
<if test="angle != null">angle,</if> |
|
52 |
<if test="angleStatus != null">angle_status,</if> |
|
53 |
<if test="collectTime != null">collect_time,</if> |
|
54 |
</trim> |
|
55 |
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
56 |
<if test="sfcCode != null">#{sfcCode},</if> |
|
57 |
<if test="locationCode != null">#{locationCode},</if> |
|
58 |
<if test="paramSetCode != null">#{paramSetCode},</if> |
|
59 |
<if test="paramSetName != null">#{paramSetName},</if> |
|
60 |
<if test="torque != null">#{torque},</if> |
|
61 |
<if test="torqueStatus != null">#{torqueStatus},</if> |
|
62 |
<if test="angle != null">#{angle},</if> |
|
63 |
<if test="angleStatus != null">#{angleStatus},</if> |
|
64 |
<if test="collectTime != null">#{collectTime},</if> |
|
65 |
</trim> |
|
66 |
</insert> |
|
67 |
|
|
68 |
<update id="updateDaTightenCollection" parameterType="DaTightenCollection"> |
|
69 |
update da_tighten_collection |
|
70 |
<trim prefix="SET" suffixOverrides=","> |
|
71 |
<if test="sfcCode != null">sfc_code = #{sfcCode},</if> |
|
72 |
<if test="locationCode != null">location_code = #{locationCode},</if> |
|
73 |
<if test="paramSetCode != null">param_set_code = #{paramSetCode},</if> |
|
74 |
<if test="paramSetName != null">param_set_name = #{paramSetName},</if> |
|
75 |
<if test="torque != null">torque = #{torque},</if> |
|
76 |
<if test="torqueStatus != null">torque_status = #{torqueStatus},</if> |
|
77 |
<if test="angle != null">angle = #{angle},</if> |
|
78 |
<if test="angleStatus != null">angle_status = #{angleStatus},</if> |
|
79 |
<if test="collectTime != null">collect_time = #{collectTime},</if> |
|
80 |
</trim> |
|
81 |
where id = #{id} |
|
82 |
</update> |
|
83 |
|
|
84 |
<delete id="deleteDaTightenCollectionById" parameterType="Long"> |
|
85 |
delete from da_tighten_collection where id = #{id} |
|
86 |
</delete> |
|
87 |
|
|
88 |
<delete id="deleteDaTightenCollectionByIds" parameterType="String"> |
|
89 |
delete from da_tighten_collection where id in |
|
90 |
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
91 |
#{id} |
|
92 |
</foreach> |
|
93 |
</delete> |
|
94 |
</mapper> |