123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <?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.PerformanceMonitorModelMapper">
- <resultMap type="PerformanceMonitorModel" id="PerformanceMonitorModelResult">
- <result property="id" column="id"/>
- <result property="object" column="object"/>
- <result property="parameter" column="parameter"/>
- <result property="stateCondition" column="state_condition"/>
- <result property="valueMethod" column="value_method"/>
- <result property="alarmValue" column="alarm_value"/>
- <result property="thresholdValue" column="threshold_value"/>
- <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="selectPerformanceMonitorModelVo">
- select id,
- object,
- parameter,
- state_condition,
- value_method,
- alarm_value,
- threshold_value,
- is_delete,
- create_by,
- create_time,
- update_by,
- update_time
- from PHM.PHM_PERFORMANCE_MONITOR_MODEL
- </sql>
- <select id="selectPerformanceMonitorModelList" parameterType="PerformanceMonitorModel"
- resultMap="PerformanceMonitorModelResult">
- <include refid="selectPerformanceMonitorModelVo"/>
- <where>
- <if test="object != null and object != ''">and object = #{object}</if>
- <if test="parameter != null and parameter != ''">and parameter = #{parameter}</if>
- <if test="stateCondition != null and stateCondition != ''">and state_condition = #{stateCondition}</if>
- <if test="valueMethod != null and valueMethod != ''">and value_method = #{valueMethod}</if>
- <if test="alarmValue != null and alarmValue != ''">and alarm_value = #{alarmValue}</if>
- <if test="thresholdValue != null and thresholdValue != ''">and threshold_value = #{thresholdValue}</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="selectPerformanceMonitorModelById" parameterType="Long" resultMap="PerformanceMonitorModelResult">
- <include refid="selectPerformanceMonitorModelVo"/>
- where id = #{id}
- </select>
- <insert id="insertPerformanceMonitorModel" parameterType="PerformanceMonitorModel">
- insert into PHM.PHM_PERFORMANCE_MONITOR_MODEL
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="object != null">object,</if>
- <if test="parameter != null">parameter,</if>
- <if test="stateCondition != null">state_condition,</if>
- <if test="valueMethod != null">value_method,</if>
- <if test="alarmValue != null">alarm_value,</if>
- <if test="thresholdValue != null">threshold_value,</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="object != null">#{object},</if>
- <if test="parameter != null">#{parameter},</if>
- <if test="stateCondition != null">#{stateCondition},</if>
- <if test="valueMethod != null">#{valueMethod},</if>
- <if test="alarmValue != null">#{alarmValue},</if>
- <if test="thresholdValue != null">#{thresholdValue},</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="updatePerformanceMonitorModel" parameterType="PerformanceMonitorModel">
- update PHM.PHM_PERFORMANCE_MONITOR_MODEL
- <trim prefix="SET" suffixOverrides=",">
- <if test="object != null">object = #{object},</if>
- <if test="parameter != null">parameter = #{parameter},</if>
- <if test="stateCondition != null">state_condition = #{stateCondition},</if>
- <if test="valueMethod != null">value_method = #{valueMethod},</if>
- <if test="alarmValue != null">alarm_value = #{alarmValue},</if>
- <if test="thresholdValue != null">threshold_value = #{thresholdValue},</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="deletePerformanceMonitorModelById" parameterType="Long">
- delete
- from PHM.PHM_PERFORMANCE_MONITOR_MODEL
- where id = #{id}
- </delete>
- <delete id="deletePerformanceMonitorModelByIds" parameterType="String">
- delete from PHM.PHM_PERFORMANCE_MONITOR_MODEL where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|