diff --git a/app/Controller/ServiceEvaluateController.php b/app/Controller/ServiceEvaluateController.php index f1d08e8..e10cecd 100644 --- a/app/Controller/ServiceEvaluateController.php +++ b/app/Controller/ServiceEvaluateController.php @@ -15,7 +15,6 @@ class ServiceEvaluateController extends BaseController * @var ServiceEvaluateServiceInterface */ protected $evaluateService; - /** * 提交评价 * @@ -35,4 +34,14 @@ class ServiceEvaluateController extends BaseController } + /** + *获取服务专员基本信息 + */ + public function getPersonnelInfo() + { + //根据用户iD 获取服务专员详细信息 + $user_id = $this->request->input('user_id', 0); + return $this->success($this->evaluateService->getPersonnelInfo($user_id)); + } + } \ No newline at end of file diff --git a/app/Service/ServiceEvaluateService.php b/app/Service/ServiceEvaluateService.php index 838e914..20f98c5 100644 --- a/app/Service/ServiceEvaluateService.php +++ b/app/Service/ServiceEvaluateService.php @@ -25,4 +25,14 @@ class ServiceEvaluateService implements ServiceEvaluateServiceInterface ->value('join_time'); return ServiceEvaluate::create($data); } + + public function getPersonnelInfo() + { + $data = $this->request->all(); + $res = Db::table('lanzu_service_personnel') + ->where(['user_id' => $data['user_id']]) + ->first(); + return $res; + } + } \ No newline at end of file diff --git a/app/Service/ServiceEvaluateServiceInterface.php b/app/Service/ServiceEvaluateServiceInterface.php index 0cadebe..ec0be55 100644 --- a/app/Service/ServiceEvaluateServiceInterface.php +++ b/app/Service/ServiceEvaluateServiceInterface.php @@ -9,4 +9,6 @@ interface ServiceEvaluateServiceInterface public function evaluate(); + public function getPersonnelInfo(); + } \ No newline at end of file diff --git a/config/routes.php b/config/routes.php index 4ffb829..ee76c82 100644 --- a/config/routes.php +++ b/config/routes.php @@ -20,4 +20,5 @@ Router::addGroup('/v1/',function (){ Router::post('CouponUserReceive/userReceiveCoupon', 'App\Controller\CouponController@userReceiveCoupon'); Router::post('CouponUserReceive/getUserAvailableCoupons', 'App\Controller\CouponController@getUserAvailableCoupons'); Router::post('ServiceEvaluate/evaluate', 'App\Controller\ServiceEvaluateController@evaluate'); + Router::post('ServiceEvaluate/getPersonnelInfo', 'App\Controller\ServiceEvaluateController@getPersonnelInfo'); }); \ No newline at end of file