| | |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:bookings:create") |
| | | public ApiResponse create(@RequestBody Bookings bookings,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | LoginUserInfo user = getLoginUser(token); |
| | | bookings.setCreator(user.getId()); |
| | | bookings.setUserInfo(getLoginUser(token)); |
| | | return ApiResponse.success(bookingsService.create(bookings)); |
| | | } |
| | | |
| | |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:bookings:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | bookingsService.deleteById(id); |
| | | bookingsService.deleteById(id,getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:bookings:update") |
| | | public ApiResponse updateById(@RequestBody Bookings bookings,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | LoginUserInfo user = getLoginUser(token); |
| | | bookings.setCreator(user.getId()); |
| | | bookings.setUserInfo(getLoginUser(token)); |
| | | bookingsService.updateById(bookings); |
| | | return ApiResponse.success(null); |
| | | } |
| | |
| | | @ApiOperation("取消") |
| | | @PostMapping("/cancelById") |
| | | @RequiresPermissions("business:bookings:update") |
| | | public ApiResponse cancelById(@RequestBody Bookings bookings) { |
| | | public ApiResponse cancelById(@RequestBody Bookings bookings,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | bookings.setUserInfo(getLoginUser(token)); |
| | | bookingsService.cancelById(bookings); |
| | | return ApiResponse.success(null); |
| | | } |
| | |
| | | @PostMapping("/exportUserStatistics") |
| | | @RequiresPermissions("business:bookings:exportExcel") |
| | | public void exportUserStatistics (@RequestBody PageWrap<UserStatisticsDTO> pageWrap,HttpServletResponse response) { |
| | | |
| | | List<UserStatisticsVo> records = bookingsService.getUserStatistics(pageWrap).getRecords(); |
| | | if (!CollectionUtils.isEmpty(records)){ |
| | | JSONArray o = (JSONArray) JSON.toJSON(records); |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "1 今天 2 本周", required = true), |
| | | }) |
| | | public ApiResponse<List<Bookings>> getMyJoinBookingMeet(@RequestParam Integer type,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | public ApiResponse<List<Bookings>> getMyJoinBookingMeet(@RequestParam Integer type |
| | | ,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | |
| | | LocalDateTime startTime = LocalDateTime.of(LocalDate.now(), LocalTime.of(00,00,00)); |
| | | LocalDateTime endTime = LocalDateTime.of(LocalDate.now(), LocalTime.of(23,59,59)); |
| | |
| | | */ |
| | | @ApiOperation("获取用户当当月预约会议情况") |
| | | @PostMapping("/findMothBookingMeet") |
| | | public ApiResponse<List<DateTimeResourceDate>> findMothBookingMeet( @RequestParam(required = false) Integer roomId,String dateMonth,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | public ApiResponse<List<DateTimeResourceDate>> findMothBookingMeet( @RequestParam(required = false) Integer roomId |
| | | ,String dateMonth,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(bookingsService.findMothBookingMeet(getLoginUser(token).getId(),roomId,dateMonth)); |
| | | } |
| | | } |