| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.pollex.pam.enums.SatisfactionTypeEnum; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.pollex.pam.domain.Appointment; |
| | | import com.pollex.pam.domain.Satisfaction; |
| | | import com.pollex.pam.security.SecurityUtils; |
| | | import com.pollex.pam.service.SatisfactionService; |
| | | import com.pollex.pam.service.dto.SatisfactionCustomerScoreDTO; |
| | | import com.pollex.pam.service.dto.SatisfactionDTO; |
| | | import com.pollex.pam.service.dto.SatisfactionUpdateDTO; |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/satisfaction") |
| | |
| | | @GetMapping("/getMySatisfaction") |
| | | public List<SatisfactionDTO> getMySatisfaction(){ |
| | | if(StringUtils.hasText(SecurityUtils.getAgentNo())) { |
| | | return satisfactionService.getByAgentNo(SecurityUtils.getAgentNo()); |
| | | return satisfactionService.getByAgentNoAndType(SecurityUtils.getAgentNo(), SatisfactionTypeEnum.APPOINTMENT); |
| | | }else if(SecurityUtils.getCustomerDBId()!=null){ |
| | | return satisfactionService.getByCustomerId(SecurityUtils.getCustomerDBId()); |
| | | } |