123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <?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.system.mapper.TShouhuanAlarmListMapper">
-
- <resultMap type="TShouhuanAlarmList" id="TShouhuanAlarmListResult">
- <result property="id" column="id" />
- <result property="facilityId" column="facility_id" />
- <result property="shinfoId" column="shinfo_id" />
- <result property="deviceIdCode" column="device_id_code" />
- <result property="gpsLong" column="gps_long" />
- <result property="gpsLat" column="gps_lat" />
- <result property="speed" column="speed" />
- <result property="direction" column="direction" />
- <result property="poster" column="poster" />
- <result property="electricQuantity" column="electric_quantity" />
- <result property="stepNumber" column="step_number" />
- <result property="rollNumber" column="roll_number" />
- <result property="statusType" column="status_type" />
- <result property="alarmType" column="alarm_type" />
- <result property="terminalStatus" column="terminal_status" />
- <result property="createTime" column="createtime" />
- <result property="alarmFromType" column="alarm_from_type" />
- <result property="msg" column="msg" />
- <result property="isSend" column="is_send" />
- <result property="sendTime" column="send_time" />
- </resultMap>
- <sql id="selectTShouhuanAlarmListVo">
- select id, facility_id, shinfo_id, device_id_code, gps_long, gps_lat, speed, direction, poster, electric_quantity, step_number, roll_number, status_type, alarm_type, terminal_status, createtime, alarm_from_type, msg, is_send, send_time from t_shouhuan_alarm_list
- </sql>
- <select id="selectTShouhuanAlarmListList" parameterType="TShouhuanAlarmList" resultMap="TShouhuanAlarmListResult">
- <include refid="selectTShouhuanAlarmListVo"/>
- <where>
- <if test="facilityId != null "> and facility_id = #{facilityId}</if>
- <if test="shinfoId != null "> and shinfo_id = #{shinfoId}</if>
- <if test="deviceIdCode != null and deviceIdCode != ''"> and device_id_code = #{deviceIdCode}</if>
- <if test="gpsLong != null "> and gps_long = #{gpsLong}</if>
- <if test="gpsLat != null "> and gps_lat = #{gpsLat}</if>
- <if test="speed != null "> and speed = #{speed}</if>
- <if test="direction != null "> and direction = #{direction}</if>
- <if test="poster != null "> and poster = #{poster}</if>
- <if test="electricQuantity != null "> and electric_quantity = #{electricQuantity}</if>
- <if test="stepNumber != null "> and step_number = #{stepNumber}</if>
- <if test="rollNumber != null "> and roll_number = #{rollNumber}</if>
- <if test="statusType != null "> and status_type = #{statusType}</if>
- <if test="alarmType != null "> and alarm_type = #{alarmType}</if>
- <if test="terminalStatus != null and terminalStatus != ''"> and terminal_status = #{terminalStatus}</if>
- <if test="createTime != null "> and createtime = #{createTime}</if>
- <if test="alarmFromType != null "> and alarm_from_type = #{alarmFromType}</if>
- <if test="msg != null and msg != ''"> and msg = #{msg}</if>
- <if test="isSend != null "> and is_send = #{isSend}</if>
- <if test="sendTime != null "> and send_time = #{sendTime}</if>
- </where>
- </select>
-
- <select id="selectTShouhuanAlarmListById" parameterType="Integer" resultMap="TShouhuanAlarmListResult">
- <include refid="selectTShouhuanAlarmListVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertTShouhuanAlarmList" parameterType="TShouhuanAlarmList" useGeneratedKeys="true" keyProperty="id">
- insert into t_shouhuan_alarm_list
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="facilityId != null">facility_id,</if>
- <if test="shinfoId != null">shinfo_id,</if>
- <if test="deviceIdCode != null">device_id_code,</if>
- <if test="gpsLong != null">gps_long,</if>
- <if test="gpsLat != null">gps_lat,</if>
- <if test="speed != null">speed,</if>
- <if test="direction != null">direction,</if>
- <if test="poster != null">poster,</if>
- <if test="electricQuantity != null">electric_quantity,</if>
- <if test="stepNumber != null">step_number,</if>
- <if test="rollNumber != null">roll_number,</if>
- <if test="statusType != null">status_type,</if>
- <if test="alarmType != null">alarm_type,</if>
- <if test="terminalStatus != null">terminal_status,</if>
- <if test="createTime != null">createtime,</if>
- <if test="alarmFromType != null">alarm_from_type,</if>
- <if test="msg != null">msg,</if>
- <if test="isSend != null">is_send,</if>
- <if test="sendTime != null">send_time,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="facilityId != null">#{facilityId},</if>
- <if test="shinfoId != null">#{shinfoId},</if>
- <if test="deviceIdCode != null">#{deviceIdCode},</if>
- <if test="gpsLong != null">#{gpsLong},</if>
- <if test="gpsLat != null">#{gpsLat},</if>
- <if test="speed != null">#{speed},</if>
- <if test="direction != null">#{direction},</if>
- <if test="poster != null">#{poster},</if>
- <if test="electricQuantity != null">#{electricQuantity},</if>
- <if test="stepNumber != null">#{stepNumber},</if>
- <if test="rollNumber != null">#{rollNumber},</if>
- <if test="statusType != null">#{statusType},</if>
- <if test="alarmType != null">#{alarmType},</if>
- <if test="terminalStatus != null">#{terminalStatus},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="alarmFromType != null">#{alarmFromType},</if>
- <if test="msg != null">#{msg},</if>
- <if test="isSend != null">#{isSend},</if>
- <if test="sendTime != null">#{sendTime},</if>
- </trim>
- </insert>
- <update id="updateTShouhuanAlarmList" parameterType="TShouhuanAlarmList">
- update t_shouhuan_alarm_list
- <trim prefix="SET" suffixOverrides=",">
- <if test="facilityId != null">facility_id = #{facilityId},</if>
- <if test="shinfoId != null">shinfo_id = #{shinfoId},</if>
- <if test="deviceIdCode != null">device_id_code = #{deviceIdCode},</if>
- <if test="gpsLong != null">gps_long = #{gpsLong},</if>
- <if test="gpsLat != null">gps_lat = #{gpsLat},</if>
- <if test="speed != null">speed = #{speed},</if>
- <if test="direction != null">direction = #{direction},</if>
- <if test="poster != null">poster = #{poster},</if>
- <if test="electricQuantity != null">electric_quantity = #{electricQuantity},</if>
- <if test="stepNumber != null">step_number = #{stepNumber},</if>
- <if test="rollNumber != null">roll_number = #{rollNumber},</if>
- <if test="statusType != null">status_type = #{statusType},</if>
- <if test="alarmType != null">alarm_type = #{alarmType},</if>
- <if test="terminalStatus != null">terminal_status = #{terminalStatus},</if>
- <if test="createTime != null">createtime = #{createTime},</if>
- <if test="alarmFromType != null">alarm_from_type = #{alarmFromType},</if>
- <if test="msg != null">msg = #{msg},</if>
- <if test="isSend != null">is_send = #{isSend},</if>
- <if test="sendTime != null">send_time = #{sendTime},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteTShouhuanAlarmListById" parameterType="Integer">
- delete from t_shouhuan_alarm_list where id = #{id}
- </delete>
- <delete id="deleteTShouhuanAlarmListByIds" parameterType="String">
- delete from t_shouhuan_alarm_list where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|