2021与蓝度共同重构项目,服务端
zhanzhiqin
2022-10-20 4e76b9737e036c18e8a9e840dc443615ffcec348
ximon-admin/src/main/java/com/sandu/ximon/admin/service/IpVolumeMissionService.java
@@ -366,17 +366,17 @@
    }
    public List<IpVolumeMissionBo> missionList(BaseConditionVO baseConditionVO, String keyword, Integer order,Integer seq) {
    public List<IpVolumeMissionBo> missionList(BaseConditionVO baseConditionVO, String keyword, Integer order, Integer seq) {
        //排序字段
        String orderByResult = OrderByEnums.IP_VOLUME_ID.getCode();
        String orderByResult = "task_id";
        //正序、倒叙
        String orderBySeq = "ASC";
        if (order != null) {
            switch (order) {
                case 1:
                    orderByResult = "create_time";
                    orderByResult = OrderByEnums.IP_VOLUME_MISSION_CREATE_TIME.getCode();
                    break;
                default:
            }
@@ -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("任务归属错误");
                }
            }