From 83bc3fa08e243b5b7227fa446951543a3a85a0ca Mon Sep 17 00:00:00 2001 From: puhanshu <a9236326> Date: 星期二, 14 十二月 2021 15:39:55 +0800 Subject: [PATCH] 修改bug --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java | 24 +++++++++++++----------- 1 files changed, 13 insertions(+), 11 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 25ab5a4..157a822 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 @@ -927,17 +927,19 @@ comActActRegistDO.setPosition(comActActRegistVO.getPosition()); comActActRegistDO.setTimes(signAllCount+1); int result = comActActRegistDAO.insert(comActActRegistDO); - if (isHave && result > 0) { - AddComActIntegralUserDTO addComActIntegralUserDTO=new AddComActIntegralUserDTO(); - addComActIntegralUserDTO.setUserId(userId); - addComActIntegralUserDTO.setIntegralType(8); - addComActIntegralUserDTO.setActivityType(1); - addComActIntegralUserDTO.setCommunityId(comActActivityDO.getCommunityId()); - addComActIntegralUserDTO.setServiceId(activityId); - comActIntegralUserTradeService.addIntegralTradeAdmin(addComActIntegralUserDTO); -// ValueOperations<String, String> opsForValue = stringRedisTemplate.opsForValue(); -// opsForValue.set(activitySignInKey, "", 1800L, TimeUnit.SECONDS); - return R.ok(comActActivityDO.getRewardIntegral()); + if (result > 0) { + if (isHave) { + AddComActIntegralUserDTO addComActIntegralUserDTO=new AddComActIntegralUserDTO(); + addComActIntegralUserDTO.setUserId(userId); + addComActIntegralUserDTO.setIntegralType(8); + addComActIntegralUserDTO.setActivityType(1); + addComActIntegralUserDTO.setCommunityId(comActActivityDO.getCommunityId()); + addComActIntegralUserDTO.setServiceId(activityId); + comActIntegralUserTradeService.addIntegralTradeAdmin(addComActIntegralUserDTO); + return R.ok(comActActivityDO.getRewardIntegral()); + } else { + return R.ok(); + } } return R.fail("网络错误,请重试"); } -- Gitblit v1.7.1