<?php
/**
 * User: MikeMei
 */
defined('IN_WEB') or die('Include Error!');
class Config{

    /**
     * 广告配置
     * @param $param
     * @return false|string
     * Created by: Owen
     * Created on: 2020/3/27 11:14
     */
    public function Advertisement($param){
        $uid = oo::functions()->uint($param['uid']);
        if(empty($uid)) {
            return oo::response(-1,[],'参数错误');
        }
        $data = oo::commonOprModel('advertisement')->getRemainCount($uid);
        $ret = oo::commonOprModel('readconfig')->getSysCon('Advertisement',"cache");
        return json_encode([
            'code' => 1, 'msg'  => '', 'data' => $data,
            'cache'=> json_decode($ret),
        ],JSON_NUMERIC_CHECK);
    }

    /**
     * 聚合广告
     * @param $param
     * @return string
     * Created by: Owen
     * Created on: 2020/7/14 11:07
     */
    public function polymerization($param){
        $uid = oo::functions()->uint($param['uid']);
        if(empty($uid)) {
            return oo::response(-1,[],'参数错误');
        }
        $userAssetsInfo = oo::commonOprModel('member')->getUserAssetsInfo($uid);
        $version = oo::commonOprModel('user')->getUserVersion($uid);
        if(oo::compareVersion($version,'1.7.0')){
            $agConfig = oo::commonOprModel('Advertisement')->getAggregateConfig2($uid);
            $config['adPro']   = 100;
            $config['adTotal'] = array_sum(array_column($agConfig,"max"));
        }else{
            if($userAssetsInfo['levelId'] >= 5){
                $userDynamicsData = oo::commonOprModel('member')->getUserDynamicsData($uid);
                $id     = max($userDynamicsData['groupId'],1);
                $config = oo::commonOprModel('config')->getUserGroupConfig($id);
            }else{
                $config['adPro']   = 0;
                $config['adTotal'] = 0;
            }
            $agConfig = oo::commonOprModel('Advertisement')->getAggregateConfig($uid);
        }

        $data = [
            'config'      => $agConfig,
            'probability' => $config['adPro'],
            'total'       => $config['adTotal'],
        ];
        return oo::response(1,$data,"",true);
    }

    /**
     * 幸运夺宝
     * @param $param
     * @return string
     * Created by: Owen
     * Created on: 2020/3/27 14:35
     */
    public function luckyDraw($param){
        $uid = oo::functions()->uint($param['uid']);
        if(empty($uid)) {
            return oo::response(-1,[],'参数错误');
        }
        $version = oo::commonOprModel('user')->getUserVersion($uid);
        if(oo::compareVersion($version,'1.7.3')){
            $progressConfig = oo::commonOprModel('luckydraw')->getProgressConfig(true);
        }else{
            $progressConfig = oo::commonOprModel('luckydraw')->getProgressConfig();
        }

        foreach ($progressConfig as $key=>$row){
            $temp['isreward'][] = oo::commonOprModel('luckydraw')->getRewardProgress($uid,$key);
        }
        $data= [
            'luckyValue'     =>oo::commonOprModel('luckydraw')->getUserLuckyValue($uid),
            'curProgress'    =>oo::commonOprModel('luckydraw')->getUserProgress($uid),
            'refreshTime'    =>time() + oo::weekDeadline(),
            'progressReward' =>$temp,
        ];
        return oo::response(1,$data,'',true);
    }

    /**
     * 签到配置
     * @param $param
     * @return string
     * Created by: Owen
     * Created on: 2020/5/22 12:32
     */
    public function signIn($param){
        $uid = oo::functions()->uint($param['uid']);
        if(empty($uid)) {
            return oo::response(-1,[],'参数错误');
        }
        $isreward = intval(oo::commonOprRedis('User')->get(okeys::SignInToday($uid)));
        $spinMonthly = oo::commonOprModel('payment')->getSpinMonthly($uid,1001);
        $spinMonthly = empty($spinMonthly)?0:$spinMonthly['endTime'];
        $spinMonthlyPro = oo::commonOprModel('payment')->getSpinMonthly($uid,1002);
        $spinMonthlyPro = empty($spinMonthlyPro)?0:$spinMonthlyPro['endTime'];
        $progress  = oo::commonOprModel('member')->getUserSignInProgress($uid,true);
        return oo::response(1,[
            'days'       => intval(oo::commonOprRedis('User')->get(okeys::SignInTimes($uid))) + 1 - $isreward,
            'isreward'   => $isreward,
            'spinMonthly'=> [$spinMonthly,$spinMonthlyPro],
            'progress'   => [
                'rewardDay' => $progress['rewardDay'],
                'signInDay' => $progress['signInDay'],
            ],
        ],'',true);
    }

