zid zu fix

This commit is contained in:
lwl0608 2024-08-30 19:11:51 +08:00
parent dfa425b64d
commit f330f61a6f
1 changed files with 25 additions and 26 deletions

View File

@ -1317,17 +1317,17 @@ func (s *Service) SearchZoneMember(ctx *gin.Context, req *vasproto.SearchMemberR
memMid := acnt.GetMid()
// 获取成员列表
zmList, err := _DefaultVas.SearchZoneMember(ctx, zid, memMid)
ec, err = errs.DealVasErr(err)
if err != nil {
logger.Error("ZoneRefund fail, err: %v", err)
return
}
mids := make([]int64, 0)
for _, zm := range zmList {
mids = append(mids, zm.GetMid())
}
logger.Info("SearchZoneMember, zid: %v, memUserId: %v, mids: %v, zmList: %v", zid, memUserId, mids, util.ToJson(zmList))
//zmList, err := _DefaultVas.SearchZoneMember(ctx, zid, memMid)
//ec, err = errs.DealVasErr(err)
//if err != nil {
// logger.Error("ZoneRefund fail, err: %v", err)
// return
//}
//mids := make([]int64, 0)
//for _, zm := range zmList {
// mids = append(mids, zm.GetMid())
//}
//logger.Info("SearchZoneMember, zid: %v, memUserId: %v, mids: %v, zmList: %v", zid, memUserId, mids, util.ToJson(zmList))
// 获取空间解锁信息
zidZuMap, _ := _DefaultVas.GetZoneUnlockMapByMidZids(ctx, memMid, []int64{zid})
@ -1339,23 +1339,22 @@ func (s *Service) SearchZoneMember(ctx *gin.Context, req *vasproto.SearchMemberR
}
// 获取用户信息
mids := []int64{memMid}
acntMap, _ := _DefaultAccount.GetAccountMapByMids(ctx, mids)
logger.Info("GetAccountMapByMids, zid: %v, acntMap: %v", zid, util.ToJson(acntMap))
for _, zm := range zmList {
item := &vasproto.SearchMemberVO{
JoinCt: zm.GetCt(),
}
mid := zm.GetMid()
if acnt, ok := acntMap[mid]; ok {
item.Account = acnt
}
if zu.IsUnlockIronfanship() {
item.IsIronfan = 1
}
if zu.IsUnlockSuperfanship() {
item.IsSuperfan = 1
}
list = append(list, item)
item := &vasproto.SearchMemberVO{
JoinCt: zu.GetAdmissionCt(),
}
mid := zu.GetMid()
if acnt, ok := acntMap[mid]; ok {
item.Account = acnt
}
if zu.IsUnlockIronfanship() {
item.IsIronfan = 1
}
if zu.IsUnlockSuperfanship() {
item.IsSuperfan = 1
}
list = append(list, item)
return
}