|
|
@@ -276,6 +276,7 @@ class UsdtWalletService extends BaseService
|
|
|
// 平台钱包地址
|
|
|
$count = 0;
|
|
|
$failedCount = 0;
|
|
|
+ $retryCount = 0;
|
|
|
$tron = new Tron();
|
|
|
$tron->setAddress($otcAddress);
|
|
|
$otcAddress = $tron->getAddress();
|
|
|
@@ -321,7 +322,7 @@ class UsdtWalletService extends BaseService
|
|
|
|
|
|
// 如果子钱包TRX不足手续费8个,平台TRX充足则自动充值后下次调用时归集
|
|
|
if ($triggerTrx < $triggerFree) {
|
|
|
- $failedCount++;
|
|
|
+ $retryCount++;
|
|
|
$result = $this->trxTransfer($address, $triggerFree);
|
|
|
$error = ['data' => $v, 'usdt' => $triggerUsdt, 'triggerMin' => $triggerMin, 'triggerTrx' => $triggerTrx, 'transfer' => $result, 'error' => '归集钱包手续费不足,先充值', 'date' => date('Y-m-d H:i:s')];
|
|
|
RedisService::set($cacheKey . "U_{$userId}:catch", $error, 7200);
|
|
|
@@ -345,10 +346,13 @@ class UsdtWalletService extends BaseService
|
|
|
RedisService::set("caches:wallet:transferPage", $page + 1, 600);
|
|
|
}
|
|
|
if ($count > 0) {
|
|
|
- return ['success' => $count, 'fail' => $failedCount];
|
|
|
+ return ['success' => $count, 'fail' => $failedCount,'retryCount'=>$retryCount];
|
|
|
} else if ($failedCount == count($addrList)){
|
|
|
$this->error = 2221;
|
|
|
return false;
|
|
|
+ } else if ($retryCount){
|
|
|
+ $this->error = lang(2222,['num'=> $retryCount]);
|
|
|
+ return false;
|
|
|
} else {
|
|
|
$this->error = 1021;
|
|
|
return false;
|