| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComActActRegistVO; |
| | | import com.panzhihua.service_community.dao.ComActActRegistDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActActRegistDO; |
| | | import com.panzhihua.service_community.model.dos.ComActActivityDO; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | for (String aId:activityList) |
| | | { |
| | | ComActActivityDO comActActivityDO=baseMapper.getActivityEndTime(aId); |
| | | |
| | | if(comActActivityDO.getEndAt().getTime()<new Date().getTime()) |
| | | if(comActActivityDO!=null) |
| | | { |
| | | List<String> timeList=baseMapper.getNotTimeUser(aId); |
| | | for (String user:timeList) |
| | | if(comActActivityDO.getEndAt().getTime()<new Date().getTime()) |
| | | { |
| | | baseMapper.updateEndTime(user,comActActivityDO.getEndAt()); |
| | | List<ComActActRegistVO> timeList=baseMapper.getNotTimeUser(aId); |
| | | for (ComActActRegistVO user:timeList) |
| | | { |
| | | baseMapper.updateEndTime(user.getId()+"",comActActivityDO.getEndAt()); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | List<ComActActRegistVO> timeList2=baseMapper.getNotTimeUser(aId); |
| | | for(ComActActRegistVO user2:timeList2) |
| | | { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(user2.getStartTime()); |
| | | calendar.add(Calendar.HOUR_OF_DAY, 3); // 加5小时 |
| | | baseMapper.updateEndTime(user2.getId()+"",calendar.getTime()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |