Browse Source

设备数据

develop
wangsixiang 3 months ago
parent
commit
bf145558ca
  1. 29
      zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml

29
zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml

@ -133,7 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="logId != null">log_id,</if> <if test="logId != null">log_id,</if>
<if test="position != null">position,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="eventId != null and eventId != ''">#{eventId},</if> <if test="eventId != null and eventId != ''">#{eventId},</if>
@ -156,7 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="logId != null">#{logId},</if> <if test="logId != null">#{logId},</if>
<if test="position != null">#{position},</if>
</trim> </trim>
</insert> </insert>
@ -183,6 +183,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
<if test="logId != null">log_id = #{logId},</if> <if test="logId != null">log_id = #{logId},</if>
<if test="position != null">position = #{position},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
@ -343,11 +344,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ORDER BY h.eventType, pc.publish_channels; ORDER BY h.eventType, pc.publish_channels;
</select> </select>
<select id="selectDcPublishManageStatistics" resultType="com.zc.business.domain.DcPublishManage"> <select id="selectDcPublishManageStatistics" resultType="com.zc.business.domain.DcPublishManage">
select manage.id, CASE select manage.id,
WHEN manage.publish_channels = 8 THEN event.stake_mark manage.position,
WHEN manage.publish_channels IN (4, 7) THEN log.dc_device_name # CASE
ELSE'未知' # WHEN manage.publish_channels = 8 THEN event.stake_mark
END AS position, # WHEN manage.publish_channels IN (4, 7) THEN log.dc_device_name
# ELSE'未知'
# END AS position,
manage.publisher,manage.publish_channels,manage.publish_status,manage.content_details,publish_time manage.publisher,manage.publish_channels,manage.publish_status,manage.content_details,publish_time
from dc_publish_manage as manage from dc_publish_manage as manage
left join dc_event as event on event.id=manage.event_id left join dc_event as event on event.id=manage.event_id
@ -366,4 +369,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
DATE_FORMAT(oper_time, '%Y-%m-%d %H:%i:%s') operTime DATE_FORMAT(oper_time, '%Y-%m-%d %H:%i:%s') operTime
from dc_oper_log where dc_device_type=2 from dc_oper_log where dc_device_type=2
</select> </select>
<select id="selectDcPublishManage" resultType="com.zc.business.domain.DcPublishManage">
select manage.id,
CASE
WHEN manage.publish_channels = 8 THEN event.stake_mark
WHEN manage.publish_channels IN (4, 7) THEN log.dc_device_name
ELSE'未知'
END AS position
from dc_publish_manage as manage
left join dc_event as event on event.id=manage.event_id
left join dc_oper_log as log on log.id=manage.log_id
</select>
</mapper> </mapper>

Loading…
Cancel
Save