@@ -36,7 +36,7 @@ func (e EggEnergyUserActivityDb) EggEnergyUserActivityInsert(m *model.EggEnergyU | |||||
} | } | ||||
func (e EggEnergyUserActivityDb) EggEnergyUserActivityCountByDate(startAt, endAt string) (int64, error) { | func (e EggEnergyUserActivityDb) EggEnergyUserActivityCountByDate(startAt, endAt string) (int64, error) { | ||||
count, err := e.Db.Distinct("uid").Where("date >= ?", startAt).And("date =< ?", endAt).Count(&model.EggEnergyUserActivity{}) | |||||
count, err := e.Db.Distinct("uid").Where("date >= ?", startAt).And("date <= ?", endAt).Count(&model.EggEnergyUserActivity{}) | |||||
if err != nil { | if err != nil { | ||||
return 0, zhios_order_relate_logx.Error(err) | return 0, zhios_order_relate_logx.Error(err) | ||||
} | } | ||||
@@ -55,7 +55,7 @@ func (u UserCertificateDb) GetUserCertificateById(id string) (m *model.UserCerti | |||||
} | } | ||||
func (u UserCertificateDb) UserCertificateCountByDate(startAt, endAt string) (int64, error) { | func (u UserCertificateDb) UserCertificateCountByDate(startAt, endAt string) (int64, error) { | ||||
count, err := u.Db.Where("start_time >= ?", startAt).And("start_time =< ?", endAt).Count(&model.UserCertificate{}) | |||||
count, err := u.Db.Where("start_time >= ?", startAt).And("start_time <= ?", endAt).Count(&model.UserCertificate{}) | |||||
if err != nil { | if err != nil { | ||||
return 0, zhios_order_relate_logx.Error(err) | return 0, zhios_order_relate_logx.Error(err) | ||||
} | } | ||||
@@ -188,7 +188,7 @@ func (u UserDb) UserExistByParams(params map[string]interface{}) (bool, error) { | |||||
} | } | ||||
func (u UserDb) UserCountByDate(startAt, endAt string) (int64, error) { | func (u UserDb) UserCountByDate(startAt, endAt string) (int64, error) { | ||||
count, err := u.Db.Where("create_at >= ?", startAt).And("create_at =< ?", endAt).Count(&model.User{}) | |||||
count, err := u.Db.Where("create_at >= ?", startAt).And("create_at <= ?", endAt).Count(&model.User{}) | |||||
if err != nil { | if err != nil { | ||||
return 0, zhios_order_relate_logx.Error(err) | return 0, zhios_order_relate_logx.Error(err) | ||||
} | } | ||||