From 5af10f175689549ca44b74e9fc1c7ee0ec92c2d7 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期二, 21 四月 2020 14:26:38 +0800
Subject: [PATCH] 后台改造

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

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java b/fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java
index d55c99d..05a06e3 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/admin/OrderAdminController.java
@@ -17,11 +17,9 @@
 import org.yeshi.utils.JsonUtil;
 
 import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
 import com.yeshi.fanli.controller.admin.utils.AdminUtils;
 import com.yeshi.fanli.dto.ChartTDO;
 import com.yeshi.fanli.dto.common.CategoryInfoDTO;
-import com.yeshi.fanli.dto.common.GoodsOtherInfoDTO;
 import com.yeshi.fanli.entity.bus.user.HongBaoV2;
 import com.yeshi.fanli.entity.goods.CommonGoods;
 import com.yeshi.fanli.entity.money.UserMoneyDebt;
@@ -136,12 +134,9 @@
 
 			data.put("todayOrder", todayOrder);
 			data.put("yesterdayOrder", yesterdayOrder);
-
 			data.put("genzong", yesterdayOrder);
 			data.put("yesterdayOrder", yesterdayOrder);
-
 			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
-
 		} catch (Exception e) {
 			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("缁熻澶辫触"));
 			e.printStackTrace();
@@ -325,9 +320,7 @@
 			JSONObject data = new JSONObject();
 			data.put("pe", pe);
 			data.put("result_list", list);
-
 			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
