diff --git a/db/db_day_luck_draw_period_reward.go b/db/db_day_luck_draw_period_reward.go index 84d8575..b1a3c20 100644 --- a/db/db_day_luck_draw_period_reward.go +++ b/db/db_day_luck_draw_period_reward.go @@ -23,6 +23,13 @@ func GetDayLuckDrawPeriodRewardList(Db *xorm.Engine, parameter *md.DayLuckDrawPe } return list, count, nil } +func GetDayLuckDrawPeriodRewardSum(Db *xorm.Engine, uid int) float64 { + sum, err := Db.Where("uid=?", uid).Sum(&model.DayLuckDrawPeriodReward{}, "reward") + if err != nil { + return 0 + } + return sum +} func DayLuckDrawPeriodRewardGetCount(Db *xorm.Engine, parameter *md.DayLuckDrawPeriodRewardRequest) int { var ord model.DayLuckDrawPeriodReward session := Db.Where("")