From 02bc3bfe47e3d5311a0bb041c94e70a34b1ca73c Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期二, 09 四月 2024 09:03:01 +0800 Subject: [PATCH] git ch --- server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java index 82c40bd..99e04df 100644 --- a/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java +++ b/server/service/src/main/java/com/doumee/service/business/impl/SolutionsServiceImpl.java @@ -156,7 +156,7 @@ // ||Constants.formatIntegerNum(solutions.getPriceCycleUnit()) < 0 ||Constants.formatIntegerNum(solutions.getInsureCycle()) < 0 ||Constants.formatIntegerNum(solutions.getInsureCycleUnit()) < 0 - || solutions.getMinAge() >solutions.getMaxAge() + ||Constants.formatIntegerNum( solutions.getMinAge()) >Constants.formatIntegerNum(solutions.getMaxAge()) || Constants.formatBigdecimal(solutions.getPrice()).compareTo(new BigDecimal(0)) !=1 ){ throw new BusinessException(ResponseStatus.BAD_REQUEST); @@ -194,6 +194,7 @@ } //鏁版嵁鏈夋晥鎬ф牎楠� initCreateParam(solutions); + solutions.setType(null);//涓嶆敮鎸佷慨鏀规姇淇濇柟妗� if(solutionsMapper.selectCount(new QueryWrapper<Solutions>().lambda() .eq(Solutions::getName,solutions.getName()) .eq(Solutions::getIsdeleted,Constants.ZERO) @@ -214,7 +215,6 @@ .last("limit 1") ); - if(Objects.isNull(oldVersion)){ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈠埌鍘嗗彶鐗堟湰鏁版嵁"); } @@ -234,8 +234,9 @@ .lambda() .eq(SolutionWorktype::getSolutionId,solutions.getId()) ); - if(Constants.equalsObject(solutions.getType(),Constants.ONE) ){ + if(Constants.equalsObject(model.getType(),Constants.ONE) ){ if (solutions.getFanganFile()!=null && StringUtils.isNotBlank(solutions.getFanganFile().getFileurl())){ + multifileMapper.update(null,new UpdateWrapper<Multifile>().lambda() .set(Multifile::getIsdeleted,Constants.ONE) .set(Multifile::getEditDate,solutions.getEditDate()) @@ -243,6 +244,7 @@ .eq(Multifile::getObjId,solutions.getId()) .eq(Multifile::getIsdeleted,Constants.ZERO) .eq(Multifile::getObjType,Constants.MultiFile.SOLUTIONS_CONFIRMATION_LATTER.getKey())); + Multifile file = solutions.getFanganFile(); file.setIsdeleted(Constants.ZERO); file.setCreateDate(solutions.getEditDate()); @@ -362,12 +364,18 @@ @Override public List<Solutions> findList(Solutions solutions) { + LoginUserInfo user = (LoginUserInfo)SecurityUtils.getSubject().getPrincipal(); solutions.setIsdeleted(Constants.ZERO); solutions.setStatus(Constants.ZERO); if(solutions.getDataType() == null){ solutions.setDataType(Constants.TWO); } + if(Constants.equalsObject(user.getType(),Constants.TWO)){ + //濡傛灉鏄垹闄� + solutions.setShopId(user.getCompanyId()); + } QueryWrapper<Solutions> wrapper = new QueryWrapper<>(solutions); + return solutionsMapper.selectList(wrapper); } -- Gitblit v1.9.3