提交 | 用户 | 时间
|
5030f3
|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
Y |
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.tileMatchMiddleware.mapper.DaTileMatchMiddlewareMapper"> |
|
6 |
<resultMap type="DaTileMatchMiddleware" id="DaTileMatchMiddlewareResult"> |
|
7 |
<result property="id" column="id" /> |
|
8 |
<result property="sfcCode" column="sfc_code" /> |
|
9 |
<result property="palletNo" column="Pallet_no" /> |
|
10 |
<result property="crankshaftNo" column="crankshaft_no" /> |
|
11 |
<result property="state" column="state" /> |
|
12 |
<result property="remarks" column="remarks" /> |
|
13 |
<result property="connectingrodNo" column="connectingRod_no" /> |
|
14 |
<result property="cylinder" column="cylinder" /> |
|
15 |
</resultMap> |
|
16 |
|
|
17 |
<sql id="selectDaTileMatchMiddlewareVo"> |
|
18 |
select id, sfc_code, Pallet_no, crankshaft_no, state, remarks, connectingRod_no, cylinder from da_tile_match_middleware |
|
19 |
</sql> |
|
20 |
|
|
21 |
<select id="selectDaTileMatchMiddlewareList" parameterType="DaTileMatchMiddleware" resultMap="DaTileMatchMiddlewareResult"> |
|
22 |
<include refid="selectDaTileMatchMiddlewareVo"/> |
|
23 |
<where> |
|
24 |
<if test="sfcCode != null and sfcCode != ''"> and sfc_code = #{sfcCode}</if> |
|
25 |
<if test="palletNo != null and palletNo != ''"> and Pallet_no = #{palletNo}</if> |
|
26 |
<if test="crankshaftNo != null and crankshaftNo != ''"> and crankshaft_no = #{crankshaftNo}</if> |
|
27 |
<if test="state != null "> and state = #{state}</if> |
|
28 |
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> |
|
29 |
<if test="connectingrodNo != null and connectingrodNo != ''"> and connectingRod_no = #{connectingrodNo}</if> |
|
30 |
<if test="cylinder != null "> and cylinder = #{cylinder}</if> |
|
31 |
</where> |
|
32 |
</select> |
|
33 |
|
|
34 |
<select id="selectDaTileMatchMiddlewareById" parameterType="Long" resultMap="DaTileMatchMiddlewareResult"> |
|
35 |
<include refid="selectDaTileMatchMiddlewareVo"/> |
|
36 |
where id = #{id} |
|
37 |
</select> |
|
38 |
|
|
39 |
<insert id="insertDaTileMatchMiddleware" parameterType="DaTileMatchMiddleware"> |
|
40 |
insert into da_tile_match_middleware |
|
41 |
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
42 |
<if test="id != null">id,</if> |
|
43 |
<if test="sfcCode != null">sfc_code,</if> |
|
44 |
<if test="palletNo != null">Pallet_no,</if> |
|
45 |
<if test="crankshaftNo != null">crankshaft_no,</if> |
|
46 |
<if test="state != null">state,</if> |
|
47 |
<if test="remarks != null">remarks,</if> |
|
48 |
<if test="connectingrodNo != null">connectingRod_no,</if> |
|
49 |
<if test="cylinder != null">cylinder,</if> |
|
50 |
</trim> |
|
51 |
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
52 |
<if test="id != null">#{id},</if> |
|
53 |
<if test="sfcCode != null">#{sfcCode},</if> |
|
54 |
<if test="palletNo != null">#{palletNo},</if> |
|
55 |
<if test="crankshaftNo != null">#{crankshaftNo},</if> |
|
56 |
<if test="state != null">#{state},</if> |
|
57 |
<if test="remarks != null">#{remarks},</if> |
|
58 |
<if test="connectingrodNo != null">#{connectingrodNo},</if> |
|
59 |
<if test="cylinder != null">#{cylinder},</if> |
|
60 |
</trim> |
|
61 |
</insert> |
|
62 |
|
|
63 |
<update id="updateDaTileMatchMiddleware" parameterType="DaTileMatchMiddleware"> |
|
64 |
update da_tile_match_middleware |
|
65 |
<trim prefix="SET" suffixOverrides=","> |
|
66 |
<if test="sfcCode != null">sfc_code = #{sfcCode},</if> |
|
67 |
<if test="palletNo != null">Pallet_no = #{palletNo},</if> |
|
68 |
<if test="crankshaftNo != null">crankshaft_no = #{crankshaftNo},</if> |
|
69 |
<if test="state != null">state = #{state},</if> |
|
70 |
<if test="remarks != null">remarks = #{remarks},</if> |
|
71 |
<if test="connectingrodNo != null">connectingRod_no = #{connectingrodNo},</if> |
|
72 |
<if test="cylinder != null">cylinder = #{cylinder},</if> |
|
73 |
</trim> |
|
74 |
where id = #{id} |
|
75 |
</update> |
|
76 |
|
|
77 |
<delete id="deleteDaTileMatchMiddlewareById" parameterType="Long"> |
|
78 |
delete from da_tile_match_middleware where id = #{id} |
|
79 |
</delete> |
|
80 |
|
|
81 |
<delete id="deleteDaTileMatchMiddlewareByIds" parameterType="String"> |
|
82 |
delete from da_tile_match_middleware where id in |
|
83 |
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
84 |
#{id} |
|
85 |
</foreach> |
|
86 |
</delete> |
|
87 |
</mapper> |