|
@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<resultMap type="IotDeviceconn" id="IotDeviceconnResult">
|
|
<resultMap type="IotDeviceconn" id="IotDeviceconnResult">
|
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
|
<result property="devconnBid" column="devconnBid" />
|
|
<result property="devconnBid" column="devconnBid" />
|
|
|
|
|
+ <result property="devclassBid" column="devclassBid" />
|
|
|
<result property="devtypeBid" column="devtypeBid" />
|
|
<result property="devtypeBid" column="devtypeBid" />
|
|
|
<result property="devconnType" column="devconnType" />
|
|
<result property="devconnType" column="devconnType" />
|
|
|
<result property="devconnName" column="devconnName" />
|
|
<result property="devconnName" column="devconnName" />
|
|
@@ -25,32 +26,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectIotDeviceconnList" parameterType="IotDeviceconn" resultMap="IotDeviceconnResult">
|
|
<select id="selectIotDeviceconnList" parameterType="IotDeviceconn" resultMap="IotDeviceconnResult">
|
|
|
- <include refid="selectIotDeviceconnVo"/>
|
|
|
|
|
|
|
+ select dcn.devconnBid, dcn.devtypeBid, dcn.devconnType, dcn.devconnName, dcn.devconnConfig, dcn.devconnRemark,
|
|
|
|
|
+ dcn.devconnCreator, dcn.devconnModifier, dcn.devconnModifieddate, dcn.devconnCreateddate, dt.devclassBid
|
|
|
|
|
+ from IotDeviceconn as dcn
|
|
|
|
|
+ left join TosDevicetype as dt on dt.devtypeBid = dcn.devtypeBid
|
|
|
|
|
+
|
|
|
<where>
|
|
<where>
|
|
|
tid = #{tid}
|
|
tid = #{tid}
|
|
|
- <if test="devconnBid != null and devconnBid != ''"> and devconnBid = #{devconnBid}</if>
|
|
|
|
|
- <if test="devtypeBid != null and devtypeBid != ''"> and devtypeBid = #{devtypeBid}</if>
|
|
|
|
|
- <if test="devconnType != null and devconnType != ''"> and devconnType = #{devconnType}</if>
|
|
|
|
|
- <if test="devconnName != null and devconnName != ''"> and devconnName like concat('%', #{devconnName}, '%')</if>
|
|
|
|
|
- <if test="devconnConfig != null and devconnConfig != ''"> and devconnConfig = #{devconnConfig}</if>
|
|
|
|
|
- <if test="devconnRemark != null and devconnRemark != ''"> and devconnRemark = #{devconnRemark}</if>
|
|
|
|
|
- <if test="devconnCreator != null and devconnCreator != ''"> and devconnCreator = #{devconnCreator}</if>
|
|
|
|
|
- <if test="devconnModifier != null and devconnModifier != ''"> and devconnModifier = #{devconnModifier}</if>
|
|
|
|
|
- <if test="devconnModifieddate != null and devconnModifieddate != ''"> and devconnModifieddate = #{devconnModifieddate}</if>
|
|
|
|
|
- <if test="devconnCreateddate != null and devconnCreateddate != ''"> and devconnCreateddate = #{devconnCreateddate}</if>
|
|
|
|
|
|
|
+ <if test="devconnBid != null and devconnBid != ''"> and dcn.devconnBid = #{devconnBid}</if>
|
|
|
|
|
+ <if test="devtypeBid != null and devtypeBid != ''"> and dcn.devtypeBid = #{devtypeBid}</if>
|
|
|
|
|
+ <if test="devconnType != null and devconnType != ''"> and dcn.devconnType = #{devconnType}</if>
|
|
|
|
|
+ <if test="devconnName != null and devconnName != ''"> and dcn.devconnName like concat('%', #{devconnName}, '%')</if>
|
|
|
|
|
+ <if test="devconnConfig != null and devconnConfig != ''"> and dcn.devconnConfig = #{devconnConfig}</if>
|
|
|
|
|
+ <if test="devconnRemark != null and devconnRemark != ''"> and dcn.devconnRemark = #{devconnRemark}</if>
|
|
|
|
|
+ <if test="devconnCreator != null and devconnCreator != ''"> and dcn.devconnCreator = #{devconnCreator}</if>
|
|
|
|
|
+ <if test="devconnModifier != null and devconnModifier != ''"> and dcn.devconnModifier = #{devconnModifier}</if>
|
|
|
|
|
+ <if test="devconnModifieddate != null and devconnModifieddate != ''"> and dcn.devconnModifieddate = #{devconnModifieddate}</if>
|
|
|
|
|
+ <if test="devconnCreateddate != null and devconnCreateddate != ''"> and dcn.devconnCreateddate = #{devconnCreateddate}</if>
|
|
|
</where>
|
|
</where>
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
- <select id="selectIotDeviceconnById" parameterType="Long" resultMap="IotDeviceconnResult">
|
|
|
|
|
- <include refid="selectIotDeviceconnVo"/>
|
|
|
|
|
- where id = #{id}
|
|
|
|
|
- </select>
|
|
|
|
|
|
|
|
|
|
<select id="listDeviceconn"
|
|
<select id="listDeviceconn"
|
|
|
parameterType="com.yunfeiyun.agmp.iotm.device.domain.reqvo.IotDeviceconnListReqVo"
|
|
parameterType="com.yunfeiyun.agmp.iotm.device.domain.reqvo.IotDeviceconnListReqVo"
|
|
|
- resultType="com.yunfeiyun.agmp.iotm.device.domain.resvo.IotDeviceconnListRspVo">
|
|
|
|
|
|
|
+ resultType="com.yunfeiyun.agmp.iotm.device.domain.resvo.IotDeviceconnListResVo">
|
|
|
SELECT dcn.devconnBid, dcn.devconnType, dcn.devconnName, dcn.devconnRemark, dc.devclassBid, dc.devclassCode,
|
|
SELECT dcn.devconnBid, dcn.devconnType, dcn.devconnName, dcn.devconnRemark, dc.devclassBid, dc.devclassCode,
|
|
|
- dc.devclassName, dt.devtypeBid, dt.devtypeCode, dt.devtypeName
|
|
|
|
|
|
|
+ dc.devclassName, dt.devtypeBid, dt.devtypeCode, dt.devtypeName, dcn.devconnCreateddate
|
|
|
FROM IotDeviceconn AS dcn
|
|
FROM IotDeviceconn AS dcn
|
|
|
LEFT JOIN TosDevicetype AS dt ON dt.devtypeBid = dcn.devtypeBid
|
|
LEFT JOIN TosDevicetype AS dt ON dt.devtypeBid = dcn.devtypeBid
|
|
|
LEFT JOIN TosDeviceclass AS dc ON dc.devclassBid = dt.devclassBid
|
|
LEFT JOIN TosDeviceclass AS dc ON dc.devclassBid = dt.devclassBid
|
|
@@ -63,37 +63,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="devconnName != null and devconnName != ''"> and dcn.devconnName like concat('%', #{devconnName}, '%')</if>
|
|
<if test="devconnName != null and devconnName != ''"> and dcn.devconnName like concat('%', #{devconnName}, '%')</if>
|
|
|
<if test="devconnType != null and devconnType != ''"> and devconnType = #{devconnType}</if>
|
|
<if test="devconnType != null and devconnType != ''"> and devconnType = #{devconnType}</if>
|
|
|
</where>
|
|
</where>
|
|
|
|
|
+ GROUP BY dcn.devtypeBid
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
- <insert id="insertIotDeviceconn" parameterType="IotDeviceconn" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
- insert into IotDeviceconn
|
|
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
- <if test="devconnBid != null">devconnBid,</if>
|
|
|
|
|
- <if test="devtypeBid != null">devtypeBid,</if>
|
|
|
|
|
- <if test="devconnType != null">devconnType,</if>
|
|
|
|
|
- <if test="devconnName != null">devconnName,</if>
|
|
|
|
|
- <if test="devconnConfig != null">devconnConfig,</if>
|
|
|
|
|
- <if test="devconnRemark != null">devconnRemark,</if>
|
|
|
|
|
- <if test="devconnCreator != null">devconnCreator,</if>
|
|
|
|
|
- <if test="devconnModifier != null">devconnModifier,</if>
|
|
|
|
|
- <if test="devconnModifieddate != null">devconnModifieddate,</if>
|
|
|
|
|
- <if test="devconnCreateddate != null">devconnCreateddate,</if>
|
|
|
|
|
- <if test="tid != null">tid,</if>
|
|
|
|
|
- </trim>
|
|
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
- <if test="devconnBid != null">#{devconnBid},</if>
|
|
|
|
|
- <if test="devtypeBid != null">#{devtypeBid},</if>
|
|
|
|
|
- <if test="devconnType != null">#{devconnType},</if>
|
|
|
|
|
- <if test="devconnName != null">#{devconnName},</if>
|
|
|
|
|
- <if test="devconnConfig != null">#{devconnConfig},</if>
|
|
|
|
|
- <if test="devconnRemark != null">#{devconnRemark},</if>
|
|
|
|
|
- <if test="devconnCreator != null">#{devconnCreator},</if>
|
|
|
|
|
- <if test="devconnModifier != null">#{devconnModifier},</if>
|
|
|
|
|
- <if test="devconnModifieddate != null">#{devconnModifieddate},</if>
|
|
|
|
|
- <if test="devconnCreateddate != null">#{devconnCreateddate},</if>
|
|
|
|
|
- <if test="tid != null">#{tid},</if>
|
|
|
|
|
- </trim>
|
|
|
|
|
- </insert>
|
|
|
|
|
<insert id="insertIotDeviceconnByBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="insertIotDeviceconnByBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into IotDeviceconn (
|
|
insert into IotDeviceconn (
|
|
|
devconnBid, devtypeBid, devconnType, devconnName, devconnConfig, devconnRemark, devconnCreator,
|
|
devconnBid, devtypeBid, devconnType, devconnName, devconnConfig, devconnRemark, devconnCreator,
|
|
@@ -109,32 +81,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
|
- <update id="updateIotDeviceconn" parameterType="IotDeviceconn">
|
|
|
|
|
- update IotDeviceconn
|
|
|
|
|
- <trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
- <if test="devconnBid != null">devconnBid = #{devconnBid},</if>
|
|
|
|
|
- <if test="devtypeBid != null">devtypeBid = #{devtypeBid},</if>
|
|
|
|
|
- <if test="devconnType != null">devconnType = #{devconnType},</if>
|
|
|
|
|
- <if test="devconnName != null">devconnName = #{devconnName},</if>
|
|
|
|
|
- <if test="devconnConfig != null">devconnConfig = #{devconnConfig},</if>
|
|
|
|
|
- <if test="devconnRemark != null">devconnRemark = #{devconnRemark},</if>
|
|
|
|
|
- <if test="devconnCreator != null">devconnCreator = #{devconnCreator},</if>
|
|
|
|
|
- <if test="devconnModifier != null">devconnModifier = #{devconnModifier},</if>
|
|
|
|
|
- <if test="devconnModifieddate != null">devconnModifieddate = #{devconnModifieddate},</if>
|
|
|
|
|
- <if test="devconnCreateddate != null">devconnCreateddate = #{devconnCreateddate},</if>
|
|
|
|
|
- <if test="tid != null">tid = #{tid},</if>
|
|
|
|
|
- </trim>
|
|
|
|
|
- where id = #{id}
|
|
|
|
|
- </update>
|
|
|
|
|
-
|
|
|
|
|
- <delete id="deleteIotDeviceconnById" parameterType="Long">
|
|
|
|
|
- delete from IotDeviceconn where id = #{id}
|
|
|
|
|
- </delete>
|
|
|
|
|
-
|
|
|
|
|
- <delete id="deleteIotDeviceconnByIds" parameterType="String">
|
|
|
|
|
- delete from IotDeviceconn where id in
|
|
|
|
|
- <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
- #{id}
|
|
|
|
|
|
|
+ <delete id="deleteIotDeviceconnByBids" parameterType="String">
|
|
|
|
|
+ delete from IotDeviceconn where devconnBid in
|
|
|
|
|
+ <foreach item="devconnBid" collection="array" open="(" separator="," close=")">
|
|
|
|
|
+ #{devconnBid}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</delete>
|
|
</delete>
|
|
|
</mapper>
|
|
</mapper>
|