|
@@ -171,6 +171,9 @@ func GetSonUserDailyActivity(engine *xorm.Engine, fatherUID int64, startDate, en |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return 0, nil, zhios_order_relate_logx.Error(err) |
|
|
return 0, nil, zhios_order_relate_logx.Error(err) |
|
|
} |
|
|
} |
|
|
|
|
|
if len(userIDs) == 0 { |
|
|
|
|
|
return 0, nil, nil |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
sql := "SELECT COUNT(*) AS total, uid FROM `egg_energy_user_activity` WHERE uid IN (%s) AND date >= '%s' AND date <= '%s' GROUP BY uid" |
|
|
sql := "SELECT COUNT(*) AS total, uid FROM `egg_energy_user_activity` WHERE uid IN (%s) AND date >= '%s' AND date <= '%s' GROUP BY uid" |
|
|
results, err := db.QueryNativeString(engine, fmt.Sprintf(sql, strings.Join(userIDs, ","), startDate, endDate)) |
|
|
results, err := db.QueryNativeString(engine, fmt.Sprintf(sql, strings.Join(userIDs, ","), startDate, endDate)) |
|
|