Browse Source

处理显示商户失效显示日志上下文

master
Mike 5 years ago
parent
commit
fb29a3e0e9
  1. 6
      app/Controller/v3/WithdrawController.php
  2. 3
      app/Service/v3/Implementations/AppointmentTimeService.php
  3. 3
      app/Service/v3/Implementations/ShopCartService.php
  4. 4
      app/Service/v3/Implementations/StoreLoginService.php

6
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));
}
// 校验余额

3
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 = [];

3
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;
}

4
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){

Loading…
Cancel
Save