    /**
     * 奖励中心
     * @return string
     * Created by: Owen
     * Created on: 2019/11/29 10:19
     */
    public function rewardCenter($param){
        $uid  = oo::functions()->uint($param['uid']);
        if(empty($uid)) {
            return oo::response(-1,[],'参数错误');
        }

        

        /**
         * 设置ABTest
         */
        $abTest = oo::functions()->uint($param['abTest']);
        oo::commonOprRedis('common')->setex(okeys::UserAbTest($uid),$abTest,10800);
        oo::commonOprRedis('common')->hSet(okeys::UserAbTest(),$uid,$abTest);
        $news = [];
        $sortEnd   = 100;
        $sortStart = 1;

        $version = oo::commonOprModel('user')->getUserVersion($uid);
//        if(oo::compareVersion($version,'1.13.1')){
            //测试代码 上线前删掉
//            oo::logs()->debug3(["ts"=>date("H:i:s"),"uid"=>$uid,"remoteConfigStr"=>$param['remoteConfigStr']],'remoteConfigStr.log');
//        }

        /**
         * 系統补偿
         */
        $config = oo::commonOprModel('config')->getSysCompensateConfig2($uid);
        if(!empty($config)){
            $reward =  $config['reward'];
            $reward['coins'] = $reward['money'];
            $news[] = [
                'id'   => 2,
                'sort' => $sortStart++,
                'type' => self::isShow(2),
                'data' =>[
                    'reward'  => $reward,//1.7.8之后不再使用
                    'isreward'=> 0,//1.7.8之后不再使用
                    'activityData'=>[
                        "showInCenter"=>1,
                        "showInButton"=>0,
                        "showCountdown"=>0,
                        'reward'  => $reward,
                        'content' => $config["content"],
                        'end'     => $config["endTime"],
                    ],
                    'userData'=>[
                        'isreward'=>0
                    ]
                ]
            ];
        }

        /**
         * 更新礼包
         */
        $giftVersion = oo::commonOprModel('config')->getVersionGiftStatus($uid);
        $config      = oo::commonOprModel('config')->getVersionConfig($uid);
        $userBaseVersion   = funs::changeVersionLength($version);
        $configBaseVersion = funs::changeVersionLength($config['gu_version']);
        if($config['gu_isReward'] == 1 && !oo::compareVersion($userBaseVersion,$configBaseVersion,false)){
            if(!($giftVersion && oo::compareVersion($userBaseVersion,$configBaseVersion) && !oo::compareVersion($userBaseVersion,$configBaseVersion,false))){
                $gu_reward = json_decode($config['gu_reward'],true);
                $gu_reward['coins'] = $gu_reward['money'];
                $news[] = [
                    'id'   => 4,
                    'sort' => intval($giftVersion)?$sortEnd--:$sortStart++,
                    'type' => self::isShow(4),
                    'data' =>[
                        'reward'  => $gu_reward,//1.7.8之后不再使用
                        'isreward'=> intval($giftVersion),//1.7.8之后不再使用
                        'version' => oo::compareVersion($version,"1.7.4") ? $config['gu_version'] : $configBaseVersion,
                        'activityData'=>[
                            "showInCenter"=>1,
                            "showInButton"=>0,
                            "showCountdown"=>0,
                            'reward'  => $gu_reward,
                            'version' => $config['gu_version'],
                        ],
                        'userData'=>[
                            'isreward'=>intval($giftVersion)
                        ]
                    ]
                ];
            }
        }


        $act_type = oo::commonOprModel('activitynew')->act_type;
        $openActList = ["rank","balloon","balloon_tg","supper_bet","crazy_bet","speed_spins","card","chain_gift","poster_1","poster_2","poster_3",'architecture', 'crazy_card_group', 'golden_card_trade', 'time_limit_invite', 'shop_promotion'];
        if(oo::compareVersion($version,'1.7.0')){
            array_push($openActList,'accumulated_pay');
        }
        if(oo::compareVersion($version,'1.7.1')){
            array_push($openActList,'discounts_architecture');
            array_push($openActList,'traffic_permit');
        }
        if(oo::compareVersion($version,'1.7.2')){
            array_push($openActList,'treasure');
        }
        if(oo::compareVersion($version,'1.7.4')){
            array_push($openActList,'super_serial_pack');
        }
        //if(oo::compareVersion($version,'1.7.5')){
        //    array_push($openActList,'steel_safe');
        //}
        if(oo::compareVersion($version,'1.13.1')){
            array_push($openActList,'spin_safe');
        }

        if(oo::compareVersion($version,'1.8.0')){
            array_push($openActList,'premium');
            array_push($openActList,'super_balloon');
        }
        if(oo::compareVersion($version,'1.8.1')){
            array_push($openActList,'traffic_permit_bet');
            array_push($openActList,'choose_one');
            array_push($openActList,'spins_master');
            array_push($openActList,'fund');
        }
        if(oo::compareVersion($version,'1.7.7')){
            array_push($openActList,'coin_blast');
            array_push($openActList,'super_collect');
        }
        if(oo::compareVersion($version,'1.8.4')){
            array_push($openActList,'collect_bet');
            array_push($openActList,'easter_egg');
            array_push($openActList,'daily_chest');
            array_push($openActList,'callback_score');
        }
        if(oo::compareVersion($version,'1.8.5')){
            array_push($openActList,'change_collect');
        }
        if(oo::compareVersion($version,'1.10.1')){
            array_push($openActList,'super_serial_pack2');
        }
        if(oo::compareVersion($version,'1.13.0')){
            array_push($openActList,'rank2');
        }
        if(oo::compareVersion($version,'1.14.1')){
            array_push($openActList,'one_plus_gift');
            array_push($openActList,'safe_surprise');
        }
        $activityList = [];
        foreach ($openActList as $v){
            $actInfo = oo::commonOprModel('activitynew')->activityLock($uid,$v,true);
            if($actInfo){
                $activityList[] = $actInfo['activityData']['aid'];
                if($v=='rank'&&$actInfo['activityData']['rewardTime']-30<time()){
                    continue;
                }
                $rcid = $act_type[$actInfo['activityData']['actType']]['rcid'];
                $news[] = [
                    'id'   => $rcid,
                    'sort' => $rcid,
                    'type' => self::isShow($rcid),
                    'data' => $actInfo
                ];
            }
        }

        //ab分组数数上报 
//        oo::commonOprModel('ta')->setEventData($uid,'user_firebase_activity',["firebase_activity" => (int)$abTest]);
        oo::commonOprModel('ta')->setEventData($uid, 'user_set', ["firebase_activity" => (int)$abTest]);

        /**
         * ta 公共属性
         */
        oo::commonOprModel('ta')->setCommonEventProperty($uid,'common',['activity_list'=>implode(',',$activityList)]);
        /**
         * jackPot
         */
    //        $activity11 = oo::commonOprModel('activity')->activityLock($uid,11,true);
    //        if($activity11){
    //            $activity11['protectTime'] = 300;
    //            $activity11['activityName']= "jackPot";
    //            $activity11['curNum'] = oo::commonOprModel('activity')->getJackPotPool();
    //            $activity11['showInButton'] = intval(oo::commonOprRedis('common')->hGet(okeys::actCenterShowType(2),15));
    //            $activity11['showCountdown'] = intval(oo::commonOprRedis('common')->hGet(okeys::actCenterShowType(3),15));
    //            $activity11['showInCenter'] = intval(oo::commonOprRedis('common')->hGet(okeys::actCenterShowType(1),15));
    //            $news[] = [
    //                'id'   => 15,
    //                'sort' => 13,
    //                'type' => self::isShow(15),
    //                'data' => ["activityData"=>$activity11],
    //            ];
    //        }
        return oo::response(1,$news,'',true);
    }

