| | |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | public void deleteById(Integer id,LoginUserInfo user) { |
| | | Bookings bookings = new Bookings(); |
| | | bookings.setId(id); |
| | | bookings.setIsdeleted(MeetConstants.ONE); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void delete(Bookings bookings) { |
| | | public void delete(Bookings bookings,LoginUserInfo user) { |
| | | UpdateWrapper<Bookings> deleteWrapper = new UpdateWrapper<>(bookings); |
| | | bookingsMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | public void deleteByIdInBatch(List<Integer> ids,LoginUserInfo user) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | |
| | | if(dbBookings.getStatus().equals(MeetConstants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "本次操作失败,预约状态已流转"); |
| | | } |
| | | LoginUserInfo user = new LoginUserInfo(); |
| | | user.setId(bookings.getCreator()); |
| | | LoginUserInfo user = bookings.getLoginUserInfo(); |
| | | isCreateParamValid(bookings, user); |
| | | bookings.setEditDate(new Date()); |
| | | bookings.setEditor(user.getId()); |
| | |
| | | @Override |
| | | public void cancelById(Bookings bs) { |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(user == null){ |
| | | user = bs.getLoginUserInfo(); |
| | | } |
| | | /* |
| | | if(Objects.isNull(bookings)||bookings.getId()==null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), ResponseStatus.BAD_REQUEST.getMessage()); |