| | |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoCommentVO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.SensitiveUtil; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoCommentDAO; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoCommentUserDAO; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoDAO; |
| | | import com.panzhihua.service_community.dao.ComActEasyPhotoUserDAO; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoCommentDO; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoCommentUserDO; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoDO; |
| | | import com.panzhihua.service_community.model.dos.ComActEasyPhotoUserDO; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.ComActEasyPhotoService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private ComActEasyPhotoCommentDAO comActEasyPhotoCommentDAO ; |
| | | @Resource |
| | | private ComActEasyPhotoCommentUserDAO comActEasyPhotoCommentUserDAO ; |
| | | @Resource |
| | | private ComActEasyPhotoActivityMapper comActEasyPhotoActivityMapper; |
| | | /** |
| | | * 分页查询随手拍 |
| | | * |
| | |
| | | public R addEasyPhoto(ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | ComActEasyPhotoDO comActEasyPhotoDO=new ComActEasyPhotoDO(); |
| | | BeanUtils.copyProperties(comActEasyPhotoVO,comActEasyPhotoDO); |
| | | //查询是否在活动时间内 |
| | | Date nowDate = DateUtils.getCurrentDate(DateUtils.ymdhms_format); |
| | | List<ComActEasyPhotoActivityDO> photoActivityDOS = comActEasyPhotoActivityMapper.selectList( |
| | | new QueryWrapper<ComActEasyPhotoActivityDO>().lambda().eq(ComActEasyPhotoActivityDO::getCommunityId,comActEasyPhotoVO.getCommunityId()) |
| | | .le(ComActEasyPhotoActivityDO::getActivityStartAt,nowDate).ge(ComActEasyPhotoActivityDO::getActivityEndAt,nowDate)); |
| | | if(!photoActivityDOS.isEmpty()){ |
| | | ComActEasyPhotoActivityDO photoActivityDO = photoActivityDOS.get(0); |
| | | comActEasyPhotoDO.setActivityId(photoActivityDO.getId()); |
| | | } |
| | | int insert = comActEasyPhotoDAO.insert(comActEasyPhotoDO); |
| | | if (insert>0) { |
| | | return R.ok(); |