优化经销商订单自动分配时间
parent
777582638c
commit
fc2f2dc8ee
|
|
@ -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('¥');
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in New Issue