6
0
Fork 0

优化经销商订单自动分配时间

release
李静 2022-01-19 15:04:17 +08:00
parent 777582638c
commit fc2f2dc8ee
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ class Dealer extends Form
$this->currency('upgrade_amount_'.DealerLvl::Special->value, '特邀门槛')->symbol('¥');
$this->currency('upgrade_amount_'.DealerLvl::Gold->value, '金牌门槛')->symbol('¥');
$this->number('order_auto_allocate_times', '订单自动分配时间(小时')->min(1);
$this->number('order_auto_allocate_times', '订单自动分配时间(')->min(1);
$this->divider('签约->签约->签约');
$this->currency('channel_rules.'.DealerLvl::Contracted->value.'_'.DealerLvl::Contracted->value.'.'.DealerLvl::Contracted->value.'_0', '签约0')->symbol('¥');

View File

@ -34,7 +34,7 @@ class OrderAutoAllocate extends Command
{
DealerOrder::where('status', DealerOrderStatus::Pending)
->where('consignor_id', '>', 1)//到1用户或者公司的订单不需要再分配
->where('allocated_at', '<', now()->subHours(app_settings('dealer.order_auto_allocate_times')))
->where('allocated_at', '<', now()->subMinutes(app_settings('dealer.order_auto_allocate_times')))
->chunkById(200, function ($orders) {
$orders->load([
'consignor',