| | |
| | | // 获取待结束的活动列表 |
| | | List<Long> activityList = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), Long.class); |
| | | if (!activityList.isEmpty()) { |
| | | log.info("社区活动结束时计算积分"); |
| | | log.info("社区活动结束时扣减未参与用户积分"); |
| | | activityList.forEach(activityId -> { |
| | | R r1 = communityService.getTaskActivityPeopleList(activityId); |
| | | if (R.isOk(r1)) { |
| | |
| | | JSONArray.parseArray(JSONArray.toJSONString(r1.getData()), ComActActivityPeopleVO.class); |
| | | if (!peopleList.isEmpty()) { |
| | | peopleList.forEach(people -> { |
| | | if (people.getIsVolunteer().equals(1)) { |
| | | communityService.addIntegralTradeAdmin(new AddComActIntegralUserDTO( |
| | | people.getActivityId(), AddComActIntegralUserDTO.integralType.cyzyzhd, |
| | | people.getCommunityId(), people.getUserId())); |
| | | } else { |
| | | communityService.addIntegralTradeAdmin(new AddComActIntegralUserDTO( |
| | | people.getActivityId(), AddComActIntegralUserDTO.integralType.cysqhd, |
| | | people.getCommunityId(), people.getUserId())); |
| | | } |
| | | AddComActIntegralUserDTO addComActIntegralUserDTO = new AddComActIntegralUserDTO(); |
| | | addComActIntegralUserDTO.setUserId(people.getUserId()); |
| | | addComActIntegralUserDTO.setIntegralType(AddComActIntegralUserDTO.integralType.qxhd); |
| | | addComActIntegralUserDTO.setActivityType(1); |
| | | addComActIntegralUserDTO.setIsVolunteer(people.getIsVolunteer()); |
| | | addComActIntegralUserDTO.setCommunityId(people.getCommunityId()); |
| | | addComActIntegralUserDTO.setServiceId(activityId); |
| | | communityService.addIntegralTradeAdmin(addComActIntegralUserDTO); |
| | | }); |
| | | } |
| | | } |