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="createTime != null">create_time,</if>
<if test="logId != null">log_id,</if>
<if test="position != null">position,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<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="createTime != null">#{createTime},</if>
<if test="logId != null">#{logId},</if>
<if test="position != null">#{position},</if>
</trim>
</insert>
@ -183,6 +183,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="logId != null">log_id = #{logId},</if>
<if test="position != null">position = #{position},</if>
</trim>
where id = #{id}
</update>
@ -343,11 +344,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ORDER BY h.eventType, pc.publish_channels;
</select>
<select id="selectDcPublishManageStatistics" 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,
select manage.id,
manage.position,
# 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,
manage.publisher,manage.publish_channels,manage.publish_status,manage.content_details,publish_time
from dc_publish_manage as manage
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
from dc_oper_log where dc_device_type=2
</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>

Loading…
Cancel
Save