|
|
@@ -814,10 +814,15 @@ class User extends BaseController
|
|
814
|
814
|
public function changePro($id,UserRepository $repository)
|
|
815
|
815
|
{
|
|
816
|
816
|
$spread_account = $this->request->param('spread_account');
|
|
817
|
|
- $olld_id = Db::name('user')->where('uid', $id)->value('spread_uid');
|
|
|
817
|
+ $olld_id = Db::name('user')->where('uid', $id)->value('spread_uid')??0;
|
|
818
|
818
|
$mark = '后台管理员修改用户推荐人';
|
|
819
|
|
- $spreadId = $this->request->param('old_spread_account');
|
|
820
|
|
- $old_spread_id = Db::name('user')->where('account', $spreadId)->value('uid');
|
|
|
819
|
+ Db::name("rrx_user_spread_change_records")->insert([
|
|
|
820
|
+ 'operation_id' => 1,
|
|
|
821
|
+ 'uid' => 114514,
|
|
|
822
|
+ 'old_spread_id' => $olld_id,
|
|
|
823
|
+ 'new_spread_id' => 1919180,
|
|
|
824
|
+ 'mark' => $mark
|
|
|
825
|
+ ]);
|
|
821
|
826
|
if($repository->update_spread($id,$spread_account,$mark,$olld_id)){
|
|
822
|
827
|
return app('json')->success("修改成功");
|
|
823
|
828
|
}else{
|