| | |
| | | comActActivityDO.setPublishAt(now);//发布时间 |
| | | } |
| | | //如果发布时间大于现在时间状态改为进行中 |
| | | if(now.getTime()<comActActivityVO.getBeginAt().getTime()){ |
| | | /*if(now.getTime()<comActActivityVO.getBeginAt().getTime()){ |
| | | comActActivityDO.setStatus(3); |
| | | }*/ |
| | | //结束时间大于当前时间则设置为“进行中” |
| | | if(comActActivityVO.getSignUpEnd()!=null && now.getTime()<comActActivityVO.getSignUpEnd().getTime()){ |
| | | comActActivityDO.setStatus(4); |
| | | } |
| | | |
| | | boolean save = this.save(comActActivityDO); |
| | | if(!save){ |
| | | return R.fail(); |
| | |
| | | public R putActivity(ComActActivityVO comActActivityVO) { |
| | | ComActActivityDO comActActivityDO=new ComActActivityDO(); |
| | | BeanUtils.copyProperties(comActActivityVO,comActActivityDO); |
| | | |
| | | //结束时间大于当前时间则设置为“进行中” |
| | | Date now = new Date(); |
| | | if(comActActivityVO.getSignUpEnd()!=null && now.getTime()<comActActivityVO.getSignUpEnd().getTime()){ |
| | | comActActivityDO.setStatus(4); |
| | | } |
| | | boolean b = this.updateById(comActActivityDO); |
| | | if (b) { |
| | | return R.ok(); |