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.
57 lines
1.5 KiB
57 lines
1.5 KiB
<?php
|
|
|
|
namespace App\Controller;
|
|
|
|
use App\Constants\ErrorCode;
|
|
use App\Exception\BusinessException;
|
|
use App\Request\EvaluateRequest;
|
|
use App\Service\ServiceEvaluateServiceInterface;
|
|
use Hyperf\Di\Annotation\Inject;
|
|
|
|
class ServiceEvaluateController extends BaseController
|
|
{
|
|
/**
|
|
* @Inject
|
|
* @var ServiceEvaluateServiceInterface
|
|
*/
|
|
protected $evaluateService;
|
|
/**
|
|
* 提交评价
|
|
*
|
|
* 评价内容:
|
|
* 服务态度评分、服务质量评分、满意度评分、评价内容
|
|
* 关联信息:
|
|
* 服务专员ID、市场ID、评价的用户ID
|
|
* 查询信息:
|
|
* 用户注册/创建时间
|
|
*
|
|
*/
|
|
public function evaluate(EvaluateRequest $validator)
|
|
{
|
|
// TODO 数据保存失败的返回处理
|
|
$ret = $this->evaluateService->evaluate();
|
|
return $this->success($ret);
|
|
|
|
}
|
|
|
|
/**
|
|
*获取服务专员基本信息
|
|
*/
|
|
public function getPersonnelInfo()
|
|
{
|
|
//根据用户iD 获取服务专员详细信息
|
|
$user_id = $this->request->input('user_id', 0);
|
|
return $this->success($this->evaluateService->getPersonnelInfo($user_id));
|
|
}
|
|
|
|
/**
|
|
*获取服务专员评价列表
|
|
*/
|
|
public function getEvaluateList()
|
|
{
|
|
//根据用户iD 获取服务专员详细信息
|
|
$service_personnel_id = $this->request->input('service_personnel_id', 0);
|
|
return $this->success($this->evaluateService->getEvaluateList($service_personnel_id));
|
|
}
|
|
|
|
}
|