From 435c322d26ffd9d459cb597cfcc68ebc27f1590d Mon Sep 17 00:00:00 2001 From: puhanshu <a9236326> Date: 星期五, 05 八月 2022 16:45:17 +0800 Subject: [PATCH] bug修改 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java index 84d7ea9..902e421 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java @@ -400,13 +400,11 @@ List<ComActActRegistDO> collect = regList.stream().sorted(Comparator.comparing(ComActActRegistDO::getId).reversed()).collect(Collectors.toList()); comActActivityVO.setTimes(collect.get(0).getTimes()); ComActActRegistDO comActActRegistDO=collect.get(0); - if(comActActRegistDO.getType()==3||comActActRegistDO.getType()==5){ - if(comActActRegistDO.getEndTime()==null){ - comActActivityVO.setSignType(2); - } - else { - comActActivityVO.setSignType(1); - } + if(comActActRegistDO.getEndTime()==null){ + comActActivityVO.setSignType(2); + } + else { + comActActivityVO.setSignType(1); } } else { @@ -1041,6 +1039,7 @@ rewardIntegral = comActActivityDO.getPbRewardIntegral(); integralType = 5; remark = "社区活动-党员身份成功参与"; + break; case 3: rewardWay = comActActivityDO.getVolunteerRewardWay(); rewardIntegral = comActActivityDO.getVolunteerRewardIntegral(); @@ -1067,22 +1066,23 @@ return R.fail("无法重复签退"); } int hours = com.panzhihua.common.utlis.DateUtils.getHour(comActActActRegistDO.getStartTime(), nowDate); + int retrieveIntegral = rewardWay == 1 ? rewardIntegral : rewardIntegral * hours; comActActRegistDO.setId(comActActActRegistDO.getId()); comActActRegistDO.setEndTime(nowDate); - comActActRegistDO.setAward(rewardIntegral * hours); + comActActRegistDO.setAward(retrieveIntegral); int result = comActActRegistDAO.updateById(comActActRegistDO); if (result > 0) { if (isHave) { AddComActIntegralUserDTO addComActIntegralUserDTO = new AddComActIntegralUserDTO(); addComActIntegralUserDTO.setUserId(userId); addComActIntegralUserDTO.setIntegralType(integralType); - addComActIntegralUserDTO.setIntegral(rewardIntegral * hours); + addComActIntegralUserDTO.setIntegral(retrieveIntegral); addComActIntegralUserDTO.setSignIdentity(comActActSignDO.getSignIdentity()); addComActIntegralUserDTO.setCommunityId(comActActivityDO.getCommunityId()); addComActIntegralUserDTO.setServiceId(activityId); addComActIntegralUserDTO.setRemark(remark); comActIntegralUserTradeService.addIntegralTradeAdmin(addComActIntegralUserDTO); - return R.ok(rewardIntegral * hours); + return R.ok(retrieveIntegral); } else { return R.ok(); } -- Gitblit v1.7.1