    /**
     * 弃用
     * @param $id
     * @return int|mixed
     * Created by: Owen
     * Created on: 2021/3/17 19:43
     */
    public function isShow($id){
        $show = oo::commonOprRedis('common')->hGet(okeys::RewardCenterShow(),$id);
        return ($show == false)?1:$show;
    }

    /**
     * 倍率配置
     * @return string
     * Created by: Owen
     * Created on: 2021/3/17 19:43
     */
    public function betConfig(){
        $data =oo::cfg('bet');
        return oo::response(1,$data,'',true);
    }

    /**
     * Notes:排行榜奖励配置
     * User: wsc
     * Time: 2020/8/12 10:27
     * @param $param
     * @return string
     */
    public function getRankRewardConf($param){
        $uid = oo::functions()->uint($param['uid']);
        if(empty($uid)) {
            return oo::response(-1,[],'参数错误');
        }
        $aid  = oo::commonOprModel('activitynew')->activityLock($uid,'rank');
        if(empty($aid)){
            return oo::response(errorCode::CONDITION_NOT_RNOUGH,[],"activity not open");
        }
        $ret = oo::commonOprModel('activitynew')->getRankEndRewardConf($aid,$uid);
        return oo::response(1,array_values($ret),'success');
    }

    //排行榜奖励配置 无进度
    public function getRankRewardConfNoPro($param){
        $uid = oo::functions()->uint($param['uid']);
        if(empty($uid)) {
            return oo::response(-1,[],'参数错误');
        }
        $aid  = oo::commonOprModel('activitynew')->activityLock($uid,'rank2');
        if(empty($aid)){
            return oo::response(errorCode::CONDITION_NOT_RNOUGH,[],"activity not open");
        }
        $ret = oo::commonOprModel('activitynew')->getRankEndRewardConf($aid,$uid);
        return oo::response(1,array_values($ret),'success');
    }

