用户头像调整

This commit is contained in:
aikai 2024-04-22 09:52:09 +08:00
parent ed2af77ec6
commit 383ada505f
3 changed files with 23 additions and 6 deletions

View File

@ -55,5 +55,9 @@ public interface LogInstanceMapper extends BaseMapperX<LogInstanceDO> {
* @param type * @param type
* @return * @return
*/ */
LogInstanceRespVO getNextOrUp(@Param("reqVO") LogInstancePageReqVO dto, @Param("id") Long id, @Param("userId") Long userId, @Param("type") Integer type, @Param("pagingType") Integer pagingType); LogInstanceRespVO getNextOrUp(@Param("reqVO") LogInstancePageReqVO dto,
@Param("id") Long id, @Param("userId") Long userId,
@Param("type") Integer type,
@Param("pagingType") Integer pagingType,
@Param("userIds") List<Long> userIds);
} }

View File

@ -234,7 +234,7 @@ public class LogInstanceServiceImpl implements LogInstanceService {
List<Long> leaderUserIds = new ArrayList<>(); List<Long> leaderUserIds = new ArrayList<>();
//判断特殊情况 只需查看各部门领导人得日志 //判断特殊情况 只需查看各部门领导人得日志
if (pageReqVO.getIsBoss()!= null && pageReqVO.getIsBoss() == 1) { if (pageReqVO.getIsBoss() != null && pageReqVO.getIsBoss() == 1) {
//查询两级以及三级部门得领导人 //查询两级以及三级部门得领导人
//以及岗位为总监或副总监的用户 //以及岗位为总监或副总监的用户
@ -368,8 +368,15 @@ public class LogInstanceServiceImpl implements LogInstanceService {
@Override @Override
public LogInstanceNextOrUpVO getNextOrUp(LogInstancePageReqVO dto, Long id, Integer pagingType) { public LogInstanceNextOrUpVO getNextOrUp(LogInstancePageReqVO dto, Long id, Integer pagingType) {
LogInstanceNextOrUpVO vo = new LogInstanceNextOrUpVO(); LogInstanceNextOrUpVO vo = new LogInstanceNextOrUpVO();
LogInstanceRespVO upLogInstance = logInstanceMapper.getNextOrUp(dto, id, getLoginUserId(), 1, pagingType); List<Long> leaderUserIds = new ArrayList<>();
LogInstanceRespVO nextLogInstance = logInstanceMapper.getNextOrUp(dto, id, getLoginUserId(), 0, pagingType); //判断特殊情况 只需查看各部门领导人得日志
if (dto.getIsBoss() != null && dto.getIsBoss() == 1) {
//查询两级以及三级部门得领导人
//以及岗位为总监或副总监的用户
leaderUserIds = adminUserService.getUserByBoss();
}
LogInstanceRespVO upLogInstance = logInstanceMapper.getNextOrUp(dto, id, getLoginUserId(), 1, pagingType, leaderUserIds);
LogInstanceRespVO nextLogInstance = logInstanceMapper.getNextOrUp(dto, id, getLoginUserId(), 0, pagingType, leaderUserIds);
vo.setUpLogInstance(upLogInstance); vo.setUpLogInstance(upLogInstance);
vo.setNextLogInstance(nextLogInstance); vo.setNextLogInstance(nextLogInstance);
//获取日志详情 //获取日志详情

View File

@ -168,8 +168,8 @@
and a.create_time &lt;= #{reqVO.createTime[1]} and a.create_time &lt;= #{reqVO.createTime[1]}
</if> </if>
</if> </if>
<if test="reqVO.unRead != null"> <if test="reqVO.readStatus != null">
and e.read_status = 0 and e.read_status = #{reqVO.readStatus}
</if> </if>
<if test="pagingType == 0"> <if test="pagingType == 0">
and a.start_user_id != #{userId} and a.start_user_id != #{userId}
@ -177,6 +177,12 @@
<if test="pagingType == 1"> <if test="pagingType == 1">
and a.start_user_id = #{userId} and a.start_user_id = #{userId}
</if> </if>
<if test="reqVO.isBoss != null">
and a.start_user_id in
<foreach collection="userIds" item="userId" open="(" close=")" separator=",">
#{userId}
</foreach>
</if>
</where> </where>
<if test="type == 0"> <if test="type == 0">
order by id desc order by id desc