TShouhuanAlarmListMapper.xml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.system.mapper.TShouhuanAlarmListMapper">
  6. <resultMap type="TShouhuanAlarmList" id="TShouhuanAlarmListResult">
  7. <result property="id" column="id" />
  8. <result property="facilityId" column="facility_id" />
  9. <result property="shinfoId" column="shinfo_id" />
  10. <result property="deviceIdCode" column="device_id_code" />
  11. <result property="gpsLong" column="gps_long" />
  12. <result property="gpsLat" column="gps_lat" />
  13. <result property="speed" column="speed" />
  14. <result property="direction" column="direction" />
  15. <result property="poster" column="poster" />
  16. <result property="electricQuantity" column="electric_quantity" />
  17. <result property="stepNumber" column="step_number" />
  18. <result property="rollNumber" column="roll_number" />
  19. <result property="statusType" column="status_type" />
  20. <result property="alarmType" column="alarm_type" />
  21. <result property="terminalStatus" column="terminal_status" />
  22. <result property="createTime" column="createtime" />
  23. <result property="alarmFromType" column="alarm_from_type" />
  24. <result property="msg" column="msg" />
  25. <result property="isSend" column="is_send" />
  26. <result property="sendTime" column="send_time" />
  27. </resultMap>
  28. <sql id="selectTShouhuanAlarmListVo">
  29. 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
  30. </sql>
  31. <select id="selectTShouhuanAlarmListList" parameterType="TShouhuanAlarmList" resultMap="TShouhuanAlarmListResult">
  32. <include refid="selectTShouhuanAlarmListVo"/>
  33. <where>
  34. <if test="facilityId != null "> and facility_id = #{facilityId}</if>
  35. <if test="shinfoId != null "> and shinfo_id = #{shinfoId}</if>
  36. <if test="deviceIdCode != null and deviceIdCode != ''"> and device_id_code = #{deviceIdCode}</if>
  37. <if test="gpsLong != null "> and gps_long = #{gpsLong}</if>
  38. <if test="gpsLat != null "> and gps_lat = #{gpsLat}</if>
  39. <if test="speed != null "> and speed = #{speed}</if>
  40. <if test="direction != null "> and direction = #{direction}</if>
  41. <if test="poster != null "> and poster = #{poster}</if>
  42. <if test="electricQuantity != null "> and electric_quantity = #{electricQuantity}</if>
  43. <if test="stepNumber != null "> and step_number = #{stepNumber}</if>
  44. <if test="rollNumber != null "> and roll_number = #{rollNumber}</if>
  45. <if test="statusType != null "> and status_type = #{statusType}</if>
  46. <if test="alarmType != null "> and alarm_type = #{alarmType}</if>
  47. <if test="terminalStatus != null and terminalStatus != ''"> and terminal_status = #{terminalStatus}</if>
  48. <if test="createTime != null "> and createtime = #{createTime}</if>
  49. <if test="alarmFromType != null "> and alarm_from_type = #{alarmFromType}</if>
  50. <if test="msg != null and msg != ''"> and msg = #{msg}</if>
  51. <if test="isSend != null "> and is_send = #{isSend}</if>
  52. <if test="sendTime != null "> and send_time = #{sendTime}</if>
  53. </where>
  54. </select>
  55. <select id="selectTShouhuanAlarmListById" parameterType="Integer" resultMap="TShouhuanAlarmListResult">
  56. <include refid="selectTShouhuanAlarmListVo"/>
  57. where id = #{id}
  58. </select>
  59. <insert id="insertTShouhuanAlarmList" parameterType="TShouhuanAlarmList" useGeneratedKeys="true" keyProperty="id">
  60. insert into t_shouhuan_alarm_list
  61. <trim prefix="(" suffix=")" suffixOverrides=",">
  62. <if test="facilityId != null">facility_id,</if>
  63. <if test="shinfoId != null">shinfo_id,</if>
  64. <if test="deviceIdCode != null">device_id_code,</if>
  65. <if test="gpsLong != null">gps_long,</if>
  66. <if test="gpsLat != null">gps_lat,</if>
  67. <if test="speed != null">speed,</if>
  68. <if test="direction != null">direction,</if>
  69. <if test="poster != null">poster,</if>
  70. <if test="electricQuantity != null">electric_quantity,</if>
  71. <if test="stepNumber != null">step_number,</if>
  72. <if test="rollNumber != null">roll_number,</if>
  73. <if test="statusType != null">status_type,</if>
  74. <if test="alarmType != null">alarm_type,</if>
  75. <if test="terminalStatus != null">terminal_status,</if>
  76. <if test="createTime != null">createtime,</if>
  77. <if test="alarmFromType != null">alarm_from_type,</if>
  78. <if test="msg != null">msg,</if>
  79. <if test="isSend != null">is_send,</if>
  80. <if test="sendTime != null">send_time,</if>
  81. </trim>
  82. <trim prefix="values (" suffix=")" suffixOverrides=",">
  83. <if test="facilityId != null">#{facilityId},</if>
  84. <if test="shinfoId != null">#{shinfoId},</if>
  85. <if test="deviceIdCode != null">#{deviceIdCode},</if>
  86. <if test="gpsLong != null">#{gpsLong},</if>
  87. <if test="gpsLat != null">#{gpsLat},</if>
  88. <if test="speed != null">#{speed},</if>
  89. <if test="direction != null">#{direction},</if>
  90. <if test="poster != null">#{poster},</if>
  91. <if test="electricQuantity != null">#{electricQuantity},</if>
  92. <if test="stepNumber != null">#{stepNumber},</if>
  93. <if test="rollNumber != null">#{rollNumber},</if>
  94. <if test="statusType != null">#{statusType},</if>
  95. <if test="alarmType != null">#{alarmType},</if>
  96. <if test="terminalStatus != null">#{terminalStatus},</if>
  97. <if test="createTime != null">#{createTime},</if>
  98. <if test="alarmFromType != null">#{alarmFromType},</if>
  99. <if test="msg != null">#{msg},</if>
  100. <if test="isSend != null">#{isSend},</if>
  101. <if test="sendTime != null">#{sendTime},</if>
  102. </trim>
  103. </insert>
  104. <update id="updateTShouhuanAlarmList" parameterType="TShouhuanAlarmList">
  105. update t_shouhuan_alarm_list
  106. <trim prefix="SET" suffixOverrides=",">
  107. <if test="facilityId != null">facility_id = #{facilityId},</if>
  108. <if test="shinfoId != null">shinfo_id = #{shinfoId},</if>
  109. <if test="deviceIdCode != null">device_id_code = #{deviceIdCode},</if>
  110. <if test="gpsLong != null">gps_long = #{gpsLong},</if>
  111. <if test="gpsLat != null">gps_lat = #{gpsLat},</if>
  112. <if test="speed != null">speed = #{speed},</if>
  113. <if test="direction != null">direction = #{direction},</if>
  114. <if test="poster != null">poster = #{poster},</if>
  115. <if test="electricQuantity != null">electric_quantity = #{electricQuantity},</if>
  116. <if test="stepNumber != null">step_number = #{stepNumber},</if>
  117. <if test="rollNumber != null">roll_number = #{rollNumber},</if>
  118. <if test="statusType != null">status_type = #{statusType},</if>
  119. <if test="alarmType != null">alarm_type = #{alarmType},</if>
  120. <if test="terminalStatus != null">terminal_status = #{terminalStatus},</if>
  121. <if test="createTime != null">createtime = #{createTime},</if>
  122. <if test="alarmFromType != null">alarm_from_type = #{alarmFromType},</if>
  123. <if test="msg != null">msg = #{msg},</if>
  124. <if test="isSend != null">is_send = #{isSend},</if>
  125. <if test="sendTime != null">send_time = #{sendTime},</if>
  126. </trim>
  127. where id = #{id}
  128. </update>
  129. <delete id="deleteTShouhuanAlarmListById" parameterType="Integer">
  130. delete from t_shouhuan_alarm_list where id = #{id}
  131. </delete>
  132. <delete id="deleteTShouhuanAlarmListByIds" parameterType="String">
  133. delete from t_shouhuan_alarm_list where id in
  134. <foreach item="id" collection="array" open="(" separator="," close=")">
  135. #{id}
  136. </foreach>
  137. </delete>
  138. </mapper>