Browse Source

修改钱包地址

jason 6 months ago
parent
commit
322c3fb228
2 changed files with 7 additions and 3 deletions
  1. 6 2
      application/api/controller/Exchange.php
  2. 1 1
      application/common/logic/MyBscApi.php

+ 6 - 2
application/api/controller/Exchange.php

@@ -92,7 +92,7 @@ class Exchange extends Api
           }
           
           $order_no = date('YmdHis') . rand(1000, 9999);
-          $inster_data[] = [
+          $inster_data = [
               'order_no' => $order_no,
               'user_id' => $this->auth->id,
               'welfare_id' => $welfare_config['id'],
@@ -187,12 +187,16 @@ class Exchange extends Api
 
           try {
               Db::startTrans();
-              Db::name('rwa_exchange_record')->fetchSql(false)->insertAll($inster_data);
+              $rs = Db::name('rwa_exchange_record')->fetchSql(false)->insert($inster_data);
+              Log::info($rs, '插入状态');
+
               //添加标记茶宝记录
               $ledgerWalletModel->changeWalletAccount($this->auth->id, Asset::FROZEN, $usdt_data['amount'], LedgerFrozenChangeModel::RwaExchangeRecord, 0);
 
               //发放产品奖励
               $rs =WelfareLoginc::setUserWelfareProduct($this->auth->id, $welfare_config['product_id'], $order_no, ProductOrder::RwaExchange);
+              Log::info($rs, '发放产品奖励状态');
+
               Db::commit();
               $this->success('ok', $order_no);
           } catch (Exception $e) {

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

@@ -15,7 +15,7 @@ use think\Log;
  */
 class MyBscApi
 {
-    protected $urls = 'https://pay.jiaxianbao.com/';
+    protected $urls = 'https://payment.hxiaoju.top/';
     protected $api_id = 1004;
     protected $api_pwd = 'er`kd34.df';
     protected $bnb_fee = 0.005;