jiangping
2024-01-26 8ebca068bb00e530ce44e10e7d009bcaa46c6579
server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java
@@ -185,6 +185,7 @@
        );
        solutionsMapper.update(null,new UpdateWrapper<Solutions>()
                .lambda()
                .ne(Solutions::getId,newModel.getId())
                .eq(Solutions::getBaseId,solutions.getId())
                .eq(Solutions::getDataType,Constants.TWO)
                .set(Solutions::getDataType,Constants.ONE)
@@ -229,7 +230,12 @@
    }
    @Override
    public Solutions findById(Integer id) {
        Solutions model = solutionsMapper.selectById(id);
        MPJLambdaWrapper<Solutions> queryWrapper = new MPJLambdaWrapper<>();
        queryWrapper.selectAll(Solutions.class);
        queryWrapper.selectAs(Insurance::getName,Solutions::getInsuranceName);
        queryWrapper.leftJoin(Insurance.class,Insurance::getId,Solutions::getInsuranceId);
        queryWrapper.eq(Solutions::getId,id);
        Solutions model = solutionsJoinMapper.selectJoinOne(Solutions.class,queryWrapper);
        if(model == null  || !Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){
            throw  new BusinessException(ResponseStatus.DATA_EMPTY );
        }
@@ -254,7 +260,9 @@
    @Override
    public List<Solutions> findList(Solutions solutions) {
        solutions.setIsdeleted(Constants.ZERO);
        solutions.setDataType(Constants.TWO);
        if(solutions.getDataType() == null){
            solutions.setDataType(Constants.TWO);
        }
        QueryWrapper<Solutions> wrapper = new QueryWrapper<>(solutions);
        return solutionsMapper.selectList(wrapper);
    }
@@ -368,6 +376,7 @@
            }
        }
        PageData<Solutions> pageData = PageData.from(solutionsJoinMapper.selectJoinPage(page,Solutions.class, queryWrapper));
        return pageData;
    }
    @Override