| | |
| | | package com.panzhihua.timejob.jobhandler; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.panzhihua.common.model.dtos.community.integral.admin.AddComActIntegralUserDTO; |
| | |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.xxl.job.core.biz.model.ReturnT; |
| | | import com.xxl.job.core.handler.annotation.XxlJob; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | |
| | | /** |
| | | * 定时任务刷新党建动态发布状态 |
| | | * |
| | | * @return 刷新个数 |
| | | * @throws Exception 出现的异常 |
| | | * @throws Exception |
| | | * 出现的异常 |
| | | */ |
| | | @XxlJob("timedtaskpartybuildingstatusJobHandler") |
| | | public ReturnT<String> timedtaskpartybuildingstatusJobHandler(String param) throws Exception { |
| | |
| | | |
| | | /** |
| | | * 定时任务取消党建活动 |
| | | * |
| | | * @return 取消个数 |
| | | * @throws Exception 出现的异常 |
| | | * @throws Exception |
| | | * 出现的异常 |
| | | */ |
| | | @XxlJob("timedTaskPartyBuildingActivityJobHandler") |
| | | public ReturnT<String> timedTaskPartyBuildingActivityJobHandler(String param) throws Exception { |
| | |
| | | if (R.isOk(r)) { |
| | | Object data = r.getData(); |
| | | if (!ObjectUtils.isEmpty(data)) { |
| | | List<PartyBuildingActivityVO> partyBuildingActivityVOS= JSONArray.parseArray(JSONArray.toJSONString(data),PartyBuildingActivityVO.class); |
| | | List<PartyBuildingActivityVO> partyBuildingActivityVOS = |
| | | JSONArray.parseArray(JSONArray.toJSONString(data), PartyBuildingActivityVO.class); |
| | | if (!ObjectUtils.isEmpty(partyBuildingActivityVOS)) { |
| | | partyBuildingActivityVOS.forEach(partyBuildingActivityVO -> { |
| | | List<Long> userIds = partyBuildingActivityVO.getUserIds(); |
| | |
| | | |
| | | /** |
| | | * 定时任务刷新党建活动的各个状态 除取消外 |
| | | * |
| | | * @return 刷新个数 |
| | | * @throws Exception 出现的异常 |
| | | * @throws Exception |
| | | * 出现的异常 |
| | | */ |
| | | @XxlJob("timedTaskPartyBuildingActivityAllJobHandler") |
| | | public ReturnT<String> timedTaskPartyBuildingActivityAllJobHandler(String param) throws Exception { |
| | |
| | | activityList.forEach(activityId -> { |
| | | R r1 = partyBuildingService.getTaskPbActivityPeopleList(activityId); |
| | | if (R.isOk(r1)){ |
| | | List<ComActActivityPeopleVO> peopleList = JSONArray.parseArray(JSONArray.toJSONString(r1.getData()), ComActActivityPeopleVO.class); |
| | | List<ComActActivityPeopleVO> peopleList = |
| | | JSONArray.parseArray(JSONArray.toJSONString(r1.getData()), ComActActivityPeopleVO.class); |
| | | if(!peopleList.isEmpty()){ |
| | | peopleList.forEach(people -> { |
| | | communityService.addIntegralTradeAdmin(new AddComActIntegralUserDTO(people.getActivityId() |
| | | ,AddComActIntegralUserDTO.integralType.cydyhd,people.getCommunityId(),people.getUserId())); |
| | | communityService.addIntegralTradeAdmin(new AddComActIntegralUserDTO( |
| | | people.getActivityId(), AddComActIntegralUserDTO.integralType.cydyhd, |
| | | people.getCommunityId(), people.getUserId())); |
| | | }); |
| | | } |
| | | } |