diff --git a/internal/dao/bundleDao.go b/internal/dao/bundleDao.go index d19da9f..8cd0fb6 100644 --- a/internal/dao/bundleDao.go +++ b/internal/dao/bundleDao.go @@ -389,7 +389,7 @@ func BundleListH5V2(req *bundle.BundleListRequest) (res *bundle.BundleListRespon res.Bundles = make([]*bundle.BundleProfile, 0) bundles := make([]*model.BundleProfile, 0) - query := app.ModuleClients.BundleDB.Model(&model.BundleProfile{}).Where("shelf_status = ?", 1).Preload("BundleProfileLang") + query := app.ModuleClients.BundleDB.Model(&model.BundleProfile{}).Where("shelf_status = ?", model.BundleShelfStatusUp).Preload("BundleProfileLang") //query = query.Where("shelf_status = ?", 1) //上架的 if req.Name != "" { diff --git a/internal/model/bundle.go b/internal/model/bundle.go index 97ac1d9..0308e59 100644 --- a/internal/model/bundle.go +++ b/internal/model/bundle.go @@ -13,6 +13,11 @@ const ( BundleTypePostpaid = 2 // 先用后付套餐 ) +const ( + BundleShelfStatusUp = 1 // 上架 + BundleShelfStatusDown = 2 // 下架 +) + type BundleProfile struct { gorm.Model UUID string `json:"uuid" gorm:"column:uuid;type:varchar(1024);comment:套餐UUID"`