|
|
@@ -1,101 +1,111 @@
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
<!DOCTYPE mapper
|
|
|
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.yunfeiyun.agmp.iotm.web.mapper.IotDeviceMapper">
|
|
|
|
|
|
<resultMap type="IotDevice" id="IotDeviceResult">
|
|
|
- <result property="id" column="id" />
|
|
|
- <result property="devBid" column="devBid" />
|
|
|
- <result property="tid" column="tid" />
|
|
|
- <result property="devtypeBid" column="devtypeBid" />
|
|
|
- <result property="firmBid" column="firmBid" />
|
|
|
- <result property="devclassBid" column="devclassBid" />
|
|
|
- <result property="devconnBid" column="devconnBid" />
|
|
|
- <result property="devtypeName" column="devtypeName" />
|
|
|
- <result property="devclassName" column="devclassName" />
|
|
|
- <result property="devCode" column="devCode" />
|
|
|
- <result property="devName" column="devName" />
|
|
|
- <result property="devVersion" column="devVersion" />
|
|
|
- <result property="devStatus" column="devStatus" />
|
|
|
- <result property="devProvince" column="devProvince" />
|
|
|
- <result property="devCity" column="devCity" />
|
|
|
- <result property="devDistrict" column="devDistrict" />
|
|
|
- <result property="devLng" column="devLng" />
|
|
|
- <result property="devLat" column="devLat" />
|
|
|
- <result property="devPositionstatus" column="devPositionstatus" />
|
|
|
- <result property="devPositiontype" column="devPositiontype" />
|
|
|
- <result property="devTag" column="devTag" />
|
|
|
- <result property="devRecogtype" column="devRecogtype" />
|
|
|
- <result property="devNetworktype" column="devNetworktype" />
|
|
|
- <result property="devOfflinedate" column="devOfflinedate" />
|
|
|
- <result property="devProvincealign" column="devProvincealign" />
|
|
|
- <result property="devCityalign" column="devCityalign" />
|
|
|
- <result property="devDistrictalign" column="devDistrictalign" />
|
|
|
- <result property="devLngalign" column="devLngalign" />
|
|
|
- <result property="devLatalign" column="devLatalign" />
|
|
|
- <result property="devContacts" column="devContacts" />
|
|
|
- <result property="devTel" column="devTel" />
|
|
|
- <result property="devCreator" column="devCreator" />
|
|
|
- <result property="devModifier" column="devModifier" />
|
|
|
- <result property="devUpdateddate" column="devUpdateddate" />
|
|
|
- <result property="devModifieddate" column="devModifieddate" />
|
|
|
- <result property="devCreateddate" column="devCreateddate" />
|
|
|
- <result property="devDelstatus" column="devDelstatus" />
|
|
|
- <result property="devOnlinedate" column="devOnlinedate" />
|
|
|
- <result property="devSubtype" column="devSubtype" />
|
|
|
- <result property="devOriginalid" column="devOriginalid" />
|
|
|
- <result property="extInfo" column="extInfo" />
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="devBid" column="devBid"/>
|
|
|
+ <result property="tid" column="tid"/>
|
|
|
+ <result property="devtypeBid" column="devtypeBid"/>
|
|
|
+ <result property="firmBid" column="firmBid"/>
|
|
|
+ <result property="devclassBid" column="devclassBid"/>
|
|
|
+ <result property="devconnBid" column="devconnBid"/>
|
|
|
+ <result property="devtypeName" column="devtypeName"/>
|
|
|
+ <result property="devclassName" column="devclassName"/>
|
|
|
+ <result property="devCode" column="devCode"/>
|
|
|
+ <result property="devName" column="devName"/>
|
|
|
+ <result property="devVersion" column="devVersion"/>
|
|
|
+ <result property="devStatus" column="devStatus"/>
|
|
|
+ <result property="devProvince" column="devProvince"/>
|
|
|
+ <result property="devCity" column="devCity"/>
|
|
|
+ <result property="devDistrict" column="devDistrict"/>
|
|
|
+ <result property="devLng" column="devLng"/>
|
|
|
+ <result property="devLat" column="devLat"/>
|
|
|
+ <result property="devPositionstatus" column="devPositionstatus"/>
|
|
|
+ <result property="devPositiontype" column="devPositiontype"/>
|
|
|
+ <result property="devTag" column="devTag"/>
|
|
|
+ <result property="devRecogtype" column="devRecogtype"/>
|
|
|
+ <result property="devNetworktype" column="devNetworktype"/>
|
|
|
+ <result property="devOfflinedate" column="devOfflinedate"/>
|
|
|
+ <result property="devProvincealign" column="devProvincealign"/>
|
|
|
+ <result property="devCityalign" column="devCityalign"/>
|
|
|
+ <result property="devDistrictalign" column="devDistrictalign"/>
|
|
|
+ <result property="devLngalign" column="devLngalign"/>
|
|
|
+ <result property="devLatalign" column="devLatalign"/>
|
|
|
+ <result property="devContacts" column="devContacts"/>
|
|
|
+ <result property="devTel" column="devTel"/>
|
|
|
+ <result property="devCreator" column="devCreator"/>
|
|
|
+ <result property="devModifier" column="devModifier"/>
|
|
|
+ <result property="devUpdateddate" column="devUpdateddate"/>
|
|
|
+ <result property="devModifieddate" column="devModifieddate"/>
|
|
|
+ <result property="devCreateddate" column="devCreateddate"/>
|
|
|
+ <result property="devDelstatus" column="devDelstatus"/>
|
|
|
+ <result property="devOnlinedate" column="devOnlinedate"/>
|
|
|
+ <result property="devSubtype" column="devSubtype"/>
|
|
|
+ <result property="devOriginalid" column="devOriginalid"/>
|
|
|
+ <result property="extInfo" column="extInfo"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectIotDeviceVo">
|
|
|
SELECT d.* ,dt.devtypeName, dc.devclassName,dt.devtypePreview devPic
|
|
|
FROM IotDevice AS d
|
|
|
- LEFT JOIN TosDevicetype AS dt ON dt.devtypeBid = d.devtypeBid
|
|
|
- LEFT JOIN TosDeviceclass AS dc ON dc.devclassBid = d.devclassBid
|
|
|
+ LEFT JOIN TosDevicetype AS dt ON dt.devtypeBid = d.devtypeBid
|
|
|
+ LEFT JOIN TosDeviceclass AS dc ON dc.devclassBid = d.devclassBid
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectIotDeviceList" parameterType="IotDevice" resultMap="IotDeviceResult">
|
|
|
<include refid="selectIotDeviceVo"/>
|
|
|
<where>
|
|
|
d.tid = #{tid} and d.devDelstatus = '0'
|
|
|
- <if test="devBid != null and devBid != ''"> and d.devBid = #{devBid}</if>
|
|
|
- <if test="devtypeBid != null and devtypeBid != ''"> and d.devtypeBid = #{devtypeBid}</if>
|
|
|
- <if test="firmBid != null and firmBid != ''"> and d.firmBid = #{firmBid}</if>
|
|
|
- <if test="devclassBid != null and devclassBid != ''"> and d.devclassBid = #{devclassBid}</if>
|
|
|
- <if test="devconnBid != null and devconnBid != ''"> and d.devconnBid = #{devconnBid}</if>
|
|
|
- <if test="devCode != null and devCode != ''"> and d.devCode = #{devCode}</if>
|
|
|
- <if test="devName != null and devName != ''"> and d.devName like concat('%', #{devName}, '%')</if>
|
|
|
- <if test="devVersion != null and devVersion != ''"> and d.devVersion = #{devVersion}</if>
|
|
|
- <if test="devStatus != null and devStatus != ''"> and d.devStatus = #{devStatus}</if>
|
|
|
- <if test="devProvince != null and devProvince != ''"> and d.devProvince = #{devProvince}</if>
|
|
|
- <if test="devCity != null and devCity != ''"> and d.devCity = #{devCity}</if>
|
|
|
- <if test="devDistrict != null and devDistrict != ''"> and d.devDistrict = #{devDistrict}</if>
|
|
|
- <if test="devLng != null "> and d.devLng = #{devLng}</if>
|
|
|
- <if test="devLat != null "> and d.devLat = #{devLat}</if>
|
|
|
- <if test="devPositionstatus != null and devPositionstatus != ''"> and d.devPositionstatus = #{devPositionstatus}</if>
|
|
|
- <if test="devPositiontype != null and devPositiontype != ''"> and d.devPositiontype = #{devPositiontype}</if>
|
|
|
- <if test="devTag != null and devTag != ''"> and d.devTag = #{devTag}</if>
|
|
|
- <if test="devRecogtype != null and devRecogtype != ''"> and d.devRecogtype = #{devRecogtype}</if>
|
|
|
- <if test="devNetworktype != null and devNetworktype != ''"> and d.devNetworktype = #{devNetworktype}</if>
|
|
|
- <if test="devOfflinedate != null and devOfflinedate != ''"> and d.devOfflinedate = #{devOfflinedate}</if>
|
|
|
- <if test="devProvincealign != null and devProvincealign != ''"> and d.devProvincealign = #{devProvincealign}</if>
|
|
|
- <if test="devCityalign != null and devCityalign != ''"> and d.devCityalign = #{devCityalign}</if>
|
|
|
- <if test="devDistrictalign != null and devDistrictalign != ''"> and d.devDistrictalign = #{devDistrictalign}</if>
|
|
|
- <if test="devLngalign != null "> and d.devLngalign = #{devLngalign}</if>
|
|
|
- <if test="devLatalign != null "> and d.devLatalign = #{devLatalign}</if>
|
|
|
- <if test="devContacts != null and devContacts != ''"> and d.devContacts = #{devContacts}</if>
|
|
|
- <if test="devTel != null and devTel != ''"> and d.devTel = #{devTel}</if>
|
|
|
- <if test="devCreator != null and devCreator != ''"> and d.devCreator = #{devCreator}</if>
|
|
|
- <if test="devModifier != null and devModifier != ''"> and d.devModifier = #{devModifier}</if>
|
|
|
- <if test="devUpdateddate != null and devUpdateddate != ''"> and d.devUpdateddate = #{devUpdateddate}</if>
|
|
|
- <if test="devModifieddate != null and devModifieddate != ''"> and d.devModifieddate = #{devModifieddate}</if>
|
|
|
- <if test="devCreateddate != null and devCreateddate != ''"> and d.devCreateddate = #{devCreateddate}</if>
|
|
|
- <if test="devOnlinedate != null and devOnlinedate != ''"> and d.devOnlinedate = #{devOnlinedate}</if>
|
|
|
- <if test="devSubtype != null and devSubtype != ''"> and d.devSubtype = #{devSubtype}</if>
|
|
|
- <if test="devOriginalid != null and devOriginalid != ''"> and d.devOriginalid = #{devOriginalid}</if>
|
|
|
- <if test="devHostingstatus != null and devHostingstatus != ''"> and d.devHostingstatus = #{devHostingstatus}</if>
|
|
|
- <if test="extInfo != null and extInfo != ''"> and d.extInfo = #{extInfo}</if>
|
|
|
+ <if test="devBid != null and devBid != ''">and d.devBid = #{devBid}</if>
|
|
|
+ <if test="devtypeBid != null and devtypeBid != ''">and d.devtypeBid = #{devtypeBid}</if>
|
|
|
+ <if test="firmBid != null and firmBid != ''">and d.firmBid = #{firmBid}</if>
|
|
|
+ <if test="devclassBid != null and devclassBid != ''">and d.devclassBid = #{devclassBid}</if>
|
|
|
+ <if test="devconnBid != null and devconnBid != ''">and d.devconnBid = #{devconnBid}</if>
|
|
|
+ <if test="devCode != null and devCode != ''">and d.devCode = #{devCode}</if>
|
|
|
+ <if test="devName != null and devName != ''">and d.devName like concat('%', #{devName}, '%')</if>
|
|
|
+ <if test="devVersion != null and devVersion != ''">and d.devVersion = #{devVersion}</if>
|
|
|
+ <if test="devStatus != null and devStatus != ''">and d.devStatus = #{devStatus}</if>
|
|
|
+ <if test="devProvince != null and devProvince != ''">and d.devProvince = #{devProvince}</if>
|
|
|
+ <if test="devCity != null and devCity != ''">and d.devCity = #{devCity}</if>
|
|
|
+ <if test="devDistrict != null and devDistrict != ''">and d.devDistrict = #{devDistrict}</if>
|
|
|
+ <if test="devLng != null ">and d.devLng = #{devLng}</if>
|
|
|
+ <if test="devLat != null ">and d.devLat = #{devLat}</if>
|
|
|
+ <if test="devPositionstatus != null and devPositionstatus != ''">and d.devPositionstatus =
|
|
|
+ #{devPositionstatus}
|
|
|
+ </if>
|
|
|
+ <if test="devPositiontype != null and devPositiontype != ''">and d.devPositiontype = #{devPositiontype}
|
|
|
+ </if>
|
|
|
+ <if test="devTag != null and devTag != ''">and d.devTag = #{devTag}</if>
|
|
|
+ <if test="devRecogtype != null and devRecogtype != ''">and d.devRecogtype = #{devRecogtype}</if>
|
|
|
+ <if test="devNetworktype != null and devNetworktype != ''">and d.devNetworktype = #{devNetworktype}</if>
|
|
|
+ <if test="devOfflinedate != null and devOfflinedate != ''">and d.devOfflinedate = #{devOfflinedate}</if>
|
|
|
+ <if test="devProvincealign != null and devProvincealign != ''">and d.devProvincealign =
|
|
|
+ #{devProvincealign}
|
|
|
+ </if>
|
|
|
+ <if test="devCityalign != null and devCityalign != ''">and d.devCityalign = #{devCityalign}</if>
|
|
|
+ <if test="devDistrictalign != null and devDistrictalign != ''">and d.devDistrictalign =
|
|
|
+ #{devDistrictalign}
|
|
|
+ </if>
|
|
|
+ <if test="devLngalign != null ">and d.devLngalign = #{devLngalign}</if>
|
|
|
+ <if test="devLatalign != null ">and d.devLatalign = #{devLatalign}</if>
|
|
|
+ <if test="devContacts != null and devContacts != ''">and d.devContacts = #{devContacts}</if>
|
|
|
+ <if test="devTel != null and devTel != ''">and d.devTel = #{devTel}</if>
|
|
|
+ <if test="devCreator != null and devCreator != ''">and d.devCreator = #{devCreator}</if>
|
|
|
+ <if test="devModifier != null and devModifier != ''">and d.devModifier = #{devModifier}</if>
|
|
|
+ <if test="devUpdateddate != null and devUpdateddate != ''">and d.devUpdateddate = #{devUpdateddate}</if>
|
|
|
+ <if test="devModifieddate != null and devModifieddate != ''">and d.devModifieddate = #{devModifieddate}
|
|
|
+ </if>
|
|
|
+ <if test="devCreateddate != null and devCreateddate != ''">and d.devCreateddate = #{devCreateddate}</if>
|
|
|
+ <if test="devOnlinedate != null and devOnlinedate != ''">and d.devOnlinedate = #{devOnlinedate}</if>
|
|
|
+ <if test="devSubtype != null and devSubtype != ''">and d.devSubtype = #{devSubtype}</if>
|
|
|
+ <if test="devOriginalid != null and devOriginalid != ''">and d.devOriginalid = #{devOriginalid}</if>
|
|
|
+ <if test="devHostingstatus != null and devHostingstatus != ''">and d.devHostingstatus =
|
|
|
+ #{devHostingstatus}
|
|
|
+ </if>
|
|
|
+ <if test="extInfo != null and extInfo != ''">and d.extInfo = #{extInfo}</if>
|
|
|
|
|
|
</where>
|
|
|
</select>
|
|
|
@@ -111,45 +121,57 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<include refid="selectIotDeviceVo"/>
|
|
|
<where>
|
|
|
d.tid = #{tid} and d.devDelstatus = '0'
|
|
|
- <if test="devBid != null and devBid != ''"> and d.devBid = #{devBid}</if>
|
|
|
- <if test="devtypeBid != null and devtypeBid != ''"> and d.devtypeBid = #{devtypeBid}</if>
|
|
|
- <if test="firmBid != null and firmBid != ''"> and d.firmBid = #{firmBid}</if>
|
|
|
- <if test="devclassBid != null and devclassBid != ''"> and d.devclassBid = #{devclassBid}</if>
|
|
|
- <if test="devconnBid != null and devconnBid != ''"> and d.devconnBid = #{devconnBid}</if>
|
|
|
- <if test="devCode != null and devCode != ''"> and d.devCode = #{devCode}</if>
|
|
|
- <if test="devName != null and devName != ''"> and d.devName like concat('%', #{devName}, '%')</if>
|
|
|
- <if test="devStatus != null and devStatus != ''"> and d.devStatus = #{devStatus}</if>
|
|
|
- <if test="devProvince != null and devProvince != ''"> and d.devProvince = #{devProvince}</if>
|
|
|
- <if test="devCity != null and devCity != ''"> and d.devCity = #{devCity}</if>
|
|
|
- <if test="devDistrict != null and devDistrict != ''"> and d.devDistrict = #{devDistrict}</if>
|
|
|
- <if test="devLng != null "> and d.devLng = #{devLng}</if>
|
|
|
- <if test="devLat != null "> and d.devLat = #{devLat}</if>
|
|
|
- <if test="devPositionstatus != null and devPositionstatus != ''"> and d.devPositionstatus = #{devPositionstatus}</if>
|
|
|
- <if test="devPositiontype != null and devPositiontype != ''"> and d.devPositiontype = #{devPositiontype}</if>
|
|
|
- <if test="devTag != null and devTag != ''"> and d.devTag = #{devTag}</if>
|
|
|
- <if test="devRecogtype != null and devRecogtype != ''"> and d.devRecogtype = #{devRecogtype}</if>
|
|
|
- <if test="devNetworktype != null and devNetworktype != ''"> and d.devNetworktype = #{devNetworktype}</if>
|
|
|
- <if test="devOfflinedate != null and devOfflinedate != ''"> and d.devOfflinedate = #{devOfflinedate}</if>
|
|
|
- <if test="devProvincealign != null and devProvincealign != ''"> and d.devProvincealign = #{devProvincealign}</if>
|
|
|
- <if test="devCityalign != null and devCityalign != ''"> and d.devCityalign = #{devCityalign}</if>
|
|
|
- <if test="devDistrictalign != null and devDistrictalign != ''"> and d.devDistrictalign = #{devDistrictalign}</if>
|
|
|
- <if test="devLngalign != null "> and d.devLngalign = #{devLngalign}</if>
|
|
|
- <if test="devLatalign != null "> and d.devLatalign = #{devLatalign}</if>
|
|
|
- <if test="devContacts != null and devContacts != ''"> and d.devContacts = #{devContacts}</if>
|
|
|
- <if test="devTel != null and devTel != ''"> and d.devTel like concat('%', #{devTel}, '%')</if>
|
|
|
- <if test="devCreator != null and devCreator != ''"> and d.devCreator = #{devCreator}</if>
|
|
|
- <if test="devModifier != null and devModifier != ''"> and d.devModifier = #{devModifier}</if>
|
|
|
- <if test="devUpdateddate != null and devUpdateddate != ''"> and d.devUpdateddate = #{devUpdateddate}</if>
|
|
|
- <if test="devModifieddate != null and devModifieddate != ''"> and d.devModifieddate = #{devModifieddate}</if>
|
|
|
- <if test="devCreateddate != null and devCreateddate != ''"> and d.devCreateddate = #{devCreateddate}</if>
|
|
|
+ <if test="devBid != null and devBid != ''">and d.devBid = #{devBid}</if>
|
|
|
+ <if test="devtypeBid != null and devtypeBid != ''">and d.devtypeBid = #{devtypeBid}</if>
|
|
|
+ <if test="firmBid != null and firmBid != ''">and d.firmBid = #{firmBid}</if>
|
|
|
+ <if test="devclassBid != null and devclassBid != ''">and d.devclassBid = #{devclassBid}</if>
|
|
|
+ <if test="devconnBid != null and devconnBid != ''">and d.devconnBid = #{devconnBid}</if>
|
|
|
+ <if test="devCode != null and devCode != ''">and d.devCode = #{devCode}</if>
|
|
|
+ <if test="devName != null and devName != ''">and d.devName like concat('%', #{devName}, '%')</if>
|
|
|
+ <if test="devStatus != null and devStatus != ''">and d.devStatus = #{devStatus}</if>
|
|
|
+ <if test="devProvince != null and devProvince != ''">and d.devProvince = #{devProvince}</if>
|
|
|
+ <if test="devCity != null and devCity != ''">and d.devCity = #{devCity}</if>
|
|
|
+ <if test="devDistrict != null and devDistrict != ''">and d.devDistrict = #{devDistrict}</if>
|
|
|
+ <if test="devLng != null ">and d.devLng = #{devLng}</if>
|
|
|
+ <if test="devLat != null ">and d.devLat = #{devLat}</if>
|
|
|
+ <if test="devPositionstatus != null and devPositionstatus != ''">and d.devPositionstatus =
|
|
|
+ #{devPositionstatus}
|
|
|
+ </if>
|
|
|
+ <if test="devPositiontype != null and devPositiontype != ''">and d.devPositiontype = #{devPositiontype}
|
|
|
+ </if>
|
|
|
+ <if test="devTag != null and devTag != ''">and d.devTag = #{devTag}</if>
|
|
|
+ <if test="devRecogtype != null and devRecogtype != ''">and d.devRecogtype = #{devRecogtype}</if>
|
|
|
+ <if test="devNetworktype != null and devNetworktype != ''">and d.devNetworktype = #{devNetworktype}</if>
|
|
|
+ <if test="devOfflinedate != null and devOfflinedate != ''">and d.devOfflinedate = #{devOfflinedate}</if>
|
|
|
+ <if test="devProvincealign != null and devProvincealign != ''">and d.devProvincealign =
|
|
|
+ #{devProvincealign}
|
|
|
+ </if>
|
|
|
+ <if test="devCityalign != null and devCityalign != ''">and d.devCityalign = #{devCityalign}</if>
|
|
|
+ <if test="devDistrictalign != null and devDistrictalign != ''">and d.devDistrictalign =
|
|
|
+ #{devDistrictalign}
|
|
|
+ </if>
|
|
|
+ <if test="devLngalign != null ">and d.devLngalign = #{devLngalign}</if>
|
|
|
+ <if test="devLatalign != null ">and d.devLatalign = #{devLatalign}</if>
|
|
|
+ <if test="devContacts != null and devContacts != ''">and d.devContacts = #{devContacts}</if>
|
|
|
+ <if test="devTel != null and devTel != ''">and d.devTel like concat('%', #{devTel}, '%')</if>
|
|
|
+ <if test="devCreator != null and devCreator != ''">and d.devCreator = #{devCreator}</if>
|
|
|
+ <if test="devModifier != null and devModifier != ''">and d.devModifier = #{devModifier}</if>
|
|
|
+ <if test="devUpdateddate != null and devUpdateddate != ''">and d.devUpdateddate = #{devUpdateddate}</if>
|
|
|
+ <if test="devModifieddate != null and devModifieddate != ''">and d.devModifieddate = #{devModifieddate}
|
|
|
+ </if>
|
|
|
+ <if test="devCreateddate != null and devCreateddate != ''">and d.devCreateddate = #{devCreateddate}</if>
|
|
|
|
|
|
- <if test="devOnlinedate != null and devOnlinedate != ''"> and d.devOnlinedate = #{devOnlinedate}</if>
|
|
|
- <if test="devSubtype != null and devSubtype != ''"> and d.devSubtype = #{devSubtype}</if>
|
|
|
- <if test="devOriginalid != null and devOriginalid != ''"> and d.devOriginalid = #{devOriginalid}</if>
|
|
|
- <if test="devHostingstatus != null and devHostingstatus != ''"> and d.devHostingstatus = #{devHostingstatus}</if>
|
|
|
- <if test="extInfo != null and extInfo != ''"> and d.extInfo = #{extInfo}</if>
|
|
|
- <if test="devVersion != null and devVersion != ''"> and d.devVersion = #{devVersion}</if>
|
|
|
- <if test="devQuery != null and devQuery != ''">and (d.devCode like CONCAT("%",#{devQuery},"%") or d.devName like CONCAT("%",#{devQuery},"%"))</if>
|
|
|
+ <if test="devOnlinedate != null and devOnlinedate != ''">and d.devOnlinedate = #{devOnlinedate}</if>
|
|
|
+ <if test="devSubtype != null and devSubtype != ''">and d.devSubtype = #{devSubtype}</if>
|
|
|
+ <if test="devOriginalid != null and devOriginalid != ''">and d.devOriginalid = #{devOriginalid}</if>
|
|
|
+ <if test="devHostingstatus != null and devHostingstatus != ''">and d.devHostingstatus =
|
|
|
+ #{devHostingstatus}
|
|
|
+ </if>
|
|
|
+ <if test="extInfo != null and extInfo != ''">and d.extInfo = #{extInfo}</if>
|
|
|
+ <if test="devVersion != null and devVersion != ''">and d.devVersion = #{devVersion}</if>
|
|
|
+ <if test="devQuery != null and devQuery != ''">and (d.devCode like CONCAT("%",#{devQuery},"%") or d.devName
|
|
|
+ like CONCAT("%",#{devQuery},"%"))
|
|
|
+ </if>
|
|
|
<if test="devtypeBidList != null and devtypeBidList.size() > 0">
|
|
|
and d.devtypeBid in
|
|
|
<foreach collection="devtypeBidList" item="item" open="(" close=")" separator=",">
|
|
|
@@ -203,7 +225,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="devOriginalid != null">devOriginalid,</if>
|
|
|
<if test="devHostingstatus != null">devHostingstatus,</if>
|
|
|
<if test="extInfo != null">extInfo,</if>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="devBid != null">#{devBid},</if>
|
|
|
<if test="tid != null">#{tid},</if>
|
|
|
@@ -245,28 +267,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="devOriginalid != null">#{devOriginalid},</if>
|
|
|
<if test="devHostingstatus != null">#{devHostingstatus},</if>
|
|
|
<if test="extInfo != null">#{extInfo},</if>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
</insert>
|
|
|
|
|
|
<insert id="insertIotDeviceByBatch" parameterType="list" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into IotDevice (
|
|
|
- devBid, tid, devtypeBid, firmBid, devclassBid, devconnBid, devCode, devName, devVersion, devStatus,
|
|
|
- devProvince, devCity, devDistrict, devLng, devLat, devPositionstatus, devPositiontype, devTag, devRecogtype,
|
|
|
- devNetworktype, devOfflinedate, devProvincealign, devCityalign, devDistrictalign, devLngalign, devLatalign,
|
|
|
- devContacts, devTel, devCreator, devModifier, devUpdateddate, devModifieddate, devCreateddate, devDelstatus,
|
|
|
- devOnlinedate, devSubtype, devOriginalid, devHostingstatus, extInfo
|
|
|
+ devBid, tid, devtypeBid, firmBid, devclassBid, devconnBid, devCode, devName, devVersion, devStatus,
|
|
|
+ devProvince, devCity, devDistrict, devLng, devLat, devPositionstatus, devPositiontype, devTag, devRecogtype,
|
|
|
+ devNetworktype, devOfflinedate, devProvincealign, devCityalign, devDistrictalign, devLngalign, devLatalign,
|
|
|
+ devContacts, devTel, devCreator, devModifier, devUpdateddate, devModifieddate, devCreateddate, devDelstatus,
|
|
|
+ devOnlinedate, devSubtype, devOriginalid, devHostingstatus, extInfo
|
|
|
)
|
|
|
values
|
|
|
<foreach collection="list" item="item" index="index" separator=",">
|
|
|
(
|
|
|
- #{item.devBid}, #{item.tid}, #{item.devtypeBid}, #{item.firmBid}, #{item.devclassBid}, #{item.devconnBid},
|
|
|
- #{item.devCode}, #{item.devName}, #{item.devVersion}, #{item.devStatus}, #{item.devProvince}, #{item.devCity},
|
|
|
- #{item.devDistrict}, #{item.devLng}, #{item.devLat}, #{item.devPositionstatus}, #{item.devPositiontype},
|
|
|
- #{item.devTag}, #{item.devRecogtype}, #{item.devNetworktype}, #{item.devOfflinedate}, #{item.devProvincealign},
|
|
|
- #{item.devCityalign}, #{item.devDistrictalign}, #{item.devLngalign}, #{item.devLatalign}, #{item.devContacts},
|
|
|
- #{item.devTel}, #{item.devCreator}, #{item.devModifier}, #{item.devUpdateddate}, #{item.devModifieddate},
|
|
|
- #{item.devCreateddate}, #{item.devDelstatus}, #{item.devOnlinedate}, #{item.devSubtype}, #{item.devOriginalid},
|
|
|
- #{item.devHostingstatus}, #{item.extInfo}
|
|
|
+ #{item.devBid}, #{item.tid}, #{item.devtypeBid}, #{item.firmBid}, #{item.devclassBid}, #{item.devconnBid},
|
|
|
+ #{item.devCode}, #{item.devName}, #{item.devVersion}, #{item.devStatus}, #{item.devProvince},
|
|
|
+ #{item.devCity},
|
|
|
+ #{item.devDistrict}, #{item.devLng}, #{item.devLat}, #{item.devPositionstatus}, #{item.devPositiontype},
|
|
|
+ #{item.devTag}, #{item.devRecogtype}, #{item.devNetworktype}, #{item.devOfflinedate},
|
|
|
+ #{item.devProvincealign},
|
|
|
+ #{item.devCityalign}, #{item.devDistrictalign}, #{item.devLngalign}, #{item.devLatalign},
|
|
|
+ #{item.devContacts},
|
|
|
+ #{item.devTel}, #{item.devCreator}, #{item.devModifier}, #{item.devUpdateddate}, #{item.devModifieddate},
|
|
|
+ #{item.devCreateddate}, #{item.devDelstatus}, #{item.devOnlinedate}, #{item.devSubtype},
|
|
|
+ #{item.devOriginalid},
|
|
|
+ #{item.devHostingstatus}, #{item.extInfo}
|
|
|
)
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
@@ -316,6 +342,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</trim>
|
|
|
where devBid = #{devBid}
|
|
|
</update>
|
|
|
+ <update id="setConnNullByDevBids">
|
|
|
+ update IotDevice set devconnBid = null
|
|
|
+ where
|
|
|
+ devBid in
|
|
|
+ <foreach collection="list" item="item" open="(" separator="," close=")">
|
|
|
+ #{item.devBid}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
|
|
|
<delete id="deleteIotDeviceByDevBid" parameterType="String">
|
|
|
update IotDevice set devDelstatus = '1'
|