提交代码

master
胡锐 2 months ago
parent 8ed1c9b5b3
commit 4d5818f3b1
  1. 18
      cweb/src/main/java/com/hfkj/controller/UserTeamController.java
  2. 2
      service/src/main/java/com/hfkj/dao/BsUserParentRelMapperExt.java

@ -24,7 +24,6 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* @className: UserTeamController * @className: UserTeamController
* @author: HuRui * @author: HuRui
@ -61,29 +60,28 @@ public class UserTeamController {
map.put("teamFriend", subList.stream().filter(o -> o.getRelType().equals(2)).count()); map.put("teamFriend", subList.stream().filter(o -> o.getRelType().equals(2)).count());
Map<String,Object> active = new HashMap<>(); Map<String,Object> active = new HashMap<>();
// 今日 // 今日
Map<String,Object> today = new HashMap<>(); Map<String,Object> today = new HashMap<>();
today.put("", ""); today.put("newFriend", "");
today.put("", ""); today.put("activeFriend", "");
active.put("today", today); active.put("today", today);
// 昨日 // 昨日
Map<String,Object> yesterday = new HashMap<>(); Map<String,Object> yesterday = new HashMap<>();
yesterday.put("", ""); yesterday.put("newFriend", "");
yesterday.put("", ""); yesterday.put("activeFriend", "");
active.put("yesterday", yesterday); active.put("yesterday", yesterday);
// 本月 // 本月
Map<String,Object> thisMonth = new HashMap<>(); Map<String,Object> thisMonth = new HashMap<>();
thisMonth.put("", ""); thisMonth.put("newFriend", "");
thisMonth.put("", ""); thisMonth.put("activeFriend", "");
active.put("thisMonth", thisMonth); active.put("thisMonth", thisMonth);
// 上月 // 上月
Map<String,Object> lastMonth = new HashMap<>(); Map<String,Object> lastMonth = new HashMap<>();
lastMonth.put("", ""); lastMonth.put("newFriend", "");
lastMonth.put("", ""); lastMonth.put("activeFriend", "");
active.put("lastMonth", lastMonth); active.put("lastMonth", lastMonth);
map.put("active", active); map.put("active", active);

@ -28,7 +28,7 @@ public interface BsUserParentRelMapperExt {
" WHERE FIND_IN_SET(invite_user_id, @pid) > 0 and @pid := concat(@pid, ',', id)" + " WHERE FIND_IN_SET(invite_user_id, @pid) > 0 and @pid := concat(@pid, ',', id)" +
" ORDER BY id" + " ORDER BY id" +
" ) a where 1 = 1" + " ) a where 1 = 1" +
" <if test='param.userId != null'> and a.id = #{param.userId} </if>" + " <if test='param.userId != null'> and a.userId = #{param.userId} </if>" +
" <if test='param.userType != null &amp;&amp; param.userType == 1'> and a.relType = 1 </if>" + " <if test='param.userType != null &amp;&amp; param.userType == 1'> and a.relType = 1 </if>" +
" <if test='param.userType != null &amp;&amp; param.userType == 2'> and a.relType = 2 </if>" + " <if test='param.userType != null &amp;&amp; param.userType == 2'> and a.relType = 2 </if>" +
" <if test='param.userType != null &amp;&amp; param.userType == 3'> and a.grade = 1 </if>" + " <if test='param.userType != null &amp;&amp; param.userType == 3'> and a.grade = 1 </if>" +

Loading…
Cancel
Save