    /**
     * 宠物配置
     * @param $param
     * @return string
     * created by owen
     * created at 21:24
     */
    public function pet($param){
        $uid = oo::functions()->uint($param['uid']);
        if(empty($uid)) {
            return oo::response(-1,[],'参数错误');
        }
        $data =  oo::commonOprModel('pet')->getPetConfig(true);
        return oo::response(1,$data,'',true);
    }

    /**
     * 分享配置
     * @param $param
     * @return string
     * Created by: Owen
     * Created on: 2020/3/27 14:43
     */
    public function shareAndLevel($param){
        $uid = oo::functions()->uint($param['uid']);
        if(empty($uid)) {
            return oo::response(-1,[],'参数错误');
        }
        $version = oo::commonOprModel('user')->getUserVersion($uid);

        $configTmp = [];
        if(oo::compareVersion($version,'1.7.4')){
            $config = oo::commonOprModel('config')->getShareConfig('',true);
            foreach ($config as $row){
                $configTmp[$row['type']] = [
                    'maxTimes'   => $row['maxTimes'],
                    'reward' => $row['reward'],
                    'intervalTime'=> $row['intervalTime'],
                ];
            }
        }else{
            $config = oo::commonOprModel('config')->getShareConfig();
            foreach ($config as $row){
                $configTmp[$row['type']] = [
                    'maxTimes'   => $row['maxTimes'],
                    'selfReward' => $row['selfReward'],
                    'otherReward'=> $row['otherReward'],
                ];
            }
        }

        $reward = oo::commonOprRedis('common')->get(okeys::ShareRewardId($uid));
        if(empty($reward)){
            $reward = [];
            foreach ($config as $row){
                $rewardId = $row['type'].date('Ymd').$uid;
                $reward[$row['type']] = $rewardId;
                oo::commonOprRedis('common')->setex(okeys::ShareRewardIdData($rewardId),json_encode([
                    'uid'     =>$uid,
                    'type'    =>$row['type'],
                ]),oo::todayDeadline());
            }
            oo::commonOprRedis('common')->setex(okeys::ShareRewardId($uid),json_encode($reward),oo::todayDeadline());
        }else{
            $reward = json_decode($reward,true);
        }
        $userShareData = [];
        foreach ($config as $row){
            $userShareData[$row['type']] = [
                'times'   => intval(oo::commonOprRedis('common')->get(okeys::userShareTimes($uid,$row['type']))),
                'rewardId'=> $reward[$row['type']],
            ];
        }
        $data = [
            'share_data' => $userShareData,
            'level_data' => oo::commonOprModel('member')->getUserConfig($uid),
        ];
        return oo::response(1,$data,'',true);
    }

