Merge branch 'dev-lwl/unlock_opt' into test

This commit is contained in:
lwl0608 2024-10-12 16:34:07 +08:00
commit c72f0555a1
3 changed files with 24 additions and 5 deletions

View File

@ -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"`
}

View File

@ -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
}

View File

@ -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
}