master
ELF 3 years ago
parent f5f1db3a3d
commit 71a07289e9

@ -760,6 +760,7 @@ class ConsoleController extends Think {
{ {
$fromAccount = 'nola2021'; $fromAccount = 'nola2021';
$toAccount = 'shanye001'; $toAccount = 'shanye001';
$shiftIds = [7805];
$formPromote = M('promote', 'tab_')->where(['account' => $fromAccount])->find(); $formPromote = M('promote', 'tab_')->where(['account' => $fromAccount])->find();
$toPromote = M('promote', 'tab_')->where(['account' => $toAccount])->find(); $toPromote = M('promote', 'tab_')->where(['account' => $toAccount])->find();
@ -768,13 +769,13 @@ class ConsoleController extends Think {
var_dump([ var_dump([
'from_promote_id' => $formPromote['id'], 'from_promote_id' => $formPromote['id'],
'to_promote_id' => $toPromote['id'], 'to_promote_id' => $toPromote['id'],
'shift_ids' => '7805', 'shift_ids' => json_encode($shiftIds),
]); ]);
$service = new PromoteService(); $service = new PromoteService();
$service->shiftPromote([ $service->shiftPromote([
'from_promote_id' => $formPromote['id'], 'from_promote_id' => $formPromote['id'],
'to_promote_id' => $toPromote['id'], 'to_promote_id' => $toPromote['id'],
'shift_ids' => '7805', 'shift_ids' => json_encode($shiftIds),
]); ]);
M('promote', 'tab_')->where(['level1_id' => $formPromote['id'], 'level2_id' => 7805, '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'], 'company_id' => $toPromote['company_id'],

Loading…
Cancel
Save