diff --git a/api/proto/vas/proto/op.go b/api/proto/vas/proto/op.go index 2ec2c1ee..20cf2cb8 100644 --- a/api/proto/vas/proto/op.go +++ b/api/proto/vas/proto/op.go @@ -154,6 +154,11 @@ type OpGetWithdrawFreezeListReq struct { base.BaseRequest } -type OpGetWithdrawFreezeListData struct { - List []*dbstruct.WithdrawFreeze `json:"list"` +type WithdrawFreezeVO struct { + *dbstruct.WithdrawFreeze + Account *dbstruct.Account `json:"account"` +} + +type OpGetWithdrawFreezeListData struct { + List []*WithdrawFreezeVO `json:"list"` } diff --git a/app/mix/service/logic/vas_zone.go b/app/mix/service/logic/vas_zone.go index abbe7f76..4ac13812 100644 --- a/app/mix/service/logic/vas_zone.go +++ b/app/mix/service/logic/vas_zone.go @@ -56,7 +56,7 @@ func (v *Vas) UpdateZoneVasInfo(ctx *gin.Context, req *vasproto.UpdateZoneVasReq if req.AdmissionPrice <= 0 && req.IronfanshipPrice <= 0 && req.SuperfanshipPrice <= 0 { return nil } - if req.IsSuperfanshipEnabled == 1 && len(req.SuperfanPriceList) < 5 { + if len(req.SuperfanPriceList) > 0 && len(req.SuperfanPriceList) != 5 { err1 := fmt.Errorf("SuperfanPriceList not fit length, req: %v", util.ToJson(req)) return err1 } diff --git a/app/mix/service/vasservice.go b/app/mix/service/vasservice.go index 2da04b73..07651549 100644 --- a/app/mix/service/vasservice.go +++ b/app/mix/service/vasservice.go @@ -1500,16 +1500,30 @@ func (s *Service) OpDelWithdrawFreeze(ctx *gin.Context, req *vasproto.OpDelWithd return } -func (s *Service) OpGetWithdrawFreezeList(ctx *gin.Context, req *vasproto.OpGetWithdrawFreezeListReq) (list []*dbstruct.WithdrawFreeze, ec errcode.ErrCode, err error) { +func (s *Service) OpGetWithdrawFreezeList(ctx *gin.Context, req *vasproto.OpGetWithdrawFreezeListReq) (list []*vasproto.WithdrawFreezeVO, ec errcode.ErrCode, err error) { defer func() { ec, err = errs.DealVasErr(err) }() - list, err = _DefaultVas.GetWithdrawFreezeList(ctx) + listTmp, err := _DefaultVas.GetWithdrawFreezeList(ctx) if err != nil { logger.Error("GetWithdrawFreezeList fail, req: %v, err: %v", util.ToJson(req), err) return } + + mids := make([]int64, 0) + for _, v := range listTmp { + mids = append(mids, v.Mid) + } + acntMap, _ := _DefaultAccount.GetAccountMapByMids(ctx, mids) + + list = make([]*vasproto.WithdrawFreezeVO, 0) + for _, v := range listTmp { + list = append(list, &vasproto.WithdrawFreezeVO{ + WithdrawFreeze: v, + Account: acntMap[v.Mid], + }) + } return }