|
|
|
@@ -247,6 +247,7 @@ func queryUserDataPage(ctx *context.Context, tableName string, queryObj interfac |
|
|
|
mapInterface := make(map[string]interface{}) |
|
|
|
mapInterface["data"] = re |
|
|
|
mapInterface["count"] = count |
|
|
|
|
|
|
|
ctx.JSON(http.StatusOK, mapInterface) |
|
|
|
} |
|
|
|
} |
|
|
|
@@ -303,6 +304,15 @@ func queryMetrics(ctx *context.Context, tableName string, startTime time.Time, e |
|
|
|
mapInterface := make(map[string]interface{}) |
|
|
|
mapInterface["data"] = result |
|
|
|
mapInterface["count"] = count |
|
|
|
if tableName == "public.user_business_analysis_yesterday" { |
|
|
|
mapInterface["datarecordbegintime"] = setting.RadarMap.RecordBeginTime |
|
|
|
if len(result) > 0 { |
|
|
|
dateTime := time.Unix(result[0].CountDate, 0) |
|
|
|
mapInterface["lastUpdatedTime"] = dateTime.Format("2006-01-02 15:04:05") |
|
|
|
} else { |
|
|
|
mapInterface["lastUpdatedTime"] = "" |
|
|
|
} |
|
|
|
} |
|
|
|
ctx.JSON(http.StatusOK, mapInterface) |
|
|
|
} |
|
|
|
|
|
|
|
|