This commit is contained in:
aozhiwei 2024-07-10 15:26:31 +08:00
parent f869199c51
commit da106673c8

View File

@ -112,9 +112,15 @@ func ReturnGoldBullion(accountId string, netId int32, tokenId string) bool {
} }
{ {
goldNumStr := q5.ToString(goldNum)
if goldNum == 1000 {
goldNumStr = "1,000"
} else if goldNum == 10000 {
goldNumStr = "10,000"
}
nowTime := f5.GetApp().GetRealSeconds() nowTime := f5.GetApp().GetRealSeconds()
subject := "gold return" subject := "gold return"
content := fmt.Sprintf("We regret to inform you that the minting of your Gold Card has failed. The %s gold has been refunded to your account. Please check your balance to confirm the refund.", goldNum) content := fmt.Sprintf("We regret to inform you that the minting of your Gold Card has failed. The %s gold has been refunded to your account. Please check your balance to confirm the refund.", goldNumStr)
uniKey := fmt.Sprintf("gold_bullion.return:%d_%s", netId, tokenId) uniKey := fmt.Sprintf("gold_bullion.return:%d_%s", netId, tokenId)
sendOk := SendSysMail( sendOk := SendSysMail(
uniKey, uniKey,
@ -126,7 +132,7 @@ func ReturnGoldBullion(accountId string, netId int32, tokenId string) bool {
jccommon.MAIL_TAG1_GOLD_BULLION, jccommon.MAIL_TAG1_GOLD_BULLION,
jccommon.MAIL_TAG2_GOLD_BULLION_RETURN) jccommon.MAIL_TAG2_GOLD_BULLION_RETURN)
if !sendOk { if !sendOk {
return true return false
} }
} }
@ -153,7 +159,7 @@ func ReturnGoldBullion(accountId string, netId int32, tokenId string) bool {
return false return false
} }
if returned { if returned {
return true return false
} }
} }
{ {
@ -183,7 +189,6 @@ func ReturnGoldBullion(accountId string, netId int32, tokenId string) bool {
} }
} }
return true
{ {
var dbErr error var dbErr error
nowTime := f5.GetApp().GetRealSeconds() nowTime := f5.GetApp().GetRealSeconds()