<commit_before><?php
namespace Api\Controller;
use Api\Model\CollectionModel;
use Api\Model\DateModel;
use Api\Model\UserDateModel;
use Api\Model\UsersModel;
use Think\Controller;
class PersonalController extends BaseController {
    //获取收藏约会
    public function getCollection () {
        $input = I('post.');
        $uid = $input['uid'];
        $collection = new CollectionModel();
        $data['data'] = $collection->getCollection($uid);
        $data['info'] = '成功';
        $data['status'] = 200;
        $this->ajaxReturn($data);
    }

    //获取个人参加记录
    public function getJoin () {
        $input = I('post.');
        $uid = $input['uid'];
        $collection = new UserDateModel();
        $data['data'] = $collection->getPao($uid);
        $data['info'] = '成功';
        $data['status'] = 200;
        $this->ajaxReturn($data);
    }

    //获取个人发起的记录
    public function getCreate () {
        $input = I('post.');
        $uid = $input['uid'];
        $date = new DateModel();
        $data['data'] = $date->getSao($uid);
        $data['info'] = '成功';
        $data['status'] = 200;
        $this->ajaxReturn($data);
    }

    //获取个人信息
    public function getInfo () {
        $input = I('post.');
        $uid = $input['uid'];
        $get_uid = $input['get_uid'];
        $userDate = new UserDateModel();
        if (!$userDate->joincheck($uid, $get_uid)){
            $data = [
                'info' => '权限不够',
                'status' => 403
            ];
            $this->ajaxReturn($data);
        }
        $users = new UsersModel();
        $this->ajaxReturn($users->getUserInfo($get_uid));
    }

    //收藏约会
    public function collect ($uid, $date_id) {
        $collection = new CollectionModel();
        $date = [
            'date_id' => $date_id,
            'user_id' => $uid
        ];
        if($collection->data($date)->add()) {
            $data = [
                'info' => '成功',
                'status' => 200
            ];
            $this->ajaxReturn($data);
        }
        else{
            $data = [
                'info' => '网络错误!',
                'status' => 500
            ];
            $this->ajaxReturn($data);
        }
    }
}<commit_msg>获取个人资料debug<commit_after><?php
namespace Api\Controller;
use Api\Model\CollectionModel;
use Api\Model\DateModel;
use Api\Model\UserDateModel;
use Api\Model\UsersModel;
use Think\Controller;
class PersonalController extends BaseController {
    //获取收藏约会
    public function getCollection () {
        $input = I('post.');
        $uid = $input['uid'];
        $collection = new CollectionModel();
        $data['data'] = $collection->getCollection($uid);
        $data['info'] = '成功';
        $data['status'] = 200;
        $this->ajaxReturn($data);
    }

    //获取个人参加记录
    public function getJoin () {
        $input = I('post.');
        $uid = $input['uid'];
        $collection = new UserDateModel();
        $data['data'] = $collection->getPao($uid);
        $data['info'] = '成功';
        $data['status'] = 200;
        $this->ajaxReturn($data);
    }

    //获取个人发起的记录
    public function getCreate () {
        $input = I('post.');
        $uid = $input['uid'];
        $date = new DateModel();
        $data['data'] = $date->getSao($uid);
        $data['info'] = '成功';
        $data['status'] = 200;
        $this->ajaxReturn($data);
    }

    //获取个人信息
    public function getInfo () {
        $input = I('post.');
        $uid = $input['uid'];
        $get_uid = $input['get_uid'];
        $users = new UsersModel();
        if($uid == $get_uid){
            $map['id'] = $uid;
            $data['data'] = $users->where($map)->find();
            $data['info'] = '成功';
            $data['status'] = 200;
            $this->ajaxReturn($data);
        }
        $userDate = new UserDateModel();
        if (!$userDate->joincheck($uid, $get_uid)){
            $data = [
                'info' => '权限不够',
                'status' => 403
            ];
            $this->ajaxReturn($data);
        }
        $data['data'] = $users->getUserInfo($get_uid);
        $data['info'] = '成功';
        $data['status'] = 200;
        $this->ajaxReturn($data);
    }

    //收藏约会
    public function collect ($uid, $date_id) {
        $collection = new CollectionModel();
        $date = [
            'date_id' => $date_id,
            'user_id' => $uid
        ];
        if($collection->data($date)->add()) {
            $data = [
                'info' => '成功',
                'status' => 200
            ];
            $this->ajaxReturn($data);
        }
        else{
            $data = [
                'info' => '网络错误!',
                'status' => 500
            ];
            $this->ajaxReturn($data);
        }
    }
}
{'fraction_non_alphanumeric': 0.18304798139928133, 'fraction_numerical': 0.008877615726062143, 'mean_word_length': 1.7164179104477613, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 50, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2399404', 'n_tokens_mistral': 1519, 'n_tokens_neox': 1551, 'n_words': 267}