日志列表时间筛选bug
This commit is contained in:
parent
c2e8bce942
commit
114be06ea2
@ -105,21 +105,21 @@
|
||||
|
||||
<select id="selectPageResult" resultType="cn.iocoder.yudao.module.system.controller.admin.worklog.vo.loginstance.LogInstanceRespVO">
|
||||
SELECT
|
||||
a.*,
|
||||
e.read_status AS readStatus,
|
||||
COUNT(b.work_log_id) AS comment,
|
||||
COUNT(c.log_instance_id) AS readCount,
|
||||
COUNT(d.log_instance_id) AS unreadCount
|
||||
a.*,
|
||||
e.read_status AS readStatus,
|
||||
COUNT(b.work_log_id) AS comment,
|
||||
COUNT(c.log_instance_id) AS readCount,
|
||||
COUNT(d.log_instance_id) AS unreadCount
|
||||
FROM
|
||||
work_log_instance_ext as a
|
||||
LEFT JOIN work_log_comment as b ON a.id = b.work_log_id
|
||||
LEFT JOIN work_log_read as e ON a.id = e.log_instance_id and e.read_user_id = #{userId}
|
||||
LEFT JOIN work_log_read as c ON a.id = c.log_instance_id and c.read_status = 1
|
||||
LEFT JOIN work_log_read as d ON a.id = d.log_instance_id and d.read_status = 0
|
||||
work_log_instance_ext as a
|
||||
LEFT JOIN work_log_comment as b ON a.id = b.work_log_id
|
||||
LEFT JOIN work_log_read as e ON a.id = e.log_instance_id and e.read_user_id = #{userId}
|
||||
LEFT JOIN work_log_read as c ON a.id = c.log_instance_id and c.read_status = 1
|
||||
LEFT JOIN work_log_read as d ON a.id = d.log_instance_id and d.read_status = 0
|
||||
<where>
|
||||
<if test="logId != null">
|
||||
and a.id = #{logId}
|
||||
</if>
|
||||
</if>
|
||||
<if test="reqVO.type != null">
|
||||
and a.type = #{reqVO.type}
|
||||
</if>
|
||||
@ -129,8 +129,13 @@
|
||||
<if test="reqVO.startUserId != null">
|
||||
and a.start_user_id = #{reqVO.startUserId}
|
||||
</if>
|
||||
<if test="reqVO.createTime != null">
|
||||
and a.create_time BETWEEN #{reqVO.createTime[0]} and #{reqVO.createTime[1]}
|
||||
<if test="reqVO.createTime != null and reqVO.createTime.length > 0">
|
||||
<if test="reqVO.createTime[0] != null">
|
||||
and a.create_time >= #{reqVO.createTime[0]}
|
||||
</if>
|
||||
<if test="reqVO.createTime[1] != null">
|
||||
and a.create_time <= #{reqVO.createTime[1]}
|
||||
</if>
|
||||
</if>
|
||||
<if test="reqVO.unRead != null">
|
||||
and e.read_status = 0
|
||||
|
Loading…
Reference in New Issue
Block a user