    /**
     * 分享配置
     * @param $param
     * @return string
     * Created by: Owen
     * Created on: 2020/3/27 14:43
     */
    public function share($param){
        $uid = oo::functions()->uint($param['uid']);
        if(empty($uid)) {
            return oo::response(-1,[],'参数错误');
        }
        $version = oo::commonOprModel('user')->getUserVersion($uid);

        $configTmp = [];
        if(oo::compareVersion($version,'1.10')){
            $config = oo::commonOprModel('config')->getShareConfig3();
            //foreach ($config as $row){
            //    $configTmp[$row['key']] = [
            //        'maxTimes'      => $row['maxTimes'],
            //        'reward'        => $row['reward'],
            //        'intervalTime'  => $row['intervalTime'],
            //    ];
            //}
        }else if(oo::compareVersion($version,'1.7.4')){
            $config = oo::commonOprModel('config')->getShareConfig('',true);
            foreach ($config as $row){
                $configTmp[$row['type']] = [
                    'maxTimes'   => $row['maxTimes'],
                    'reward' => $row['reward'],
                    'intervalTime'=> $row['intervalTime'],
                ];
            }
        }else{
            $config = oo::commonOprModel('config')->getShareConfig();
            foreach ($config as $row){
                $configTmp[$row['type']] = [
                    'maxTimes'   => $row['maxTimes'],
                    'selfReward' => $row['selfReward'],
                    'otherReward'=> $row['otherReward'],
                ];
            }
        }
        $reward = oo::commonOprRedis('common')->get(okeys::ShareRewardId($uid));
        if(empty($reward)){
            $reward = [];
            foreach ($config as $row){
                $rewardKey = isset($row['key']) ? $row['key'] : $row['type'];
                $rewardId = $rewardKey.date('Ymd').$uid;
                $reward[$rewardKey] = $rewardId;
                oo::commonOprRedis('common')->setex(okeys::ShareRewardIdData($rewardId),json_encode([
                    'uid'     =>$uid,
                    'type'    =>$row['key'],
                ]),oo::todayDeadline());
            }
            oo::commonOprRedis('common')->setex(okeys::ShareRewardId($uid),json_encode($reward),oo::todayDeadline());
        }else{
            $reward = json_decode($reward,true);
        }
        $userShareData = [];
        foreach ($config as $row){
            $userShareData[$row['key']] = [
                'times'   => intval(oo::commonOprRedis('common')->get(okeys::userShareTimes($uid,$row['type']))),
                'rewardId'=> $reward[$row['key']],
                'expire'  => intval(oo::commonOprRedis('common')->ttl(okeys::ShareIntervalTime($uid,$row['type']))) + time()
            ];
        }
        return oo::response(1,$userShareData,'',true);
    }

    /**
     * 拉取用户道具
     * @param $param
     * @return string
     * Created by: Owen
     * Created on: 2019/12/23 16:09
     */
    public function props($param) {
        $uid = oo::functions()->uint($param['uid']);
        if(empty($uid)){
            return oo::response(-1);
        }
        $id = oo::functions()->uint($param['id']);
        $state = [];
        $cgBless = oo::commonOprModel('card')->getCardBlessList($uid);
        if($cgBless){
            $state['bless'] = $cgBless;
        }
        $data = [
            'props'=>oo::commonOprModel('props')->getUserProps($uid, $id),
            'state'=>$state,
        ];
        return oo::response(1,$data,'',true);
    }

    /**
     * 排行榜
     * @param $param
     * @return false|string
     * Created by: Owen
     * Created on: 2020/3/27 19:31
     */
    public function rank($param){
        $uid = oo::functions()->uint($param['uid']);
        if( empty($uid) ){
            return oo::response(-1);
        }
        $data = oo::commonOprModel('rank')->getStaRank($uid);
        /**
         * firstName
         */
        $world  = $data['list']['world'];
        foreach ($world as $key=>$w){
            $world[$key]['nick'] = oo::commonOprModel('member')->getUserFirstName($w['nick']);
        }
        $data['list']['world'] = $world;
        $country  = $data['list']['country'];
        foreach ($country as $key=>$c){
            $country[$key]['nick'] = oo::commonOprModel('member')->getUserFirstName($c['nick']);
        }
        $data['list']['country'] = $country;
        return json_encode($data);
    }

