|
|
|
@ -59,6 +59,7 @@ class Order extends BaseService |
|
|
|
|
$model = new DealerOrderModel; |
|
|
|
|
$orderList = $model->getUnSettledList($storeId); |
|
|
|
|
// 发放分销订单佣金 |
|
|
|
|
Db::table('yoshop_wx_server')->insertGetId(['content' => '发放佣金', 'created_at' => date('Y-m-d H:i:s')]); |
|
|
|
|
$this->settlement($storeId, $orderList); |
|
|
|
|
// 记录日志 |
|
|
|
|
Tools::taskLogs('DealerOrder', 'grantMoneyEvent', [ |
|
|
|
@ -78,6 +79,7 @@ class Order extends BaseService |
|
|
|
|
$model = new DealerOrderModel; |
|
|
|
|
$model->transaction(function () use ($storeId, $orderList) { |
|
|
|
|
foreach ($orderList as $order) { |
|
|
|
|
Db::table('yoshop_wx_server')->insertGetId(['content' => '发放分销订单佣金', 'created_at' => date('Y-m-d H:i:s')]); |
|
|
|
|
static::grantMoneyOrder($storeId, $order); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|