| | |
| | | * @param endTime 活动结束时间 |
| | | * @return 返回冲突的活动数量 |
| | | */ |
| | | Integer getEasyPhotoActivityTimeConflict(@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("activityId") Long activityId); |
| | | Integer getEasyPhotoActivityTimeConflict(@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("activityId") Long activityId,@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 分页查询随手拍活动下居民参与记录 |
| | |
| | | public R addActivity(AddEasyPhotoActivityDTO addEasyPhotoActivityDTO){ |
| | | |
| | | //判断当前活动时间是否与其他时间有冲突 |
| | | Integer count = this.baseMapper.getEasyPhotoActivityTimeConflict(addEasyPhotoActivityDTO.getActivityStartAt(),addEasyPhotoActivityDTO.getActivityEndAt(),null); |
| | | Integer count = this.baseMapper.getEasyPhotoActivityTimeConflict(addEasyPhotoActivityDTO.getActivityStartAt(),addEasyPhotoActivityDTO.getActivityEndAt(),null,addEasyPhotoActivityDTO.getCommunityId()); |
| | | if(count > 0){ |
| | | return R.fail("在此期间已有活动,请勿重复添加"); |
| | | } |
| | |
| | | return R.fail("未查询到活动记录"); |
| | | } |
| | | |
| | | Integer count = this.baseMapper.getEasyPhotoActivityTimeConflict(editEasyPhotoActivityDTO.getActivityStartAt(),editEasyPhotoActivityDTO.getActivityEndAt(),editEasyPhotoActivityDTO.getId()); |
| | | Integer count = this.baseMapper.getEasyPhotoActivityTimeConflict(editEasyPhotoActivityDTO.getActivityStartAt(),editEasyPhotoActivityDTO.getActivityEndAt(),editEasyPhotoActivityDTO.getId(),photoActivityDO.getCommunityId()); |
| | | if(count > 0){ |
| | | return R.fail("在此期间已有活动,请勿重复添加"); |
| | | } |
| | |
| | | and id != #{activityId} |
| | | </if> |
| | | |
| | | and community_id = #{communityId} |
| | | |
| | | </select> |
| | | |
| | | <select id="pageActivityUser" parameterType="com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityUserDTO" |