Browse Source

修复充值到账方法

jason 9 months ago
parent
commit
ad0a071f2a
3 changed files with 7 additions and 1 deletions
  1. 4 0
      .gitignore
  2. 2 0
      application/api/controller/Order.php
  3. 1 1
      application/common/logic/OrderPay.php

+ 4 - 0
.gitignore

@@ -20,3 +20,7 @@ public/nginx.htaccess
 public/.htaccess
 .htaccess
 nginx.htaccess
+rwacha.sql
+rwacha_清空后.sql
+rwacha_清空后.zip
+rwacha-清空-带会员.sql

+ 2 - 0
application/api/controller/Order.php

@@ -321,8 +321,10 @@ class Order extends Api
         try {
             //更新订单支付状态为 待确认
             OfflineRechargeRecordModel::create([
+                'order_no'      => $this->auth->id . substr((string)time(), -8),//会员ID+时间戳后8位
                 'user_id'       => $this->auth->id,
                 'amount'        => $amount,
+                'symbol'        => Asset::USDT,
                 'status'        => OfflineRechargeRecordModel::StatusConfirm,
                 'tx_hash'       => $tx_hash,
                 'from_address'  => $this->auth->address,

+ 1 - 1
application/common/logic/OrderPay.php

@@ -85,7 +85,7 @@ class OrderPay
             $log_id = (new OfflineRechargePayLogModel())->insertGetId($insert_data);
 
             //增加业绩或发放佣金
-            if($result['code'] == 1 && $item['power'] > 0){
+            if($result['code'] == 1 && $item['cha_bao'] > 0){
                 switch ($item['order_type']){
                     case 1://产品
                         $uid   = $item['user_id'];