同步订单状态

This commit is contained in:
jianghanbo 2024-12-03 18:28:01 +08:00
parent 74e711a449
commit a7e664430b
2 changed files with 14 additions and 8 deletions

View File

@ -30,9 +30,12 @@ class AdminController extends base
//$routeType = self::ROUTE_LISTS[mb_substr($typeDesc, 0, 2)] ?? 10;
//$query->where('route_type', $routeType);
}
try {
if ($request->admin->is_franchisee == 1) {
$query->where('pid', $request->admin->id);
}
} catch (\Exception $exception) {
if ($request->admin->is_franchisee == 1) {
$query->where('pid', $request->admin->id);
}
$list = $query->paginate($request->get('limit',10));

View File

@ -100,13 +100,16 @@ class OrderController extends base
$zhubo_id = Admins::where('username', $zhubo)->value('id');
$query->where('zhubo', $zhubo_id);
}
try {
$admin = $request->get('admin');
if ($request->admin->is_franchisee == 1) {
$query->whereRaw(sprintf('admin_id in (select id from admins where pid = "%s")', $request->admin->id));
} elseif($admin){
$admin_id = Admins::where('username', $admin)->value('id');
$query->where('admin_id', $admin_id);
}
} catch (\Exception $exception) {
$admin = $request->get('admin');
if ($request->admin->is_franchisee == 1) {
$query->whereRaw(sprintf('admin_id in (select id from admins where pid = "%s")', $request->admin->id));
} elseif($admin){
$admin_id = Admins::where('username', $admin)->value('id');
$query->where('admin_id', $admin_id);
}
$excel = $request->get('excel');