diff --git a/app/Constants/v3/ErrorCode.php b/app/Constants/v3/ErrorCode.php index 8fe3c65..f516122 100644 --- a/app/Constants/v3/ErrorCode.php +++ b/app/Constants/v3/ErrorCode.php @@ -278,8 +278,8 @@ class ErrorCode extends AbstractConstants const LOCATION_ERROR = 1301; /** - * 定位失败 - * @Message("超出配送范围") + * 超出配送范围 + * @Message("您的地址超出配送范围,请重新选择地址") */ const LOCATION_LONG_DISTANCE= 1302; } \ No newline at end of file diff --git a/app/Controller/v3/StoreController.php b/app/Controller/v3/StoreController.php index aee3b4d..b52c04c 100644 --- a/app/Controller/v3/StoreController.php +++ b/app/Controller/v3/StoreController.php @@ -66,11 +66,12 @@ class StoreController extends BaseController public function updateBusinessHours() { $storeId = $this->request->input('store_id'); + $isRest = $this->request->input('is_rest',''); $time1 = $this->request->input('time1',''); $time2 = $this->request->input('time2',''); $time3 = $this->request->input('time3',''); $time4 = $this->request->input('time4',''); - $res = $this->businessHoursService->do($storeId,$time1,$time2,$time3,$time4); + $res = $this->businessHoursService->do($storeId,$isRest,$time1,$time2,$time3,$time4); return $this->success($res); } } \ No newline at end of file diff --git a/app/Service/v3/Implementations/BusinessHoursService.php b/app/Service/v3/Implementations/BusinessHoursService.php index 82db352..e6c098a 100644 --- a/app/Service/v3/Implementations/BusinessHoursService.php +++ b/app/Service/v3/Implementations/BusinessHoursService.php @@ -8,9 +8,10 @@ use \App\Service\v3\Interfaces\BusinessHoursServiceInterface; class BusinessHoursService implements BusinessHoursServiceInterface { - public function do($storeId,$time1,$time2,$time3 = '',$time4 = '') + public function do($storeId,$isRest,$time1,$time2,$time3 = '',$time4 = '') { $store = Store::query()->find($storeId); + $store->is_rest = $isRest; $store->time1 = $time1; $store->time2 = $time2; $store->time3 = $time3; diff --git a/app/Service/v3/Interfaces/BusinessHoursServiceInterface.php b/app/Service/v3/Interfaces/BusinessHoursServiceInterface.php index 0fd0a53..68999c4 100644 --- a/app/Service/v3/Interfaces/BusinessHoursServiceInterface.php +++ b/app/Service/v3/Interfaces/BusinessHoursServiceInterface.php @@ -6,7 +6,7 @@ namespace App\Service\v3\Interfaces; interface BusinessHoursServiceInterface { - public function do($storeId,$time1,$time2,$time3 = '',$time4 = ''); + public function do($storeId,$isRest,$time1,$time2,$time3 = '',$time4 = ''); public function check($storeId); public function undo(); } \ No newline at end of file