| | |
| | | |
| | | @Autowired |
| | | ConsultantService consultantService; |
| | | |
| | | |
| | | @Autowired |
| | | AppointmentService appointmentService; |
| | | |
| | | @GetMapping("/favorite") |
| | | public ResponseEntity<List<CustomerFavoriteConsultantDTO>> getMyConsultantList() { |
| | | List<CustomerFavoriteConsultantDTO> myConsultants = consultantService.getMyConsultantList(); |
| | | return new ResponseEntity<>(myConsultants, HttpStatus.OK); |
| | | } |
| | | |
| | | @GetMapping("/all") |
| | | public ResponseEntity<List<ConsultantDTO>> getAllConsultantList() { |
| | | List<ConsultantDTO> myConsultants = consultantService.getAllConsultantList(); |
| | | return new ResponseEntity<>(myConsultants, HttpStatus.OK); |
| | | } |
| | | |
| | |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | } |
| | | |
| | | |
| | | @Deprecated |
| | | @PostMapping("/strictQuery") |
| | | public ResponseEntity<List<ConsultantDTO>> strictQueryConsultant(@RequestBody StrictQueryConsultantParam param) { |
| | | List<ConsultantDTO> queryResult = consultantService.strictQueryConsultant(param); |
| | | return new ResponseEntity<>(queryResult, HttpStatus.OK); |
| | | } |
| | | |
| | | @Deprecated |
| | | @PostMapping("/fastQuery") |
| | | public ResponseEntity<List<ConsultantDTO>> fastQueryConsultant(@RequestBody FastQueryConsultantParam param) { |
| | | List<ConsultantDTO> queryResult = consultantService.fastQueryConsultant(param); |
| | |
| | | }else { |
| | | return new ResponseEntity<>(HttpStatus.NOT_FOUND); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | @PostMapping("/record/allAppointmentsView") |
| | |
| | | consultantService.recordAllAppointmentsView(); |
| | | return ResponseEntity.noContent().build(); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/edit") |
| | | public ResponseEntity<Consultant> editConsultant(@RequestBody ConsultantEditDTO editDTO) { |
| | | if(!editDTO.getAgentNo().equals(SecurityUtils.getAgentNo())) { |
| | |
| | | Consultant editResult = consultantService.editConsultant(editDTO); |
| | | return new ResponseEntity<>(editResult, HttpStatus.OK); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/sendSatisfactionToClient/{appointmentId}") |
| | | public ResponseEntity<Void> sendSatisfactionToClient(@PathVariable Long appointmentId) { |
| | | Appointment appointment = appointmentService.findById(appointmentId); |