You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.2 KiB

  1. <?php
  2. namespace App\Controller;
  3. use App\Constants\ErrorCode;
  4. use App\Exception\BusinessException;
  5. use App\Request\EvaluateRequest;
  6. use App\Service\ServiceEvaluateServiceInterface;
  7. use Hyperf\Di\Annotation\Inject;
  8. class ServiceEvaluateController extends BaseController
  9. {
  10. /**
  11. * @Inject
  12. * @var ServiceEvaluateServiceInterface
  13. */
  14. protected $evaluateService;
  15. /**
  16. * 提交评价
  17. *
  18. * 评价内容:
  19. * 服务态度评分、服务质量评分、满意度评分、评价内容
  20. * 关联信息:
  21. * 服务专员ID、市场ID、评价的用户ID
  22. * 查询信息:
  23. * 用户注册/创建时间
  24. *
  25. */
  26. public function evaluate(EvaluateRequest $validator)
  27. {
  28. // TODO 数据保存失败的返回处理
  29. $ret = $this->evaluateService->evaluate();
  30. return $this->success($ret);
  31. }
  32. /**
  33. *获取服务专员基本信息
  34. */
  35. public function getPersonnelInfo()
  36. {
  37. //根据用户iD 获取服务专员详细信息
  38. $user_id = $this->request->input('user_id', 0);
  39. return $this->success($this->evaluateService->getPersonnelInfo($user_id));
  40. }
  41. }