This commit is contained in:
aozhiwei 2024-06-16 16:08:13 +08:00
parent 74740dc449
commit 4733a123c8
2 changed files with 31 additions and 1 deletions

View File

@ -77,4 +77,34 @@ func (this *cacheMgr) internalGetNft(dto *common.NftDto) {
}
func (this *cacheMgr) batchGetNfts(nfts []*common.NftDto) {
keys := []string{}
for _, val := range nfts {
q5.AppendSlice(&keys, val.GetKey())
}
if len(keys) <= 0 {
return
}
locks := f5.BatchAllocLock(keys)
defer f5.BatchReleaseLock(locks)
rspObj := struct {
ErrCode interface{} `json:"errcode"`
ErrMsg string `json:"errmsg"`
}{}
f5.GetHttpCliMgr().SendGoStyleJsonRspPost(
mt.Table.Config.GetGameApiUrl() + "/webapp/index.php",
map[string]string{
"c": "OutAppNft",
"a": "nftDetailList",
},
&rspObj,
"application/json",
"",
func (rsp f5.HttpCliResponse) {
if rsp.GetErr() == nil {
p := new(nft)
jsonRsp := map[string]interface{}{}
q5.DecodeJson(rsp.GetRawData(), &jsonRsp)
p.jsonData = jsonRsp
}
})
}

2
third_party/f5 vendored

@ -1 +1 @@
Subproject commit 550a64387e2d163b99ea39bbf48500bba998676e
Subproject commit 330f53df3d6143867c0d78d97cdfb8bbd6c42ebb