diff --git a/server/marketserver/cache/cachemgr.go b/server/marketserver/cache/cachemgr.go index ec2f0e91..c9984e64 100644 --- a/server/marketserver/cache/cachemgr.go +++ b/server/marketserver/cache/cachemgr.go @@ -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 + } + }) } diff --git a/third_party/f5 b/third_party/f5 index 550a6438..330f53df 160000 --- a/third_party/f5 +++ b/third_party/f5 @@ -1 +1 @@ -Subproject commit 550a64387e2d163b99ea39bbf48500bba998676e +Subproject commit 330f53df3d6143867c0d78d97cdfb8bbd6c42ebb