仪表盘功能完善

This commit is contained in:
2025-10-31 14:33:57 +08:00
parent 778f05daa5
commit bbe79ecffb
8 changed files with 416 additions and 20 deletions
@@ -41,6 +41,12 @@ public class DashboardStatsResponse {
@Schema(description = "数据更新时间")
private LocalDateTime updateTime;
@Schema(description = "用户增长趋势数据")
private List<UserGrowthTrend> userGrowthTrends;
@Schema(description = "最近登录用户")
private List<RecentLogin> recentLogins;
/**
* 用户统计
*/
@@ -165,4 +171,51 @@ public class DashboardStatsResponse {
@Schema(description = "额外数据")
private Map<String, Object> extraData;
}
/**
* 用户增长趋势
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "用户增长趋势")
public static class UserGrowthTrend {
@Schema(description = "日期")
private String date;
@Schema(description = "新增用户数")
private Long newUsers;
@Schema(description = "累计用户数")
private Long totalUsers;
}
/**
* 最近登录用户
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "最近登录用户")
public static class RecentLogin {
@Schema(description = "用户ID")
private String userId;
@Schema(description = "用户名")
private String username;
@Schema(description = "昵称")
private String nickname;
@Schema(description = "头像")
private String avatar;
@Schema(description = "登录时间")
private LocalDateTime loginTime;
@Schema(description = "登录时间描述")
private String timeDescription;
}
}