Browse Source

修改提示

master
李可松 4 years ago
parent
commit
a66f15b85d
  1. 8
      app/Http/Controllers/Api/VerificationController.php

8
app/Http/Controllers/Api/VerificationController.php

@ -40,14 +40,14 @@ class VerificationController extends Controller
->whereIn('status', [OrderStatus::PAID, OrderStatus::PAID_RETAINAGE, OrderStatus::OFFLINE_PAID, OrderStatus::REFUSED_REFUND])
->find($id);
if (!$order) {
return $this->error('订单不存在或订单状态不允许核销1——' . $input_verify_code);
return $this->error($input_verify_code . "核销码不存在或订单状态不允许核销");
}
$mobile = User::where('id', $this->user_id)->value('mobile');
$checkMobile = Product::query()->whereIn('id', explode(',', $order->product_ids))->where('verify_mobile', $mobile)->doesntExist();
if ($checkMobile) {
return $this->error('对不起,你没有核销权限,请联系管理员1——' . $input_verify_code);
return $this->error('对不起,你没有核销权限,请联系管理员');
}
$order->status = OrderStatus::SUCCESS;
@ -77,14 +77,14 @@ class VerificationController extends Controller
$order = IndustryOrder::with('industryProduct:id,verify_mobile')
->where(['status' => OrderStatus::OFFLINE_PAID, 'verify_code' => $verify_code])->find($id);
if (!$order) {
return $this->error('订单不存在或订单状态不允许核销2——' . $input_verify_code);
return $this->error($input_verify_code . "核销码不存在或订单状态不允许核销");
}
$user = User::find($this->user_id);
if (!$user->mobile) {
return $this->error('手机号与核销手机号不一致');
} else if ($user->mobile != $order->industryProduct->verify_mobile) {
return $this->error('对不起,你没有该订单的核销权限2——' . $input_verify_code);
return $this->error('对不起,你没有该订单的核销权限');
}
DB::beginTransaction();

Loading…
Cancel
Save