修改bug

master
ELF 5 years ago
parent d9419ae64e
commit fbce375679

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

Loading…
Cancel
Save