| | |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import java.util.List; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PatchMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | |
| | | miniVisitorApplicationService.update(id, uuid, request); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | @Operation(summary = "设置默认访客") |
| | | @PatchMapping("/{id}/default") |
| | | public Result<Void> setDefault( |
| | | @PathVariable Long id, |
| | | @RequestParam @NotBlank(message = "uuid 不能为空") String uuid) { |
| | | miniVisitorApplicationService.setDefault(id, uuid); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | @Operation(summary = "删除访客") |
| | | @DeleteMapping("/{id}") |
| | | public Result<Void> delete( |
| | | @PathVariable Long id, |
| | | @RequestParam @NotBlank(message = "uuid 不能为空") String uuid) { |
| | | miniVisitorApplicationService.delete(id, uuid); |
| | | return ResultUtil.success(); |
| | | } |
| | | } |