    /**
     * 获取当前等级对应的配置
     * @param $param
     * @return false|string
     * Created by: Cassie Lee
     * Created on: 2019/6/10 19:54
     * Description:
     */
    public function level($param){
        $uid = oo::functions()->uint($param['uid']);
        if(empty($uid)){
            return oo::response(-1);
        }
        $data  = oo::commonOprModel('member')->getUserConfig($uid);
        return json_encode([
            'code'=>1,
            'data'=>$data
        ]);
    }

    /**
     * 过关配置
     * @param $param
     * @return string
     * Created by: Owen
     * Created on: 2020/3/27 20:20
     */
    public function newLevel($param){
        $uid = oo::functions()->uint($param['uid']);
        if(empty($uid)){
            return oo::response(-1);
        }
        $config  = oo::commonOprModel('member')->getUserConfig($uid);
        $LandData = oo::commonOprModel('level')->getLandDatas($uid);
        return oo::response(1,['config'=>$config, 'LandData'=>$LandData],"",true);
    }

    /**
     * 星星兑换配置
     * @param $param
     * @return string
     * Created by: Owen
     * Created on: 2020/8/7 20:10
     */
    public function starExchange($param){
        $uid = oo::functions()->uint($param['uid']);
        if(empty($uid)){
            return oo::response(-1);
        }
        $userAssetsInfo = oo::commonOprModel('member')->getUserAssetsInfo($uid);
        $coins    = oo::commonOprModel('config')->getActivityCoins(max($userAssetsInfo['levelId'],1),"starExchange");
        $config   = oo::commonOprModel('config')->getStarExchange();
        foreach ($config as $key=>$row){
            $pConf = oo::commonOprModel('props')->getChestData($uid,19,false,$row['propsId']);
            $config[$key] = array_merge($config[$key],$pConf);
            $config[$key]['refreshTimes']= intval(oo::commonOprRedis('User')->get(okeys::StarExchangeBuyTimer($uid,$row['propsId'])));
            $config[$key]['refreshTime'] = time() + max(oo::commonOprRedis('User')->ttl(okeys::StarExchange($uid,$row['propsId'])),0);
            $config[$key]['refreshInterval'] = $row['refreshTime'];
            $priceArr = [];
            foreach ($row['chestPrice'] as $bet){
                $priceArr[] = intval($coins * $bet);
            }
            $config[$key]['refreshPrice'] = $priceArr;
            $config[$key]['priceNum']     = count($priceArr);
            unset($config[$key]['chestPrice']);
            unset($config[$key]['chestProId']);
        }
        return oo::response(1,['config'=>$config,'levelId'=>$userAssetsInfo['levelId']],"",true);
    }

    /**
     * 邀请奖励配置 等级区间
     * @param $param
     * @return string
     * Created by: Hss
     * Created on: 2020/8/17 15:46
     */
    public function inviteReward($param){
        $sid = $param['sid']??1;
        $config = oo::commonOprModel('config')->getInviteRewardConfig(0,$sid);
        return oo::response(1,['config'=>$config],"",true);
    }

    /**
     * Notes:获取邀请阶段奖励详情
     * User: wsc
     * Time: 2020/9/17 10:13
     * @param $param
     * @return string
     */
    public function inviteStageReward($param){
        $uid = oo::functions()->uint($param['uid']);
        if(empty($uid) ){
            return oo::response(-1);
        }
        $reward = oo::commonOprModel('config')->getInviteStageReward($uid);
        return oo::response(1,$reward,"",true);
    }

    /**
     * 奖励链接
     * @param $param
     * @return string
     * Created by: Owen
     * Created on: 2020/12/3 9:51
     */
    public function giftList($param){
        $uid = oo::functions()->uint($param['uid']);
        if(empty($uid) ){
            return oo::response(-1);
        }
        $ret = oo::commonOprModel('member')->getUserGiftList($uid);
        return oo::response(errorCode::SUCCESS,['list'=>$ret],"",true);
    }

    /**
     * 公共事件属性
     * @param $param
     * @return string
     * Created by: Owen
     * Created on: 2021/5/11 9:45
     */
    public function CommonEventProperty($param){
        $uid = oo::functions()->uint($param['uid']);
        if(empty($uid) ){
            return oo::response(-1);
        }
        $ret = oo::commonOprModel('ta')->getCommonEventProperty($uid);
        return oo::response(errorCode::SUCCESS,['properties'=>$ret]);
    }
}
