From 47f157086a556d96e7bcfc9adfe17ecf7c154dfe Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 08 六月 2020 17:27:14 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div

---
 fanli/src/main/java/com/yeshi/fanli/controller/admin/UserInfoAdminController.java |   81 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 81 insertions(+), 0 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/admin/UserInfoAdminController.java b/fanli/src/main/java/com/yeshi/fanli/controller/admin/UserInfoAdminController.java
index f768a0e..defb8a1 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/admin/UserInfoAdminController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/admin/UserInfoAdminController.java
@@ -118,6 +118,9 @@
 	@Resource
 	private UserInviteValidNumService userInviteValidNumService;
 	
+	@Resource
+	private ThreeSaleSerivce threeSaleSerivce;
+	
 	/**
 	 * 鏌ヨ鐢ㄦ埛淇℃伅鍒楄〃 姝e父鐢ㄦ埛/寮傚父鐢ㄦ埛
 	 * 
@@ -214,6 +217,82 @@
 		}
 	}
 
+	/**
+	 * 鐢ㄦ埛鍩虹淇℃伅鏌ヨ
+	 * @param callback
+	 * @param pageIndex
+	 * @param pageSize
+	 * @param key
+	 * @param keyType
+	 * @param rank
+	 * @param userType
+	 * @param days
+	 * @param startTime
+	 * @param endTime
+	 * @param type
+	 * @param level
+	 * @param activeCode
+	 * @param out
+	 */
+	@RequestMapping(value = "queryInfo")
+	public void queryInfo(String callback, Integer pageIndex, Integer pageSize, String key, Integer keyType, Integer rank,Integer userType,
+			Integer days, String startTime, String endTime, Integer state,String level,
+			Integer activeCode, PrintWriter out) {
+		try {
+			if (pageIndex == null)
+				pageIndex = 1;
+
+			if (pageSize == null)
+				pageSize = Constant.PAGE_SIZE;
+
+			String userRank = null;
+			if (rank != null) {
+				switch (rank) {
+				case 1:
+					userRank = "闈掗摐";
+					break;
+				case 2:
+					userRank = "鐧介摱";
+					break;
+				case 3:
+					userRank = "榛勯噾";
+					break;
+				case 4:
+					userRank = "閾傞噾";
+					break;
+				default:
+					break;
+				}
+			}
+
+			List<UserInfoVO> userList = userInfoService.queryInfo((pageIndex - 1) * pageSize, pageSize, state, key, keyType,
+					userRank, days, startTime, endTime, userType, level, activeCode);
+
+			if (userList == null || userList.size() == 0) {
+				JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏆傛棤鐩稿叧鏁版嵁"));
+				return;
+			}
+
+			long count = userInfoService.countInfo(state, key, keyType, userRank, days, startTime, endTime,userType, level, activeCode);
+
+			int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
+			PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
+
+			GsonBuilder gsonBuilder = new GsonBuilder();
+			gsonBuilder.serializeNulls();
+			Gson gson = gsonBuilder.create();
+
+			JSONObject data = new JSONObject();
+			data.put("pe", pe);
+			data.put("resultList", gson.toJson(userList));
+			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
+		} catch (Exception e) {
+			e.printStackTrace();
+			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鎿嶄綔寮傚父"));
+		}
+	}
+	
+	
 	/**
 	 * 缁熻浠婃棩鐢ㄦ埛鎬绘儏鍐�
 	 * 
@@ -1333,6 +1412,8 @@
 		JSONObject data = new JSONObject();
 		data.put("doneFirst", doneFirst); 
 		data.put("doneSecond", doneSecond); 
+		data.put("first", threeSaleSerivce.countFirstTeam(uid)); 
+		data.put("second", threeSaleSerivce.countSecondTeam(uid)); 
 		JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
 	}
 

--
Gitblit v1.8.0