fix panic

This commit is contained in:
lwl0608 2024-07-24 16:42:49 +08:00
parent 3cdc52c75e
commit 33e8d70e24
1 changed files with 4 additions and 0 deletions

View File

@ -900,6 +900,10 @@ func (s *Service) ZoneGetCashier(ctx *gin.Context, req *vasproto.ZoneGetCashierR
} }
data.Price = zv.IronfanshipPrice data.Price = zv.IronfanshipPrice
case dbstruct.ProductIdH5ZoneSuperfanship: case dbstruct.ProductIdH5ZoneSuperfanship:
if zv == nil {
ec = errcode.ErrCodeVasSrvFail
return nil, ec, fmt.Errorf("主播没开通空间")
}
// 判断主播是否开启超粉 // 判断主播是否开启超粉
if zv.IsSuperfanshipEnabled != 1 { if zv.IsSuperfanshipEnabled != 1 {
ec = errcode.ErrCodeVasSrvFail ec = errcode.ErrCodeVasSrvFail