2021与蓝度共同重构项目,服务端
liuhaonan
2022-10-21 0a30812acaa26ebe654340f7e749a6801b63b194
ximon-admin/src/main/java/com/sandu/ximon/admin/service/IpVolumeMissionService.java
@@ -370,7 +370,7 @@
        //排序字段
        String orderByResult = "id";
        String orderByResult = "task_id";
        //正序、倒叙
        String orderBySeq = "ASC";
        if (order != null) {
@@ -395,12 +395,14 @@
        }
        //排序方式
        String orderBy = orderByResult + " " + orderBySeq;
        PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), orderBy);
        if (baseConditionVO != null) {
            PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), orderBy);
        }
        List<IpVolumeMissionBo> ipVolumeMissionBos = new ArrayList<>();
        LambdaQueryWrapper<IpVolumeMission> eq = Wrappers.lambdaQuery(IpVolumeMission.class);
        PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize());
        //不是超管
        if (SecurityUtils.getClientId() != null) {
            eq = eq.eq(IpVolumeMission::getUserId, SecurityUtils.getUserId()).or(w -> {
@@ -435,12 +437,12 @@
        }
        if (SecurityUtils.getClientId() != null) {
            if (clientService.findClientId()) {
                if (byId.getUserId().equals(SecurityUtils.getUserId())) {
                if (!byId.getUserId().equals(SecurityUtils.getUserId())) {
                    throw new BusinessException("任务归属错误");
                }
            } else {
                if (byId.getClientId().equals(SecurityUtils.getUserId())) {
                if (!byId.getClientId().equals(SecurityUtils.getUserId())&&!byId.getUserId().equals(SecurityUtils.getUserId())) {
                    throw new BusinessException("任务归属错误");
                }
            }