From b30e1a48f2bc5f65a0efd2e69e090fed2d7a627c Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期四, 17 十一月 2022 15:56:43 +0800 Subject: [PATCH] #feat 订单退款和查询 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java index 69b6d5a..d6b9b4d 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java @@ -41,6 +41,7 @@ import org.springframework.web.bind.annotation.RequestParam; import javax.annotation.Resource; +import java.math.BigDecimal; import java.util.*; import static java.util.Objects.isNull; @@ -96,6 +97,7 @@ Boolean isExpertCheck=false; Long expertId=null; Boolean isStretAccount = isStreetAccount(loginUserInfoVO); + comEvent.setAppId(loginUserInfoVO.getAppId()); if (nonNull(comEvent.getUserType())){ if (comEvent.getUserType().equals(1)){ //个人账号权限 @@ -1003,6 +1005,7 @@ } } log.info("当前userType===="+comEvent.getUserType()); + comEvent.setAppId(loginUserInfoVO.getAppId()); List<ComEventCalculateVO> calculateList = baseMapper.calculate(comEvent); ComEventCalculateVO comEventCalculateVO =new ComEventCalculateVO(); comEventCalculateVO.setStatus("0"); @@ -1059,7 +1062,12 @@ if (nonNull(vo.getSuccess()) && !vo.getSuccess().equals(0)){ if (nonNull(vo.getAccepted()) && !vo.getAccepted().equals(0)){ //计算成功率 - vo.setSuccessRate(NumberUtil.div(vo.getSuccess(),vo.getAccepted(),2)); + try { + vo.setSuccessRate(NumberUtil.div(vo.getSuccess(),vo.getAccepted(),2)); + }catch (NullPointerException e){ + vo.setSuccessRate(new BigDecimal(0)); + } + } } vo.setExpert(comSanshuoExpertDao.selectExpertCount(indexDataDTO)); -- Gitblit v1.7.1