feat: 收益全额直入商城余额、存量结转与奖项名称全局规范化对齐
这个提交包含在:
@@ -227,24 +227,8 @@ class PartnerInstall extends Command
|
||||
|
||||
protected function backfillLastSelfOrder(Output $output)
|
||||
{
|
||||
$rows = Db::name('shopro_order')
|
||||
->where('status', 'in', ['paid', 'completed'])
|
||||
->where('paid_time', '>', 0)
|
||||
->field('user_id, max(paid_time) as last_paid')
|
||||
->group('user_id')
|
||||
->select();
|
||||
$count = 0;
|
||||
foreach ($rows as $row) {
|
||||
$agent = Db::name('shopro_commission_agent')->where('user_id', $row['user_id'])->find();
|
||||
if (!$agent || !empty($agent['last_self_order_time'])) {
|
||||
continue;
|
||||
}
|
||||
Db::name('shopro_commission_agent')->where('user_id', $row['user_id'])->update([
|
||||
'last_self_order_time' => intval($row['last_paid']),
|
||||
]);
|
||||
$count++;
|
||||
}
|
||||
$output->writeln("backfill last_self_order_time: {$count}");
|
||||
$count = (new \addons\shopro\service\partner\ActiveService())->syncActiveTimes();
|
||||
$output->writeln("backfill last_self_order_time (self + direct): {$count}");
|
||||
}
|
||||
|
||||
protected function clearConfigCache(Output $output)
|
||||
|
||||
在新工单中引用
屏蔽一个用户