diff --git a/app/Controller/v3/WithdrawController.php b/app/Controller/v3/WithdrawController.php index 97cd17c..2ab1f62 100644 --- a/app/Controller/v3/WithdrawController.php +++ b/app/Controller/v3/WithdrawController.php @@ -68,7 +68,8 @@ class WithdrawController extends BaseController $storeId = $this->request->input('store_id'); $store = Store::query()->where(['user_id' => $userId, 'id' => $storeId])->first(); if (empty($store)) { - throw new ErrorCodeException(ErrorCode::STORE_NOT_AVAILABLE); + $msg = ['user_id' => $userId, 'storeId' => $storeId]; + throw new ErrorCodeException(ErrorCode::STORE_NOT_AVAILABLE,json_encode($msg)); } $data['balance'] = UserBalance::query() @@ -128,7 +129,8 @@ class WithdrawController extends BaseController $storeId = $this->request->input('store_id'); $store = Store::query()->where(['user_id' => $userId, 'id' => $storeId])->first(); if (empty($store)) { - throw new ErrorCodeException(ErrorCode::STORE_NOT_AVAILABLE, '[稍后重试]'); + $msg = ['user_id' => $userId, 'storeId' => $storeId]; + throw new ErrorCodeException(ErrorCode::STORE_NOT_AVAILABLE, '[稍后重试]' . json_encode($msg)); } // 校验余额 diff --git a/app/Service/v3/Implementations/AppointmentTimeService.php b/app/Service/v3/Implementations/AppointmentTimeService.php index 37714c8..a2f1aa3 100644 --- a/app/Service/v3/Implementations/AppointmentTimeService.php +++ b/app/Service/v3/Implementations/AppointmentTimeService.php @@ -38,7 +38,8 @@ class AppointmentTimeService implements AppointmentTimeServiceInterface $sotreIds = ShoppingCart::query()->whereIn('id',$shopcartIds)->pluck('store_id'); $stores = Store::query()->whereIn('id',$sotreIds)->get()->toArray(); if(empty($stores)){ - throw new ErrorCodeException(ErrorCode::STORE_NOT_AVAILABLE); + $msg = ['id'=>$sotreIds]; + throw new ErrorCodeException(ErrorCode::STORE_NOT_AVAILABLE,json_encode($msg)); } $time1Arr = []; $time2Arr = []; diff --git a/app/Service/v3/Implementations/ShopCartService.php b/app/Service/v3/Implementations/ShopCartService.php index 6a02069..919e783 100644 --- a/app/Service/v3/Implementations/ShopCartService.php +++ b/app/Service/v3/Implementations/ShopCartService.php @@ -169,7 +169,8 @@ class ShopCartService implements ShopCartServiceInterface $totalAmount = 0; foreach ($carts as $key => &$cart) { if (empty($cart->store)) { - throw new ErrorCodeException(ErrorCode::STORE_NOT_AVAILABLE); + $msg = ["car_module"=>"1","shopcartIdsArr"=>$shopcartIdsArr]; + throw new ErrorCodeException(ErrorCode::STORE_NOT_AVAILABLE,json_encode($msg)); continue; } diff --git a/app/Service/v3/Implementations/StoreLoginService.php b/app/Service/v3/Implementations/StoreLoginService.php index 0aa7e4e..3bdc0fe 100644 --- a/app/Service/v3/Implementations/StoreLoginService.php +++ b/app/Service/v3/Implementations/StoreLoginService.php @@ -16,7 +16,9 @@ class StoreLoginService implements StoreLoginServiceInterface ['status','=',2] ])->first(); if(empty($storeUsersModel)){ - throw new ErrorCodeException(ErrorCode::STORE_NOT_AVAILABLE); + $msg = ["StoreLoginService"=>"1","account"=>$account]; + + throw new ErrorCodeException(ErrorCode::STORE_NOT_AVAILABLE,json_encode($msg)); } $password = $this->stringHash($password,$storeUsersModel->salt); if($storeUsersModel->password === $password){