| | |
| | | import com.pollex.pam.service.dto.*; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | |
| | | this.consultantService = consultantService; |
| | | } |
| | | |
| | | @GetMapping("") |
| | | @GetMapping("/favorite") |
| | | public ResponseEntity<List<ConsultantDTO>> getMyConsultantList() { |
| | | List<ConsultantDTO> myConsultants = consultantService.getMyConsultantList(); |
| | | return new ResponseEntity<>(myConsultants, HttpStatus.OK); |
| | |
| | | return new ResponseEntity<>(recommendConsultantList, HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping("") |
| | | public ResponseEntity<Void> addConsultantToOwnList(@RequestBody AddConsultantParam param) { |
| | | consultantService.addConsultantToOwnList(param); |
| | | @PostMapping("/favorite") |
| | | public ResponseEntity<Void> addConsultantToCustomList(@RequestBody AddConsultantParam param) { |
| | | consultantService.addConsultantToCustomList(param); |
| | | return new ResponseEntity<>(HttpStatus.ACCEPTED); |
| | | } |
| | | |
| | |
| | | return new ResponseEntity<>(queryResult, HttpStatus.OK); |
| | | } |
| | | |
| | | @GetMapping("/{agentNo}") |
| | | @GetMapping("/detail/{agentNo}") |
| | | public ResponseEntity<ConsultantDetailDTO> getConsultantDetail(@PathVariable String agentNo) { |
| | | ConsultantDetailDTO result = consultantService.getConsultantDetail(agentNo); |
| | | return new ResponseEntity<>(result, HttpStatus.OK); |