From 96a415a0de73542ddb5da7eaa61e4d7e55065ae3 Mon Sep 17 00:00:00 2001
From: yujian <yujian>
Date: 星期六, 12 一月 2019 15:30:55 +0800
Subject: [PATCH] Merge branch 'div1'

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoOrderServiceImpl.java |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 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 92891ba..1d2243d 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 {
@@ -114,4 +117,52 @@
 		return taoBaoOrderMapper.getStateByOrderIdAndPayment(orderId, payment);
 	}
 
+	
+	@Override
+	public List<TaoBaoOrderVO> listQuery(int start, int count,Integer keyType, String key, 
+			String startTime, String endTime, Integer state) throws Exception {
+		
+		List<TaoBaoOrderVO> listData = taoBaoOrderMapper.listQuery(start, count, keyType, 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");
+			}
+		
+			/* 鍒拌处鐘舵�� */
+			String moneyState = taoBaoOrderVO.getUserMoneyState();
+			if ((HongBaoV2.STATE_BUKELINGQU+"").equals(moneyState) 
+					|| (HongBaoV2.STATE_KELINGQU+"").equals(moneyState)) {
+				taoBaoOrderVO.setUserMoneyState("1"); // 鏈埌璐�
+			} else if ((HongBaoV2.STATE_YILINGQU + "").equals(moneyState)) {
+				taoBaoOrderVO.setUserMoneyState("2"); // 宸插埌璐�
+			} else {
+				taoBaoOrderVO.setUserMoneyState("3"); // 宸插け鏁�
+			}
+			
+			String userHongBaoType = taoBaoOrderVO.getUserHongBaoType();
+			if ((HongBaoV2.TYPE_ZIGOU+"").equals(userHongBaoType)) {
+				taoBaoOrderVO.setUserHongBaoType("1"); // 鑷喘
+			} else if ((HongBaoV2.TYPE_SHARE_GOODS + "").equals(userHongBaoType)) {
+				taoBaoOrderVO.setUserHongBaoType("2"); // 鍒嗕韩
+			} else {
+				taoBaoOrderVO.setUserHongBaoType("3"); // 閭�璇�
+			}
+		}
+		
+		return listData;
+	}
+	
+	@Override
+	public long countQuery(Integer keyType, String key, String startTime, String endTime, 
+			Integer state) throws Exception {
+		return taoBaoOrderMapper.countQuery(keyType, key, startTime, endTime, state);
+	}
+	
 }

--
Gitblit v1.8.0