| | |
| | | public R addactivity(PartyBuildingActivityVO partyBuildingActivityVO) { |
| | | ComPbActivityDO comPbActivityDO = new ComPbActivityDO(); |
| | | BeanUtils.copyProperties(partyBuildingActivityVO, comPbActivityDO); |
| | | comPbActivityDO.setCreateAt(new Date()); |
| | | Date now = new Date(); |
| | | comPbActivityDO.setEnrollTimeBegin(now); |
| | | comPbActivityDO.setCreateAt(now); |
| | | |
| | | Integer status = partyBuildingActivityVO.getStatus(); |
| | | if(status!=null && status.intValue()==2) {//点击'保存并发布' 按钮 |
| | | //默认设置为“进行中” |
| | | comPbActivityDO.setStatus(4); |
| | | } |
| | | |
| | | int insert = comBpActivityDAO.insert(comPbActivityDO); |
| | | if (insert > 0) { |
| | | return R.ok(); |
| | |
| | | comPbActivityMemberDO.setMemberId(comPbMemberDOId); |
| | | comPbActivityMemberDO.setActivityId(comPbActivityDO1Id); |
| | | comPbActivityMemberDO.setCreateAt(new Date()); |
| | | comPbActivityMemberDO.setUserId(comPbActivityDTO.getCreateBy()); |
| | | comPbActivityMemberDO.setName(comPbMemberDO.getName()); |
| | | comPbActivityMemberDO.setPhotoPath(comPbMemberDO.getPhotoPath()); |
| | | comPbActivityMemberDAO.insert(comPbActivityMemberDO); |
| | | return R.ok(); |
| | | } |