From d668424ac7a87eca9613808dadb48fba71e20ae5 Mon Sep 17 00:00:00 2001 From: "jiaji.H" Date: Fri, 5 Jun 2026 10:58:40 +0800 Subject: [PATCH] =?UTF-8?q?Update:=E5=A2=9E=E5=8A=A0=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/dao/bundleDao.go | 2 +- internal/model/bundle.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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"`