添加冻结金额字段
This commit is contained in:
1 parent
2602897c23
commit
cdf32a86cb
4 files changed
+68
-1
No files matched your search
@@ -61,6 +61,14 @@ public class Apps extends BaseEntity
|
||||
@Excel(name = "usdt账号金额")
|
||||
private BigDecimal usdtBalance;
|
||||
|
||||
/** USDT冻结余额 */
|
||||
@Excel(name = "USDT冻结余额")
|
||||
private BigDecimal usdtFrozenBalance;
|
||||
|
||||
/** TRX冻结余额 */
|
||||
@Excel(name = "TRX冻结余额")
|
||||
private BigDecimal trxFrozenBalance;
|
||||
|
||||
/** 公钥 */
|
||||
@Excel(name = "公钥")
|
||||
private String publicKey;
|
||||
@@ -183,6 +191,24 @@ public class Apps extends BaseEntity
|
||||
{
|
||||
return usdtBalance;
|
||||
}
|
||||
public void setUsdtFrozenBalance(BigDecimal usdtFrozenBalance)
|
||||
{
|
||||
this.usdtFrozenBalance = usdtFrozenBalance;
|
||||
}
|
||||
|
||||
public BigDecimal getUsdtFrozenBalance()
|
||||
{
|
||||
return usdtFrozenBalance;
|
||||
}
|
||||
public void setTrxFrozenBalance(BigDecimal trxFrozenBalance)
|
||||
{
|
||||
this.trxFrozenBalance = trxFrozenBalance;
|
||||
}
|
||||
|
||||
public BigDecimal getTrxFrozenBalance()
|
||||
{
|
||||
return trxFrozenBalance;
|
||||
}
|
||||
public void setPublicKey(String publicKey)
|
||||
{
|
||||
this.publicKey = publicKey;
|
||||
@@ -269,6 +295,8 @@ public class Apps extends BaseEntity
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.append("trxBalance", getTrxBalance())
|
||||
.append("usdtBalance", getUsdtBalance())
|
||||
.append("usdtFrozenBalance", getUsdtFrozenBalance())
|
||||
.append("trxFrozenBalance", getTrxFrozenBalance())
|
||||
.append("publicKey", getPublicKey())
|
||||
.append("privateKey", "<redacted>")
|
||||
.append("creditLimit", getCreditLimit())
|
||||
|
||||
@@ -54,6 +54,12 @@ public class AppsPlus implements Serializable
|
||||
/** usdt账号 */
|
||||
@Excel(name = "usdt账号金额")
|
||||
private BigDecimal usdtBalance;
|
||||
/** USDT冻结余额 */
|
||||
@Excel(name = "USDT冻结余额")
|
||||
private BigDecimal usdtFrozenBalance;
|
||||
/** TRX冻结余额 */
|
||||
@Excel(name = "TRX冻结余额")
|
||||
private BigDecimal trxFrozenBalance;
|
||||
/** 公钥 */
|
||||
@Excel(name = "公钥")
|
||||
private String publicKey;
|
||||
@@ -168,6 +174,24 @@ public class AppsPlus implements Serializable
|
||||
{
|
||||
return usdtBalance;
|
||||
}
|
||||
public void setUsdtFrozenBalance(BigDecimal usdtFrozenBalance)
|
||||
{
|
||||
this.usdtFrozenBalance = usdtFrozenBalance;
|
||||
}
|
||||
|
||||
public BigDecimal getUsdtFrozenBalance()
|
||||
{
|
||||
return usdtFrozenBalance;
|
||||
}
|
||||
public void setTrxFrozenBalance(BigDecimal trxFrozenBalance)
|
||||
{
|
||||
this.trxFrozenBalance = trxFrozenBalance;
|
||||
}
|
||||
|
||||
public BigDecimal getTrxFrozenBalance()
|
||||
{
|
||||
return trxFrozenBalance;
|
||||
}
|
||||
public void setPublicKey(String publicKey)
|
||||
{
|
||||
this.publicKey = publicKey;
|
||||
@@ -254,6 +278,8 @@ public class AppsPlus implements Serializable
|
||||
.append("deletedAt", getDeletedAt())
|
||||
.append("trxBalance", getTrxBalance())
|
||||
.append("usdtBalance", getUsdtBalance())
|
||||
.append("usdtFrozenBalance", getUsdtFrozenBalance())
|
||||
.append("trxFrozenBalance", getTrxFrozenBalance())
|
||||
.append("publicKey", getPublicKey())
|
||||
.append("privateKey", "<redacted>")
|
||||
.append("creditLimit", getCreditLimit())
|
||||
|
||||
@@ -320,6 +320,9 @@ public class AppsServiceImpl extends ServiceImpl<AppsMapper, AppsPlus> implement
|
||||
if (apps.getStatus() == null) apps.setStatus(1);
|
||||
if (apps.getTrxBalance() == null) apps.setTrxBalance(BigDecimal.ZERO);
|
||||
if (apps.getUsdtBalance() == null) apps.setUsdtBalance(BigDecimal.ZERO);
|
||||
// 冻结余额只能由后续账务流程变更,创建接口不接受客户端指定的初始值。
|
||||
apps.setUsdtFrozenBalance(BigDecimal.ZERO);
|
||||
apps.setTrxFrozenBalance(BigDecimal.ZERO);
|
||||
if (apps.getCreditLimit() == null) apps.setCreditLimit(BigDecimal.ZERO);
|
||||
// 公私钥只允许系统生成,忽略请求中传入的任何密钥字段。
|
||||
AppKeyPairResult keyPair = generateKeyPair();
|
||||
|
||||
@@ -15,6 +15,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="deletedAt" column="deleted_at" />
|
||||
<result property="trxBalance" column="trx_balance" />
|
||||
<result property="usdtBalance" column="usdt_balance" />
|
||||
<result property="usdtFrozenBalance" column="usdt_frozen_balance" />
|
||||
<result property="trxFrozenBalance" column="trx_frozen_balance" />
|
||||
<result property="publicKey" column="public_key" />
|
||||
<result property="privateKey" column="private_key" />
|
||||
<result property="creditLimit" column="credit_limit" />
|
||||
@@ -26,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAppsVo">
|
||||
select id, user_id, name, description, status, created_at, updated_at, deleted_at, trx_balance, usdt_balance, public_key, private_key, credit_limit, google_sub, google_email, google_name, google_picture, dist_token_address from apps
|
||||
select id, user_id, name, description, status, created_at, updated_at, deleted_at, trx_balance, usdt_balance, usdt_frozen_balance, trx_frozen_balance, public_key, private_key, credit_limit, google_sub, google_email, google_name, google_picture, dist_token_address from apps
|
||||
</sql>
|
||||
|
||||
<select id="lockUserById" resultType="Long">
|
||||
@@ -50,6 +52,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="deletedAt != null "> and deleted_at = #{deletedAt}</if>
|
||||
<if test="trxBalance != null "> and trx_balance = #{trxBalance}</if>
|
||||
<if test="usdtBalance != null "> and usdt_balance = #{usdtBalance}</if>
|
||||
<if test="usdtFrozenBalance != null "> and usdt_frozen_balance = #{usdtFrozenBalance}</if>
|
||||
<if test="trxFrozenBalance != null "> and trx_frozen_balance = #{trxFrozenBalance}</if>
|
||||
<if test="publicKey != null and publicKey != ''"> and public_key = #{publicKey}</if>
|
||||
<if test="creditLimit != null "> and credit_limit = #{creditLimit}</if>
|
||||
<if test="googleSub != null and googleSub != ''"> and google_sub = #{googleSub}</if>
|
||||
@@ -98,6 +102,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="deletedAt != null">deleted_at,</if>
|
||||
<if test="trxBalance != null">trx_balance,</if>
|
||||
<if test="usdtBalance != null">usdt_balance,</if>
|
||||
<if test="usdtFrozenBalance != null">usdt_frozen_balance,</if>
|
||||
<if test="trxFrozenBalance != null">trx_frozen_balance,</if>
|
||||
<if test="publicKey != null">public_key,</if>
|
||||
<if test="privateKey != null">private_key,</if>
|
||||
<if test="creditLimit != null">credit_limit,</if>
|
||||
@@ -117,6 +123,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="deletedAt != null">#{deletedAt},</if>
|
||||
<if test="trxBalance != null">#{trxBalance},</if>
|
||||
<if test="usdtBalance != null">#{usdtBalance},</if>
|
||||
<if test="usdtFrozenBalance != null">#{usdtFrozenBalance},</if>
|
||||
<if test="trxFrozenBalance != null">#{trxFrozenBalance},</if>
|
||||
<if test="publicKey != null">#{publicKey},</if>
|
||||
<if test="privateKey != null">#{privateKey},</if>
|
||||
<if test="creditLimit != null">#{creditLimit},</if>
|
||||
@@ -140,6 +148,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="deletedAt != null">deleted_at = #{deletedAt},</if>
|
||||
<if test="trxBalance != null">trx_balance = #{trxBalance},</if>
|
||||
<if test="usdtBalance != null">usdt_balance = #{usdtBalance},</if>
|
||||
<if test="usdtFrozenBalance != null">usdt_frozen_balance = #{usdtFrozenBalance},</if>
|
||||
<if test="trxFrozenBalance != null">trx_frozen_balance = #{trxFrozenBalance},</if>
|
||||
<if test="publicKey != null">public_key = #{publicKey},</if>
|
||||
<if test="privateKey != null">private_key = #{privateKey},</if>
|
||||
<if test="creditLimit != null">credit_limit = #{creditLimit},</if>
|
||||
|
||||
Reference in new issue
Block a user