Merge branch 'refs/heads/feeen-1.17.1' into feeen-1.18.0

# Conflicts:
#	ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/GetSmsDetailTask.java
pull/520/head
dorion 2024-07-12 21:59:55 +08:00
commit 36a87cb4c7
3 changed files with 33 additions and 11 deletions

View File

@ -94,15 +94,22 @@
},
{
field: 'fromAddress',
title: '转出账户'
title: '转出账户',
formatter: function (value, row, index) {
return "<a href='https://www.oklink.com/zh-hans/trx/address/" + value + "' target='_blank'>" + value + "</a>";
}
},
{
field: 'toAddress',
title: '转入账户'
title: '转入账户',
formatter: function (value, row, index) {
return "<a href='https://www.oklink.com/zh-hans/trx/address/" + value + "' target='_blank'>" + value + "</a>";
}
},
{
field: 'accountAddress',
title: '实际出账账户'
title: '实际出账账户',
visible: false
},
{
field: 'price',
@ -110,7 +117,11 @@
},
{
field: 'trxTxId',
title: '订单hash'
title: '订单hash',
formatter: function (value, row, index) {
return "<a href='https://www.oklink.com/zh-hans/trx/address/" + value + "' target='_blank'>" + value + "</a>";
},
visible: false
},
{
field: 'tranferCount',
@ -172,7 +183,14 @@
formatter: function(value, row, index) {
return $.table.selectDictLabel(calcRuleDatas, value);
}
}/*,
} , {
field: 'createTime',
title: '创建时间'
},
{
field: 'updateTime',
title: '更新时间'
}/*,
{
title: '操作',
align: 'center',

View File

@ -3,7 +3,6 @@ package com.ruoyi.quartz.task;
import com.ruoyi.common.core.domain.entity.SmsTaskTbl;
import com.ruoyi.system.handler.GetSmsDetailTaskHandler;
import com.ruoyi.system.mapper.SmsTaskTblMapper;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@ -20,8 +19,10 @@ public class GetSmsDetailTask {
public void doGetSmsDetailTask() {
List<SmsTaskTbl> smsTaskTblList = smsTaskTblMapper.selectSmsTaskTblListNotComplete();
if (CollectionUtils.isNotEmpty(smsTaskTblList)){
getSmsDetailTaskHandler.doGetSmsDetailTask(smsTaskTblList);
if(CollectionUtil.isEmpty(smsTaskTblList)){
return;
}
getSmsDetailTaskHandler.doGetSmsDetailTask(smsTaskTblList);
}
}

View File

@ -375,8 +375,8 @@ public class TRX2EneryTransferHandler {
Object cacheidTrxExchangeFail = redisTemplate.opsForValue().get("transfer_trx_fail_" + txID);
if (cacheidTrxExchangeFail == null){
TrxExchangeFail trxExchangeFail = new TrxExchangeFail();
trxExchangeFail.setFromAddress(ownerAddress);
trxExchangeFail.setToAddress(toAddress);
trxExchangeFail.setFromAddress(AddressUtil.hexToBase58(ownerAddress));
trxExchangeFail.setToAddress(AddressUtil.hexToBase58(toAddress));
trxExchangeFail.setAccountAddress(accountAddress);
trxExchangeFail.setPrice(price);
trxExchangeFail.setTrxTxId(txID);
@ -389,7 +389,7 @@ public class TRX2EneryTransferHandler {
trxExchangeFail.setDelegateStatus("2");
trxExchangeFail.setCalcRule(calcRule);
trxExchangeFailMapper.insertTrxExchangeFail(trxExchangeFail);
redisTemplate.opsForValue().set("transfer_trx_fail_" + txID, trxExchangeFail.getIdTrxExchangeFail(), 1, TimeUnit.HOURS);
redisTemplate.opsForValue().set("transfer_trx_fail_" + txID, trxExchangeFail.getIdTrxExchangeFail(), 7, TimeUnit.DAYS);
}
throw new RuntimeException(e);
}
@ -425,6 +425,7 @@ public class TRX2EneryTransferHandler {
TrxExchangeFail trxExchangeFail = new TrxExchangeFail();
trxExchangeFail.setIdTrxExchangeFail(Long.valueOf(cacheidTrxExchangeFail.toString()));
trxExchangeFail.setDelegateStatus("1");
trxExchangeFail.setUpdateTime(new Date());
trxExchangeFailMapper.updateTrxExchangeFail(trxExchangeFail);
redisTemplate.delete("transfer_trx_fail_" + txID);
}
@ -459,6 +460,8 @@ public class TRX2EneryTransferHandler {
}
private long getBalance(Response.AccountResourceMessage accountResource, long transferCount, String resourceCode) {
Long balance = null;
if (resourceCode.equals(Common.ResourceCode.ENERGY.name())) {