| | |
| | | import java.util.List; |
| | | |
| | | import com.pollex.pam.enums.SatisfactionTypeEnum; |
| | | import com.pollex.pam.service.dto.SatisfactionSystemScoreDTO; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | if(StringUtils.hasText(SecurityUtils.getAgentNo())) { |
| | | return satisfactionService.getByAgentNoAndType(SecurityUtils.getAgentNo(), SatisfactionTypeEnum.APPOINTMENT); |
| | | }else if(SecurityUtils.getCustomerDBId()!=null){ |
| | | return satisfactionService.getByCustomerIdAndType(SecurityUtils.getCustomerDBId(), SatisfactionTypeEnum.APPOINTMENT); |
| | | return satisfactionService.getByCustomerId(SecurityUtils.getCustomerDBId()); |
| | | } |
| | | log.error("Not has agent code and customer id"); |
| | | throw new IllegalArgumentException("Not has agent code and customer id"); |
| | | } |
| | | |
| | | @PostMapping("/system/score") |
| | | public Satisfaction createSystemSatisfaction(@RequestBody SatisfactionSystemScoreDTO scoreDTO) { |
| | | return satisfactionService.createSystemSatisfaction(scoreDTO); |
| | | } |
| | | } |