jhprjv2/ruoyi-quartz/src/main/resources/mapper/quartz/DevPitmonitSouthsmosDeviceM...

196 lines
12 KiB
XML

<?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.ruoyi.quartz.mapper.DevPitmonitSouthsmosDeviceMapper">
<resultMap type="DevPitmonitSouthsmosDevice" id="DevPitmonitSouthsmosDeviceResult">
<result property="id" column="id" />
<result property="cfgId" column="cfgId" />
<result property="devId" column="devId" />
<result property="autoType" column="autoType" />
<result property="certUrl" column="certUrl" />
<result property="checkDate" column="checkDate" />
<result property="devCode" column="devCode" />
<result property="devShadow" column="devShadow" />
<result property="devType" column="devType" />
<result property="devTypeName" column="devTypeName" />
<result property="key" column="key" />
<result property="manufacturer" column="manufacturer" />
<result property="name" column="name" />
<result property="orgId" column="orgId" />
<result property="parent" column="parent" />
<result property="parentIds" column="parentIds" />
<result property="productType" column="productType" />
<result property="position" column="position" />
<result property="status" column="status" />
<result property="structureId" column="structureId" />
<result property="structureName" column="structureName" />
<result property="typeCategory" column="typeCategory" />
<result property="typeName" column="typeName" />
<result property="verifyDate" column="verifyDate" />
<result property="state" column="state" />
<result property="remark" column="remark" />
<result property="isDel" column="is_del" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectDevPitmonitSouthsmosDeviceVo">
select id, cfgId, devId, autoType, certUrl, checkDate, devCode, devShadow, devType, devTypeName, `key`, manufacturer, name, orgId, parent, parentIds, productType, position, status, structureId, structureName, typeCategory, typeName, verifyDate, state, remark, is_del, create_by, create_time, update_by, update_time from dev_pitmonit_southsmos_device
</sql>
<select id="selectDevPitmonitSouthsmosDeviceList" parameterType="DevPitmonitSouthsmosDevice" resultMap="DevPitmonitSouthsmosDeviceResult">
<include refid="selectDevPitmonitSouthsmosDeviceVo"/>
<where>
<if test="cfgId != null "> and cfgId = #{cfgId}</if>
<if test="devId != null "> and devId = #{devId}</if>
<if test="autoType != null and autoType != ''"> and autoType = #{autoType}</if>
<if test="certUrl != null and certUrl != ''"> and certUrl = #{certUrl}</if>
<if test="checkDate != null "> and checkDate = #{checkDate}</if>
<if test="devCode != null and devCode != ''"> and devCode = #{devCode}</if>
<if test="devShadow != null and devShadow != ''"> and devShadow = #{devShadow}</if>
<if test="devType != null and devType != ''"> and devType = #{devType}</if>
<if test="devTypeName != null and devTypeName != ''"> and devTypeName like concat('%', #{devTypeName}, '%')</if>
<if test="key != null and key != ''"> and `key` = #{key}</if>
<if test="manufacturer != null and manufacturer != ''"> and manufacturer = #{manufacturer}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="orgId != null "> and orgId = #{orgId}</if>
<if test="parent != null and parent != ''"> and parent = #{parent}</if>
<if test="parentIds != null and parentIds != ''"> and parentIds = #{parentIds}</if>
<if test="productType != null and productType != ''"> and productType = #{productType}</if>
<if test="position != null and position != ''"> and position = #{position}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="structureId != null "> and structureId = #{structureId}</if>
<if test="structureName != null and structureName != ''"> and structureName like concat('%', #{structureName}, '%')</if>
<if test="typeCategory != null and typeCategory != ''"> and typeCategory = #{typeCategory}</if>
<if test="typeName != null and typeName != ''"> and typeName like concat('%', #{typeName}, '%')</if>
<if test="verifyDate != null and verifyDate != ''"> and verifyDate = #{verifyDate}</if>
<if test="state != null "> and state = #{state}</if>
<if test="isDel != null "> and is_del = #{isDel}</if>
</where>
</select>
<select id="selectDevPitmonitSouthsmosDeviceById" parameterType="Long" resultMap="DevPitmonitSouthsmosDeviceResult">
<include refid="selectDevPitmonitSouthsmosDeviceVo"/>
where id = #{id}
</select>
<insert id="insertDevPitmonitSouthsmosDevice" parameterType="DevPitmonitSouthsmosDevice" useGeneratedKeys="true" keyProperty="id">
insert into dev_pitmonit_southsmos_device
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cfgId != null">cfgId,</if>
<if test="devId != null">devId,</if>
<if test="autoType != null">autoType,</if>
<if test="certUrl != null">certUrl,</if>
<if test="checkDate != null">checkDate,</if>
<if test="devCode != null">devCode,</if>
<if test="devShadow != null">devShadow,</if>
<if test="devType != null">devType,</if>
<if test="devTypeName != null">devTypeName,</if>
<if test="key != null">`key`,</if>
<if test="manufacturer != null">manufacturer,</if>
<if test="name != null">name,</if>
<if test="orgId != null">orgId,</if>
<if test="parent != null">parent,</if>
<if test="parentIds != null">parentIds,</if>
<if test="productType != null">productType,</if>
<if test="position != null">position,</if>
<if test="status != null">status,</if>
<if test="structureId != null">structureId,</if>
<if test="structureName != null">structureName,</if>
<if test="typeCategory != null">typeCategory,</if>
<if test="typeName != null">typeName,</if>
<if test="verifyDate != null">verifyDate,</if>
<if test="state != null">state,</if>
<if test="remark != null">remark,</if>
<if test="isDel != null">is_del,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="cfgId != null">#{cfgId},</if>
<if test="devId != null">#{devId},</if>
<if test="autoType != null">#{autoType},</if>
<if test="certUrl != null">#{certUrl},</if>
<if test="checkDate != null">#{checkDate},</if>
<if test="devCode != null">#{devCode},</if>
<if test="devShadow != null">#{devShadow},</if>
<if test="devType != null">#{devType},</if>
<if test="devTypeName != null">#{devTypeName},</if>
<if test="key != null">#{key},</if>
<if test="manufacturer != null">#{manufacturer},</if>
<if test="name != null">#{name},</if>
<if test="orgId != null">#{orgId},</if>
<if test="parent != null">#{parent},</if>
<if test="parentIds != null">#{parentIds},</if>
<if test="productType != null">#{productType},</if>
<if test="position != null">#{position},</if>
<if test="status != null">#{status},</if>
<if test="structureId != null">#{structureId},</if>
<if test="structureName != null">#{structureName},</if>
<if test="typeCategory != null">#{typeCategory},</if>
<if test="typeName != null">#{typeName},</if>
<if test="verifyDate != null">#{verifyDate},</if>
<if test="state != null">#{state},</if>
<if test="remark != null">#{remark},</if>
<if test="isDel != null">#{isDel},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateDevPitmonitSouthsmosDevice" parameterType="DevPitmonitSouthsmosDevice">
update dev_pitmonit_southsmos_device
<trim prefix="SET" suffixOverrides=",">
<if test="cfgId != null">cfgId = #{cfgId},</if>
<if test="devId != null">devId = #{devId},</if>
<if test="autoType != null">autoType = #{autoType},</if>
<if test="certUrl != null">certUrl = #{certUrl},</if>
<if test="checkDate != null">checkDate = #{checkDate},</if>
<if test="devCode != null">devCode = #{devCode},</if>
<if test="devShadow != null">devShadow = #{devShadow},</if>
<if test="devType != null">devType = #{devType},</if>
<if test="devTypeName != null">devTypeName = #{devTypeName},</if>
<if test="key != null">`key` = #{key},</if>
<if test="manufacturer != null">manufacturer = #{manufacturer},</if>
<if test="name != null">name = #{name},</if>
<if test="orgId != null">orgId = #{orgId},</if>
<if test="parent != null">parent = #{parent},</if>
<if test="parentIds != null">parentIds = #{parentIds},</if>
<if test="productType != null">productType = #{productType},</if>
<if test="position != null">position = #{position},</if>
<if test="status != null">status = #{status},</if>
<if test="structureId != null">structureId = #{structureId},</if>
<if test="structureName != null">structureName = #{structureName},</if>
<if test="typeCategory != null">typeCategory = #{typeCategory},</if>
<if test="typeName != null">typeName = #{typeName},</if>
<if test="verifyDate != null">verifyDate = #{verifyDate},</if>
<if test="state != null">state = #{state},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDevPitmonitSouthsmosDeviceById" parameterType="Long">
delete from dev_pitmonit_southsmos_device where id = #{id}
</delete>
<delete id="deleteDevPitmonitSouthsmosDeviceByIds" parameterType="String">
delete from dev_pitmonit_southsmos_device where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>