From bc9d4bf3fddcb3107f8509159a250f7a5a5f8ae5 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 11 六月 2021 17:13:01 +0800
Subject: [PATCH] 特价bug修复

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java |   20 +++++++++++++++++++-
 1 files changed, 19 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 84efc51..8f6c41d 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
@@ -368,6 +368,8 @@
                     CommonOrderGoodsVO commonGoodsVO = new CommonOrderGoodsVO();
                     PropertyUtils.copyProperties(commonGoodsVO, goods);
                     commonGoodsVO.setGoodsType(sourceType);
+                    commonGoodsVO.setPlaceOrderTime(TimeUtil.getGernalTime(order.getThirdCreateTime().getTime(),"yyyy.MM.dd HH:mm"));
+
 
                     // 娣樺疂鍟嗗搧鍥剧墖澶勭悊
                     String picture = commonGoodsVO.getPicture();
@@ -384,6 +386,11 @@
                     if (totalSettlement == null || totalSettlement.compareTo(new BigDecimal(0)) <= 0) {
                         totalSettlement = commonOrder.getTotalPayment();
                     }
+                    if (totalSettlement== null || totalSettlement.compareTo(new BigDecimal(0)) <= 0)
+                        commonGoodsVO.setPayState("鏈粯娆�/宸查��娆�");
+                    else
+                        commonGoodsVO.setPayState("宸蹭粯娆�");
+
                     commonGoodsVO.setActualPay("浠樻閲戦锛毬�" + totalSettlement);
 
                     // 閭�璇疯鍗曚俊鎭繚鎶�
@@ -1376,7 +1383,7 @@
                     && oldCommonOrder.getSourceType() != Constant.SOURCE_TYPE_JD)
                     || oldCommonOrder.getState() == CommonOrder.STATE_SX
                     || oldCommonOrder.getState() == CommonOrder.STATE_WQ
-                    || (oldCommonOrder.getState().intValue() == commonOrder.getState())) {
+                    || (oldCommonOrder.getState().intValue() == commonOrder.getState()&&oldCommonOrder.getPayment().compareTo(commonOrder.getPayment())==0)) {
                 return new CommonOrderAddResultDTO(oldCommonOrder, CommonOrderAddResultDTO.TYPE_NOUPDATE);
             }
             // 浜ゆ槗ID涓�鑷存墠淇敼
@@ -1745,6 +1752,7 @@
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
+                commonGoodsVO.setPlaceOrderTime(TimeUtil.getGernalTime(commonOrder.getThirdCreateTime().getTime(),"yyyy.MM.dd HH:mm"));
 
                 String picture = commonGoodsVO.getPicture();
                 if (!StringUtil.isNullOrEmpty(picture) && !picture.contains("320x320")) {
@@ -1771,6 +1779,10 @@
                 if (totalSettlement == null || totalSettlement.compareTo(new BigDecimal(0)) <= 0) {
                     totalSettlement = commonOrder.getTotalPayment();
                 }
+                if (totalSettlement== null || totalSettlement.compareTo(new BigDecimal(0)) <= 0)
+                    commonGoodsVO.setPayState("鏈粯娆�/宸查��娆�");
+                else
+                    commonGoodsVO.setPayState("宸蹭粯娆�");
                 // 瀹炰粯娆�
                 commonGoodsVO.setActualPay("浠樻閲戦锛毬�" + totalSettlement);
 
@@ -2110,6 +2122,7 @@
                     if (commonGoodsVO.getGoodsType() == null) {
                         commonGoodsVO.setGoodsType(sourceType);
                     }
+                    commonGoodsVO.setPlaceOrderTime(TimeUtil.getGernalTime(order.getThirdCreateTime().getTime(),"yyyy.MM.dd HH:mm"));
 
                     // 娣樺疂鍟嗗搧鍥剧墖澶勭悊
                     String picture = commonGoodsVO.getPicture();
@@ -2126,6 +2139,11 @@
                     if (totalSettlement == null || totalSettlement.compareTo(new BigDecimal(0)) <= 0) {
                         totalSettlement = commonOrder.getTotalPayment();
                     }
+                    if (totalSettlement== null || totalSettlement.compareTo(new BigDecimal(0)) <= 0)
+                        commonGoodsVO.setPayState("鏈粯娆�/宸查��娆�");
+                    else
+                        commonGoodsVO.setPayState("宸蹭粯娆�");
+
                     commonGoodsVO.setActualPay("浠樻閲戦锛毬�" + totalSettlement);
 
                     // 閭�璇疯鍗曚俊鎭繚鎶�

--
Gitblit v1.8.0