This commit is contained in:
aozhiwei 2024-07-29 11:52:04 +08:00
parent b031b3fda2
commit bcd5f914eb

View File

@ -185,13 +185,7 @@ func RepiarHeroQuality() error {
var resultErr error
nftDatas := []*jccommon.NftIdentityAndExtData{}
{
f5.GetGoStyleDb().OrmSelect(
constant.BCNFT_DB,
"t_nft",
[][]string{
{"token_type", q5.ToString(jccommon.NFT_TYPE_CFHERO)},
},
func (err error, ds *f5.DataSet) {
cb := func (err error, ds *f5.DataSet) {
resultErr = err
if err != nil {
return
@ -201,7 +195,14 @@ func RepiarHeroQuality() error {
p.LoadFromDb(ds)
q5.AppendSlice(&nftDatas, p);
}
})
}
f5.GetGoStyleDb().OrmSelect(
constant.BCNFT_DB,
"t_nft",
[][]string{
{"token_type", q5.ToString(jccommon.NFT_TYPE_CFHERO)},
},
cb)
if resultErr == nil {
f5.GetGoStyleDb().OrmSelect(
constant.BCNFT_DB,
@ -209,17 +210,7 @@ func RepiarHeroQuality() error {
[][]string{
{"token_type", q5.ToString(jccommon.NFT_TYPE_CFHERO_NORMAL)},
},
func (err error, ds *f5.DataSet) {
resultErr = err
if err != nil {
return
}
for ds.Next() {
p := new(jccommon.NftIdentityAndExtData)
p.LoadFromDb(ds)
q5.AppendSlice(&nftDatas, p);
}
})
cb)
}
}
procBatchFunc := func(batch []*jccommon.NftIdentityAndExtData) {