|
|
|
@ -758,8 +758,8 @@ class ConsoleController extends Think {
|
|
|
|
|
|
|
|
|
|
public function shiftPromote()
|
|
|
|
|
{
|
|
|
|
|
$fromAccount = 'longyan';
|
|
|
|
|
$toAccount = 'nola2021';
|
|
|
|
|
$fromAccount = 'nola2021';
|
|
|
|
|
$toAccount = 'shanye001';
|
|
|
|
|
$formPromote = M('promote', 'tab_')->where(['account' => $fromAccount])->find();
|
|
|
|
|
$toPromote = M('promote', 'tab_')->where(['account' => $toAccount])->find();
|
|
|
|
|
|
|
|
|
@ -768,23 +768,23 @@ class ConsoleController extends Think {
|
|
|
|
|
var_dump([
|
|
|
|
|
'from_promote_id' => $formPromote['id'],
|
|
|
|
|
'to_promote_id' => $toPromote['id'],
|
|
|
|
|
'shift_ids' => '',
|
|
|
|
|
'shift_ids' => '7805',
|
|
|
|
|
]);
|
|
|
|
|
$service = new PromoteService();
|
|
|
|
|
$service->shiftPromote([
|
|
|
|
|
'from_promote_id' => $formPromote['id'],
|
|
|
|
|
'to_promote_id' => $toPromote['id'],
|
|
|
|
|
'shift_ids' => '',
|
|
|
|
|
'shift_ids' => '7805',
|
|
|
|
|
]);
|
|
|
|
|
M('promote', 'tab_')->where(['level1_id' => $formPromote['id'], 'company_id' => $formPromote['company_id']])->save([
|
|
|
|
|
M('promote', 'tab_')->where(['level1_id' => $formPromote['id'], 'level2_id' => 7805, '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');
|
|
|
|
|
/* if (count($ids)) {
|
|
|
|
|
$orderTime = strtotime('2021-09-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']]);
|
|
|
|
|
}
|
|
|
|
|
} */
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|