按线路分单

This commit is contained in:
jianghanbo 2024-10-14 09:06:23 +08:00
parent 47c5de6384
commit e63eb847a6
5 changed files with 18 additions and 7 deletions

View File

@ -96,7 +96,7 @@ class OrderController extends base
$admin_id = Admins::where('username', $admin)->value('id');
$query->where('admin_id', $admin_id);
}
Log::info($query->getLastSql());
$excel = $request->get('excel');
if($excel == 1) {
$orders = $query->select();

View File

@ -366,7 +366,13 @@ class SpiderDy extends Command
if (!empty($oldMobile)) {
$admin_id = $oldMobile->admin_id;
} else {
$admin_id = $this->poolUser($order->orderStatus, $order->category_desc);
// $admin_id = $this->poolUser($order->orderStatus, $order->category_desc);
try {
$admin_id = \app\server\Orders::poolUser($order->orderStatus, $order->product_id);
} catch (\Exception $exception) {
Log::info(sprintf('dy create order fail:%s, order_id:%s', $exception->getMessage(), $order->sn));
continue;
}
}
if (empty($admin_id)) return null;

View File

@ -378,16 +378,15 @@ class SpiderMt extends Command
$admin_id = $oldMobile->admin_id;
} else {
try {
$admin_id = $this->poolUser($order->orderStatus, $order->category_desc);
// $admin_id = $this->poolUser($order->orderStatus, $order->category_desc);
$admin_id = \app\server\Orders::poolUser($order->orderStatus, $order->product_id);
} catch (\Exception $exception) {
Log::info(sprintf('mt create order fail:%s, order_id:%s', $exception->getMessage(), $order->sn));
continue;
}
}
if (empty($admin_id)) return null;
}
$order->admin_id = $admin_id;
$order->give_time = time();

View File

@ -226,7 +226,13 @@ class SpiderTc extends Command
if (!empty($oldMobile)) {
$admin_id = $oldMobile->admin_id;
} else {
$admin_id = $this->poolUser($order->orderStatus, $order->category_desc);
// $admin_id = $this->poolUser($order->orderStatus, $order->category_desc);
try {
$admin_id = \app\server\Orders::poolUser($order->orderStatus, $order->product_id);
} catch (\Exception $exception) {
Log::info(sprintf('tc create order fail:%s, order_id:%s', $exception->getMessage(), $order->sn));
continue;
}
}
if (empty($admin_id)) return null;

View File

@ -250,7 +250,7 @@ class Orders {
* @throws \Exception
*/
public static function poolUser($status, $thirdProductId) {
$status .= $thirdProductId;
// $status .= $thirdProductId;
if (empty(self::$redisPool[$status])) {
self::$redisPool[$status] = Redis::hGetAll('CRM:Pool:' . $status);
$users = self::users($thirdProductId);