Browse Source

匹配视频和语聊扣费修改,充值0.01去掉

lizhen_gitee 3 years ago
parent
commit
dcbe1718d9
2 changed files with 9 additions and 7 deletions
  1. 2 2
      application/api/controller/Pay.php
  2. 7 5
      application/api/controller/Usercenter.php

+ 2 - 2
application/api/controller/Pay.php

@@ -89,7 +89,7 @@ class Pay extends Api
             'orderid'      => $pay_no,
             'title'        => $data['memo'],
             'amount'       => $data['money'],
-            'amount'       => 0.01,
+            //'amount'       => 0.01,
             //'method'       => 'miniapp',
             'method'       => 'app',
             //'openid'       => $openid,
@@ -197,7 +197,7 @@ class Pay extends Api
             'orderid'      => $pay_no,
             'title'        => $data['memo'],
             'amount'       => $data['money'],
-            'amount'       => 0.01,
+            //'amount'       => 0.01,
             'method'       => 'app',
             'notifyurl' => $this->request->root(true) . '/notify.php/paytype/'.$pay_type,
             'returnurl' => '',

+ 7 - 5
application/api/controller/Usercenter.php

@@ -273,7 +273,8 @@ class Usercenter extends Api
         }
 
         //扣费
-        if($price > 0 && $this->auth->gender == 1){
+        //男的,或 未实名认证的女的 都要扣费
+        if($price > 0 && (($this->auth->gender == 1) || ($this->auth->gender == 0 && $this->auth->idcard_status != 1))){
             $rs = model('wallet')->lockChangeAccountRemain($this->auth->id,'gold',-$price,11,'','user_match_video_log',$log_id);
             if($rs['status'] === false){
                 Db::rollback();
@@ -335,7 +336,8 @@ class Usercenter extends Api
         }
 
         //扣费
-        if($price > 0 && $this->auth->gender == 1){
+        //男的,或 未实名认证的女的 都要扣费
+        if($price > 0 && (($this->auth->gender == 1) || ($this->auth->gender == 0 && $this->auth->idcard_status != 1))){
             $rs = model('wallet')->lockChangeAccountRemain($this->auth->id,'gold',-$price,12,'','user_match_audio_log',$log_id);
             if($rs['status'] === false){
                 Db::rollback();
@@ -458,7 +460,7 @@ class Usercenter extends Api
             'real_status' => 1,                                 //真人认证
             'idcard_status' => 1,                               //实名认证
             'open_match_audio' => 1,                            //打开语聊开关
-//            'id' => ['NOT IN',$my_follow]                     //不是好友的
+            'id' => ['NOT IN',$my_follow]                     //不是好友的
         ];
 
         $lists = Db::name('user')->field('id,cityname,status,gender,real_status,tag_ids')->where($map)->order('logintime desc')->page($this->page,100)->select();
@@ -525,7 +527,7 @@ class Usercenter extends Api
             'real_status' => 1,                                 //真人认证
             'idcard_status' => 1,                               //实名认证
             'open_match_video' => 1,                            //打开视频开关的
-//            'id' => ['NOT IN',$my_follow]                     //不是好友的
+            'id' => ['NOT IN',$my_follow]                     //不是好友的
         ];
 
         $lists = Db::name('user')->field('id,cityname,status,gender,real_status,tag_ids')->where($map)->order('logintime desc')->page($this->page,100)->select();
@@ -566,7 +568,7 @@ class Usercenter extends Api
             //'idcard_status' => 1,                               //实名认证
             //打开聊天开关的
             'open_match_typing' => 1,                            //打开文字聊天开关的
-//            'id' => ['NOT IN',$my_follow]                      //不是好友的
+            'id' => ['NOT IN',$my_follow]                      //不是好友的
         ];
 
         $lists = Db::name('user')->field('id,cityname,status,gender,real_status,tag_ids')->where($map)->order('logintime desc')->page($this->page,100)->select();