|
@@ -8,8 +8,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
|
<result property="name" column="name" />
|
|
<result property="name" column="name" />
|
|
|
<result property="tp" column="tp" />
|
|
<result property="tp" column="tp" />
|
|
|
|
|
+ <result property="brand" column="brand" />
|
|
|
<result property="model" column="model" />
|
|
<result property="model" column="model" />
|
|
|
|
|
+ <result property="serialNumber" column="serial_number" />
|
|
|
<result property="status" column="status" />
|
|
<result property="status" column="status" />
|
|
|
|
|
+ <result property="installDate" column="install_date" />
|
|
|
<result property="configChannelId" column="config_channel_id" />
|
|
<result property="configChannelId" column="config_channel_id" />
|
|
|
<result property="configStationId" column="config_station_id" />
|
|
<result property="configStationId" column="config_station_id" />
|
|
|
<result property="configDeviceId" column="config_device_id" />
|
|
<result property="configDeviceId" column="config_device_id" />
|
|
@@ -17,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectConfigDeviceVo">
|
|
<sql id="selectConfigDeviceVo">
|
|
|
- select id, name, tp, model, status, config_channel_id, config_station_id, config_device_id, remark from config_device
|
|
|
|
|
|
|
+ select id, name, tp, brand, model, serial_number, status, install_date, config_channel_id, config_station_id, config_device_id, remark from config_device
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectConfigDeviceList" parameterType="ConfigDevice" resultMap="ConfigDeviceResult">
|
|
<select id="selectConfigDeviceList" parameterType="ConfigDevice" resultMap="ConfigDeviceResult">
|
|
@@ -57,17 +60,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
insert into config_device
|
|
insert into config_device
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="name != null and name != ''">name,</if>
|
|
<if test="name != null and name != ''">name,</if>
|
|
|
|
|
+ <if test="tp != null and tp != ''">tp,</if>
|
|
|
|
|
+ <if test="brand != null and brand != ''">brand,</if>
|
|
|
|
|
+ <if test="model != null and model != ''">model,</if>
|
|
|
|
|
+ <if test="serialNumber != null and serialNumber != ''">serial_number,</if>
|
|
|
|
|
+ <if test="status != null and status != ''">status,</if>
|
|
|
|
|
+ <if test="installDate != null">install_date,</if>
|
|
|
<if test="configChannelId != null">config_channel_id,</if>
|
|
<if test="configChannelId != null">config_channel_id,</if>
|
|
|
<if test="configStationId != null">config_station_id,</if>
|
|
<if test="configStationId != null">config_station_id,</if>
|
|
|
- <if test="configDeviceId != null and configDeviceId != ''">config_device_id,</if>
|
|
|
|
|
<if test="configDeviceId != null">config_device_id,</if>
|
|
<if test="configDeviceId != null">config_device_id,</if>
|
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="name != null and name != ''">#{name},</if>
|
|
<if test="name != null and name != ''">#{name},</if>
|
|
|
|
|
+ <if test="tp != null and tp != ''">#{tp},</if>
|
|
|
|
|
+ <if test="brand != null and brand != ''">#{brand},</if>
|
|
|
|
|
+ <if test="model != null and model != ''">#{model},</if>
|
|
|
|
|
+ <if test="serialNumber != null and serialNumber != ''">#{serialNumber},</if>
|
|
|
|
|
+ <if test="status != null and status != ''">#{status},</if>
|
|
|
|
|
+ <if test="installDate != null">#{installDate},</if>
|
|
|
<if test="configChannelId != null">#{configChannelId},</if>
|
|
<if test="configChannelId != null">#{configChannelId},</if>
|
|
|
<if test="configStationId != null">#{configStationId},</if>
|
|
<if test="configStationId != null">#{configStationId},</if>
|
|
|
- <if test="configDeviceId != null and configDeviceId != ''">#{configDeviceId},</if>
|
|
|
|
|
<if test="configDeviceId != null">#{configDeviceId},</if>
|
|
<if test="configDeviceId != null">#{configDeviceId},</if>
|
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
|
</trim>
|
|
</trim>
|
|
@@ -77,9 +90,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
update config_device
|
|
update config_device
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="name != null and name != ''">name = #{name},</if>
|
|
<if test="name != null and name != ''">name = #{name},</if>
|
|
|
|
|
+ <if test="tp != null and tp != ''">tp = #{tp},</if>
|
|
|
|
|
+ <if test="brand != null and brand != ''">brand = #{brand},</if>
|
|
|
|
|
+ <if test="model != null and model != ''">model = #{model},</if>
|
|
|
|
|
+ <if test="serialNumber != null and serialNumber != ''">serial_number = #{serialNumber},</if>
|
|
|
|
|
+ <if test="status != null and status != ''">status = #{status},</if>
|
|
|
|
|
+ <if test="installDate != null">install_date = #{installDate},</if>
|
|
|
<if test="configChannelId != null">config_channel_id = #{configChannelId},</if>
|
|
<if test="configChannelId != null">config_channel_id = #{configChannelId},</if>
|
|
|
<if test="configStationId != null">config_station_id = #{configStationId},</if>
|
|
<if test="configStationId != null">config_station_id = #{configStationId},</if>
|
|
|
- <if test="configDeviceId != null and configDeviceId != ''">config_device_id = #{configDeviceId},</if>
|
|
|
|
|
<if test="configDeviceId != null">config_device_id = #{configDeviceId},</if>
|
|
<if test="configDeviceId != null">config_device_id = #{configDeviceId},</if>
|
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
|
update_time = CURRENT_TIMESTAMP,
|
|
update_time = CURRENT_TIMESTAMP,
|