|
|
@@ -3114,13 +3114,13 @@ class UserRepository extends BaseRepository
|
|
3114
|
3114
|
*@author cabbage
|
|
3115
|
3115
|
*@date 2020-10-31
|
|
3116
|
3116
|
* */
|
|
3117
|
|
- public function update_spread($uid,$spread_account,$mark,$old_spread_id){
|
|
|
3117
|
+ public function update_spread($uid,$spread_account,$mark,$account){
|
|
3118
|
3118
|
//推荐人信息
|
|
3119
|
3119
|
$spread = Db::name("user")->where('account',$spread_account)->field("uid")->find();
|
|
3120
|
3120
|
//被推荐人信息
|
|
3121
|
3121
|
$identity=Db::name("user")->where('uid',$uid)->field("identity,spread_uid")->find();
|
|
3122
|
3122
|
// $user_identity_log=Db::name("user_identity_log")->where(["link_id"=>$uid])->find();
|
|
3123
|
|
- //$old_spreadId = Db::name("user")->where('account',$spreadId)->value('uid');
|
|
|
3123
|
+ $spreadId = Db::name("user")->where('account',$account)->value('uid');
|
|
3124
|
3124
|
if($spread){
|
|
3125
|
3125
|
try{
|
|
3126
|
3126
|
$data= Db::name("user")->where(["uid"=>$uid])->update(['spread_uid'=>$spread['uid']]);
|
|
|
@@ -3133,7 +3133,7 @@ class UserRepository extends BaseRepository
|
|
3133
|
3133
|
Db::name("rrx_user_spread_change_records")->insert([
|
|
3134
|
3134
|
'operation_id' => 1,
|
|
3135
|
3135
|
'uid' => $uid,
|
|
3136
|
|
- 'old_spread_id' => $old_spread_id,
|
|
|
3136
|
+ 'old_spread_id' => $spreadId,
|
|
3137
|
3137
|
'new_spread_id' => $spread['uid'],
|
|
3138
|
3138
|
'mark' => $mark
|
|
3139
|
3139
|
]);
|