1 多表联查实现方法

有两种方式一种使用DAO写SQL语句实现,这种实现理解起来相对轻松,只要保证SQL语句不写错就行了。缺点也很明显,比较零散,而且不符合YII的推荐框架,最重要的缺点在于容易写错。

还有一种便是下面要说的使用YII自带的CActiveRecord实现多表联查

2 整体框架

我们需要找到一个用户的好友关系,用户的信息放在用户表中,用户之间的关系放在关系表中,而关系的内容则放在关系类型表中。明显的我们只需要以关系表为主表联查其他两个表即可。我主要从代码的角度,分析下实现的过程。

3 CActiveRecord

我们首先需要对3张表建立相应的model,下面是关系表的代码

SocialRelation.php

[php]  view plain copy
  1. <?php  
  2.   
  3. /** 
  4.  * This is the model class for table "{{social_relation}}". 
  5.  * 
  6.  * The followings are the available columns in table '{{social_relation}}': 
  7.  * @property integer $relation_id 
  8.  * @property integer $relation_type_id 
  9.  * @property integer $user_id 
  10.  * @property integer $another_user_id 
  11.  * 
  12.  * The followings are the available model relations: 
  13.  * @property SocialRelationType $relationType 
  14.  * @property AccessUser $user 
  15.  * @property AccessUser $anotherUser 
  16.  */  
  17. class SocialRelation extends CActiveRecord  
  18. {  
  19.     /** 
  20.      * Returns the static model of the specified AR class. 
  21.      * @param string $className active record class name. 
  22.      * @return SocialRelation the static model class 
  23.      */  
  24.     public static function model($className=__CLASS__)  
  25.     {  
  26.         return parent::model($className);  
  27.     }  
  28.   
  29.     /** 
  30.      * @return string the associated database table name 
  31.      */  
  32.     public function tableName()  
  33.     {  
  34.         return '{{social_relation}}';  
  35.     }  
  36.   
  37.     /** 
  38.      * @return array validation rules for model attributes. 
  39.      */  
  40.     public function rules()  
  41.     {  
  42.         // NOTE: you should only define rules for those attributes that  
  43.         // will receive user inputs.  
  44.         return array(  
  45.             array('relation_type_id, user_id, another_user_id''numerical''integerOnly'=>true),  
  46.             // The following rule is used by search().  
  47.             // Please remove those attributes that should not be searched.  
  48.             array('relation_id, relation_type_id, user_id, another_user_id''safe''on'=>'search'),  
  49.         );  
  50.     }  
  51.   
  52.     /** 
  53.      * @return array relational rules. 
  54.      */  
  55.     public function relations()  
  56.     {  
  57.         // NOTE: you may need to adjust the relation name and the related  
  58.         // class name for the relations automatically generated below.  
  59.         return array(  
  60.             'relationType' => array(self::BELONGS_TO, 'SocialRelationType''relation_type_id'),  
  61.             'user' => array(self::BELONGS_TO, 'AccessUser''user_id'),  
  62.             'anotherUser' => array(self::BELONGS_TO, 'AccessUser''another_user_id'),  
  63.         );  
  64.     }  
  65.   
  66.     /** 
  67.      * @return array customized attribute labels (name=>label) 
  68.      */  
  69.     public function attributeLabels()  
  70.     {  
  71.         return array(  
  72.             'relation_id' => 'Relation',  
  73.             'relation_type_id' => 'Relation Type',  
  74.             'relation_type_name' => 'Relation Name',  
  75.             'user_id' => 'User ID',  
  76.             'user_name' => 'User Name',  
  77.             'another_user_id' => 'Another User',  
  78.             'another_user_name' => 'Another User Name',  
  79.         );  
  80.     }  
  81.   
  82.     /** 
  83.      * Retrieves a list of models based on the current search/filter conditions. 
  84.      * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions. 
  85.      */  
  86.     public function search()  
  87.     {  
  88.         // Warning: Please modify the following code to remove attributes that  
  89.         // should not be searched.  
  90.   
  91.         $criteria=new CDbCriteria;  
  92.   
  93.         $criteria->compare('relation_id',$this->relation_id);  
  94.         $criteria->compare('relation_type_id',$this->relation_type_id);  
  95.         $criteria->compare('user_id',$this->user_id);  
  96.         $criteria->compare('another_user_id',$this->another_user_id);  
  97.         $criteria->with=array(  
  98.             'relationType',  
  99.         );  
  100.   
  101.         return new CActiveDataProvider($thisarray(  
  102.             'criteria'=>$criteria,  
  103.         ));  
  104.     }  
  105. }  


