From 64fa40bb05e09c55617a581e006cd0d25c6fc986 Mon Sep 17 00:00:00 2001
From: yujian <yujian>
Date: 星期五, 11 一月 2019 12:30:28 +0800
Subject: [PATCH] 网页推送、站内信推送时  PushRecord写入推送时间

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java |   70 ++++++++++++++++++++++++++++++++++
 1 files changed, 69 insertions(+), 1 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
index ec1d2b1..44c7a85 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -13,6 +13,7 @@
 import org.apache.commons.beanutils.PropertyUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.yeshi.utils.taobao.TbImgUtil;
 
 import com.yeshi.fanli.dao.mybatis.order.CommonOrderGoodsMapper;
 import com.yeshi.fanli.dao.mybatis.order.CommonOrderMapper;
@@ -29,6 +30,7 @@
 import com.yeshi.fanli.service.inter.order.CommonOrderService;
 import com.yeshi.fanli.util.Constant;
 import com.yeshi.fanli.util.MoneyBigDecimalUtil;
+import com.yeshi.fanli.util.StringUtil;
 import com.yeshi.fanli.util.factory.CommonOrderGoodsFactory;
 import com.yeshi.fanli.util.taobao.TaoBaoOrderUtil;
 import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
@@ -169,6 +171,11 @@
 						e.printStackTrace();
 					}
 
+					String picture = commonGoodsVO.getPicture();
+					if (!StringUtil.isNullOrEmpty(picture) && !picture.contains("320x320")) {
+						commonGoodsVO.setPicture(TbImgUtil.getTBSize320Img(picture));
+					}
+					
 					Integer hongBaoType = order.getHongBaoType();
 					// 閭�璇疯鍗曚俊鎭繚鎶�
 					if (HongBaoV2.TYPE_YAOQING == hongBaoType || HongBaoV2.TYPE_YIJI == hongBaoType
@@ -448,7 +455,68 @@
 
 	@Override
 	public long countByUidAndOrderStateWithOrderBalanceTime(Long uid, int state, Date minDate, Date maxDate) {
-
 		return commonOrderMapper.countByUidAndOrderStateWithOrderBalanceTime(uid, state, minDate, maxDate);
 	}
+	
+	
+	@Override
+	public List<CommonOrderVO> listQueryByUid(long start, int count, Long uid, Integer state, Integer type,
+			Integer orderState, String orderNo, String startTime, String endTime, Integer dateType)
+			throws CommonOrderException {
+		
+			
+		List<CommonOrderVO> list = commonOrderMapper.listQueryByUid(start, count, uid, state, type, 
+				orderState, orderNo, startTime, endTime, dateType);
+		
+		if (list == null) {
+			list = new ArrayList<CommonOrderVO>();
+		}
+		
+		if (list.size() == 0) {
+			return list;
+		}
+
+		for (CommonOrderVO order : list) {
+
+			/* 璁㈠崟杩斿埄绫诲瀷 杞崲 */
+			Integer hongBaoType = order.getHongBaoType();
+			if (HongBaoV2.TYPE_ZIGOU == hongBaoType || 2 == hongBaoType) {
+				// 鑷喘
+				order.setHongBaoType(1);
+			} else if (HongBaoV2.TYPE_SHARE_GOODS == hongBaoType) {
+				// 鍒嗕韩
+				order.setHongBaoType(2);
+			} else if (HongBaoV2.TYPE_YAOQING == hongBaoType || HongBaoV2.TYPE_YIJI == hongBaoType
+					|| HongBaoV2.TYPE_ERJI == hongBaoType || HongBaoV2.TYPE_SHARE_YIJI == hongBaoType
+					|| HongBaoV2.TYPE_SHARE_ERJI == hongBaoType) {
+				// 閭�璇�
+				order.setHongBaoType(3);
+			}
+
+			Integer hongBaoState = order.getHongBaoState();
+			if (HongBaoV2.STATE_KELINGQU == hongBaoState || HongBaoV2.STATE_BUKELINGQU == hongBaoState) {
+				// 鏈埌璐�
+				order.setHongBaoState(1);
+
+			} else if (HongBaoV2.STATE_YILINGQU == hongBaoState) {
+				// 宸插埌璐�
+				order.setHongBaoState(2);
+
+			} else if (HongBaoV2.STATE_SHIXIAO == hongBaoState) {
+				// 宸插け鏁�
+				order.setHongBaoState(3);
+			}
+		}
+		
+		return list;
+			
+	}
+
+	@Override
+	public long countQueryByUid(Long uid, Integer state, Integer type, Integer orderState, String orderNo,
+			String startTime, String endTime, Integer dateType) throws CommonOrderException {
+		return commonOrderMapper.countQueryByUid(uid, state, type, orderState, orderNo, startTime, endTime, dateType);
+	}
+	
+	
 }

--
Gitblit v1.8.0