提交 | 用户 | 时间
|
fd2207
|
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.jcdm.main.sc.stationConf.mapper.ScStationConfMapper"> |
|
6 |
|
|
7 |
<resultMap type="ScStationConf" id="ScStationConfResult"> |
|
8 |
<result property="id" column="id" /> |
|
9 |
<result property="processesCode" column="processes_code" /> |
|
10 |
<result property="processesName" column="processes_name" /> |
|
11 |
<result property="processesType" column="processes_type" /> |
|
12 |
<result property="ipAddress" column="ip_address" /> |
|
13 |
<result property="spareField1" column="spare_field_1" /> |
|
14 |
<result property="spareField2" column="spare_field_2" /> |
|
15 |
<result property="spareField3" column="spare_field_3" /> |
|
16 |
<result property="spareField4" column="spare_field_4" /> |
|
17 |
<result property="createUser" column="create_user" /> |
|
18 |
<result property="createTime" column="create_time" /> |
|
19 |
<result property="updateUser" column="update_user" /> |
|
20 |
<result property="updateTime" column="update_time" /> |
|
21 |
<result property="remarks" column="remarks" /> |
14e848
|
22 |
<result property="macAddress" column="mac_address" /> |
fd2207
|
23 |
</resultMap> |
懒 |
24 |
|
|
25 |
<sql id="selectScStationConfVo"> |
14e848
|
26 |
select id, processes_code, mac_address,processes_name, processes_type, ip_address, spare_field_1, spare_field_2, spare_field_3, spare_field_4, create_user, create_time, update_user, update_time, remarks from sc_station_conf |
fd2207
|
27 |
</sql> |
懒 |
28 |
|
|
29 |
<select id="selectScStationConfList" parameterType="ScStationConf" resultMap="ScStationConfResult"> |
|
30 |
<include refid="selectScStationConfVo"/> |
|
31 |
<where> |
14e848
|
32 |
<if test="macAddress != null and macAddress != ''"> and mac_adress = #{macAddress}</if> |
fd2207
|
33 |
<if test="processesCode != null and processesCode != ''"> and processes_code = #{processesCode}</if> |
懒 |
34 |
<if test="processesName != null and processesName != ''"> and processes_name like concat('%', #{processesName}, '%')</if> |
|
35 |
<if test="processesType != null and processesType != ''"> and processes_type = #{processesType}</if> |
|
36 |
<if test="ipAddress != null and ipAddress != ''"> and ip_address = #{ipAddress}</if> |
|
37 |
<if test="spareField1 != null and spareField1 != ''"> and spare_field_1 = #{spareField1}</if> |
|
38 |
<if test="spareField2 != null and spareField2 != ''"> and spare_field_2 = #{spareField2}</if> |
|
39 |
<if test="spareField3 != null and spareField3 != ''"> and spare_field_3 = #{spareField3}</if> |
|
40 |
<if test="spareField4 != null and spareField4 != ''"> and spare_field_4 = #{spareField4}</if> |
|
41 |
<if test="createUser != null and createUser != ''"> and create_user = #{createUser}</if> |
|
42 |
<if test="updateUser != null and updateUser != ''"> and update_user = #{updateUser}</if> |
|
43 |
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> |
|
44 |
</where> |
|
45 |
</select> |
|
46 |
|
|
47 |
<select id="selectScStationConfById" parameterType="Long" resultMap="ScStationConfResult"> |
|
48 |
<include refid="selectScStationConfVo"/> |
|
49 |
where id = #{id} |
|
50 |
</select> |
|
51 |
|
|
52 |
<insert id="insertScStationConf" parameterType="ScStationConf" useGeneratedKeys="true" keyProperty="id"> |
|
53 |
insert into sc_station_conf |
|
54 |
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
55 |
<if test="processesCode != null">processes_code,</if> |
14e848
|
56 |
<if test="macAddress != null">mac_address,</if> |
fd2207
|
57 |
<if test="processesName != null">processes_name,</if> |
懒 |
58 |
<if test="processesType != null">processes_type,</if> |
|
59 |
<if test="ipAddress != null">ip_address,</if> |
|
60 |
<if test="spareField1 != null">spare_field_1,</if> |
|
61 |
<if test="spareField2 != null">spare_field_2,</if> |
|
62 |
<if test="spareField3 != null">spare_field_3,</if> |
|
63 |
<if test="spareField4 != null">spare_field_4,</if> |
|
64 |
<if test="createUser != null">create_user,</if> |
|
65 |
<if test="createTime != null">create_time,</if> |
|
66 |
<if test="updateUser != null">update_user,</if> |
|
67 |
<if test="updateTime != null">update_time,</if> |
|
68 |
<if test="remarks != null">remarks,</if> |
|
69 |
</trim> |
|
70 |
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
71 |
<if test="processesCode != null">#{processesCode},</if> |
14e848
|
72 |
<if test="macAddress != null">#{macAddress},</if> |
fd2207
|
73 |
<if test="processesName != null">#{processesName},</if> |
懒 |
74 |
<if test="processesType != null">#{processesType},</if> |
|
75 |
<if test="ipAddress != null">#{ipAddress},</if> |
|
76 |
<if test="spareField1 != null">#{spareField1},</if> |
|
77 |
<if test="spareField2 != null">#{spareField2},</if> |
|
78 |
<if test="spareField3 != null">#{spareField3},</if> |
|
79 |
<if test="spareField4 != null">#{spareField4},</if> |
|
80 |
<if test="createUser != null">#{createUser},</if> |
|
81 |
<if test="createTime != null">#{createTime},</if> |
|
82 |
<if test="updateUser != null">#{updateUser},</if> |
|
83 |
<if test="updateTime != null">#{updateTime},</if> |
|
84 |
<if test="remarks != null">#{remarks},</if> |
|
85 |
</trim> |
|
86 |
</insert> |
|
87 |
|
|
88 |
<update id="updateScStationConf" parameterType="ScStationConf"> |
|
89 |
update sc_station_conf |
|
90 |
<trim prefix="SET" suffixOverrides=","> |
|
91 |
<if test="processesCode != null">processes_code = #{processesCode},</if> |
|
92 |
<if test="processesName != null">processes_name = #{processesName},</if> |
14e848
|
93 |
<if test="macAddress != null">mac_address = #{macAddress},</if> |
fd2207
|
94 |
<if test="processesType != null">processes_type = #{processesType},</if> |
懒 |
95 |
<if test="ipAddress != null">ip_address = #{ipAddress},</if> |
|
96 |
<if test="spareField1 != null">spare_field_1 = #{spareField1},</if> |
|
97 |
<if test="spareField2 != null">spare_field_2 = #{spareField2},</if> |
|
98 |
<if test="spareField3 != null">spare_field_3 = #{spareField3},</if> |
|
99 |
<if test="spareField4 != null">spare_field_4 = #{spareField4},</if> |
|
100 |
<if test="createUser != null">create_user = #{createUser},</if> |
|
101 |
<if test="createTime != null">create_time = #{createTime},</if> |
|
102 |
<if test="updateUser != null">update_user = #{updateUser},</if> |
|
103 |
<if test="updateTime != null">update_time = #{updateTime},</if> |
|
104 |
<if test="remarks != null">remarks = #{remarks},</if> |
|
105 |
</trim> |
|
106 |
where id = #{id} |
|
107 |
</update> |
|
108 |
|
|
109 |
<delete id="deleteScStationConfById" parameterType="Long"> |
|
110 |
delete from sc_station_conf where id = #{id} |
|
111 |
</delete> |
|
112 |
|
|
113 |
<delete id="deleteScStationConfByIds" parameterType="String"> |
|
114 |
delete from sc_station_conf where id in |
|
115 |
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
116 |
#{id} |
|
117 |
</foreach> |
|
118 |
</delete> |
|
119 |
</mapper> |