From fd9e6797ea4efbed1680287eab16c26f7edeeab4 Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期三, 28 八月 2019 15:42:02 +0800
Subject: [PATCH] 维护信息查询bug
---
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java | 57 +++++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 45 insertions(+), 12 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 82441ef..d17a644 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
@@ -329,7 +329,9 @@
SimpleDateFormat formatday = new SimpleDateFormat("yyyy.MM.dd");
// 鏄惁瀛樺湪濂栧姳鍒�
- boolean hasRewardCoupon = userSystemCouponService.hasRewardCoupon(uid);
+ //boolean hasRewardCoupon = userSystemCouponService.hasRewardCoupon(uid);
+ boolean hasRewardCoupon = userSystemCouponService.getIncludeNotExchange(uid);
+ boolean exchangeCoupon = userSystemCouponService.getIncludeExchange(uid);
// 2019.8.1寮�濮嬭繑鍥炵淮鏉冧俊鎭�
Date august = null;
@@ -548,13 +550,13 @@
} else {
// 濂栧姳璁㈠崟銆佸厤鍗� 浣跨敤璁板綍
if (sourceType == null) {
- setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType, null, signList);
+ setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType, null, signList, acceptData);
} else if (sourceType == Constant.SOURCE_TYPE_TAOBAO) {
- setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType, listRecordTB, signList);
+ setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType, listRecordTB, signList, acceptData);
} else if (sourceType == Constant.SOURCE_TYPE_JD) {
- setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType, listRecordJD, signList);
+ setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType, listRecordJD, signList, acceptData);
} else if (sourceType == Constant.SOURCE_TYPE_PDD) {
- setSystemCouponRecord(order, hasRewardCoupon, hongBaoState, hongBaoType, listRecordPDD, signList);
+ setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType, listRecordPDD, signList, acceptData);
}
}
@@ -576,8 +578,8 @@
* @param list
* @param signList
*/
- public void setSystemCouponRecord(CommonOrderVO order, boolean hasRewardCoupon, Integer hongBaoState,
- Integer hongBaoType, List<UserSystemCouponRecord> list, List<String> signList) {
+ public void setSystemCouponRecord(CommonOrderVO order, boolean hasRewardCoupon, boolean exchangeCoupon, Integer hongBaoState,
+ Integer hongBaoType, List<UserSystemCouponRecord> list, List<String> signList, AcceptData acceptData) {
// 鏄惁鍏嶅崟鍟嗗搧
boolean freeOrder = false;
@@ -597,7 +599,8 @@
signList.add(PIC_REWARD); // 鍔犲叆濂栧姳鎴愬姛鍥剧墖
} else if (CouponTypeEnum.freeCoupon.name().equals(systemCouponType)
- || CouponTypeEnum.welfareFreeCoupon.name().equals(systemCouponType)) {
+ || CouponTypeEnum.welfareFreeCoupon.name().equals(systemCouponType)
+ || CouponTypeEnum.freeCouponBuy.name().equals(systemCouponType)) {
if (UserSystemCouponRecord.STATE_FREE_ON == state) {
// 鍏嶅崟涓�
@@ -623,6 +626,21 @@
// 璁㈠崟鏍囪瘑
order.setSignList(signList);
+ // 1.6.5 鏄惁瀛樺湪鏂板厬鎹㈢殑鍒�
+ if (!hasRewardCoupon && exchangeCoupon) {
+ try {
+ String downTime = order.getDownTime();
+ if (!StringUtil.isNullOrEmpty(downTime)) {
+ long downOrderTime = TimeUtil.convertDateToTemp2(downTime);
+ long limitDate = TimeUtil.convertDateToTemp("2019-09-01");
+ if (downOrderTime > limitDate )
+ hasRewardCoupon = true;
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
boolean rewardOrder = false;
int type = 1; // 1 甯歌璺宠浆椤甸潰 2寮瑰嚭閫夐」锛堝鍔卞埜锛�
@@ -634,7 +652,7 @@
// 鏈夊彲鐢ㄧ殑濂栧姳鍒� 銆侀潪鍏嶅崟璁㈠崟 銆佷笖宸插埌璐︾殑 銆佽繑鍒╄鍗�
type = 2;
rewardOrder = true;
- }
+ }
if (rewardOrder) {
ClientTextStyleVO rewardStyleVO = new ClientTextStyleVO();
@@ -645,6 +663,9 @@
Map<String, Object> jumpLink = new HashMap<String, Object>();
jumpLink.put("orderNo", order.getOrderNo());
+ if (VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) {
+ jumpLink.put("goodsType", order.getSourceType());
+ }
Map<String, Object> jump = new HashMap<String, Object>();
jump.put("type", type);
@@ -667,6 +688,9 @@
Map<String, Object> jumpLink = new HashMap<String, Object>();
jumpLink.put("orderNo", order.getOrderNo());
+ if (VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) {
+ jumpLink.put("goodsType", order.getSourceType());
+ }
Map<String, Object> jump = new HashMap<String, Object>();
jump.put("type", 1); // 椤甸潰璺宠浆
@@ -1165,7 +1189,8 @@
String systemCouponType = couponRecord.getCouponType();
Integer couponState = couponRecord.getState();
if (CouponTypeEnum.freeCoupon.name().equals(systemCouponType)
- || CouponTypeEnum.welfareFreeCoupon.name().equals(systemCouponType)) {
+ || CouponTypeEnum.welfareFreeCoupon.name().equals(systemCouponType)
+ || CouponTypeEnum.freeCouponBuy.name().equals(systemCouponType)) {
if (UserSystemCouponRecord.STATE_SUCCESS == couponState) {
// 鍏嶅崟鎴愬姛
order.setOtherState(2);
@@ -1182,7 +1207,8 @@
String systemCouponType = couponRecord.getCouponType();
Integer couponState = couponRecord.getState();
if (CouponTypeEnum.freeCoupon.name().equals(systemCouponType)
- || CouponTypeEnum.welfareFreeCoupon.name().equals(systemCouponType)) {
+ || CouponTypeEnum.welfareFreeCoupon.name().equals(systemCouponType)
+ || CouponTypeEnum.freeCouponBuy.name().equals(systemCouponType)) {
if (UserSystemCouponRecord.STATE_SUCCESS == couponState) {
// 鍏嶅崟鎴愬姛
order.setOtherState(2);
@@ -1199,7 +1225,8 @@
String systemCouponType = couponRecord.getCouponType();
Integer couponState = couponRecord.getState();
if (CouponTypeEnum.freeCoupon.name().equals(systemCouponType)
- || CouponTypeEnum.welfareFreeCoupon.name().equals(systemCouponType)) {
+ || CouponTypeEnum.welfareFreeCoupon.name().equals(systemCouponType)
+ || CouponTypeEnum.freeCouponBuy.name().equals(systemCouponType)) {
if (UserSystemCouponRecord.STATE_SUCCESS == couponState) {
// 鍏嶅崟鎴愬姛
order.setOtherState(2);
@@ -1402,4 +1429,10 @@
return commonOrderMapper.listBySourceTypeAndStateAndThirdCrateTime(sourceType, state, minTime, maxTime,
(page - 1) * pageSize, pageSize);
}
+
+ @Override
+ public List<CommonOrder> getByOrderNo(Long uid, String orderNO) {
+ return commonOrderMapper.getByOrderNo(uid, orderNO);
+ }
+
}
--
Gitblit v1.8.0