为了描述方便我们约定 主表为A表(执行查询的那个表), 引用表为B表(外键所引用的表)

建议使用Gii自动生成模型,这样能够节省大量时间,为了测试方便,可以对主表生成CRUD,就是增删改查页面,其他的引用表只用生成model就行了。

1 model函数、tablename函数用于得到这个模型和得到数据库表基本信息。自动生成无需修改

2 rules函数,这个函数主要用于规定参数检验方式,注意即使有些参数不需要校验,也必须出现在rules中。不然模型将无法得到参数

3 relation函数,这个函数十分关键,用于定义表之间的关系,下面我将详细说明其中含义

[php]  view plain copy
  1. 'relationType' => array(self::BELONGS_TO, 'SocialRelationType''relation_type_id')  
这句代码中结构如下

'VarName'=>array('RelationType', 'ClassName', 'ForeignKey', ...additional options)

VarName 是关系的名字,我们以后会用这个名字访问外键引用表的字段

RelationType是关系的类型,十分重要,如果设定错误会导致一些奇怪而且难以检查的错误,Yii一共提供了4种关系

BELONGS_TO(属于): 如果表 A 和 B 之间的关系是一对多,则 表 B 属于 表 A 
HAS_MANY(有多个): 如果表 A 和 B 之间的关系是一对多,则 A 有多个 B 
HAS_ONE(有一个): 这是 HAS_MANY 的一个特例,A 最多有一个 B
MANY_MANY: 这个对应于数据库中的 多对多关系

ClassName是引用表名,就是外键所引用的表的名字,也就是B表表名

ForeignKey是外键名,主要这里填写的是外键在主表中的名字,也就是外键在A表中的表名,切记不要填错了

如果B表中是双主键可以采用下列方式实现,从软件工程的角度不推荐这样的做法,每个表最好使用独立无意义主键,不然容易出现各种问题,而且不方便管理

[php]  view plain copy
  1. 'categories'=>array(self::MANY_MANY, 'Category',  
  2.                 'tbl_post_category(post_id, category_id)'),  
additional option 附加选项,很少用到

4 attributeLabels函数,这就是表属性的显示名称了,有点点像powerdesigner中code和name的关系前面一部分为数据库字段名,后面一部分为显示名称

5 search函数,用于生成表查询结果的函数,可以在此加一些限制条件,具体的使用方法就不在这里说明了,可以参考API中CDbCriteria的讲解。如果使用Gii生成那么不需要怎么修改。

同理我们生成,剩下的两个引用表

关系类型表:SocialRelationType.php

