zhangguidong 2 tahun lalu
induk
melakukan
44a059ed10

+ 2 - 7
application/api/controller/Index.php

@@ -48,13 +48,8 @@ class Index extends Api
     }
     public function ceshi()
     {
-        $out_trade_no = 'SMS167817045828';
-        $smslog_model= new Smsorder();
-        $user_model = new \app\admin\model\User();
-        $number = $smslog_model->where('order_no',$out_trade_no)->field('number,user_id')->find();
-        $user_number = $user_model->where('id',$number['user_id'])->value('sms_number');
-
-        $smslog_model->isUpdate('true',['order_no'=>$out_trade_no])->save(['status'=>1]);
+        $total_fee = ((22.02 - 20/ config('site.score_cash_offset') ) > 0 ?(22.02 - 20/ config('site.score_cash_offset') ): 0);
+        print_r($total_fee);
 
     }
 

+ 2 - 1
application/api/model/order/OrderOper.php

@@ -203,7 +203,8 @@ trait OrderOper
         // 用户使用积分
         if ($use_score > 0) {
             $score_amount = $use_score;
-            $total_fee = (($total_fee - $score_amount / 100) > 0 ?: 0);
+
+            $total_fee = (($total_fee - $score_amount /  config('site.score_cash_offset')) > 0 ?($total_fee - $score_amount /  config('site.score_cash_offset')): 0);
         }
 
         $order = Db::transaction(function () use (