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) {