[php]  view plain copy
  1. <?php  
  2.   
  3. /** 
  4.  * This is the model class for table "{{social_relation_type}}". 
  5.  * 
  6.  * The followings are the available columns in table '{{social_relation_type}}': 
  7.  * @property integer $relation_type_id 
  8.  * @property string $relation_type_name 
  9.  * 
  10.  * The followings are the available model relations: 
  11.  * @property SocialRelation[] $socialRelations 
  12.  */  
  13. class SocialRelationType extends CActiveRecord  
  14. {  
  15.     /** 
  16.      * Returns the static model of the specified AR class. 
  17.      * @param string $className active record class name. 
  18.      * @return SocialRelationType the static model class 
  19.      */  
  20.     public static function model($className=__CLASS__)  
  21.     {  
  22.         return parent::model($className);  
  23.     }  
  24.   
  25.     /** 
  26.      * @return string the associated database table name 
  27.      */  
  28.     public function tableName()  
  29.     {  
  30.         return '{{social_relation_type}}';  
  31.     }  
  32.   
  33.     /** 
  34.      * @return array validation rules for model attributes. 
  35.      */  
  36.     public function rules()  
  37.     {  
  38.         // NOTE: you should only define rules for those attributes that  
  39.         // will receive user inputs.  
  40.         return array(  
  41.             array('relation_type_name''length''max'=>10),  
  42.             // The following rule is used by search().  
  43.             // Please remove those attributes that should not be searched.  
  44.             array('relation_type_id, relation_type_name''safe''on'=>'search'),  
  45.         );  
  46.     }  
  47.   
  48.     /** 
  49.      * @return array relational rules. 
  50.      */  
  51.     public function relations()  
  52.     {  
  53.         // NOTE: you may need to adjust the relation name and the related  
  54.         // class name for the relations automatically generated below.  
  55.         return array(  
  56.             'socialRelations' => array(self::HAS_MANY, 'SocialRelation''relation_type_id'),  
  57.         );  
  58.     }  
  59.   
  60.     /** 
  61.      * @return array customized attribute labels (name=>label) 
  62.      */  
  63.     public function attributeLabels()  
  64.     {  
  65.         return array(  
  66.             'relation_type_id' => 'Relation Type',  
  67.             'relation_type_name' => 'Relation Type Name',  
  68.         );  
  69.     }  
  70.   
  71.     /** 
  72.      * Retrieves a list of models based on the current search/filter conditions. 
  73.      * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions. 
  74.      */  
  75.     public function search()  
  76.     {  
  77.         // Warning: Please modify the following code to remove attributes that  
  78.         // should not be searched.  
  79.   
  80.         $criteria=new CDbCriteria;  
  81.   
  82.         $criteria->compare('relation_type_id',$this->relation_type_id);  
  83.         $criteria->compare('relation_type_name',$this->relation_type_name,true);  
  84.   
  85.         return new CActiveDataProvider($thisarray(  
  86.             'criteria'=>$criteria,  
  87.         ));  
  88.     }  
  89. }  

用户表:AccessUser.php

[php]  view plain copy
  1. <?php  
  2.   
  3. /** 
  4.  * This is the model class for table "{{access_user}}". 
  5.  * 
  6.  * The followings are the available columns in table '{{access_user}}': 
  7.  * @property integer $id 
  8.  * @property string $name 
  9.  * @property string $password 
  10.  * @property string $lastlogin 
  11.  * @property string $salt 
  12.  * @property string $email 
  13.  * @property integer $status 
  14.  * 
  15.  * The followings are the available model relations: 
  16.  * @property SocialRelation[] $socialRelations 
  17.  * @property SocialRelation[] $socialRelations1 
  18.  */  
  19. class AccessUser extends CActiveRecord  
  20. {  
  21.     /** 
  22.      * Returns the static model of the specified AR class. 
  23.      * @param string $className active record class name. 
  24.      * @return AccessUser the static model class 
  25.      */  
  26.     public static function model($className=__CLASS__)  
  27.     {  
  28.         return parent::model($className);  
  29.     }  
  30.   
  31.     /** 
  32.      * @return string the associated database table name 
  33.      */  
  34.     public function tableName()  
  35.     {  
  36.         return '{{access_user}}';  
  37.     }  
  38.   
  39.     /** 
  40.      * @return array validation rules for model attributes. 
  41.      */  
  42.     public function rules()  
  43.     {  
  44.         // NOTE: you should only define rules for those attributes that  
  45.         // will receive user inputs.  
  46.         return array(  
  47.             array('status''numerical''integerOnly'=>true),  
  48.             array('name, password, salt, email''length''max'=>255),  
  49.             array('lastlogin''safe'),  
  50.             // The following rule is used by search().  
  51.             // Please remove those attributes that should not be searched.  
  52.             array('id, name, password, lastlogin, salt, email, status''safe''on'=>'search'),  
  53.         );  
  54.     }  
  55.   
  56.     /** 
  57.      * @return array relational rules. 
  58.      */  
  59.     public function relations()  
  60.     {  
  61.         // NOTE: you may need to adjust the relation name and the related  
  62.         // class name for the relations automatically generated below.  
  63.         return array(  
  64.             'user_name' => array(self::HAS_MANY, 'SocialRelation''user_id'),  
  65.             'anotherUser_name' => array(self::HAS_MANY, 'SocialRelation''another_user_id'),  
  66.         );  
  67.     }  
  68.   
  69.     /** 
  70.      * @return array customized attribute labels (name=>label) 
  71.      */  
  72.     public function attributeLabels()  
  73.     {  
  74.         return array(  
  75.             'id' => 'ID',  
  76.             'name' => 'Name',  
  77.             'password' => 'Password',  
  78.             'lastlogin' => 'Lastlogin',  
  79.             'salt' => 'Salt',  
  80.             'email' => 'Email',  
  81.             'status' => 'Status',  
  82.         );  
  83.     }  
  84.   
  85.     /** 
  86.      * Retrieves a list of models based on the current search/filter conditions. 
  87.      * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions. 
  88.      */  
  89.     public function search()  
  90.     {  
  91.         // Warning: Please modify the following code to remove attributes that  
  92.         // should not be searched.  
  93.   
  94.         $criteria=new CDbCriteria;  
  95.   
  96.         $criteria->compare('id',$this->id);  
  97.         $criteria->compare('name',$this->name,true);  
  98.         $criteria->compare('password',$this->password,true);  
  99.         $criteria->compare('lastlogin',$this->lastlogin,true);  
  100.         $criteria->compare('salt',$this->salt,true);  
  101.         $criteria->compare('email',$this->email,true);  
  102.         $criteria->compare('status',$this->status);  
  103.   
  104.         return new CActiveDataProvider($thisarray(  
  105.             'criteria'=>$criteria,  
  106.         ));  
  107.     }  
  108. }  
