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.zhyc.xps.goaf.mapper.GoafSensorAlarmReportMapper">
- <resultMap id="GoafSensorAlarmReportMapper" type="com.zhyc.xps.goaf.entity.GoafSensorAlarmReport">
- <id column="goaf_sensor_alarm_report_id" property="goafSensorAlarmReportId" jdbcType="BIGINT"/>
- <result column="oc_id" property="ocId" jdbcType="BIGINT"/>
- <result column="goaf_sensor_alarm_finish_num" property="goafSensorAlarmFinishNum" jdbcType="BIGINT"/>
- <result column="goaf_sensor_alarm_end_num" property="goafSensorAlarmEndNum" jdbcType="BIGINT"/>
- <result column="goaf_sensor_alarm_report_content" property="goafSensorAlarmReportContent" jdbcType="VARCHAR"/>
- <result column="goaf_sensor_alarm_report_time" property="goafSensorAlarmReportTime" jdbcType="TIMESTAMP"/>
- </resultMap>
- <select id="getByAlarmReportId" parameterType="java.util.Map" resultMap="GoafSensorAlarmReportMapper">
- SELECT *
- FROM goaf_sensor_alarm_report
- WHERE goaf_sensor_alarm_report_id = #{goafSensorAlarmReportId ,jdbcType=BIGINT}
- </select>
- <select id="getByList" parameterType="java.util.Map" resultMap="GoafSensorAlarmReportMapper">
- SELECT *
- FROM goaf_sensor_alarm_report
- WHERE oc_id = #{ocId ,jdbcType=BIGINT}
- ORDER BY goaf_sensor_alarm_report_time DESC
- </select>
- <select id="getByPage" parameterType="java.util.Map" resultMap="GoafSensorAlarmReportMapper">
- SELECT *
- FROM goaf_sensor_alarm_report
- WHERE oc_id = #{ocId ,jdbcType=BIGINT}
- ORDER BY goaf_sensor_alarm_report_time DESC
- </select>
- <insert id="create" parameterType="com.zhyc.xps.goaf.entity.GoafSensorAlarmReport">
- insert into goaf_sensor_alarm_report
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="goafSensorAlarmReportId != null">
- goaf_sensor_alarm_report_id,
- </if>
- <if test="ocId != null">
- oc_id,
- </if>
- <if test="goafSensorAlarmFinishNum != null">
- goaf_sensor_alarm_finish_num,
- </if>
- <if test="goafSensorAlarmEndNum != null">
- goaf_sensor_alarm_end_num,
- </if>
- <if test="goafSensorAlarmReportContent != null and goafSensorAlarmReportContent != ''">
- goaf_sensor_alarm_report_content,
- </if>
- <if test="goafSensorAlarmReportTime != null">
- goaf_sensor_alarm_report_time,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="goafSensorAlarmReportId != null">
- #{goafSensorAlarmReportId, jdbcType=BIGINT},
- </if>
- <if test="ocId != null">
- #{ocId, jdbcType=BIGINT},
- </if>
- <if test="goafSensorAlarmFinishNum != null">
- #{goafSensorAlarmFinishNum, jdbcType=BIGINT},
- </if>
- <if test="goafSensorAlarmEndNum != null">
- #{goafSensorAlarmEndNum, jdbcType=BIGINT},
- </if>
- <if test="goafSensorAlarmReportContent != null and goafSensorAlarmReportContent != ''">
- #{goafSensorAlarmReportContent, jdbcType=VARCHAR},
- </if>
- <if test="goafSensorAlarmReportTime != null">
- #{goafSensorAlarmReportTime, jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <!--Update更新-->
- <update id="update" parameterType="com.zhyc.xps.goaf.entity.GoafSensorAlarmReport">
- UPDATE goaf_sensor_alarm_report
- <trim suffixOverrides=",">
- <set>
- <if test="goafSensorAlarmFinishNum != null">
- goaf_sensor_alarm_finish_num = #{goafSensorAlarmFinishNum, jdbcType=BIGINT},
- </if>
- <if test="goafSensorAlarmEndNum != null">
- goaf_sensor_alarm_end_num = #{goafSensorAlarmEndNum, jdbcType=BIGINT},
- </if>
- <if test="goafSensorAlarmReportContent != null and goafSensorAlarmReportContent != ''">
- goaf_sensor_alarm_report_content = #{goafSensorAlarmReportContent, jdbcType=VARCHAR},
- </if>
- </set>
- </trim>
- WHERE goaf_sensor_alarm_report_id = #{goafSensorAlarmReportId, jdbcType=BIGINT}
- </update>
- </mapper>
|