From 4b1272a80a39ba3eb33f1fb7f9893a7e2b6084a9 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 14 一月 2019 13:19:51 +0800
Subject: [PATCH] 消息的显示层实体表示

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoOrderServiceImpl.java |   35 +++++++++++++++++++++++++++++++----
 1 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoOrderServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoOrderServiceImpl.java
index 009b7d9..666a04a 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoOrderServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoOrderServiceImpl.java
@@ -7,17 +7,20 @@
 
 import javax.annotation.Resource;
 
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoOrderMapper;
 import com.yeshi.fanli.entity.admin.ReslutOrder;
+import com.yeshi.fanli.entity.bus.user.HongBaoV2;
 import com.yeshi.fanli.entity.taobao.TaoBaoOrder;
 import com.yeshi.fanli.service.inter.taobao.TaoBaoOrderService;
 import com.yeshi.fanli.util.Constant;
 import com.yeshi.fanli.util.RedisManager;
 import com.yeshi.fanli.util.StringUtil;
 import com.yeshi.fanli.util.taobao.TaoBaoOrderUtil;
+import com.yeshi.fanli.vo.order.TaoBaoOrderVO;
 
 @Service
 public class TaoBaoOrderServiceImpl implements TaoBaoOrderService {
@@ -70,10 +73,6 @@
 				taoBaoOrderMapper.insertSelective(taoBaoOrder);
 			}
 		} else {
-			//娴嬭瘯
-			if(1>0)
-				return;
-			
 			boolean hasPayOrder = false;
 			for (TaoBaoOrder order : oldOrderList)
 				if (order.getOrderState().equalsIgnoreCase("璁㈠崟浠樻")) {
@@ -118,4 +117,32 @@
 		return taoBaoOrderMapper.getStateByOrderIdAndPayment(orderId, payment);
 	}
 
+	
+	@Override
+	public List<TaoBaoOrderVO> listQuery(int start, int count, String key, 
+			String startTime, String endTime, Integer state) throws Exception {
+		
+		List<TaoBaoOrderVO> listData = taoBaoOrderMapper.listQuery(start, count, key, startTime, endTime, state);
+		
+		for (TaoBaoOrderVO taoBaoOrderVO : listData) {
+			
+			String orderState = taoBaoOrderVO.getOrderState();
+			if ("璁㈠崟浠樻".equals(orderState)) {
+				taoBaoOrderVO.setOrderState("1");
+			}else if ("璁㈠崟缁撶畻".equals(orderState) || "璁㈠崟鎴愬姛".equals(orderState)) {
+				taoBaoOrderVO.setOrderState("2");
+			} else if ("璁㈠崟澶辨晥".equals(orderState)) {
+				taoBaoOrderVO.setOrderState("3");
+			}
+		}
+		
+		return listData;
+	}
+	
+	@Override
+	public long countQuery(String key, String startTime, String endTime, 
+			Integer state) throws Exception {
+		return taoBaoOrderMapper.countQuery(key, startTime, endTime, state);
+	}
+	
 }

--
Gitblit v1.8.0