保誠-保戶業務員媒合平台
wayne
2022-02-14 a2edb2c55c3ef6129db84ac92c78970bc8bd27e5
pamapi/src/main/java/com/pollex/pam/web/rest/SatisfactionResource.java
@@ -3,7 +3,6 @@
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;
@@ -45,14 +44,9 @@
      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);
    }
}