提交 | 用户 | 时间
|
0cceb6
|
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.opcuaconfig.mapper.DaOpcuaConfigMapper"> |
|
6 |
<resultMap type="DaOpcuaConfig" id="DaOpcuaConfigResult"> |
|
7 |
<result property="id" column="id" /> |
|
8 |
<result property="node" column="node" /> |
|
9 |
<result property="sysTypes" column="sys_types" /> |
|
10 |
<result property="subscribe" column="subscribe" /> |
|
11 |
<result property="rFunction" column="r_function" /> |
|
12 |
<result property="remarks" column="remarks" /> |
|
13 |
<result property="processName" column="process_name" /> |
|
14 |
<result property="process" column="process" /> |
|
15 |
<result property="state" column="state" /> |
|
16 |
</resultMap> |
|
17 |
|
|
18 |
<sql id="selectDaOpcuaConfigVo"> |
|
19 |
select id, node, sys_types, subscribe, r_function, remarks, process_name, process, state from da_opcua_config |
|
20 |
</sql> |
|
21 |
|
|
22 |
<select id="selectDaOpcuaConfigList" parameterType="DaOpcuaConfig" resultMap="DaOpcuaConfigResult"> |
|
23 |
<include refid="selectDaOpcuaConfigVo"/> |
|
24 |
<where> |
|
25 |
<if test="node != null and node != ''"> and node = #{node}</if> |
|
26 |
<if test="rFunction != null and rFunction != ''"> and r_function = #{rFunction}</if> |
|
27 |
<if test="process != null and process != ''"> and process = #{process}</if> |
|
28 |
<if test="subscribe != null and subscribe != ''"> and subscribe = #{subscribe}</if> |
|
29 |
<if test="state != null "> and state = #{state}</if> |
|
30 |
</where> |
|
31 |
</select> |
|
32 |
|
|
33 |
<select id="selectDaOpcuaConfigById" parameterType="Long" resultMap="DaOpcuaConfigResult"> |
|
34 |
<include refid="selectDaOpcuaConfigVo"/> |
|
35 |
where id = #{id} |
|
36 |
</select> |
|
37 |
|
|
38 |
<insert id="insertDaOpcuaConfig" parameterType="DaOpcuaConfig" useGeneratedKeys="true" keyProperty="id"> |
|
39 |
insert into da_opcua_config |
|
40 |
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
41 |
<if test="node != null">node,</if> |
|
42 |
<if test="sysTypes != null">sys_types,</if> |
|
43 |
<if test="subscribe != null">subscribe,</if> |
|
44 |
<if test="rFunction != null">r_function,</if> |
|
45 |
<if test="remarks != null">remarks,</if> |
|
46 |
<if test="processName != null">process_name,</if> |
|
47 |
<if test="process != null">process,</if> |
|
48 |
<if test="state != null">state,</if> |
|
49 |
</trim> |
|
50 |
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
51 |
<if test="node != null">#{node},</if> |
|
52 |
<if test="sysTypes != null">#{sysTypes},</if> |
|
53 |
<if test="subscribe != null">#{subscribe},</if> |
|
54 |
<if test="rFunction != null">#{rFunction},</if> |
|
55 |
<if test="remarks != null">#{remarks},</if> |
|
56 |
<if test="processName != null">#{processName},</if> |
|
57 |
<if test="process != null">#{process},</if> |
|
58 |
<if test="state != null">#{state},</if> |
|
59 |
</trim> |
|
60 |
</insert> |
|
61 |
|
|
62 |
<update id="updateDaOpcuaConfig" parameterType="DaOpcuaConfig"> |
|
63 |
update da_opcua_config |
|
64 |
<trim prefix="SET" suffixOverrides=","> |
|
65 |
<if test="node != null">node = #{node},</if> |
|
66 |
<if test="sysTypes != null">sys_types = #{sysTypes},</if> |
|
67 |
<if test="subscribe != null">subscribe = #{subscribe},</if> |
|
68 |
<if test="rFunction != null">r_function = #{rFunction},</if> |
|
69 |
<if test="remarks != null">remarks = #{remarks},</if> |
|
70 |
<if test="processName != null">process_name = #{processName},</if> |
|
71 |
<if test="process != null">process = #{process},</if> |
|
72 |
<if test="state != null">state = #{state},</if> |
|
73 |
</trim> |
|
74 |
where id = #{id} |
|
75 |
</update> |
|
76 |
|
|
77 |
<delete id="deleteDaOpcuaConfigById" parameterType="Long"> |
|
78 |
delete from da_opcua_config where id = #{id} |
|
79 |
</delete> |
|
80 |
|
|
81 |
<delete id="deleteDaOpcuaConfigByIds" parameterType="String"> |
|
82 |
delete from da_opcua_config where id in |
|
83 |
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
84 |
#{id} |
|
85 |
</foreach> |
|
86 |
</delete> |
|
87 |
</mapper> |