From 369b4d0a6e17ad6f79080177f4a797d742e3f6b9 Mon Sep 17 00:00:00 2001
From: dorion <872354125@qq.com>
Date: Thu, 18 Jul 2024 01:43:05 +0800
Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=98=BE=E7=A4=BA=E5=80=BC?=
=?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=A5=E5=8F=8A=E9=80=9A=E7=9F=A5markdown?=
=?UTF-8?q?=E6=A0=BC=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../templates/trx2Energy/exchange/trx.html | 42 +++++++--------
.../templates/trx2Energy/monitor/monitor.html | 38 +++++++++++---
.../templates/trx2Energy/tenant/tenant.html | 29 ++++++-----
.../templates/usdt2Trx/exchange/usdt.html | 18 ++++---
.../templates/usdt2Trx/monitor/monitor.html | 40 ++++++++++----
.../ruoyi/common/enums/DesensitizedType.java | 2 +-
.../system/domain/vo/TrxExchangeInfoVO.java | 8 +--
.../handler/TRX2EneryTransferHandler.java | 8 +--
.../handler/Usdt2TrxTransferHandler.java | 52 +++++++++++--------
.../exchange/UsdtExchangeInfoMapper.xml | 1 +
10 files changed, 142 insertions(+), 96 deletions(-)
diff --git a/ruoyi-admin/src/main/resources/templates/trx2Energy/exchange/trx.html b/ruoyi-admin/src/main/resources/templates/trx2Energy/exchange/trx.html
index 3b1a9340d..139cd35e2 100644
--- a/ruoyi-admin/src/main/resources/templates/trx2Energy/exchange/trx.html
+++ b/ruoyi-admin/src/main/resources/templates/trx2Energy/exchange/trx.html
@@ -18,10 +18,7 @@
-
+
@@ -41,12 +38,7 @@
th:value="${dict.dictValue}">
-
-
+
@@ -118,16 +110,20 @@
field: 'fromAddress',
title: '付款账户',
formatter: function (value, row, index) {
- return "" + value + "";
+ // return "" + value + "";
+ const maskedValue = value.replace(/^(.{6}).*(.{8})$/, '$1***$2');
+
+ // 生成链接
+ return "" + maskedValue + "";
}
},
{
field: 'toAddress',
- title: '收款账户',
+ title: '收款账户地址',
visible: false
}, {
field: 'monitorAddressName',
- title: '收款账户别名',
+ title: '收款账户',
formatter: function (value, row, index) {
if (value == null) {
return value;
@@ -135,10 +131,6 @@
return "" + value + "";
}
},
- /* {
- field: 'accountAddress',
- title: '实际出账账户'
- },*/
{
field: 'price',
title: '单价'
@@ -212,7 +204,7 @@
},
{
field: 'calcRule',
- title: '笔数计算规则',
+ title: '能量规则',
formatter: function(value, row, index) {
return $.table.selectDictLabel(calcRuleDatas, value);
}
@@ -226,19 +218,21 @@
field: 'fcd',
title: '创建时间'
},
- /* {
+ {
field: 'fcu',
- title: '创建用户'
- },*/
+ title: '创建用户',
+ visible: false
+ },
{
field: 'lcd',
title: '更新时间',
visible: false
},
- /*{
+ {
field: 'lcu',
- title: '更新用户'
- },*/
+ title: '更新用户',
+ visible: false
+ },
{
title: '操作',
align: 'center',
diff --git a/ruoyi-admin/src/main/resources/templates/trx2Energy/monitor/monitor.html b/ruoyi-admin/src/main/resources/templates/trx2Energy/monitor/monitor.html
index 56be52c2f..949373d12 100644
--- a/ruoyi-admin/src/main/resources/templates/trx2Energy/monitor/monitor.html
+++ b/ruoyi-admin/src/main/resources/templates/trx2Energy/monitor/monitor.html
@@ -116,16 +116,37 @@
if (value == null) {
return value;
}
- return "" + value + "";
+ const maskedValue = value.replace(/^(.{6}).*(.{8})$/, '$1***$2');
+ return "" + maskedValue + "";
}
},
{
field: 'trxBalance',
- title: 'TRX余额'
+ title: 'TRX余额',
+ formatter: function (value, row, index) {
+ // 确保值是一个数字
+ if (!isNaN(value)) {
+ // 保留两位小数
+ return parseFloat(value).toFixed(2);
+ } else {
+ // 如果值不是数字,直接返回原值
+ return value;
+ }
+ }
},
{
field: 'usdtBalance',
- title: 'USDT余额'
+ title: 'USDT余额',
+ formatter: function (value, row, index) {
+ // 确保值是一个数字
+ if (!isNaN(value)) {
+ // 保留两位小数
+ return parseFloat(value).toFixed(2);
+ } else {
+ // 如果值不是数字,直接返回原值
+ return value;
+ }
+ }
}, {
field: 'busiType',
title: '业务类型',
@@ -142,11 +163,12 @@
return value;
}
return "" + value + "";
- }
+ },
+ visible: false
},
{
field: 'trxPrice',
- title: 'TRX兑换单价',
+ title: 'TRX价格',
formatter: function (value, row, index) {
if (value == null) {
return value;
@@ -156,12 +178,12 @@
},
{
field: 'usdtPrice',
- title: 'USDT兑换单价',
+ title: 'USDT价格',
formatter: function (value, row, index) {
if (value == null) {
return value;
}
- return value + ' USDT';
+ return value + ' U';
},
},
@@ -180,7 +202,7 @@
}
},{
field: 'idTgMessageInfo',
- title: '通知消息模版',
+ title: '消息模版',
formatter: function(value, row, index) {
if ($.common.isEmpty(topicTgmessageInfoList) || $.common.isEmpty(value)) {
return '';
diff --git a/ruoyi-admin/src/main/resources/templates/trx2Energy/tenant/tenant.html b/ruoyi-admin/src/main/resources/templates/trx2Energy/tenant/tenant.html
index 5085d7ae9..c3922c7c2 100644
--- a/ruoyi-admin/src/main/resources/templates/trx2Energy/tenant/tenant.html
+++ b/ruoyi-admin/src/main/resources/templates/trx2Energy/tenant/tenant.html
@@ -98,12 +98,13 @@
},
{
field: 'receiverAddress',
- title: '接收能量地址',
+ title: '委托地址',
formatter: function (value, row, index) {
if (value == null) {
return value;
}
- return "" + value + "";
+ const maskedValue = value.replace(/^(.{6}).*(.{8})$/, '$1***$2');
+ return "" + maskedValue + "";
}
},
{
@@ -119,16 +120,7 @@
return $.table.selectDictLabel(energyBusiTypeDatas, value);
}
} ,
- {
- field: 'price',
- title: '单价',
- formatter: function(value, row, index) {
- if (value == null) {
- return value;
- }
- return value + ' ' + row['exchangeUnit'];
- }
- },
+
{
field: 'transferCount',
title: '笔数',
@@ -176,11 +168,11 @@
},
{
field: 'delegatedDays',
- title: '已经委托天数'
+ title: '委托天数'
},
{
field: 'totalCountUsed',
- title: '已使用笔数'
+ title: '已用笔数'
},
{
field: 'calcRule',
@@ -191,6 +183,15 @@
}, {
field: 'remark',
title: '备注'
+ },{
+ field: 'price',
+ title: '单价',
+ formatter: function(value, row, index) {
+ if (value == null) {
+ return value;
+ }
+ return value + ' ' + (row['exchangeUnit'] == 'USDT' ? 'U' : 'TRX');
+ }
},
{
field: 'fcd',
diff --git a/ruoyi-admin/src/main/resources/templates/usdt2Trx/exchange/usdt.html b/ruoyi-admin/src/main/resources/templates/usdt2Trx/exchange/usdt.html
index 30627ca1b..fb7abc61d 100644
--- a/ruoyi-admin/src/main/resources/templates/usdt2Trx/exchange/usdt.html
+++ b/ruoyi-admin/src/main/resources/templates/usdt2Trx/exchange/usdt.html
@@ -84,26 +84,32 @@
field: 'fromAddress',
title: '付款账户',
formatter:function(value, row, index) {
- return "" + value + "";
+ if (value == null) {
+ return value;
+ }
+ const maskedValue = value.replace(/^(.{6}).*(.{8})$/, '$1***$2');
+ return "" + maskedValue + "";
}
},
{
field: 'toAddress',
- title: '收款账户',
+ title: '收款账户地址',
visible: false
}, {
field: 'monitorAddressName',
- title: '收款账户别名',
+ title: '收款账户',
formatter: function (value, row, index) {
if (value == null) {
return value;
}
- return "" + value + "";
+ const maskedValue = value.replace(/^(.{6}).*(.{8})$/, '$1***$2');
+ return "" + maskedValue + "";
}
},
{
field: 'usdtTxId',
- title: '交易订单'
+ title: '交易订单',
+ visible: false
},
{
field: 'usdtAmount',
@@ -112,7 +118,7 @@
if (value == null) {
return value;
}
- return value + ' USDT' ;
+ return value + ' U' ;
}
},
{
diff --git a/ruoyi-admin/src/main/resources/templates/usdt2Trx/monitor/monitor.html b/ruoyi-admin/src/main/resources/templates/usdt2Trx/monitor/monitor.html
index 6da917d0e..5223d3c9a 100644
--- a/ruoyi-admin/src/main/resources/templates/usdt2Trx/monitor/monitor.html
+++ b/ruoyi-admin/src/main/resources/templates/usdt2Trx/monitor/monitor.html
@@ -18,10 +18,7 @@
-
+
\ No newline at end of file