|
|
|
@ -193,16 +193,18 @@ class PromoteService {
|
|
|
|
|
'chain' => $toPromote['chain'] . $toPromote['id'] . '/'
|
|
|
|
|
]);
|
|
|
|
|
if (!$status) {
|
|
|
|
|
$lastSql = M()->getLastSql();
|
|
|
|
|
$model->rollback();
|
|
|
|
|
return ['status' => false, 'msg' => '系统异常,修改推广员上级失败'];
|
|
|
|
|
return ['status' => false, 'msg' => '系统异常,修改推广员上级失败[' . $lastSql . ']'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$status = M('promote', 'tab_')->where($secondMap)->save([
|
|
|
|
|
'chain' => ['exp', 'REPLACE(chain, "/' . $fromPromote['id'] . '/","/' . $toPromote['id'] . '/")'],
|
|
|
|
|
]);
|
|
|
|
|
if (!$status) {
|
|
|
|
|
$lastSql = M()->getLastSql();
|
|
|
|
|
$model->rollback();
|
|
|
|
|
return ['status' => false, 'msg' => '系统异常,修改推广员CHAIN失败'];
|
|
|
|
|
return ['status' => false, 'msg' => '系统异常,修改推广员CHAIN失败[' . $lastSql . ']'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$status1 = M('ShiftTask')->where('id=' . $task['id'])->save(['status' => 1, 'handle_time' => time()]);
|
|
|
|
|