4 Controller

三张表介绍完了后,下面就应当介绍Controller了,同样的我们使用Gii生成主表(A表)的CRUD后就能得到controller,我们只需要对其进行一些修改即可,代码如下

SocialRelationController.php

[php]  view plain copy
  1. <?php  
  2.   
  3. class SocialRelationController extends Controller  
  4. {  
  5.     /** 
  6.      * @var string the default layout for the views. Defaults to '//layouts/column2', meaning 
  7.      * using two-column layout. See 'protected/views/layouts/column2.php'. 
  8.      */  
  9.     public $layout='//layouts/column2';  
  10.   
  11.     /** 
  12.      * @return array action filters 
  13.      */  
  14.     public function filters()  
  15.     {  
  16.         return array(  
  17.             'accessControl'// perform access control for CRUD operations  
  18.             'postOnly + delete'// we only allow deletion via POST request  
  19.         );  
  20.     }  
  21.   
  22.     /** 
  23.      * Specifies the access control rules. 
  24.      * This method is used by the 'accessControl' filter. 
  25.      * @return array access control rules 
  26.      */  
  27.     public function accessRules()  
  28.     {  
  29.         return array(  
  30.             array('allow',  // allow all users to perform 'index' and 'view' actions  
  31.                 'actions'=>array('index','view'),  
  32.                 'users'=>array('*'),  
  33.             ),  
  34.             array('allow'// allow authenticated user to perform 'create' and 'update' actions  
  35.                 'actions'=>array('create','update'),  
  36.                 'users'=>array('@'),  
  37.             ),  
  38.             array('allow'// allow admin user to perform 'admin' and 'delete' actions  
  39.                 'actions'=>array('admin','delete'),  
  40.                 'users'=>array('admin'),  
  41.             ),  
  42.             array('deny',  // deny all users  
  43.                 'users'=>array('*'),  
  44.             ),  
  45.         );  
  46.     }  
  47.   
  48.     /** 
  49.      * Displays a particular model. 
  50.      * @param integer $id the ID of the model to be displayed 
  51.      */  
  52.     public function actionView($id)  
  53.     {  
  54.         $this->render('view',array(  
  55.             'model'=>$this->loadModel($id),  
  56.         ));  
  57.     }  
  58.   
  59.     /** 
  60.      * Creates a new model. 
  61.      * If creation is successful, the browser will be redirected to the 'view' page. 
  62.      */  
  63.     public function actionCreate()  
  64.     {  
  65.         $model=new SocialRelation;  
  66.   
  67.         // Uncomment the following line if AJAX validation is needed  
  68.         // $this->performAjaxValidation($model);  
  69.   
  70.         if(isset($_POST['SocialRelation']))  
  71.         {  
  72.             $model->attributes=$_POST['SocialRelation'];  
  73.             if($model->save())  
  74.                 $this->redirect(array('view','id'=>$model->relation_id));  
  75.         }  
  76.   
  77.         $this->render('create',array(  
  78.             'model'=>$model,  
  79.         ));  
  80.     }  
  81.   
  82.     /** 
  83.      * Updates a particular model. 
  84.      * If update is successful, the browser will be redirected to the 'view' page. 
  85.      * @param integer $id the ID of the model to be updated 
  86.      */  
  87.     public function actionUpdate($id)  
  88.     {  
  89.         $model=$this->loadModel($id);  
  90.   
  91.         // Uncomment the following line if AJAX validation is needed  
  92.         // $this->performAjaxValidation($model);  
  93.   
  94.         if(isset($_POST['SocialRelation']))  
  95.         {  
  96.             $model->attributes=$_POST['SocialRelation'];  
  97.             if($model->save())  
  98.                 $this->redirect(array('view','id'=>$model->relation_id));  
  99.         }  
  100.   
  101.         $this->render('update',array(  
  102.             'model'=>$model,  
  103.         ));  
  104.     }  
  105.   
  106.     /** 
  107.      * Deletes a particular model. 
  108.      * If deletion is successful, the browser will be redirected to the 'admin' page. 
  109.      * @param integer $id the ID of the model to be deleted 
  110.      */  
  111.     public function actionDelete($id)  
  112.     {  
  113.         $this->loadModel($id)->delete();  
  114.   
  115.         // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser  
  116.         if(!isset($_GET['ajax']))  
  117.             $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));  
  118.     }  
  119.   
  120.     /** 
  121.      * Lists all models. 
  122.      */  
  123.     public function actionIndex()  
  124.     {  
  125.         if(Yii::app()->user->id != null){  
  126.             $dataProvider=new CActiveDataProvider(  
  127.                 'SocialRelation',   
  128.                 array('criteria'=>array('condition'=>'user_id='.Yii::app()->user->id,  
  129.             ))  
  130.             );  
  131.             $this->render('index',array(  
  132.                 'dataProvider'=>$dataProvider,  
  133.             ));  
  134.         }  
  135.           
  136.     }  
  137.   
  138.     /** 
  139.      * Manages all models. 
  140.      */  
  141.     public function actionAdmin()  
  142.     {  
  143.         $model=new SocialRelation('search');  
  144.         $model->unsetAttributes();  // clear any default values  
  145.         if(isset($_GET['SocialRelation']))  
  146.             $model->attributes=$_GET['SocialRelation'];  
  147.   
  148.         $this->render('admin',array(  
  149.             'model'=>$model,  
  150.         ));  
  151.     }  
  152.   
  153.     /** 
  154.      * Returns the data model based on the primary key given in the GET variable. 
  155.      * If the data model is not found, an HTTP exception will be raised. 
  156.      * @param integer $id the ID of the model to be loaded 
  157.      * @return SocialRelation the loaded model 
  158.      * @throws CHttpException 
  159.      */  
  160.     public function loadModel($id)  
  161.     {  
  162.         $model=SocialRelation::model()->findByPk($id);  
  163.         if($model===null)  
  164.             throw new CHttpException(404,'The requested page does not exist.');  
  165.         return $model;  
  166.     }  
  167.   
  168.     /** 
  169.      * Performs the AJAX validation. 
  170.      * @param SocialRelation $model the model to be validated 
  171.      */  
  172.     protected function performAjaxValidation($model)  
  173.     {  
  174.         if(isset($_POST['ajax']) && $_POST['ajax']==='social-relation-form')  
  175.         {  
  176.             echo CActiveForm::validate($model);  
  177.             Yii::app()->end();  
  178.         }  
  179.     }  
  180. }  
