diff --git a/app/mix/service/logic/vas.go b/app/mix/service/logic/vas.go index 70e85764..aa80e3a0 100644 --- a/app/mix/service/logic/vas.go +++ b/app/mix/service/logic/vas.go @@ -1672,7 +1672,12 @@ func (v *Vas) PayCallback(ctx *gin.Context, p *vasproto.PayCallbackParamIn) erro case dbstruct.ProductIdH5ZoneAdmission: ch.SType = goproto.Int32(dbstruct.CHSTypeChargeZoneAdmission) ch.Change = goproto.Int64(order.GetPayAmount()) - case dbstruct.ProductIdH5ZoneSuperfanship: + case dbstruct.ProductIdH5ZoneSuperfanship, + dbstruct.ProductIdH5ZoneSuperfanshipEternal, + dbstruct.ProductIdH5ZoneSuperfanshipMonth, + dbstruct.ProductIdH5ZoneSuperfanshipSeason, + dbstruct.ProductIdH5ZoneSuperfanshipHalfYear, + dbstruct.ProductIdH5ZoneSuperfanshipYear: ch.SType = goproto.Int32(dbstruct.CHSTypeChargeZoneSuperfanship) ch.Change = goproto.Int64(order.GetPayAmount()) } @@ -1740,7 +1745,12 @@ func (v *Vas) PayCallback(ctx *gin.Context, p *vasproto.PayCallbackParamIn) erro logger.Error("UnlockZoneAdmission fail, order: %v, err: %v", util.ToJson(order), err) return err } - case product.Id == dbstruct.ProductIdH5ZoneSuperfanship: + case product.Id == dbstruct.ProductIdH5ZoneSuperfanship, + product.Id == dbstruct.ProductIdH5ZoneSuperfanshipEternal, + product.Id == dbstruct.ProductIdH5ZoneSuperfanshipMonth, + product.Id == dbstruct.ProductIdH5ZoneSuperfanshipSeason, + product.Id == dbstruct.ProductIdH5ZoneSuperfanshipHalfYear, + product.Id == dbstruct.ProductIdH5ZoneSuperfanshipYear: err = v.UnlockZoneSuperfanship(ctx, tx, order, dbstruct.ZoneUnlockTypePay) if err != nil { logger.Error("UnlockZoneSuperfanship fail, order: %v, err: %v", util.ToJson(order), err) diff --git a/app/mix/service/logic/vas_zone.go b/app/mix/service/logic/vas_zone.go index 162eaf3d..abbe7f76 100644 --- a/app/mix/service/logic/vas_zone.go +++ b/app/mix/service/logic/vas_zone.go @@ -56,6 +56,10 @@ 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 { + err1 := fmt.Errorf("SuperfanPriceList not fit length, req: %v", util.ToJson(req)) + return err1 + } err := v.store.UpsertZoneVas(ctx, req.ZoneVas) return err } diff --git a/app/mix/service/vasservice.go b/app/mix/service/vasservice.go index 9c0ce99c..540949f8 100644 --- a/app/mix/service/vasservice.go +++ b/app/mix/service/vasservice.go @@ -365,7 +365,12 @@ func (s *Service) chListIncome(ctx *gin.Context, chList []*dbstruct.ConsumeHisto item.Desc = "空间成员-代运营" case dbstruct.ProductIdH5ZoneMoment: item.Desc = "空间动态-代运营" - case dbstruct.ProductIdH5ZoneSuperfanship: + case dbstruct.ProductIdH5ZoneSuperfanship, + dbstruct.ProductIdH5ZoneSuperfanshipEternal, + dbstruct.ProductIdH5ZoneSuperfanshipMonth, + dbstruct.ProductIdH5ZoneSuperfanshipSeason, + dbstruct.ProductIdH5ZoneSuperfanshipHalfYear, + dbstruct.ProductIdH5ZoneSuperfanshipYear: item.Desc = "空间超粉-代运营" case dbstruct.ProductIdContactWechat: if chDB.GetCt() >= 1722497400 { @@ -384,7 +389,12 @@ func (s *Service) chListIncome(ctx *gin.Context, chList []*dbstruct.ConsumeHisto item.Desc = "空间成员-合伙人" case dbstruct.ProductIdH5ZoneMoment: item.Desc = "空间动态-合伙人" - case dbstruct.ProductIdH5ZoneSuperfanship: + case dbstruct.ProductIdH5ZoneSuperfanship, + dbstruct.ProductIdH5ZoneSuperfanshipEternal, + dbstruct.ProductIdH5ZoneSuperfanshipMonth, + dbstruct.ProductIdH5ZoneSuperfanshipSeason, + dbstruct.ProductIdH5ZoneSuperfanshipHalfYear, + dbstruct.ProductIdH5ZoneSuperfanshipYear: item.Desc = "空间超粉-合伙人" case dbstruct.ProductIdContactWechat: if chDB.GetCt() >= 1722497400 { @@ -403,7 +413,12 @@ func (s *Service) chListIncome(ctx *gin.Context, chList []*dbstruct.ConsumeHisto item.Desc = "空间成员" case dbstruct.ProductIdH5ZoneMoment: item.Desc = "空间动态" - case dbstruct.ProductIdH5ZoneSuperfanship: + case dbstruct.ProductIdH5ZoneSuperfanship, + dbstruct.ProductIdH5ZoneSuperfanshipEternal, + dbstruct.ProductIdH5ZoneSuperfanshipMonth, + dbstruct.ProductIdH5ZoneSuperfanshipSeason, + dbstruct.ProductIdH5ZoneSuperfanshipHalfYear, + dbstruct.ProductIdH5ZoneSuperfanshipYear: item.Desc = "空间超粉" } item.Change = changeMark + fmt.Sprintf("%d钻石", chDB.GetChange()) @@ -423,7 +438,12 @@ func (s *Service) chListIncome(ctx *gin.Context, chList []*dbstruct.ConsumeHisto item.Desc = "空间成员退款-代运营" case dbstruct.ProductIdH5ZoneMoment: item.Desc = "空间动态退款-代运营" - case dbstruct.ProductIdH5ZoneSuperfanship: + case dbstruct.ProductIdH5ZoneSuperfanship, + dbstruct.ProductIdH5ZoneSuperfanshipEternal, + dbstruct.ProductIdH5ZoneSuperfanshipMonth, + dbstruct.ProductIdH5ZoneSuperfanshipSeason, + dbstruct.ProductIdH5ZoneSuperfanshipHalfYear, + dbstruct.ProductIdH5ZoneSuperfanshipYear: item.Desc = "空间超粉退款-代运营" } item.Change = fmt.Sprintf("%d钻石", chDB.GetChange()) @@ -437,7 +457,12 @@ func (s *Service) chListIncome(ctx *gin.Context, chList []*dbstruct.ConsumeHisto item.Desc = "空间成员退款-合伙人" case dbstruct.ProductIdH5ZoneMoment: item.Desc = "空间动态退款-合伙人" - case dbstruct.ProductIdH5ZoneSuperfanship: + case dbstruct.ProductIdH5ZoneSuperfanship, + dbstruct.ProductIdH5ZoneSuperfanshipEternal, + dbstruct.ProductIdH5ZoneSuperfanshipMonth, + dbstruct.ProductIdH5ZoneSuperfanshipSeason, + dbstruct.ProductIdH5ZoneSuperfanshipHalfYear, + dbstruct.ProductIdH5ZoneSuperfanshipYear: item.Desc = "空间动态退款-合伙人" } item.Change = fmt.Sprintf("%d钻石", chDB.GetChange()) @@ -451,7 +476,12 @@ func (s *Service) chListIncome(ctx *gin.Context, chList []*dbstruct.ConsumeHisto item.Desc = "用户退款-空间成员" case dbstruct.ProductIdH5ZoneMoment: item.Desc = "用户退款-空间动态" - case dbstruct.ProductIdH5ZoneSuperfanship: + case dbstruct.ProductIdH5ZoneSuperfanship, + dbstruct.ProductIdH5ZoneSuperfanshipEternal, + dbstruct.ProductIdH5ZoneSuperfanshipMonth, + dbstruct.ProductIdH5ZoneSuperfanshipSeason, + dbstruct.ProductIdH5ZoneSuperfanshipHalfYear, + dbstruct.ProductIdH5ZoneSuperfanshipYear: item.Desc = "用户退款-空间超粉" } item.Change = fmt.Sprintf("%d钻石", chDB.GetChange()) @@ -947,6 +977,7 @@ func (s *Service) ZoneGetCashier(ctx *gin.Context, req *vasproto.ZoneGetCashierR } data.Price = zv.SuperfanshipPrice data.Validity = zv.GetSuperfanshipDurationDesc() + data.SuperfanPriceList = zv.SuperfanPriceList } return }