diff --git a/app/Controller/ServiceEvaluateController.php b/app/Controller/ServiceEvaluateController.php index e10cecd..9b0c5d3 100644 --- a/app/Controller/ServiceEvaluateController.php +++ b/app/Controller/ServiceEvaluateController.php @@ -44,4 +44,14 @@ class ServiceEvaluateController extends BaseController 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)); + } + } \ No newline at end of file diff --git a/app/Service/ServiceEvaluateService.php b/app/Service/ServiceEvaluateService.php index 20f98c5..a6e1dc8 100644 --- a/app/Service/ServiceEvaluateService.php +++ b/app/Service/ServiceEvaluateService.php @@ -35,4 +35,13 @@ class ServiceEvaluateService implements ServiceEvaluateServiceInterface return $res; } + public function getEvaluateList() + { + $data = $this->request->all(); + $res = Db::table('lanzu_service_evaluate') + ->where(['service_personnel_id' => $data['service_personnel_id']]) + ->get(); + return $res; + } + } \ No newline at end of file diff --git a/app/Service/ServiceEvaluateServiceInterface.php b/app/Service/ServiceEvaluateServiceInterface.php index ec0be55..ee2418d 100644 --- a/app/Service/ServiceEvaluateServiceInterface.php +++ b/app/Service/ServiceEvaluateServiceInterface.php @@ -11,4 +11,6 @@ interface ServiceEvaluateServiceInterface public function getPersonnelInfo(); + public function getEvaluateList(); + } \ No newline at end of file diff --git a/config/routes.php b/config/routes.php index ee76c82..284846d 100644 --- a/config/routes.php +++ b/config/routes.php @@ -21,4 +21,5 @@ Router::addGroup('/v1/',function (){ Router::post('CouponUserReceive/getUserAvailableCoupons', 'App\Controller\CouponController@getUserAvailableCoupons'); Router::post('ServiceEvaluate/evaluate', 'App\Controller\ServiceEvaluateController@evaluate'); Router::post('ServiceEvaluate/getPersonnelInfo', 'App\Controller\ServiceEvaluateController@getPersonnelInfo'); + Router::post('ServiceEvaluate/getEvaluateList', 'App\Controller\ServiceEvaluateController@getEvaluateList'); }); \ No newline at end of file