|
|
@ -6,6 +6,7 @@ use App\Common\PayType; |
|
|
use App\Common\StatementType; |
|
|
use App\Common\StatementType; |
|
|
use App\Http\Controllers\Controller; |
|
|
use App\Http\Controllers\Controller; |
|
|
use App\Models\Agent; |
|
|
use App\Models\Agent; |
|
|
|
|
|
use App\Models\AgentProduct; |
|
|
use App\Models\Guide; |
|
|
use App\Models\Guide; |
|
|
use App\Models\IndustryOrder; |
|
|
use App\Models\IndustryOrder; |
|
|
use App\Models\Order; |
|
|
use App\Models\Order; |
|
|
@ -45,7 +46,11 @@ class VerificationController extends Controller |
|
|
|
|
|
|
|
|
$mobile = User::where('id', $this->user_id)->value('mobile'); |
|
|
$mobile = User::where('id', $this->user_id)->value('mobile'); |
|
|
|
|
|
|
|
|
|
|
|
if ($order->product_id) { |
|
|
$checkMobile = Product::query()->whereIn('id', explode(',', $order->product_ids))->where('verify_mobile', $mobile)->doesntExist(); |
|
|
$checkMobile = Product::query()->whereIn('id', explode(',', $order->product_ids))->where('verify_mobile', $mobile)->doesntExist(); |
|
|
|
|
|
} else { |
|
|
|
|
|
$checkMobile = AgentProduct::where(['id' => $order->agent_product_id, 'verify_mobile' => $mobile])->doesntExist(); |
|
|
|
|
|
} |
|
|
if ($checkMobile) { |
|
|
if ($checkMobile) { |
|
|
return $this->error('对不起,你没有核销权限,请联系管理员'); |
|
|
return $this->error('对不起,你没有核销权限,请联系管理员'); |
|
|
} |
|
|
} |
|
|
|