|
@@ -1,6 +1,6 @@
|
|
|
<?php
|
|
<?php
|
|
|
|
|
|
|
|
-namespace app\common\controller;
|
|
|
|
|
|
|
+namespace app\api\controller;
|
|
|
|
|
|
|
|
use think\Db;
|
|
use think\Db;
|
|
|
|
|
|
|
@@ -15,30 +15,36 @@ class debug
|
|
|
$order_list = Db::name('rwa_exchange_record_1')->where('order_no', $order_no)->select();
|
|
$order_list = Db::name('rwa_exchange_record_1')->where('order_no', $order_no)->select();
|
|
|
$usdt_info = $token_info = [];
|
|
$usdt_info = $token_info = [];
|
|
|
foreach ($order_list as $item) {
|
|
foreach ($order_list as $item) {
|
|
|
- if ($order['symbol'] == 'USDT') {
|
|
|
|
|
|
|
+ if ($item['symbol'] == 'USDT') {
|
|
|
$usdt_info = $item;
|
|
$usdt_info = $item;
|
|
|
} else {
|
|
} else {
|
|
|
$token_info = $item;
|
|
$token_info = $item;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- $inster_data[] = [
|
|
|
|
|
|
|
+ dump($usdt_info);
|
|
|
|
|
+ dump($token_info);
|
|
|
|
|
+
|
|
|
|
|
+ $inster_data = [
|
|
|
'order_no' => $order_no,
|
|
'order_no' => $order_no,
|
|
|
'user_id' => $order['user_id'],
|
|
'user_id' => $order['user_id'],
|
|
|
'welfare_id' => 1,
|
|
'welfare_id' => 1,
|
|
|
'product_id' => $order['product_id'],
|
|
'product_id' => $order['product_id'],
|
|
|
- 'tx_hash_usdt' => $usdt_info['hash'],
|
|
|
|
|
|
|
+ 'tx_hash_usdt' => $usdt_info['tx_hash'],
|
|
|
'from_address_usdt' => $usdt_info['from_address'],
|
|
'from_address_usdt' => $usdt_info['from_address'],
|
|
|
'amount_usdt' => $usdt_info['amount'],
|
|
'amount_usdt' => $usdt_info['amount'],
|
|
|
'token_name' => $token_info['symbol'],
|
|
'token_name' => $token_info['symbol'],
|
|
|
'from_address_token' => $token_info['from_address'],
|
|
'from_address_token' => $token_info['from_address'],
|
|
|
'amount_token' => $token_info['amount'],
|
|
'amount_token' => $token_info['amount'],
|
|
|
- 'tx_hash_token' => $token_info['hash'],
|
|
|
|
|
|
|
+ 'tx_hash_token' => $token_info['tx_hash'],
|
|
|
'to_address' => $order['to_address'],
|
|
'to_address' => $order['to_address'],
|
|
|
- 'create_time' => time()
|
|
|
|
|
|
|
+ 'create_time' => $token_info['create_time']
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
- Db::name('rwa_exchange_record_back')->insert($inster_data);
|
|
|
|
|
|
|
+ dump('拼接数据');
|
|
|
|
|
+ dump($inster_data);
|
|
|
|
|
+ $rs = Db::name('rwa_exchange_record_back')->insert($inster_data);
|
|
|
|
|
+ dump($rs);
|
|
|
dump('完成:' . $order_no);
|
|
dump('完成:' . $order_no);
|
|
|
$i++;
|
|
$i++;
|
|
|
}
|
|
}
|