From ac3587fec379a08d94d30b0a13e67e10612b3b06 Mon Sep 17 00:00:00 2001 From: nidapeng <jp@doumee.com> Date: 星期一, 01 四月 2024 15:24:32 +0800 Subject: [PATCH] 提交一把 --- server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java | 73 +++++++++++++++++++++++++++++++++--- 1 files changed, 67 insertions(+), 6 deletions(-) diff --git a/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java index 69d410b..8dceba4 100644 --- a/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java +++ b/server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java @@ -12,10 +12,7 @@ import com.doumee.core.utils.DateUtil; import com.doumee.core.utils.Utils; import com.doumee.dao.business.*; -import com.doumee.dao.business.dto.ApplyChangeCyclePriceDTO; -import com.doumee.dao.business.dto.ApplyChangeOptDTO; -import com.doumee.dao.business.dto.CountCyclePriceDTO; -import com.doumee.dao.business.dto.InsuranceApplyOptDTO; +import com.doumee.dao.business.dto.*; import com.doumee.dao.business.join.*; import com.doumee.dao.business.model.*; import com.doumee.dao.business.vo.CountCyclePriceVO; @@ -25,6 +22,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.doumee.service.business.SmsEmailService; import com.doumee.service.business.third.SignService; import com.github.xiaoymin.knife4j.core.util.CollectionUtils; import com.github.yulichang.wrapper.MPJLambdaWrapper; @@ -104,6 +102,8 @@ @Autowired private SolutionsMapper solutionsMapper; + @Autowired + private SmsEmailService smsEmailService; @Autowired private NoticesMapper noticesMapper; /** @@ -1967,8 +1967,18 @@ * 浜哄憳鍚嶅崟绛剧珷 */ @Override - public String getChangeMemberListOnlineSignLink(Integer applyChangeId) { - ApplyChange model = this.queryApplyChangeData(applyChangeId); + public String getChangeMemberListOnlineSignLink(SmsCheckDTO smsCheckDTO) { + if(Objects.isNull(smsCheckDTO) + || Objects.isNull(smsCheckDTO.getBusinessId()) + || StringUtils.isBlank(smsCheckDTO.getCode()) + ){ + throw new BusinessException(ResponseStatus.BAD_REQUEST); + } + //楠岃瘉 楠岃瘉鐮� + if(!debugModel){ + smsEmailService.validateCode(smsCheckDTO.getCode()); + } + ApplyChange model = this.queryApplyChangeData(smsCheckDTO.getBusinessId()); if(Objects.isNull(model)){ throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈠姞鍑忎繚淇℃伅"); } @@ -2020,6 +2030,57 @@ + @Override + @Transactional(rollbackFor = {Exception.class,BusinessException.class}) + public Integer check(ApplyChange applyChange) { + LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); + if(!user.getType().equals(Constants.TWO)){ + throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"闈炲晢鎴风鏃犳硶杩涜璇ユ搷浣�"); + } + if(applyChange.getId() == null){ + throw new BusinessException(ResponseStatus.BAD_REQUEST); + } + ApplyChange model = applyChangeJoinMapper.selectJoinOne(ApplyChange.class, + new MPJLambdaWrapper<ApplyChange>() + .selectAll(ApplyChange.class) + .selectAs(InsuranceApply::getSolutionId,ApplyChange::getSolutionsId) + .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyChange::getApplyId) + .eq(ApplyChange::getId,applyChange.getId()) + .last(" limit 1") + ); + if(model == null ||!Constants.equalsInteger(model.getIsdeleted(),Constants.ZERO)){ + throw new BusinessException(ResponseStatus.DATA_EMPTY); + } + Solutions solutions = solutionsMapper.selectById(model.getSolutionsId()); + if(Objects.isNull(solutions)){ + throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"鏈煡璇㈡柟妗堜俊鎭�"); + } + if(solutions.getType().equals(Constants.ZERO)){ + throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鐩翠繚鍗曟嵁鏃犳硶杩涜璇ユ搷浣�"); + }else{ + if(!Constants.equalsInteger(model.getStatus(),Constants.ApplyChangeStatus.COMPANY_SIGN.getKey())){ + throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"瀵逛笉璧凤紝璇ョ敵璇风姸鎬佸凡娴佽浆锛屽綋鍓嶄笉鏀寔璇ユ搷浣渵"); + } + } + + ApplyChange update = new ApplyChange(); + update.setEditDate(new Date()); + update.setEditor(user.getId()); + update.setCheckDate(update.getEditDate()); + update.setCheckInfo(applyChange.getCheckInfo()); + update.setCheckUserId(user.getId()); + update.setId(model.getId()); + if(applyChange.getDealBackApply() ==1){ + //濡傛灉鏄笉閫氳繃 + update.setStatus(Constants.ApplyChangeStatus.PALTFORM_CHECK_PASS_NO.getKey()); + }else{ + update.setStatus(Constants.ApplyChangeStatus.PALTFORM_CHECK_PASS.getKey()); + } + applyChangeJoinMapper.updateById(update); + + return 1; + + } } -- Gitblit v1.9.3