Updata:修正检索

This commit is contained in:
jiaji.H 2026-03-03 16:14:38 +08:00
parent 45620df185
commit 3baffe8d2f

View File

@ -120,17 +120,18 @@ func GetBundleBalanceList(req *bundle.GetBundleBalanceListReq) (data []model.Bun
if req.Bought == 1 {
session = session.Where("bb.user_id IS NULL")
}
t := time.Now()
if req.StatusType != 0 {
if req.ExpiredTimeStart > time.Now().UnixMilli() {
if req.StatusType == 1 {
session = session.Where("bb.expired_at <= ?", time.Now().UnixMilli())
session = session.Where("bb.expired_at <= ?", t.Format("2006-01-02 15:04:05"))
} else {
}
} else {
if req.StatusType == 1 {
session = session.Where("bb.expired_at <= ?", time.Now().UnixMilli())
session = session.Where("bb.expired_at <= ?", t.Format("2006-01-02 15:04:05"))
} else {
session = session.Where("bb.expired_at >= ?", time.Now().UnixMilli())
session = session.Where("bb.expired_at >= ?", t.Format("2006-01-02 15:04:05"))
}
}
}