| | |
| | | roomsMapper.insert(rooms); |
| | | if(!Constants.equalsInteger(rooms.getFileType(),Constants.TWO)){ |
| | | List<Multifile> multifileList = rooms.getMultifileList(); |
| | | if(CollectionUtils.isEmpty(multifileList)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"请上传附件信息"); |
| | | } |
| | | for (Multifile multifile:multifileList) { |
| | | if(Objects.isNull(multifile) |
| | | || StringUtils.isBlank(multifile.getFileurl())){ |
| | | || StringUtils.isBlank(multifile.getFileurl())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"附件参数错误"); |
| | | } |
| | | multifile.setCreateDate(new Date()); |
| | |
| | | Integer re = recordisExist(rooms.getId()); |
| | | if (Constants.equalsInteger(re, Constants.ONE)) { |
| | | //存下预约记录不允许更新开放时间和粒度分钟 |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "会议室存在预约中的记录,不允许修改"); |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "会议室存在预约中的记录,不允许修改"); |
| | | rooms.setStartTime(null); |
| | | rooms.setEndTime(null); |
| | | rooms.setIntervalTime(null); |
| | |
| | | |
| | | if(!Constants.equalsInteger(rooms.getFileType(),Constants.TWO)){ |
| | | List<Multifile> multifileList = rooms.getMultifileList(); |
| | | if(CollectionUtils.isEmpty(multifileList)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"请上传附件信息"); |
| | | } |
| | | for (Multifile multifile:multifileList) { |
| | | if(Objects.isNull(multifile) |
| | | || StringUtils.isBlank(multifile.getFileurl())){ |