|
@@ -3,13 +3,13 @@
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.jjt.rz.mapper.TwinDeviceRzMapper">
|
|
|
-
|
|
|
+
|
|
|
<resultMap type="TwinDeviceRz" id="TwinDeviceRzResult">
|
|
|
<result property="deviceId" column="DEVICE_ID" />
|
|
|
<result property="wsName" column="WS_NAME" />
|
|
|
<result property="line" column="LINE" />
|
|
|
<result property="typeId" column="TYPE_ID" />
|
|
|
- <result property="deviceType" column="DEVICE_TYPE" />
|
|
|
+ <result property="typeName" column="TYPE_NAME" />
|
|
|
<result property="deviceCode" column="DEVICE_CODE" />
|
|
|
<result property="deviceName" column="DEVICE_NAME" />
|
|
|
<result property="devicePath" column="DEVICE_PATH" />
|
|
@@ -21,16 +21,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTwinDeviceRzVo">
|
|
|
- select DEVICE_ID, WS_NAME, LINE, TYPE_ID, DEVICE_TYPE, DEVICE_CODE, DEVICE_NAME, DEVICE_PATH, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, REMARK from TWIN_DEVICE_RZ
|
|
|
+ select DEVICE_ID, WS_NAME, LINE, TYPE_ID, TYPE_NAME, DEVICE_CODE, DEVICE_NAME, DEVICE_PATH, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, REMARK from TWIN_DEVICE_RZ
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTwinDeviceRzList" parameterType="TwinDeviceRz" resultMap="TwinDeviceRzResult">
|
|
|
<include refid="selectTwinDeviceRzVo"/>
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
<if test="wsName != null and wsName != ''"> and WS_NAME like concat('%', #{wsName}, '%')</if>
|
|
|
<if test="line != null and line != ''"> and LINE = #{line}</if>
|
|
|
<if test="typeId != null "> and TYPE_ID = #{typeId}</if>
|
|
|
- <if test="deviceType != null and deviceType != ''"> and DEVICE_TYPE = #{deviceType}</if>
|
|
|
+ <if test="typeName != null and typeName != ''"> and TYPE_NAME = #{typeName}</if>
|
|
|
<if test="deviceCode != null and deviceCode != ''"> and DEVICE_CODE = #{deviceCode}</if>
|
|
|
<if test="deviceName != null and deviceName != ''"> and DEVICE_NAME like concat('%', #{deviceName}, '%')</if>
|
|
|
<if test="devicePath != null and devicePath != ''"> and DEVICE_PATH = #{devicePath}</if>
|
|
@@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="remark != null and remark != ''"> and REMARK = #{remark}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectTwinDeviceRzByDeviceId" parameterType="Long" resultMap="TwinDeviceRzResult">
|
|
|
<include refid="selectTwinDeviceRzVo"/>
|
|
|
where DEVICE_ID = #{deviceId}
|
|
@@ -53,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="wsName != null">WS_NAME,</if>
|
|
|
<if test="line != null">LINE,</if>
|
|
|
<if test="typeId != null">TYPE_ID,</if>
|
|
|
- <if test="deviceType != null">DEVICE_TYPE,</if>
|
|
|
+ <if test="typeName != null">TYPE_NAME,</if>
|
|
|
<if test="deviceCode != null">DEVICE_CODE,</if>
|
|
|
<if test="deviceName != null">DEVICE_NAME,</if>
|
|
|
<if test="devicePath != null">DEVICE_PATH,</if>
|
|
@@ -67,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="wsName != null">#{wsName},</if>
|
|
|
<if test="line != null">#{line},</if>
|
|
|
<if test="typeId != null">#{typeId},</if>
|
|
|
- <if test="deviceType != null">#{deviceType},</if>
|
|
|
+ <if test="typeName != null">#{typeName},</if>
|
|
|
<if test="deviceCode != null">#{deviceCode},</if>
|
|
|
<if test="deviceName != null">#{deviceName},</if>
|
|
|
<if test="devicePath != null">#{devicePath},</if>
|
|
@@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="wsName != null">WS_NAME = #{wsName},</if>
|
|
|
<if test="line != null">LINE = #{line},</if>
|
|
|
<if test="typeId != null">TYPE_ID = #{typeId},</if>
|
|
|
- <if test="deviceType != null">DEVICE_TYPE = #{deviceType},</if>
|
|
|
+ <if test="typeName != null">TYPE_NAME = #{typeName},</if>
|
|
|
<if test="deviceCode != null">DEVICE_CODE = #{deviceCode},</if>
|
|
|
<if test="deviceName != null">DEVICE_NAME = #{deviceName},</if>
|
|
|
<if test="devicePath != null">DEVICE_PATH = #{devicePath},</if>
|
|
@@ -103,9 +103,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteTwinDeviceRzByDeviceIds" parameterType="String">
|
|
|
- delete from TWIN_DEVICE_RZ where DEVICE_ID in
|
|
|
+ delete from TWIN_DEVICE_RZ where DEVICE_ID in
|
|
|
<foreach item="deviceId" collection="array" open="(" separator="," close=")">
|
|
|
#{deviceId}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
-</mapper>
|
|
|
+</mapper>
|