设备信息接口

This commit is contained in:
zhumeixiao
2024-11-18 11:30:59 +08:00
parent eea03062dd
commit 8713323b4f
30 changed files with 2637 additions and 0 deletions

View File

@ -0,0 +1,126 @@
<?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">
<mapper namespace="com.fastbee.deviceInfo.mapper.DeviceInformationMeteorologyMapper">
<resultMap type="DeviceInformationMeteorology" id="DeviceInformationMeteorologyResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="deviceBrand" column="device_brand" />
<result property="deviceType" column="device_type" />
<result property="deviceEncoding" column="device_encoding" />
<result property="type" column="type" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="installationLocation" column="installation_location" />
<result property="nameProject" column="name_project" />
<result property="constructionYear" column="construction_year" />
<result property="dockingMethod" column="docking_method" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
</resultMap>
<sql id="selectDeviceInformationMeteorologyVo">
select id, name, device_brand, device_type, device_encoding, type, longitude, latitude, installation_location, name_project, construction_year, docking_method, del_flag, create_time, create_by, update_time, update_by from iot_device_information_meteorology
</sql>
<select id="selectDeviceInformationMeteorologyList" parameterType="DeviceInformationMeteorology" resultMap="DeviceInformationMeteorologyResult">
<include refid="selectDeviceInformationMeteorologyVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="deviceBrand != null and deviceBrand != ''"> and device_brand = #{deviceBrand}</if>
<if test="deviceType != null and deviceType != ''"> and device_type = #{deviceType}</if>
<if test="deviceEncoding != null and deviceEncoding != ''"> and device_encoding = #{deviceEncoding}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
<if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
<if test="installationLocation != null and installationLocation != ''"> and installation_location = #{installationLocation}</if>
<if test="nameProject != null and nameProject != ''"> and name_project = #{nameProject}</if>
<if test="constructionYear != null "> and construction_year = #{constructionYear}</if>
<if test="dockingMethod != null and dockingMethod != ''"> and docking_method = #{dockingMethod}</if>
</where>
</select>
<select id="selectDeviceInformationMeteorologyById" parameterType="Long" resultMap="DeviceInformationMeteorologyResult">
<include refid="selectDeviceInformationMeteorologyVo"/>
where id = #{id}
</select>
<insert id="insertDeviceInformationMeteorology" parameterType="DeviceInformationMeteorology" useGeneratedKeys="true" keyProperty="id">
insert into iot_device_information_meteorology
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="deviceBrand != null">device_brand,</if>
<if test="deviceType != null">device_type,</if>
<if test="deviceEncoding != null">device_encoding,</if>
<if test="type != null">type,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="installationLocation != null">installation_location,</if>
<if test="nameProject != null">name_project,</if>
<if test="constructionYear != null">construction_year,</if>
<if test="dockingMethod != null">docking_method,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="deviceBrand != null">#{deviceBrand},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="deviceEncoding != null">#{deviceEncoding},</if>
<if test="type != null">#{type},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="installationLocation != null">#{installationLocation},</if>
<if test="nameProject != null">#{nameProject},</if>
<if test="constructionYear != null">#{constructionYear},</if>
<if test="dockingMethod != null">#{dockingMethod},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
</trim>
</insert>
<update id="updateDeviceInformationMeteorology" parameterType="DeviceInformationMeteorology">
update iot_device_information_meteorology
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="deviceBrand != null">device_brand = #{deviceBrand},</if>
<if test="deviceType != null">device_type = #{deviceType},</if>
<if test="deviceEncoding != null">device_encoding = #{deviceEncoding},</if>
<if test="type != null">type = #{type},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="installationLocation != null">installation_location = #{installationLocation},</if>
<if test="nameProject != null">name_project = #{nameProject},</if>
<if test="constructionYear != null">construction_year = #{constructionYear},</if>
<if test="dockingMethod != null">docking_method = #{dockingMethod},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDeviceInformationMeteorologyById" parameterType="Long">
delete from iot_device_information_meteorology where id = #{id}
</delete>
<delete id="deleteDeviceInformationMeteorologyByIds" parameterType="String">
delete from iot_device_information_meteorology where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,126 @@
<?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">
<mapper namespace="com.fastbee.deviceInfo.mapper.DeviceInformationMiaoqingMapper">
<resultMap type="DeviceInformationMiaoqing" id="DeviceInformationMiaoqingResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="deviceBrand" column="device_brand" />
<result property="deviceType" column="device_type" />
<result property="deviceEncoding" column="device_encoding" />
<result property="type" column="type" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="installationLocation" column="installation_location" />
<result property="nameProject" column="name_project" />
<result property="constructionYear" column="construction_year" />
<result property="dockingMethod" column="docking_method" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
</resultMap>
<sql id="selectDeviceInformationMiaoqingVo">
select id, name, device_brand, device_type, device_encoding, type, longitude, latitude, installation_location, name_project, construction_year, docking_method, del_flag, create_time, create_by, update_time, update_by from iot_device_information_miaoQing
</sql>
<select id="selectDeviceInformationMiaoqingList" parameterType="DeviceInformationMiaoqing" resultMap="DeviceInformationMiaoqingResult">
<include refid="selectDeviceInformationMiaoqingVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="deviceBrand != null and deviceBrand != ''"> and device_brand = #{deviceBrand}</if>
<if test="deviceType != null and deviceType != ''"> and device_type = #{deviceType}</if>
<if test="deviceEncoding != null and deviceEncoding != ''"> and device_encoding = #{deviceEncoding}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
<if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
<if test="installationLocation != null and installationLocation != ''"> and installation_location = #{installationLocation}</if>
<if test="nameProject != null and nameProject != ''"> and name_project = #{nameProject}</if>
<if test="constructionYear != null "> and construction_year = #{constructionYear}</if>
<if test="dockingMethod != null and dockingMethod != ''"> and docking_method = #{dockingMethod}</if>
</where>
</select>
<select id="selectDeviceInformationMiaoqingById" parameterType="Long" resultMap="DeviceInformationMiaoqingResult">
<include refid="selectDeviceInformationMiaoqingVo"/>
where id = #{id}
</select>
<insert id="insertDeviceInformationMiaoqing" parameterType="DeviceInformationMiaoqing" useGeneratedKeys="true" keyProperty="id">
insert into iot_device_information_miaoQing
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="deviceBrand != null">device_brand,</if>
<if test="deviceType != null">device_type,</if>
<if test="deviceEncoding != null">device_encoding,</if>
<if test="type != null">type,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="installationLocation != null">installation_location,</if>
<if test="nameProject != null">name_project,</if>
<if test="constructionYear != null">construction_year,</if>
<if test="dockingMethod != null">docking_method,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="deviceBrand != null">#{deviceBrand},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="deviceEncoding != null">#{deviceEncoding},</if>
<if test="type != null">#{type},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="installationLocation != null">#{installationLocation},</if>
<if test="nameProject != null">#{nameProject},</if>
<if test="constructionYear != null">#{constructionYear},</if>
<if test="dockingMethod != null">#{dockingMethod},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
</trim>
</insert>
<update id="updateDeviceInformationMiaoqing" parameterType="DeviceInformationMiaoqing">
update iot_device_information_miaoQing
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="deviceBrand != null">device_brand = #{deviceBrand},</if>
<if test="deviceType != null">device_type = #{deviceType},</if>
<if test="deviceEncoding != null">device_encoding = #{deviceEncoding},</if>
<if test="type != null">type = #{type},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="installationLocation != null">installation_location = #{installationLocation},</if>
<if test="nameProject != null">name_project = #{nameProject},</if>
<if test="constructionYear != null">construction_year = #{constructionYear},</if>
<if test="dockingMethod != null">docking_method = #{dockingMethod},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDeviceInformationMiaoqingById" parameterType="Long">
delete from iot_device_information_miaoQing where id = #{id}
</delete>
<delete id="deleteDeviceInformationMiaoqingByIds" parameterType="String">
delete from iot_device_information_miaoQing where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,131 @@
<?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">
<mapper namespace="com.fastbee.deviceInfo.mapper.DeviceInformationMoistureMapper">
<resultMap type="DeviceInformationMoisture" id="DeviceInformationMoistureResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="productsName" column="products_name" />
<result property="deviceBrand" column="device_brand" />
<result property="deviceType" column="device_type" />
<result property="deviceEncoding" column="device_encoding" />
<result property="type" column="type" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="installationLocation" column="installation_location" />
<result property="nameProject" column="name_project" />
<result property="constructionYear" column="construction_year" />
<result property="dockingMethod" column="docking_method" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
</resultMap>
<sql id="selectDeviceInformationMoistureVo">
select id, name, products_name, device_brand, device_type, device_encoding, type, longitude, latitude, installation_location, name_project, construction_year, docking_method, del_flag, create_time, create_by, update_time, update_by from iot_device_information_moisture
</sql>
<select id="selectDeviceInformationMoistureList" parameterType="DeviceInformationMoisture" resultMap="DeviceInformationMoistureResult">
<include refid="selectDeviceInformationMoistureVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="productsName != null and productsName != ''"> and products_name like concat('%', #{productsName}, '%')</if>
<if test="deviceBrand != null and deviceBrand != ''"> and device_brand = #{deviceBrand}</if>
<if test="deviceType != null and deviceType != ''"> and device_type = #{deviceType}</if>
<if test="deviceEncoding != null and deviceEncoding != ''"> and device_encoding = #{deviceEncoding}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
<if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
<if test="installationLocation != null and installationLocation != ''"> and installation_location = #{installationLocation}</if>
<if test="nameProject != null and nameProject != ''"> and name_project = #{nameProject}</if>
<if test="constructionYear != null "> and construction_year = #{constructionYear}</if>
<if test="dockingMethod != null and dockingMethod != ''"> and docking_method = #{dockingMethod}</if>
</where>
</select>
<select id="selectDeviceInformationMoistureById" parameterType="Long" resultMap="DeviceInformationMoistureResult">
<include refid="selectDeviceInformationMoistureVo"/>
where id = #{id}
</select>
<insert id="insertDeviceInformationMoisture" parameterType="DeviceInformationMoisture" useGeneratedKeys="true" keyProperty="id">
insert into iot_device_information_moisture
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="productsName != null">products_name,</if>
<if test="deviceBrand != null">device_brand,</if>
<if test="deviceType != null">device_type,</if>
<if test="deviceEncoding != null">device_encoding,</if>
<if test="type != null">type,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="installationLocation != null">installation_location,</if>
<if test="nameProject != null">name_project,</if>
<if test="constructionYear != null">construction_year,</if>
<if test="dockingMethod != null">docking_method,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="productsName != null">#{productsName},</if>
<if test="deviceBrand != null">#{deviceBrand},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="deviceEncoding != null">#{deviceEncoding},</if>
<if test="type != null">#{type},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="installationLocation != null">#{installationLocation},</if>
<if test="nameProject != null">#{nameProject},</if>
<if test="constructionYear != null">#{constructionYear},</if>
<if test="dockingMethod != null">#{dockingMethod},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
</trim>
</insert>
<update id="updateDeviceInformationMoisture" parameterType="DeviceInformationMoisture">
update iot_device_information_moisture
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="productsName != null">products_name = #{productsName},</if>
<if test="deviceBrand != null">device_brand = #{deviceBrand},</if>
<if test="deviceType != null">device_type = #{deviceType},</if>
<if test="deviceEncoding != null">device_encoding = #{deviceEncoding},</if>
<if test="type != null">type = #{type},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="installationLocation != null">installation_location = #{installationLocation},</if>
<if test="nameProject != null">name_project = #{nameProject},</if>
<if test="constructionYear != null">construction_year = #{constructionYear},</if>
<if test="dockingMethod != null">docking_method = #{dockingMethod},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDeviceInformationMoistureById" parameterType="Long">
delete from iot_device_information_moisture where id = #{id}
</delete>
<delete id="deleteDeviceInformationMoistureByIds" parameterType="String">
delete from iot_device_information_moisture where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,146 @@
<?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">
<mapper namespace="com.fastbee.deviceInfo.mapper.DeviceInformationMonitorMapper">
<resultMap type="DeviceInformationMonitor" id="DeviceInformationMonitorResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="deviceEncoding" column="device_encoding" />
<result property="type" column="type" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="installationLocation" column="installation_location" />
<result property="deviceBrand" column="device_brand" />
<result property="deviceType" column="device_type" />
<result property="nameProject" column="name_project" />
<result property="constructionYear" column="construction_year" />
<result property="affiliationTownship" column="affiliation_township" />
<result property="managementLeader" column="management_leader" />
<result property="managementLeaderTelephone" column="management_leader_telephone" />
<result property="managementUnit" column="management_unit" />
<result property="remarksInformation" column="remarks_information" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
</resultMap>
<sql id="selectDeviceInformationMonitorVo">
select id, name, device_encoding, type, longitude, latitude, installation_location, device_brand, device_type, name_project, construction_year, affiliation_township, management_leader, management_leader_telephone, management_unit, remarks_information, del_flag, create_time, create_by, update_time, update_by from iot_device_information_monitor
</sql>
<select id="selectDeviceInformationMonitorList" parameterType="DeviceInformationMonitor" resultMap="DeviceInformationMonitorResult">
<include refid="selectDeviceInformationMonitorVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="deviceEncoding != null and deviceEncoding != ''"> and device_encoding = #{deviceEncoding}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
<if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
<if test="installationLocation != null and installationLocation != ''"> and installation_location = #{installationLocation}</if>
<if test="deviceBrand != null and deviceBrand != ''"> and device_brand = #{deviceBrand}</if>
<if test="deviceType != null and deviceType != ''"> and device_type = #{deviceType}</if>
<if test="nameProject != null and nameProject != ''"> and name_project = #{nameProject}</if>
<if test="constructionYear != null "> and construction_year = #{constructionYear}</if>
<if test="affiliationTownship != null and affiliationTownship != ''"> and affiliation_township = #{affiliationTownship}</if>
<if test="managementLeader != null and managementLeader != ''"> and management_leader = #{managementLeader}</if>
<if test="managementLeaderTelephone != null and managementLeaderTelephone != ''"> and management_leader_telephone = #{managementLeaderTelephone}</if>
<if test="managementUnit != null and managementUnit != ''"> and management_unit = #{managementUnit}</if>
<if test="remarksInformation != null and remarksInformation != ''"> and remarks_information = #{remarksInformation}</if>
</where>
</select>
<select id="selectDeviceInformationMonitorById" parameterType="Long" resultMap="DeviceInformationMonitorResult">
<include refid="selectDeviceInformationMonitorVo"/>
where id = #{id}
</select>
<insert id="insertDeviceInformationMonitor" parameterType="DeviceInformationMonitor" useGeneratedKeys="true" keyProperty="id">
insert into iot_device_information_monitor
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="deviceEncoding != null">device_encoding,</if>
<if test="type != null">type,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="installationLocation != null">installation_location,</if>
<if test="deviceBrand != null">device_brand,</if>
<if test="deviceType != null">device_type,</if>
<if test="nameProject != null">name_project,</if>
<if test="constructionYear != null">construction_year,</if>
<if test="affiliationTownship != null">affiliation_township,</if>
<if test="managementLeader != null">management_leader,</if>
<if test="managementLeaderTelephone != null">management_leader_telephone,</if>
<if test="managementUnit != null">management_unit,</if>
<if test="remarksInformation != null">remarks_information,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="deviceEncoding != null">#{deviceEncoding},</if>
<if test="type != null">#{type},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="installationLocation != null">#{installationLocation},</if>
<if test="deviceBrand != null">#{deviceBrand},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="nameProject != null">#{nameProject},</if>
<if test="constructionYear != null">#{constructionYear},</if>
<if test="affiliationTownship != null">#{affiliationTownship},</if>
<if test="managementLeader != null">#{managementLeader},</if>
<if test="managementLeaderTelephone != null">#{managementLeaderTelephone},</if>
<if test="managementUnit != null">#{managementUnit},</if>
<if test="remarksInformation != null">#{remarksInformation},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
</trim>
</insert>
<update id="updateDeviceInformationMonitor" parameterType="DeviceInformationMonitor">
update iot_device_information_monitor
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="deviceEncoding != null">device_encoding = #{deviceEncoding},</if>
<if test="type != null">type = #{type},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="installationLocation != null">installation_location = #{installationLocation},</if>
<if test="deviceBrand != null">device_brand = #{deviceBrand},</if>
<if test="deviceType != null">device_type = #{deviceType},</if>
<if test="nameProject != null">name_project = #{nameProject},</if>
<if test="constructionYear != null">construction_year = #{constructionYear},</if>
<if test="affiliationTownship != null">affiliation_township = #{affiliationTownship},</if>
<if test="managementLeader != null">management_leader = #{managementLeader},</if>
<if test="managementLeaderTelephone != null">management_leader_telephone = #{managementLeaderTelephone},</if>
<if test="managementUnit != null">management_unit = #{managementUnit},</if>
<if test="remarksInformation != null">remarks_information = #{remarksInformation},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDeviceInformationMonitorById" parameterType="Long">
delete from iot_device_information_monitor where id = #{id}
</delete>
<delete id="deleteDeviceInformationMonitorByIds" parameterType="String">
delete from iot_device_information_monitor where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,121 @@
<?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">
<mapper namespace="com.fastbee.deviceInfo.mapper.DeviceInformationTargetpestsMapper">
<resultMap type="DeviceInformationTargetpests" id="DeviceInformationTargetpestsResult">
<result property="id" column="id" />
<result property="deviceBrand" column="device_brand" />
<result property="type" column="type" />
<result property="deviceType" column="device_type" />
<result property="powerSupply" column="power_supply" />
<result property="deviceEncoding" column="device_encoding" />
<result property="addressCode" column="address_code" />
<result property="installationLocation" column="installation_location" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="dockingMethod" column="docking_method" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
</resultMap>
<sql id="selectDeviceInformationTargetpestsVo">
select id, device_brand, type, device_type, power_supply, device_encoding, address_code, installation_location, longitude, latitude, docking_method, del_flag, create_time, create_by, update_time, update_by from iot_device_information_targetPests
</sql>
<select id="selectDeviceInformationTargetpestsList" parameterType="DeviceInformationTargetpests" resultMap="DeviceInformationTargetpestsResult">
<include refid="selectDeviceInformationTargetpestsVo"/>
<where>
<if test="deviceBrand != null and deviceBrand != ''"> and device_brand = #{deviceBrand}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="deviceType != null and deviceType != ''"> and device_type = #{deviceType}</if>
<if test="powerSupply != null and powerSupply != ''"> and power_supply = #{powerSupply}</if>
<if test="deviceEncoding != null and deviceEncoding != ''"> and device_encoding = #{deviceEncoding}</if>
<if test="addressCode != null and addressCode != ''"> and address_code = #{addressCode}</if>
<if test="installationLocation != null and installationLocation != ''"> and installation_location = #{installationLocation}</if>
<if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
<if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
<if test="dockingMethod != null and dockingMethod != ''"> and docking_method = #{dockingMethod}</if>
</where>
</select>
<select id="selectDeviceInformationTargetpestsById" parameterType="Long" resultMap="DeviceInformationTargetpestsResult">
<include refid="selectDeviceInformationTargetpestsVo"/>
where id = #{id}
</select>
<insert id="insertDeviceInformationTargetpests" parameterType="DeviceInformationTargetpests" useGeneratedKeys="true" keyProperty="id">
insert into iot_device_information_targetPests
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deviceBrand != null">device_brand,</if>
<if test="type != null">type,</if>
<if test="deviceType != null">device_type,</if>
<if test="powerSupply != null">power_supply,</if>
<if test="deviceEncoding != null">device_encoding,</if>
<if test="addressCode != null">address_code,</if>
<if test="installationLocation != null">installation_location,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="dockingMethod != null">docking_method,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deviceBrand != null">#{deviceBrand},</if>
<if test="type != null">#{type},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="powerSupply != null">#{powerSupply},</if>
<if test="deviceEncoding != null">#{deviceEncoding},</if>
<if test="addressCode != null">#{addressCode},</if>
<if test="installationLocation != null">#{installationLocation},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="dockingMethod != null">#{dockingMethod},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
</trim>
</insert>
<update id="updateDeviceInformationTargetpests" parameterType="DeviceInformationTargetpests">
update iot_device_information_targetPests
<trim prefix="SET" suffixOverrides=",">
<if test="deviceBrand != null">device_brand = #{deviceBrand},</if>
<if test="type != null">type = #{type},</if>
<if test="deviceType != null">device_type = #{deviceType},</if>
<if test="powerSupply != null">power_supply = #{powerSupply},</if>
<if test="deviceEncoding != null">device_encoding = #{deviceEncoding},</if>
<if test="addressCode != null">address_code = #{addressCode},</if>
<if test="installationLocation != null">installation_location = #{installationLocation},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="dockingMethod != null">docking_method = #{dockingMethod},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDeviceInformationTargetpestsById" parameterType="Long">
delete from iot_device_information_targetPests where id = #{id}
</delete>
<delete id="deleteDeviceInformationTargetpestsByIds" parameterType="String">
delete from iot_device_information_targetPests where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,121 @@
<?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">
<mapper namespace="com.fastbee.deviceInfo.mapper.DeviceInformationWormsMapper">
<resultMap type="DeviceInformationWorms" id="DeviceInformationWormsResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="deviceBrand" column="device_brand" />
<result property="deviceType" column="device_type" />
<result property="deviceEncoding" column="device_encoding" />
<result property="installationLocation" column="installation_location" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="nameProject" column="name_project" />
<result property="constructionYear" column="construction_year" />
<result property="dockingMethod" column="docking_method" />
<result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
</resultMap>
<sql id="selectDeviceInformationWormsVo">
select id, name, device_brand, device_type, device_encoding, installation_location, longitude, latitude, name_project, construction_year, docking_method, del_flag, create_time, create_by, update_time, update_by from iot_device_information_worms
</sql>
<select id="selectDeviceInformationWormsList" parameterType="DeviceInformationWorms" resultMap="DeviceInformationWormsResult">
<include refid="selectDeviceInformationWormsVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="deviceBrand != null and deviceBrand != ''"> and device_brand = #{deviceBrand}</if>
<if test="deviceType != null and deviceType != ''"> and device_type = #{deviceType}</if>
<if test="deviceEncoding != null and deviceEncoding != ''"> and device_encoding = #{deviceEncoding}</if>
<if test="installationLocation != null and installationLocation != ''"> and installation_location = #{installationLocation}</if>
<if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
<if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
<if test="nameProject != null and nameProject != ''"> and name_project = #{nameProject}</if>
<if test="constructionYear != null "> and construction_year = #{constructionYear}</if>
<if test="dockingMethod != null and dockingMethod != ''"> and docking_method = #{dockingMethod}</if>
</where>
</select>
<select id="selectDeviceInformationWormsById" parameterType="Long" resultMap="DeviceInformationWormsResult">
<include refid="selectDeviceInformationWormsVo"/>
where id = #{id}
</select>
<insert id="insertDeviceInformationWorms" parameterType="DeviceInformationWorms" useGeneratedKeys="true" keyProperty="id">
insert into iot_device_information_worms
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="deviceBrand != null">device_brand,</if>
<if test="deviceType != null">device_type,</if>
<if test="deviceEncoding != null">device_encoding,</if>
<if test="installationLocation != null">installation_location,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="nameProject != null">name_project,</if>
<if test="constructionYear != null">construction_year,</if>
<if test="dockingMethod != null">docking_method,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="deviceBrand != null">#{deviceBrand},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="deviceEncoding != null">#{deviceEncoding},</if>
<if test="installationLocation != null">#{installationLocation},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="nameProject != null">#{nameProject},</if>
<if test="constructionYear != null">#{constructionYear},</if>
<if test="dockingMethod != null">#{dockingMethod},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
</trim>
</insert>
<update id="updateDeviceInformationWorms" parameterType="DeviceInformationWorms">
update iot_device_information_worms
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="deviceBrand != null">device_brand = #{deviceBrand},</if>
<if test="deviceType != null">device_type = #{deviceType},</if>
<if test="deviceEncoding != null">device_encoding = #{deviceEncoding},</if>
<if test="installationLocation != null">installation_location = #{installationLocation},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="nameProject != null">name_project = #{nameProject},</if>
<if test="constructionYear != null">construction_year = #{constructionYear},</if>
<if test="dockingMethod != null">docking_method = #{dockingMethod},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDeviceInformationWormsById" parameterType="Long">
delete from iot_device_information_worms where id = #{id}
</delete>
<delete id="deleteDeviceInformationWormsByIds" parameterType="String">
delete from iot_device_information_worms where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>