afa hai 6 meses
pai
achega
393c7c37f5
Modificáronse 1 ficheiros con 5 adicións e 6 borrados
  1. 5 6
      application/api/controller/Exchange.php

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

@@ -81,7 +81,7 @@ class Exchange extends Api
           if (!$welfare_config) $this->error(__('Invalid parameters'));
           //检查是否在开启时间之内
           if(time() < $welfare_config['start_time'] || time() > $welfare_config['end_time']) $this->error(__('不在兑换时间范围内'));
-          /*
+          
           //检查是否已兑换过
           if($welfare_config['limit_num'] > 0){
               $check_user = (new RwaExchangeRecordModel())
@@ -183,14 +183,13 @@ class Exchange extends Api
 
           //记录
           $inster_data['tx_hash_usdt'] = $usdt_data['hash'];
-          Log::info($inster_data, '插入数据');*/
+          Log::info($inster_data, '插入数据');
 
           try {
               Db::startTrans();
-              //$rs = Db::name('rwa_exchange_record')->fetchSql(false)->insert($inster_data);
-              //Log::info($rs, '插入状态');
-              $usdt_data['amount'] = 100;
-              $order_no = date('YmdHis') . rand(1000, 9999);
+              $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);