From 71e053fc8e9e265852b5dc7c762e3a439d477efe Mon Sep 17 00:00:00 2001 From: Lemon <15040771@qq.com> Date: Thu, 3 Sep 2020 11:55:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=AE=B6=E7=99=BB=E5=BD=95=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Constants/v3/ErrorCode.php | 6 ++++ app/Controller/v3/StoreLoginController.php | 25 ++++++++++++++++ .../v3/Implementations/StoreLoginService.php | 29 +++++++++++++++++++ .../StoreLoginServicceInterface.php | 12 ++++++++ config/autoload/dependencies.php | 1 + config/routes.php | 1 + 6 files changed, 74 insertions(+) create mode 100644 app/Controller/v3/StoreLoginController.php create mode 100644 app/Service/v3/Implementations/StoreLoginService.php create mode 100644 app/Service/v3/Interfaces/StoreLoginServicceInterface.php diff --git a/app/Constants/v3/ErrorCode.php b/app/Constants/v3/ErrorCode.php index 40490b9..a955131 100644 --- a/app/Constants/v3/ErrorCode.php +++ b/app/Constants/v3/ErrorCode.php @@ -66,6 +66,12 @@ class ErrorCode extends AbstractConstants * @Message("更新失败") */ const USER_INFO_UPDATE_ERROR = 705; + + /** + * 商户账户密码不匹配 + * @Message("账号密码错误") + */ + const STORE_LOGIN_ERROR = 706; /************************************/ /* 定位相关 751-800 */ /************************************/ diff --git a/app/Controller/v3/StoreLoginController.php b/app/Controller/v3/StoreLoginController.php new file mode 100644 index 0000000..0a5e185 --- /dev/null +++ b/app/Controller/v3/StoreLoginController.php @@ -0,0 +1,25 @@ +request->all(); + $res = $this->storeLoginServicce->do($params['account'],$params['password']); + return $this->success($res); + } +} \ No newline at end of file diff --git a/app/Service/v3/Implementations/StoreLoginService.php b/app/Service/v3/Implementations/StoreLoginService.php new file mode 100644 index 0000000..b94dd7d --- /dev/null +++ b/app/Service/v3/Implementations/StoreLoginService.php @@ -0,0 +1,29 @@ + \App\Service\v3\Implementations\CouponService::class, \App\Service\v3\Interfaces\OrderListServiceInterface::class => \App\Service\v3\Implementations\OrderListService::class, \App\Service\v3\Interfaces\UserCenterBlockServiceInterface::class => \App\Service\v3\Implementations\UserCenterBlockService::class, + \App\Service\v3\Interfaces\StoreLoginServicceInterface::class => \App\Service\v3\Implementations\StoreLoginService::class, ]; diff --git a/config/routes.php b/config/routes.php index 37ff3a0..75dc918 100644 --- a/config/routes.php +++ b/config/routes.php @@ -107,4 +107,5 @@ Router::addGroup('/v3/', function () { Router::post('collectStore/update', 'App\Controller\v3\CollectStoreController@update'); Router::post('shopCartUpdate/update', 'App\Controller\v3\ShopCartUpdateController@update'); Router::post('shopCart/detail', 'App\Controller\v3\ShopCartController@detail'); + Router::post('storeLogin/login', 'App\Controller\v3\StoreLoginController@login'); },['middleware' => [\App\Middleware\Auth\ApiMiddleware::class, \App\Middleware\Auth\UserMiddleware::class]]); \ No newline at end of file