|
|
@@ -208,20 +208,7 @@ public class UserController {
|
|
|
Map<String, Object> stats = new HashMap<>();
|
|
|
|
|
|
// 1. 总积分
|
|
|
- Integer totalPoints = 0;
|
|
|
- try {
|
|
|
- Integer totalPoints = user.getTotalPoints() != null ? user.getTotalPoints() : 0;
|
|
|
- if (points != null) {
|
|
|
- if (points instanceof Map) {
|
|
|
- Object v = ((Map<?, ?>) points).get("totalPoints");
|
|
|
- if (v != null) totalPoints = ((Number) v).intValue();
|
|
|
- } else if (points instanceof Number) {
|
|
|
- totalPoints = ((Number) points).intValue();
|
|
|
- }
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- log.warn("获取积分失败: userId={}", userId, e);
|
|
|
- }
|
|
|
+ Integer totalPoints = user.getTotalPoints() != null ? user.getTotalPoints() : 0;
|
|
|
stats.put("totalPoints", totalPoints);
|
|
|
|
|
|
// 2. 连续打卡天数(取所有孩子中最高值)
|