|
|
|
@ -744,22 +744,35 @@ class ConsoleController extends Think {
|
|
|
|
|
} while($hasNext);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* public function shiftPromote()
|
|
|
|
|
public function shiftPromote()
|
|
|
|
|
{
|
|
|
|
|
$fromAccount = 'longyan';
|
|
|
|
|
$toAccount = 'nola2021';
|
|
|
|
|
$formPromote = M('promote', 'tab_')->where(['account' => $fromAccount])->find();
|
|
|
|
|
$toPromote = M('promote', 'tab_')->where(['account' => $toAccount])->find();
|
|
|
|
|
|
|
|
|
|
$ids = M('promote', 'tab_')->where(['level1_id' => $formPromote['id'], 'company_id' => $formPromote['company_id']])->getField('id', true);
|
|
|
|
|
|
|
|
|
|
var_dump([
|
|
|
|
|
'from_promote_id' => $formPromote['id'],
|
|
|
|
|
'to_promote_id' => $toPromote['id'],
|
|
|
|
|
'shift_ids' => '',
|
|
|
|
|
]);
|
|
|
|
|
$service = new PromoteService();
|
|
|
|
|
$fromPromoteId = 0;
|
|
|
|
|
$fromCompanyId = 0;
|
|
|
|
|
$toPromoteId = 0;
|
|
|
|
|
$toCompanyId = 0;
|
|
|
|
|
$adminId = 0;
|
|
|
|
|
$service->shiftPromote([
|
|
|
|
|
'from_promote_id' => $fromPromoteId,
|
|
|
|
|
'to_promote_id' => $toPromoteId,
|
|
|
|
|
'from_promote_id' => $formPromote['id'],
|
|
|
|
|
'to_promote_id' => $toPromote['id'],
|
|
|
|
|
'shift_ids' => '',
|
|
|
|
|
]);
|
|
|
|
|
M('promote', 'tab_')->where(['level1_id' => $fromPromoteId, 'company_id' => $fromCompanyId])->save([
|
|
|
|
|
'company_id' => $toCompanyId,
|
|
|
|
|
'admin_id' => $adminId
|
|
|
|
|
M('promote', 'tab_')->where(['level1_id' => $formPromote['id'], 'company_id' => $formPromote['company_id']])->save([
|
|
|
|
|
'company_id' => $toPromote['company_id'],
|
|
|
|
|
'admin_id' => $toPromote['admin_id'],
|
|
|
|
|
]);
|
|
|
|
|
} */
|
|
|
|
|
|
|
|
|
|
if (count($ids)) {
|
|
|
|
|
$orderTime = strtotime('2021-08-01 00:00:00');
|
|
|
|
|
M('deposit', 'tab_')->where(['promote_id' => ['in', $ids], 'create_time' => ['egt', $orderTime]])->save(['market_admin_id' => $toPromote['admin_id']]);
|
|
|
|
|
M('spend', 'tab_')->where(['promote_id' => ['in', $ids], 'spend_time' => ['egt', $orderTime]])->save(['market_admin_id' => $toPromote['admin_id']]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|