-
 		} catch (CommonOrderException e) {
 			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
 		} catch (Exception e) {
@@ -405,249 +398,6 @@
 			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(e.getMsg()));
 		} catch (Exception e) {
 			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏌ヨ澶辫触"));
-			e.printStackTrace();
-		}
-	}
-
-	
-	
-	
-	
-	
-	
-	/**
-	 * 缁熻鎻愮幇鐢宠鎬婚噾棰�
-	 * 
-	 * @param callback
-	 * @param channelArray
-	 *            娓犻亾鍚� 涓虹┖鏄粺璁℃墍鏈�
-	 * @param dateType
-	 *            鏄剧ず瑙嗗浘锛氭棩-1 銆佹湀-2銆� 骞�-3
-	 * @param state
-	 *            鐘舵�侊細 1-鏈埌璐� 2-宸插埌璐� 3-宸插け鏁�
-	 * @param year
-	 * @param startTime
-	 * @param endTime
-	 * @param out
-	 */
-	@RequestMapping(value = "getHongBaoMoney")
-	public void getHongBaoMoney(String callback, String channelArray, Integer dateType, Integer state, String year,
-			String startTime, String endTime, PrintWriter out) {
-
-		String validateMsg = AdminUtils.validateParams(dateType, startTime, endTime);
-		if (validateMsg != null) {
-			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(validateMsg));
-			return;
-		}
-
-		try {
-
-			JSONObject data = countHistoryHongBao(channelArray, dateType, state, year, startTime, endTime, 2);
-			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
-		} catch (Exception e) {
-			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("绯荤粺寮傚父"));
-			e.printStackTrace();
-		}
-	}
-
-	/**
-	 * 缁熻绾㈠寘淇℃伅
-	 * 
-	 * @param channelArray
-	 * @param dateType
-	 * @param state
-	 * @param year
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 * @throws Exception
-	 */
-	public JSONObject countHistoryHongBao(String channelArray, Integer dateType, Integer state, String year,
-			String startTime, String endTime, int countType) throws Exception {
-		if (dateType != 1 && (!StringUtil.isNullOrEmpty(startTime) || !StringUtil.isNullOrEmpty(endTime))) {
-			startTime = null;
-			endTime = null;
-		}
-
-		List<String> channelList = null;
-		if (channelArray != null && channelArray.trim().length() > 0) {
-			Gson gson = new Gson();
-			channelList = gson.fromJson(channelArray, new TypeToken<ArrayList<String>>() {
-			}.getType());
-		}
-
-		if (channelList == null || channelList.size() == 0) {
-			channelList = new ArrayList<String>();
-			channelList.add("all");
-		}
-
-		if (dateType == 1 && year != null) {
-			year = null; // 璁剧疆涓虹┖
-		} else if (dateType == 2) {
-			if (startTime != null)
-				startTime = null;
-
-			if (endTime != null)
-				endTime = null;
-
-		} else if (dateType == 3) {
-			if (year != null)
-				year = null;
-
-			if (startTime != null)
-				startTime = null;
-
-			if (endTime != null)
-				endTime = null;
-		}
-
-		Gson gson = new Gson();
-		Object objectDate = null;
-		List<String> dateList = AdminUtils.getDateList(dateType, startTime, endTime, year);
-
-		JSONArray line_list = new JSONArray();
-		for (String channel : channelList) {
-			List<ChartTDO> list = null;
-			if (countType == 1) {
-				list = hongBaoV2CountService.countHongBaoNum(channel, dateType, state, year, startTime, endTime);
-			} else if (countType == 2) {
-				list = hongBaoV2CountService.countHongBaoMoney(channel, dateType, state, year, startTime, endTime);
-			}
-
-			if ("all".equalsIgnoreCase(channel)) {
-				channel = "鎬昏";
-			}
-
-			JSONObject innerList = new JSONObject();
-			innerList.put("name", channel);
-
-			if (dateType != 3) {
-				innerList.put("data", gson.toJson(AdminUtils.dayOrMonthDataFactory(dateType, dateList, list)));
-			} else {
-				// 骞磋鍥�
-				Map<String, Object> map = AdminUtils.yearsDataFactory(list);
-
-				if (objectDate == null) {
-					objectDate = map.get("date");
-				}
-				innerList.put("data", gson.toJson(map.get("value")));
-			}
-			line_list.add(innerList);
-		}
-
-		JSONObject data = new JSONObject();
-		if (objectDate != null) {
-			data.put("xAxis_list", gson.toJson(objectDate));
-		} else {
-			data.put("xAxis_list", gson.toJson(dateList));
-		}
-		data.put("line_list", line_list);
-		return data;
-	}
-
-	/**
-	 * 鍒嗙被鍨嬭鍗曟暟涓庢瘮渚�
-	 * 
-	 * @param callback
-	 * @param dateType
-	 *            鏃� -1 鏈�-2 骞�-3
-	 * @param type
-	 *            杩斿埄璁㈠崟-1 鍒嗕韩璁㈠崟-2 閭�璇疯鍗�-3
-	 * @param year
-	 * @param startTime
-	 * @param endTime
-	 * @param out
-	 */
-	@RequestMapping(value = "getTypeNumber")
-	public void getTypeNumber(String callback, Integer dateType, String typeArray, String year, String startTime,
-			String endTime, PrintWriter out) {
-		String validateMsg = AdminUtils.validateParams(dateType, startTime, endTime);
-		if (validateMsg != null) {
-			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(validateMsg));
-			return;
-		}
-
-		if (dateType != 1 && (!StringUtil.isNullOrEmpty(startTime) || !StringUtil.isNullOrEmpty(endTime))) {
-			startTime = null;
-			endTime = null;
-		}
-
-		List<Integer> channelList = null;
-		if (typeArray != null && typeArray.trim().length() > 0) {
-			Gson gson = new Gson();
-			channelList = gson.fromJson(typeArray, new TypeToken<ArrayList<Integer>>() {
-			}.getType());
-		}
-
-		if (channelList == null || channelList.size() == 0) {
-			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("璁㈠崟绫诲瀷涓嶈兘涓虹┖"));
-			return;
-		}
-
-		if (dateType == 1 && year != null) {
-			year = null; // 璁剧疆涓虹┖
-		} else if (dateType == 2) {
-			if (startTime != null)
-				startTime = null;
-
-			if (endTime != null)
-				endTime = null;
-
-		} else if (dateType == 3) {
-			if (year != null)
-				year = null;
-
-			if (startTime != null)
-				startTime = null;
-
-			if (endTime != null)
-				endTime = null;
-		}
-
-		Gson gson = new Gson();
-		Object objectDate = null;
-		List<String> dateList = AdminUtils.getDateList(dateType, startTime, endTime, year);
-		try {
-			JSONArray line_list = new JSONArray();
-			for (Integer type : channelList) {
-				List<ChartTDO> list = hongBaoV2CountService.countHongBaoType(dateType, type, year, startTime, endTime);
-				JSONObject innerList = new JSONObject();
-				if (type == 1) {
-					innerList.put("name", "杩斿埄璁㈠崟");
-				} else if (type == 2) {
-					innerList.put("name", "鍒嗕韩璁㈠崟");
-				} else if (type == 3) {
-					innerList.put("name", "閭�璇疯鍗�");
-				}
-
-				if (dateType != 3) {
-					innerList.put("data", gson.toJson(AdminUtils.dayOrMonthDataFactory(dateType, dateList, list)));
-				} else {
-					// 骞磋鍥�
-					Map<String, Object> map = AdminUtils.yearsDataFactory(list);
-
-					if (objectDate == null) {
-						objectDate = map.get("date");
-					}
-					innerList.put("data", gson.toJson(map.get("value")));
-				}
-
-				line_list.add(innerList);
-			}
-
-			JSONObject data = new JSONObject();
-			if (objectDate != null) {
-				data.put("xAxis_list", gson.toJson(objectDate));
-			} else {
-				data.put("xAxis_list", gson.toJson(dateList));
-			}
-
-			data.put("line_list", line_list);
-
-			JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
-
-		} catch (Exception e) {
-			JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鎿嶄綔寮傚父"));
 			e.printStackTrace();
 		}
 	}

--
Gitblit v1.8.0