From 4ce64cfcc457ca93dfc19960e89def4d07433c14 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 30 八月 2019 14:33:45 +0800
Subject: [PATCH] 用户查询订单修改

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserOrderController.java |   43 ++++++++++++++++++++++++-------------------
 1 files changed, 24 insertions(+), 19 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserOrderController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserOrderController.java
index 3bb2a63..4ac83a7 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserOrderController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserOrderController.java
@@ -13,6 +13,7 @@
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.yeshi.utils.DateUtil;
 import org.yeshi.utils.IPUtil;
 import org.yeshi.utils.JsonUtil;
@@ -108,9 +109,12 @@
 	 * @param out
 	 */
 	@RequestMapping(value = "getorder", method = RequestMethod.POST)
-	public void getOrder(AcceptData acceptData, Integer page, Long uid, Integer state, Integer type, Integer orderState,
-			String orderNo, String startTime, String endTime, Integer slotTime, boolean needCount, Integer dateType,
-			Integer goodsType, PrintWriter out) {
+	public void getOrder(AcceptData acceptData, Integer page, Long uid, Integer state,
+			@RequestParam("type") String type1, Integer orderState, String orderNo, String startTime, String endTime,
+			Integer slotTime, boolean needCount, Integer dateType, Integer goodsType, PrintWriter out) {
+		Integer type = null;
+		if (StringUtil.isNullOrEmpty(type1))
+			type = null;
 
 		if (uid == null) {
 			out.print(JsonUtil.loadFalseResult(1, "鐢ㄦ埛鏈櫥褰�"));
@@ -136,14 +140,14 @@
 			orderState = 2; // 宸茬淮鏉�
 			state = null; // 娓呯┖
 		}
-				
+
 		if (type != null && type == 0) {
 			type = null; // 鎵�鏈夌被鍨嬭鍗�
 		}
-		
+
 		if (!VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) {
 			goodsType = Constant.SOURCE_TYPE_TAOBAO;
-		} else if (goodsType != null && goodsType == 0){
+		} else if (goodsType != null && goodsType == 0) {
 			goodsType = null; // 鎵�鏈夊钩鍙拌鍗�
 		}
 
@@ -170,8 +174,8 @@
 			BigDecimal todayMoney = null;
 
 			// 鏌ヨ鍒楄〃
-			List<CommonOrderVO> list = commonOrderService.getOrderByUid(acceptData, page, uid, state, type, orderState, orderNo,
-					startTime, endTime, dateType, goodsType);
+			List<CommonOrderVO> list = commonOrderService.getOrderByUid(acceptData, page, uid, state, type, orderState,
+					orderNo, startTime, endTime, dateType, goodsType);
 
 			if (list != null && list.size() > 0) {
 				// 缁熻鎬绘暟
@@ -182,9 +186,11 @@
 			// 闇�瑕佺粺璁$瓫閫変俊鎭� 锛氭湭澶辨晥鐨勬�婚噾棰� 浠ュ強璁㈠崟
 			if (needCount && page == 1) {
 
-				todayMoney = commonOrderService.countBonusOrderMoney(uid, type, dateType, startTime, endTime, goodsType);
+				todayMoney = commonOrderService.countBonusOrderMoney(uid, type, dateType, startTime, endTime,
+						goodsType);
 
-				todayTotal = commonOrderService.countBonusOrderNumber(uid, type, dateType, startTime, endTime, goodsType);
+				todayTotal = commonOrderService.countBonusOrderNumber(uid, type, dateType, startTime, endTime,
+						goodsType);
 
 				// 缁熻鏈夋晥鐨勮鍗曟暟閲� 銆� 澶辨晥璁㈠崟鏁伴噺 銆佺淮鏉冭鍗曟暟閲�
 				Map<String, BigDecimal> countOrder = commonOrderService.countByUidAndOrderState(uid, type, startTime,
@@ -293,8 +299,8 @@
 			Integer goodsType = null; // 鐗堟湰鍖哄垎
 			if (!VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) {
 				goodsType = Constant.SOURCE_TYPE_TAOBAO;
-			} 
-			
+			}
+
 			/* 鎬昏鍗曠粺璁� */
 			Map<String, BigDecimal> countOrder = commonOrderService.countHistoryOrder(uid, null, goodsType);
 			int self = 0;
@@ -379,10 +385,10 @@
 			e.printStackTrace();
 		}
 	}
-	
-	
+
 	/**
 	 * 缁熻鍚勪釜骞冲彴鏁版嵁
+	 * 
 	 * @param acceptData
 	 * @param uid
 	 * @param goodsType
@@ -400,7 +406,7 @@
 			out.print(JsonUtil.loadFalseResult(1, "骞冲彴绫诲瀷缂哄け鎴栦笉姝g‘"));
 			return;
 		}
-		
+
 		/* 浠婃棩璁㈠崟缁熻 */
 		Map<String, BigDecimal> countToday = commonOrderService.countHistoryOrder(uid, 1, goodsType);
 
@@ -456,8 +462,7 @@
 		data.put("yesterday", yesterdaydata);
 		out.print(JsonUtil.loadTrueResult(data));
 	}
-	
-	
+
 	/**
 	 * 缁熻濂栭噾
 	 * 
@@ -479,11 +484,11 @@
 			BigDecimal sharemoney = new BigDecimal(0.00);
 			Object inviteCount = 0;
 			BigDecimal inviteMoney = new BigDecimal(0.00);
-			
+
 			Integer goodsType = null; // 鐗堟湰鍖哄垎
 			if (!VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) {
 				goodsType = Constant.SOURCE_TYPE_TAOBAO;
-			} 
+			}
 
 			Map<String, Object> shareMap = commonOrderService.countBonusOrderMoneyAndNumber(uid, 2, dateType, null,
 					null, goodsType);

--
Gitblit v1.8.0