|
|
|
@@ -452,7 +452,7 @@ func DownloadUserDefineFile(ctx *context.Context) { |
|
|
|
func QueryUserMetricsCurrentMonth(ctx *context.Context) { |
|
|
|
|
|
|
|
currentTimeNow := time.Now() |
|
|
|
pageEndTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 23, 59, 59, 0, currentTimeNow.Location()) |
|
|
|
pageEndTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 0, 0, 0, 0, currentTimeNow.Location()) |
|
|
|
pageStartTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), 1, 0, 0, 0, 0, currentTimeNow.Location()) |
|
|
|
pageStartTime = getStartTime(pageStartTime) |
|
|
|
queryMetrics(ctx, "public.user_business_analysis_current_month", pageStartTime, pageEndTime) |
|
|
|
@@ -478,7 +478,7 @@ func QueryUserMetricsCurrentWeek(ctx *context.Context) { |
|
|
|
} |
|
|
|
pageStartTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 0, 0, 0, 0, time.Local).AddDate(0, 0, offset) |
|
|
|
pageStartTime = getStartTime(pageStartTime) |
|
|
|
pageEndTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 23, 59, 59, 0, currentTimeNow.Location()) |
|
|
|
pageEndTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 0, 0, 0, 0, currentTimeNow.Location()) |
|
|
|
queryMetrics(ctx, "public.user_business_analysis_current_week", pageStartTime, pageEndTime) |
|
|
|
} |
|
|
|
func QueryUserStaticCurrentWeek(ctx *context.Context) { |
|
|
|
@@ -492,7 +492,7 @@ func QueryUserMetricsCurrentYear(ctx *context.Context) { |
|
|
|
currentTimeNow := time.Now() |
|
|
|
pageStartTime := time.Date(currentTimeNow.Year(), 1, 1, 0, 0, 0, 0, currentTimeNow.Location()) |
|
|
|
pageStartTime = getStartTime(pageStartTime) |
|
|
|
pageEndTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 23, 59, 59, 0, currentTimeNow.Location()) |
|
|
|
pageEndTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 0, 0, 0, 0, currentTimeNow.Location()) |
|
|
|
queryMetrics(ctx, "public.user_business_analysis_current_year", pageStartTime, pageEndTime) |
|
|
|
} |
|
|
|
func QueryUserStaticCurrentYear(ctx *context.Context) { |
|
|
|
@@ -502,7 +502,7 @@ func QueryUserMetricsLast30Day(ctx *context.Context) { |
|
|
|
currentTimeNow := time.Now() |
|
|
|
pageStartTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 0, 0, 0, 0, time.Local).AddDate(0, 0, -30) |
|
|
|
pageStartTime = getStartTime(pageStartTime) |
|
|
|
pageEndTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 23, 59, 59, 0, currentTimeNow.Location()) |
|
|
|
pageEndTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 0, 0, 0, 0, currentTimeNow.Location()) |
|
|
|
queryMetrics(ctx, "public.user_business_analysis_last30_day", pageStartTime, pageEndTime) |
|
|
|
} |
|
|
|
func QueryUserStaticLast30Day(ctx *context.Context) { |
|
|
|
@@ -513,14 +513,14 @@ func QueryUserMetricsLastMonth(ctx *context.Context) { |
|
|
|
thisMonth := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), 1, 0, 0, 0, 0, currentTimeNow.Location()) |
|
|
|
pageStartTime := thisMonth.AddDate(0, -1, 0) |
|
|
|
pageStartTime = getStartTime(pageStartTime) |
|
|
|
pageEndTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), 1, 23, 59, 59, 0, currentTimeNow.Location()).AddDate(0, 0, -1) |
|
|
|
pageEndTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), 1, 0, 0, 0, 0, currentTimeNow.Location()).AddDate(0, 0, -1) |
|
|
|
queryMetrics(ctx, "public.user_business_analysis_last_month", pageStartTime, pageEndTime) |
|
|
|
} |
|
|
|
func QueryUserStaticLastMonth(ctx *context.Context) { |
|
|
|
queryUserDataPage(ctx, "public.user_business_analysis_last_month", new(models.UserBusinessAnalysisLastMonth)) |
|
|
|
} |
|
|
|
func QueryUserMetricsYesterday(ctx *context.Context) { |
|
|
|
currentTimeNow := time.Now() |
|
|
|
currentTimeNow := time.Now().AddDate(0, 0, -1) |
|
|
|
pageStartTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 0, 0, 0, 0, time.Local) |
|
|
|
pageStartTime = getStartTime(pageStartTime) |
|
|
|
pageEndTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 23, 59, 59, 0, currentTimeNow.Location()) |
|
|
|
@@ -533,7 +533,7 @@ func QueryUserMetricsAll(ctx *context.Context) { |
|
|
|
currentTimeNow := time.Now() |
|
|
|
pageStartTime := time.Date(2022, 4, 5, 0, 0, 0, 0, currentTimeNow.Location()) |
|
|
|
pageStartTime = getStartTime(pageStartTime) |
|
|
|
pageEndTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 23, 59, 59, 0, currentTimeNow.Location()) |
|
|
|
pageEndTime := time.Date(currentTimeNow.Year(), currentTimeNow.Month(), currentTimeNow.Day(), 0, 0, 0, 0, currentTimeNow.Location()) |
|
|
|
queryMetrics(ctx, "public.user_business_analysis_all", pageStartTime, pageEndTime) |
|
|
|
} |
|
|
|
func QueryUserStaticAll(ctx *context.Context) { |
|
|
|
|