This commit is contained in:
aozhiwei 2024-07-19 14:46:16 +08:00
parent bcbbfb3584
commit 18a93ea11d
2 changed files with 4 additions and 44 deletions

View File

@ -1,41 +0,0 @@
package service
import (
"q5"
"f5"
"main/constant"
)
func SendSysMail(uniKey string, to string, subject string, content string, sendTime int32, expireTime int32,
tag1 int32, tag2 int32) bool {
var dbErr error
nowTime := f5.GetApp().GetRealSeconds()
f5.GetGoStyleDb().Upsert(
constant.MAIL_DB,
"t_sys_mail",
[][]string{
{"unikey", uniKey},
},
[][]string{
},
[][]string{
{"unikey", uniKey},
{"subject", subject},
{"content", content},
{"recipients", q5.EncodeJson([]string{
to,
})},
{"tag1", q5.ToString(tag1)},
{"tag2", q5.ToString(tag2)},
{"sendtime", q5.ToString(sendTime)},
{"expiretime", q5.ToString(expireTime)},
{"user_reg_start_time", q5.ToString(0)},
{"user_reg_end_time", q5.ToString(nowTime + 3600 * 24 * 365 * 10)},
{"createtime", q5.ToString(nowTime)},
{"modifytime", q5.ToString(nowTime)},
},
func (err error, lastInsertId int64, rowsAffected int64) {
dbErr = err
})
return dbErr == nil
}

View File

@ -113,14 +113,14 @@ func (this* repairNft) repairNft(ds *f5.DataSet) bool {
var itemId int32
var quality int32
if service.GetHeroByTokenId(tokenId, &itemId, &quality) {
this.updateNftItemId(netId, contractAddress, tokenId, itemId)
this.updateNftItemId(netId, contractAddress, tokenId, itemId, quality)
}
}
case jccommon.NFT_TYPE_GOLD_BULLION:
{
var itemId int32
if service.GetGoldBullionByNetIdTokenId(netId, tokenId, &itemId) {
this.updateNftItemId(netId, contractAddress, tokenId, itemId)
this.updateNftItemId(netId, contractAddress, tokenId, itemId, 0)
}
}
}
@ -128,7 +128,7 @@ func (this* repairNft) repairNft(ds *f5.DataSet) bool {
}
func (this* repairNft) updateNftItemId(netId int32, contractAddress string, tokenId string,
itemId int32) {
itemId int32, quality int32) {
f5.GetGoStyleDb().Update(
constant.BCNFT_DB,
"t_nft",
@ -140,6 +140,7 @@ func (this* repairNft) updateNftItemId(netId int32, contractAddress string, toke
},
[][]string {
{"item_id", q5.ToString(itemId)},
{"quality", q5.ToString(quality)},
},
func (err error, lastInsertId int64, rowsAffected int64) {
})