Update:增加对应类型

This commit is contained in:
jiaji.H 2026-06-05 10:58:40 +08:00
parent acdd67e0ae
commit d668424ac7
2 changed files with 6 additions and 1 deletions

View File

@ -389,7 +389,7 @@ func BundleListH5V2(req *bundle.BundleListRequest) (res *bundle.BundleListRespon
res.Bundles = make([]*bundle.BundleProfile, 0) res.Bundles = make([]*bundle.BundleProfile, 0)
bundles := make([]*model.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) //上架的 //query = query.Where("shelf_status = ?", 1) //上架的
if req.Name != "" { if req.Name != "" {

View File

@ -13,6 +13,11 @@ const (
BundleTypePostpaid = 2 // 先用后付套餐 BundleTypePostpaid = 2 // 先用后付套餐
) )
const (
BundleShelfStatusUp = 1 // 上架
BundleShelfStatusDown = 2 // 下架
)
type BundleProfile struct { type BundleProfile struct {
gorm.Model gorm.Model
UUID string `json:"uuid" gorm:"column:uuid;type:varchar(1024);comment:套餐UUID"` UUID string `json:"uuid" gorm:"column:uuid;type:varchar(1024);comment:套餐UUID"`