131 lines
7.1 KiB
XML
131 lines
7.1 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.yanzhu.device.mapper.PitmonitSouthsmosElementItemMapper">
|
|
|
|
<resultMap type="PitmonitSouthsmosElementItem" id="PitmonitSouthsmosElementItemResult">
|
|
<result property="id" column="id" />
|
|
<result property="cfgId" column="cfgId" />
|
|
<result property="srvId" column="srvId" />
|
|
<result property="monitorElementId" column="monitorElementId" />
|
|
<result property="name" column="name" />
|
|
<result property="step" column="step" />
|
|
<result property="unit" column="unit" />
|
|
<result property="valueRange" column="valueRange" />
|
|
<result property="gmtCreate" column="gmtCreate" />
|
|
<result property="gmtModified" column="gmtModified" />
|
|
<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="selectDevPitmonitSouthsmosElementItemVo">
|
|
select id, cfgId, srvId, monitorElementId, name, step, unit, valueRange, gmtCreate, gmtModified, state, remark, is_del, create_by, create_time, update_by, update_time from dev_pitmonit_southsmos_element_item
|
|
</sql>
|
|
|
|
<select id="selectDevPitmonitSouthsmosElementItemList" parameterType="PitmonitSouthsmosElementItem" resultMap="PitmonitSouthsmosElementItemResult">
|
|
<include refid="selectDevPitmonitSouthsmosElementItemVo"/>
|
|
<where>
|
|
<if test="cfgId != null "> and cfgId = #{cfgId}</if>
|
|
<if test="srvId != null "> and srvId = #{srvId}</if>
|
|
<if test="monitorElementId != null "> and monitorElementId = #{monitorElementId}</if>
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
<if test="step != null "> and step = #{step}</if>
|
|
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
|
<if test="valueRange != null and valueRange != ''"> and valueRange = #{valueRange}</if>
|
|
<if test="gmtCreate != null and gmtCreate != ''"> and gmtCreate = #{gmtCreate}</if>
|
|
<if test="gmtModified != null and gmtModified != ''"> and gmtModified = #{gmtModified}</if>
|
|
<if test="state != null "> and state = #{state}</if>
|
|
<if test="isDel != null "> and is_del = #{isDel}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectDevPitmonitSouthsmosElementItemById" parameterType="Long" resultMap="PitmonitSouthsmosElementItemResult">
|
|
<include refid="selectDevPitmonitSouthsmosElementItemVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<select id="selectDevPitmonitSouthsmosElementItemBySrvId" parameterType="Long" resultMap="PitmonitSouthsmosElementItemResult">
|
|
<include refid="selectDevPitmonitSouthsmosElementItemVo"/>
|
|
where srvId = #{srvId}
|
|
</select>
|
|
|
|
<insert id="insertDevPitmonitSouthsmosElementItem" parameterType="PitmonitSouthsmosElementItem" useGeneratedKeys="true" keyProperty="id">
|
|
insert into dev_pitmonit_southsmos_element_item
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="cfgId != null">cfgId,</if>
|
|
<if test="srvId != null">srvId,</if>
|
|
<if test="monitorElementId != null">monitorElementId,</if>
|
|
<if test="name != null">name,</if>
|
|
<if test="step != null">step,</if>
|
|
<if test="unit != null">unit,</if>
|
|
<if test="valueRange != null">valueRange,</if>
|
|
<if test="gmtCreate != null">gmtCreate,</if>
|
|
<if test="gmtModified != null">gmtModified,</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="monitorElementId != null">#{monitorElementId},</if>
|
|
<if test="name != null">#{name},</if>
|
|
<if test="step != null">#{step},</if>
|
|
<if test="unit != null">#{unit},</if>
|
|
<if test="valueRange != null">#{valueRange},</if>
|
|
<if test="gmtCreate != null">#{gmtCreate},</if>
|
|
<if test="gmtModified != null">#{gmtModified},</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="updateDevPitmonitSouthsmosElementItem" parameterType="PitmonitSouthsmosElementItem">
|
|
update dev_pitmonit_southsmos_element_item
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="cfgId != null">cfgId = #{cfgId},</if>
|
|
<if test="srvId != null">srvId = #{srvId},</if>
|
|
<if test="monitorElementId != null">monitorElementId = #{monitorElementId},</if>
|
|
<if test="name != null">name = #{name},</if>
|
|
<if test="step != null">step = #{step},</if>
|
|
<if test="unit != null">unit = #{unit},</if>
|
|
<if test="valueRange != null">valueRange = #{valueRange},</if>
|
|
<if test="gmtCreate != null">gmtCreate = #{gmtCreate},</if>
|
|
<if test="gmtModified != null">gmtModified = #{gmtModified},</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="deleteDevPitmonitSouthsmosElementItemById" parameterType="Long">
|
|
delete from dev_pitmonit_southsmos_element_item where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteDevPitmonitSouthsmosElementItemByIds" parameterType="String">
|
|
delete from dev_pitmonit_southsmos_element_item where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |