From 06180fa3c8ee17d731561b88897fa18b9f8cf228 Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期五, 04 十一月 2022 17:53:50 +0800 Subject: [PATCH] Merge branch 'huacheng_test' into local_20221104 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java | 21 ++++++++++++--------- 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java index 51b7088..ef08e01 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java @@ -107,6 +107,10 @@ e.printStackTrace(); } //生成后台账号 + //如果是普达社区专家则不生成后台账号 + if (nonNull(expert.getCommunityId()) && !expert.getCommunityId().equals(10172)){ + return R.ok(); + } AdministratorsUserVO user=new AdministratorsUserVO(); user.setUserId(Snowflake.getId()); user.setAccount(comSanshuoExpertDTO.getAccount()); @@ -115,7 +119,8 @@ user.setType(11); user.setImageUrl(comSanshuoExpertDTO.getAvatar()); user.setPhone(comSanshuoExpertDTO.getPhone()); - return R.ok(userService.sanShuoAddUser(user)); + userService.sanShuoAddUser(user); + return R.ok(); } }else { ComSanshuoExpert expert=new ComSanshuoExpert(); @@ -359,17 +364,15 @@ Integer count = comEventMapper.selectCount(new QueryWrapper<ComEvent>().lambda().eq(ComEvent::getSpecialistId, comSanshuoExpert.getId()).eq(ComEvent::getEventProcessStatus, 6)); Integer successCount = comEventMapper.selectCount(new QueryWrapper<ComEvent>().lambda().eq(ComEvent::getSpecialistId, comSanshuoExpert.getId()).eq(ComEvent::getEventProcessStatus, 6).eq(ComEvent::getEventResult, 2)); comSanshuoExpert.setCount(count); - if (nonNull(count) && !count.equals(0)){ - comSanshuoExpert.setCount(count); - if (nonNull(successCount) && !count.equals(successCount)){ - //计算成功率 - comSanshuoExpert.setRate(NumberUtil.div(successCount, count,2)); - }else { - comSanshuoExpert.setRate(new BigDecimal(0)); + if (nonNull(successCount) && nonNull(count)){ + if (!successCount.equals(0) && !count.equals(0)){ + //计算成功率 + comSanshuoExpert.setRate(NumberUtil.div(successCount, count,2)); } }else { - comSanshuoExpert.setCount(0); + comSanshuoExpert.setRate(new BigDecimal(0)); } + } return R.ok(comSanshuoExperts); } -- Gitblit v1.7.1