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