From aac216bd020eea376f7317f4ba54bc7f5cfa5179 Mon Sep 17 00:00:00 2001 From: hu177768073 <177768073@qq.com> Date: Fri, 27 Sep 2024 16:31:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hfkj/controller/UserTeamController.java | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/cweb/src/main/java/com/hfkj/controller/UserTeamController.java b/cweb/src/main/java/com/hfkj/controller/UserTeamController.java index 15656a2..654b8af 100644 --- a/cweb/src/main/java/com/hfkj/controller/UserTeamController.java +++ b/cweb/src/main/java/com/hfkj/controller/UserTeamController.java @@ -59,32 +59,45 @@ public class UserTeamController { // 团队好友 map.put("teamFriend", subList.stream().filter(o -> o.getRelType().equals(2)).count()); + // 活跃情况 Map active = new HashMap<>(); // 今日 Map today = new HashMap<>(); - today.put("newFriend", ""); - today.put("activeFriend", ""); + today.put("newFriend", "0"); + today.put("activeFriend", "0"); active.put("today", today); // 昨日 Map yesterday = new HashMap<>(); - yesterday.put("newFriend", ""); - yesterday.put("activeFriend", ""); + yesterday.put("newFriend", "0"); + yesterday.put("activeFriend", "0"); active.put("yesterday", yesterday); // 本月 Map thisMonth = new HashMap<>(); - thisMonth.put("newFriend", ""); - thisMonth.put("activeFriend", ""); + thisMonth.put("newFriend", "0"); + thisMonth.put("activeFriend", "0"); active.put("thisMonth", thisMonth); // 上月 Map lastMonth = new HashMap<>(); - lastMonth.put("newFriend", ""); - lastMonth.put("activeFriend", ""); + lastMonth.put("newFriend", "0"); + lastMonth.put("activeFriend", "0"); active.put("lastMonth", lastMonth); map.put("active", active); + + // 邀请人 + if (userSession.getUser().getInviteUserId() != null) { + // 邀请人数据 + BsUser inviteUser = userService.getUser(userSession.getUser().getInviteUserId()); + if (inviteUser != null) { + inviteUser.setPhone(null); + } + map.put("inviteUser", inviteUser); + } else { + map.put("inviteUser", null); + } return ResponseMsgUtil.success(map); } catch (Exception e) {