修改 日志分页查询sql

This commit is contained in:
furongxin 2024-09-10 23:57:56 +08:00
parent 5d91b50418
commit c4b5279167
2 changed files with 5 additions and 4 deletions

View File

@ -237,7 +237,7 @@ public class LogInstanceServiceImpl implements LogInstanceService {
List<Long> leaderUserIds = new ArrayList<>();
//判断特殊情况 只需查看各部门领导人得日志
if (pageReqVO.getIsBoss() != null && pageReqVO.getIsBoss() == 1) {
if (pageReqVO.getIsProduce() == null && pageReqVO.getIsBoss() != null && pageReqVO.getIsBoss() == 1) {
//查询两级以及三级部门得领导人
//以及岗位为总监或副总监的用户

View File

@ -147,17 +147,18 @@
<if test="pagingType == 1">
and a.start_user_id = #{userId}
</if>
<if test="reqVO.isBoss != null">
<if test="reqVO.isBoss != null and reqVO.isProduce == null">
and a.start_user_id in
<foreach collection="userIds" item="userId" open="(" close=")" separator=",">
#{userId}
</foreach>
</if>
</where>
-- GROUP BY a.id, readStatus, readCount, unReadCount, comment
GROUP BY a.id
ORDER BY
a.time DESC,
post.sort
post.sort,
a.start_user_id
</select>
<select id="getNextOrUp"
resultType="cn.iocoder.yudao.module.system.controller.admin.worklog.vo.loginstance.LogInstanceRespVO">