简单介绍下其中各个函数和变量

$layout 就是布局文件的位置了,布局文件如何使用,这里不做讨论

filters 定义过滤器,这里面水很深

accessRules 访问方式,就是那些用户能够访问到这个模块 

[php]  view plain copy
  1. array('allow',  // allow all users to perform 'index' and 'view' actions  
  2.                 'actions'=>array('index','view'),  
  3.                 'users'=>array('*'),  
  4.             ),  
allow 表示允许访问的规则如下,deny表示拒绝访问的规则如下。

action,表示规定规则使用的动作

user,表示规则适用的用户群组,*表示所有用户,@表示登录后的用户,admin表示管理员用户

actionXXX 各个action函数

这里值得注意的是 这个函数

[php]  view plain copy
  1. public function actionIndex()  
  2.     {  
  3.         if(Yii::app()->user->id != null){  
  4.             $dataProvider=new CActiveDataProvider(  
  5.                 'SocialRelation',   
  6.                 array('criteria'=>array('condition'=>'user_id='.Yii::app()->user->id,  
  7.             ))  
  8.             );  
  9.             $this->render('index',array(  
  10.                 'dataProvider'=>$dataProvider,  
  11.             ));  
  12.         }  
  13.           
  14.     }  
其中我们可以在dataProvider中设置相应的查询条件,注意这里设置是对于主表(A表)进行的,用的字段名也是主表中的,因为我们要显示的是当前用户的好友,于是, 这里我们使用Yii::app()->user->id取得当前用户的id

