Compare commits

..

No commits in common. "d9795b9e794b692a34da4045c111dcb4a72f2a73" and "47b8090e047a0b7ef7246a9c902084a23d774b1d" have entirely different histories.

View File

@ -104,10 +104,10 @@ func GetBundleBalanceList(req *bundle.GetBundleBalanceListReq) (data []model.Bun
session = session.Where("bb.expired_at >= ?", time.UnixMilli(req.ExpiredTimeStart)) session = session.Where("bb.expired_at >= ?", time.UnixMilli(req.ExpiredTimeStart))
} }
if req.Bought == 2 { if req.Bought == 2 {
session = session.Where("bb.user_id IS NOT NULL") session = session.Where("bor.uuid IS NOT NULL")
} }
if req.Bought == 1 { if req.Bought == 1 {
session = session.Where("bb.user_id IS NULL") session = session.Where("bor.uuid IS NULL")
} }
if req.Month == "" { if req.Month == "" {
newestMonthQuery := app.ModuleClients.BundleDB.Model(&model.BundleBalance{}).Select("max(month) as month,user_id").Group("user_id") newestMonthQuery := app.ModuleClients.BundleDB.Model(&model.BundleBalance{}).Select("max(month) as month,user_id").Group("user_id")