全部
常见问题
产品动态
精选推荐

讲师登陆信息有误

管理 管理 编辑 删除

微信绑定手机号讲师登陆信息未修改

943cf202308281759078542.png


public static function setUserRelationInfos($bindingPhone, $uid, $newUid, $isDel = true, $qcodeId = 0)
    {
        self::startTrans();
        try {
            //修改下级推广人关系
            self::where('spread_uid', $uid)->update(['spread_uid' => $newUid]);

            //修改用户金额变动记录表
            self::getDb('user_bill')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改签到记录表
            self::getDb('user_sign')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改虚拟币充值记录表
            self::getDb('user_recharge')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改收货地址表
            self::getDb('user_address')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改提现记录用户
            self::getDb('user_extract')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改专题相关表
            self::getDb('special_buy')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('special_watch')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('learning_records')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('special_exchange')->where('use_uid', $uid)->update(['use_uid' => $newUid]);
            self::getDb('special_record')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('special_relation')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('special_reply')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改直播嘉宾表
            self::getDb('live_user')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('live_barrage')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('live_honoured_guest')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('live_reward')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改购物车记录表
            self::getDb('store_cart')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('store_product_reply')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改用户订单记录
            self::getDb('store_order')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改拼团用户记录
            self::getDb('store_pink')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改手机用户表记录
            self::getDb('phone_user')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改会员记录表记录
            self::getDb('member_record')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改搜索记录表记录
            self::getDb('search_history')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改用户报名表记录
            self::getDb('event_sign_up')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('event_write_off_user')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改资料订单表记录
            self::getDb('data_download_buy')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('data_download_order')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('data_download_records')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改证书记录表记录
            self::getDb('certificate_record')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改考试相关表记录
            self::getDb('examination_record')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('examination_test_record')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('examination_wrong_bank')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('test_paper_obtain')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('test_paper_order')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改讲师相关表
            self::getDb('merchant')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('merchant_admin')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('merchant_follow')->where('uid', $uid)->update(['uid' => $newUid]);
            self::getDb('user_enter')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改学员相关表
            self::getDb('student')->where('uid', $uid)->update(['uid' => $newUid]);

            //修改老师相关表
            self::getDb('teacher')->where('uid', $uid)->update(['uid' => $newUid]);


            //删除用户表H5用户记录
            $user = self::where('uid', $uid)->find();
            if ($isDel) self::where('uid', $uid)->delete();
            //修改上级推广关系和绑定手机号码
            self::where('uid', $newUid)->update([
                'phone' => $bindingPhone,
                'spread_uid' => $user['spread_uid'],
                'spread_time' => $user['spread_time'],
                'valid_time' => $user['valid_time'],
                'is_promoter' => $user['is_promoter'],
                'pay_count' => $user['pay_count'],
                'is_senior' => $user['is_senior'],
                'now_money' => $user['now_money'],
                'gold_num' => $user['gold_num'],
                'brokerage_price' => $user['brokerage_price'],
                'is_permanent' => $user['is_permanent'],
                'member_time' => $user['member_time'],
                'overdue_time' => $user['overdue_time'],
                'level' => $user['level'],
                'identitys' => $user['identitys'],
                'is_write_off' => $user['is_write_off'],
                'business' => $user['business']
            ]);
            if ($qcodeId) WechatQrcode::where('id', $qcodeId)->update(['scan_id' => $newUid]);
            self::commit();
            Session::clear('wap');
            Session::set('loginUid', $newUid, 'wap');
            return true;
        } catch (\Exception $e) {
            self::rollback();
            return self::setErrorInfo($e->getMessage());
        }
    }


请登录后查看

全 最后编辑于2023-09-01 14:33:00

快捷回复
回复
回复
回复({{post_count}}) {{!is_user ? '我的回复' :'全部回复'}}
排序 默认正序 回复倒序 点赞倒序

{{item.user_info.nickname ? item.user_info.nickname : item.user_name}} LV.{{ item.user_info.bbs_level }}

作者 管理员 企业

{{item.floor}}# 同步到gitee 已同步到gitee {{item.is_suggest == 1? '取消推荐': '推荐'}}
{{item.is_suggest == 1? '取消推荐': '推荐'}}
沙发 板凳 地板 {{item.floor}}#
{{item.user_info.title || '暂无简介'}}
附件

{{itemf.name}}

{{item.created_at}}  {{item.ip_address}}
{{item.like_count}}
{{item.showReply ? '取消回复' : '回复'}}
删除
回复
回复

{{itemc.user_info.nickname}}

{{itemc.user_name}}

回复 {{itemc.comment_user_info.nickname}}

附件

{{itemf.name}}

{{itemc.created_at}}
{{itemc.like_count}}
{{itemc.showReply ? '取消回复' : '回复'}}
删除
回复
回复
查看更多
1224
{{like_count}}
{{collect_count}}
添加回复 ({{post_count}})

相关推荐

快速安全登录

使用微信扫码登录
{{item.label}} 加精
{{item.label}} {{item.label}} 板块推荐 常见问题 产品动态 精选推荐 首页头条 首页动态 首页推荐
取 消 确 定
回复
回复
问题:
问题自动获取的帖子内容,不准确时需要手动修改. [获取答案]
答案:
提交
bug 需求 取 消 确 定

微信登录/注册

切换手机号登录

{{ bind_phone ? '绑定手机' : '手机登录'}}

{{codeText}}
切换微信登录/注册
暂不绑定
CRMEB客服

CRMEB咨询热线 咨询热线

400-8888-794

微信扫码咨询

CRMEB开源商城下载 源码下载 CRMEB帮助文档 帮助文档
返回顶部 返回顶部
CRMEB客服