loadModel 用于装载模型,这里我们可以看到findByPk查询了数据库,具体使用方式常见API 和 手册

performAjaxValidation 用于Ajax验证

5 视图View

index.php

[php]  view plain copy
  1. <?php  
  2. /* @var $this SocialRelationController */  
  3. /* @var $dataProvider CActiveDataProvider */  
  4.   
  5. $this->breadcrumbs=array(  
  6.     'Social Relations',  
  7. );  
  8. ?>  
  9.   
  10. <h1>Social Relations</h1>  
  11.   
  12. <?php $this->widget('zii.widgets.CListView'array(  
  13.     'dataProvider'=>$dataProvider,  
  14.     'itemView'=>'_view',  
  15. )); ?>  

我们使用一个 CListView控件进行显示,其中itemView为内容显示的具体表单,dataProvider这个是内容源,我们在controller中已经设定了。

_view.php

[php]  view plain copy
  1. <?php  
  2. /* @var $this SocialRelationController */  
  3. /* @var $data SocialRelation */  
  4. ?>  
  5.   
  6. <div class="view">  
  7.   
  8.     <b><?php echo CHtml::encode($data->getAttributeLabel('relation_id')); ?>:</b>  
  9.     <?php echo CHtml::link(CHtml::encode($data->relation_id), array('view''id'=>$data->relation_id)); ?>  
  10.     <br />  
  11.   
  12.     <b><?php echo CHtml::encode($data->getAttributeLabel('relation_type_id')); ?>:</b>  
  13.     <?php echo CHtml::encode($data->relation_type_id); ?>  
  14.     <br />  
  15.   
  16.     <b><?php echo CHtml::encode($data->getAttributeLabel('relation_type_name')); ?>:</b>  
  17.     <?php   
  18.         echo $data->relationType->relation_type_name;  
  19.     ?>  
  20.     <br />  
  21.       
  22.     <b><?php echo CHtml::encode($data->getAttributeLabel('user_id')); ?>:</b>  
  23.     <?php echo CHtml::encode($data->user_id); ?>  
  24.     <br />  
  25.   
  26.     <b><?php echo CHtml::encode($data->getAttributeLabel('user_name')); ?>:</b>  
  27.     <?php   
  28.         echo $data->user->name;  
  29.     ?>  
  30.     <br />  
  31.   
  32.     <b><?php echo CHtml::encode($data->getAttributeLabel('another_user_id')); ?>:</b>  
  33.     <?php echo CHtml::encode($data->another_user_id); ?>  
  34.     <br />  
  35.   
  36.     <b><?php echo CHtml::encode($data->getAttributeLabel('another_user_name')); ?>:</b>  
  37.     <?php  
  38.         echo $data->anotherUser->name;  
  39.     ?>  
  40.     <br />  
  41.       
  42. </div>  
主要都是类似的,我们看其中的一条

[php]  view plain copy
  1. <b><?php echo CHtml::encode($data->getAttributeLabel('relation_type_name')); ?>:</b>  
  2. <?php echo $data->relationType->relation_type_name; ?>  
第一行为显示标签,在模型中我们设定的显示名就在这里体现出来

第二行为内容显示,这里的relationType是在模型中设置的关系名字,后面的relation_type_name是引用表的字段名(B表中的名字)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值