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

116 lines
6.0 KiB
XML
Raw Normal View History

2024-08-09 23:48:40 +08:00
<?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.DevPitmonitSouthsmosElementMapper">
<resultMap type="DevPitmonitSouthsmosElement" id="DevPitmonitSouthsmosElementResult">
<result property="id" column="id" />
<result property="cfgId" column="cfgId" />
<result property="srvId" column="srvId" />
<result property="maxSp" column="maxSp" />
<result property="monitorStatus" column="monitorStatus" />
<result property="name" column="name" />
<result property="nameEn" column="nameEn" />
<result property="type" column="type" />
<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="selectDevPitmonitSouthsmosElementVo">
select id, cfgId, srvId, maxSp, monitorStatus, name, nameEn, type, state, remark, is_del, create_by, create_time, update_by, update_time from dev_pitmonit_southsmos_element
</sql>
<select id="selectDevPitmonitSouthsmosElementList" parameterType="DevPitmonitSouthsmosElement" resultMap="DevPitmonitSouthsmosElementResult">
<include refid="selectDevPitmonitSouthsmosElementVo"/>
<where>
<if test="cfgId != null "> and cfgId = #{cfgId}</if>
<if test="srvId != null "> and srvId = #{srvId}</if>
<if test="maxSp != null and maxSp != ''"> and maxSp = #{maxSp}</if>
<if test="monitorStatus != null and monitorStatus != ''"> and monitorStatus = #{monitorStatus}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="nameEn != null and nameEn != ''"> and nameEn = #{nameEn}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="state != null "> and state = #{state}</if>
<if test="isDel != null "> and is_del = #{isDel}</if>
</where>
</select>
<select id="selectDevPitmonitSouthsmosElementById" parameterType="Long" resultMap="DevPitmonitSouthsmosElementResult">
<include refid="selectDevPitmonitSouthsmosElementVo"/>
where id = #{id}
</select>
<insert id="insertDevPitmonitSouthsmosElement" parameterType="DevPitmonitSouthsmosElement" useGeneratedKeys="true" keyProperty="id">
insert into dev_pitmonit_southsmos_element
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cfgId != null">cfgId,</if>
<if test="srvId != null">srvId,</if>
<if test="maxSp != null">maxSp,</if>
<if test="monitorStatus != null">monitorStatus,</if>
<if test="name != null">name,</if>
<if test="nameEn != null">nameEn,</if>
<if test="type != null">type,</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="srvId != null">#{srvId},</if>
<if test="maxSp != null">#{maxSp},</if>
<if test="monitorStatus != null">#{monitorStatus},</if>
<if test="name != null">#{name},</if>
<if test="nameEn != null">#{nameEn},</if>
<if test="type != null">#{type},</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="updateDevPitmonitSouthsmosElement" parameterType="DevPitmonitSouthsmosElement">
update dev_pitmonit_southsmos_element
<trim prefix="SET" suffixOverrides=",">
<if test="cfgId != null">cfgId = #{cfgId},</if>
<if test="srvId != null">srvId = #{srvId},</if>
<if test="maxSp != null">maxSp = #{maxSp},</if>
<if test="monitorStatus != null">monitorStatus = #{monitorStatus},</if>
<if test="name != null">name = #{name},</if>
<if test="nameEn != null">nameEn = #{nameEn},</if>
<if test="type != null">type = #{type},</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="deleteDevPitmonitSouthsmosElementById" parameterType="Long">
delete from dev_pitmonit_southsmos_element where id = #{id}
</delete>
<delete id="deleteDevPitmonitSouthsmosElementByIds" parameterType="String">
delete from dev_pitmonit_southsmos_element where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>