|
|
@ -187,16 +187,11 @@ class PromoteService {
|
|
|
|
$secondMap['parent_id'] = ['in', $shiftIds];
|
|
|
|
$secondMap['parent_id'] = ['in', $shiftIds];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$status = M('promote', 'tab_')->where($firstMap)->save([
|
|
|
|
M('promote', 'tab_')->where($firstMap)->save([
|
|
|
|
'parent_id' => $toPromote['id'],
|
|
|
|
'parent_id' => $toPromote['id'],
|
|
|
|
'parent_name' => $toPromote['account'],
|
|
|
|
'parent_name' => $toPromote['account'],
|
|
|
|
'chain' => $toPromote['chain'] . $toPromote['id'] . '/'
|
|
|
|
'chain' => $toPromote['chain'] . $toPromote['id'] . '/'
|
|
|
|
]);
|
|
|
|
]);
|
|
|
|
if (!$status) {
|
|
|
|
|
|
|
|
$lastSql = M()->getLastSql();
|
|
|
|
|
|
|
|
$model->rollback();
|
|
|
|
|
|
|
|
return ['status' => false, 'msg' => '系统异常,修改推广员上级失败[' . $lastSql . ']'];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
M('promote', 'tab_')->where($secondMap)->save([
|
|
|
|
M('promote', 'tab_')->where($secondMap)->save([
|
|
|
|
'chain' => ['exp', 'REPLACE(chain, "/' . $fromPromote['id'] . '/","/' . $toPromote['id'] . '/")'],
|
|
|
|
'chain' => ['exp', 'REPLACE(chain, "/' . $fromPromote['id'] . '/","/' . $toPromote['id'] . '/")'],
|
|
|
|