123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <?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.phm.manage.mapper.MonitorParameterConfigMapper">
- <resultMap type="MonitorParameterConfig" id="MonitorParameterConfigResult">
- <result property="id" column="id"/>
- <result property="name" column="name"/>
- <result property="busRotocol" column="bus_rotocol"/>
- <result property="dataBlock" column="data_block"/>
- <result property="dataWord" column="data_word"/>
- <result property="isDelete" column="is_delete"/>
- <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="selectMonitorParameterConfigVo">
- select id,
- name,
- bus_rotocol,
- data_block,
- data_word,
- is_delete,
- create_by,
- create_time,
- update_by,
- update_time
- from PHM.PHM_MONITOR_PARAMETER_CONFIG
- </sql>
- <select id="selectMonitorParameterConfigList" parameterType="MonitorParameterConfig"
- resultMap="MonitorParameterConfigResult">
- <include refid="selectMonitorParameterConfigVo"/>
- <where>
- <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
- <if test="busRotocol != null and busRotocol != ''">and bus_rotocol = #{busRotocol}</if>
- <if test="dataBlock != null and dataBlock != ''">and data_block = #{dataBlock}</if>
- <if test="dataWord != null and dataWord != ''">and data_word = #{dataWord}</if>
- <if test="isDelete != null ">and is_delete = #{isDelete}</if>
- <if test="createBy != null and createBy != ''">and create_by = #{createBy}</if>
- <if test="createTime != null ">and create_time = #{createTime}</if>
- <if test="updateBy != null and updateBy != ''">and update_by = #{updateBy}</if>
- <if test="updateTime != null ">and update_time = #{updateTime}</if>
- </where>
- </select>
- <select id="selectMonitorParameterConfigById" parameterType="Long" resultMap="MonitorParameterConfigResult">
- <include refid="selectMonitorParameterConfigVo"/>
- where id = #{id}
- </select>
- <insert id="insertMonitorParameterConfig" parameterType="MonitorParameterConfig">
- insert into PHM.PHM_MONITOR_PARAMETER_CONFIG
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="name != null">name,</if>
- <if test="busRotocol != null">bus_rotocol,</if>
- <if test="dataBlock != null">data_block,</if>
- <if test="dataWord != null">data_word,</if>
- <if test="isDelete != null">is_delete,</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="id != null">#{id},</if>
- <if test="name != null">#{name},</if>
- <if test="busRotocol != null">#{busRotocol},</if>
- <if test="dataBlock != null">#{dataBlock},</if>
- <if test="dataWord != null">#{dataWord},</if>
- <if test="isDelete != null">#{isDelete},</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="updateMonitorParameterConfig" parameterType="MonitorParameterConfig">
- update PHM.PHM_MONITOR_PARAMETER_CONFIG
- <trim prefix="SET" suffixOverrides=",">
- <if test="name != null">name = #{name},</if>
- <if test="busRotocol != null">bus_rotocol = #{busRotocol},</if>
- <if test="dataBlock != null">data_block = #{dataBlock},</if>
- <if test="dataWord != null">data_word = #{dataWord},</if>
- <if test="isDelete != null">is_delete = #{isDelete},</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="deleteMonitorParameterConfigById" parameterType="Long">
- delete
- from PHM.PHM_MONITOR_PARAMETER_CONFIG
- where id = #{id}
- </delete>
- <delete id="deleteMonitorParameterConfigByIds" parameterType="String">
- delete from PHM.PHM_MONITOR_PARAMETER_CONFIG where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|