| | |
| | | @PostMapping("/create") |
| | | @Operation(summary = "创建预约") |
| | | @PreAuthorize("@ss.hasPermission('ecg:appointment:create')") |
| | | public CommonResult<Integer> createAppointment(@Valid @RequestBody AppointmentSaveReqVO createReqVO) { |
| | | public CommonResult<Long> createAppointment(@Valid @RequestBody AppointmentSaveReqVO createReqVO) { |
| | | return success(appointmentService.createAppointment(createReqVO)); |
| | | } |
| | | |
| | |
| | | @Operation(summary = "删除预约") |
| | | @Parameter(name = "id", description = "编号", required = true) |
| | | @PreAuthorize("@ss.hasPermission('ecg:appointment:delete')") |
| | | public CommonResult<Boolean> deleteAppointment(@RequestParam("id") Integer id) { |
| | | public CommonResult<Boolean> deleteAppointment(@RequestParam("id") Long id) { |
| | | appointmentService.deleteAppointment(id); |
| | | return success(true); |
| | | } |
| | |
| | | @Operation(summary = "获得预约") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('ecg:appointment:query')") |
| | | public CommonResult<AppointmentRespVO> getAppointment(@RequestParam("id") Integer id) { |
| | | public CommonResult<AppointmentRespVO> getAppointment(@RequestParam("id") Long id) { |
| | | AppointmentDO appointment = appointmentService.getAppointment(id); |
| | | return success(BeanUtils.toBean(appointment, AppointmentRespVO.class)); |
| | | } |