From 828ee65169b584a7b779ef6f2fa22c2d6869f06e Mon Sep 17 00:00:00 2001 From: tommy <3405129587@qq.com> Date: Wed, 10 Jun 2020 17:30:52 +0800 Subject: [PATCH] calorie --- models/CalorieUser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/CalorieUser.go b/models/CalorieUser.go index 5600284..5e666bd 100644 --- a/models/CalorieUser.go +++ b/models/CalorieUser.go @@ -37,7 +37,7 @@ func (t *CalorieUser) IncrScore(score int) (int64, error) { func (t *CalorieUser) CountByCalorieId(calorieId, rehearsalId interface{}) (int64, error) { return core.GetXormAuto().Where("is_delete=0 and calorie_id=? and rehearsal_id=?", - calorieId, rehearsalId).Count(t) + calorieId, rehearsalId).Count(&CalorieUser{}) } func GetCalorieUsersByCalorieIdAndScore(calorieId, rehearsalId, score interface{}) ([]*CalorieUser, error) {