|
|
@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="devconnType" column="devconnType" />
|
|
|
<result property="devconnName" column="devconnName" />
|
|
|
<result property="devconnConfig" column="devconnConfig" />
|
|
|
+ <result property="devconnRemark" column="devconnRemark" />
|
|
|
<result property="devconnCreator" column="devconnCreator" />
|
|
|
<result property="devconnModifier" column="devconnModifier" />
|
|
|
<result property="devconnModifieddate" column="devconnModifieddate" />
|
|
|
@@ -19,22 +20,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectIotDeviceconnVo">
|
|
|
- select id, devconnBid, devtypeBid, devconnType, devconnName, devconnConfig, devconnCreator, devconnModifier, devconnModifieddate, devconnCreateddate, tid from IotDeviceconn
|
|
|
+ select id, devconnBid, devtypeBid, devconnType, devconnName, devconnConfig, devconnRemark, devconnCreator,
|
|
|
+ devconnModifier, devconnModifieddate, devconnCreateddate, tid from IotDeviceconn
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectIotDeviceconnList" parameterType="IotDeviceconn" resultMap="IotDeviceconnResult">
|
|
|
<include refid="selectIotDeviceconnVo"/>
|
|
|
- <where>
|
|
|
+ <where>
|
|
|
+ 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="tid != null and tid != ''"> and tid = #{tid}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
@@ -42,7 +45,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<include refid="selectIotDeviceconnVo"/>
|
|
|
where id = #{id}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
+ <select id="listDeviceconn"
|
|
|
+ parameterType="com.yunfeiyun.agmp.iotm.device.domain.reqvo.IotDeviceconnListReqVo"
|
|
|
+ resultType="com.yunfeiyun.agmp.iotm.device.domain.resvo.IotDeviceconnListRspVo">
|
|
|
+ SELECT dcn.devconnBid, dcn.devconnType, dcn.devconnName, dcn.devconnRemark, dc.devclassBid, dc.devclassCode,
|
|
|
+ dc.devclassName, dt.devtypeBid, dt.devtypeCode, dt.devtypeName
|
|
|
+ FROM IotDeviceconn AS dcn
|
|
|
+ LEFT JOIN TosDevicetype AS dt ON dt.devtypeBid = dcn.devtypeBid
|
|
|
+ LEFT JOIN TosDeviceclass AS dc ON dc.devclassBid = dt.devclassBid
|
|
|
+ <where>
|
|
|
+ dcn.tid = #{tid}
|
|
|
+ <if test="devclassCode != null and devclassCode != ''"> and dc.devclassCode like concat('%', #{devclassCode}, '%')</if>
|
|
|
+ <if test="devclassName != null and devclassName != ''"> and dc.devclassName like concat('%', #{devclassName}, '%')</if>
|
|
|
+ <if test="devtypeName != null and devtypeName != ''"> and dt.devtypeName like concat('%', #{devtypeName}, '%')</if>
|
|
|
+ <if test="devtypeCode != null and devtypeCode != ''"> and dt.devtypeCode like concat('%', #{devtypeCode}, '%')</if>
|
|
|
+ <if test="devconnName != null and devconnName != ''"> and dcn.devconnName like concat('%', #{devconnName}, '%')</if>
|
|
|
+ <if test="devconnType != null and devconnType != ''"> and devconnType = #{devconnType}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
<insert id="insertIotDeviceconn" parameterType="IotDeviceconn" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into IotDeviceconn
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
@@ -51,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<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>
|
|
|
@@ -63,6 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<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>
|
|
|
@@ -79,6 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<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>
|