Browse Source

联合丽格

huangzhiguo 2 years ago
parent
commit
709f5ff7f7

+ 15 - 3
src/main/java/com/caimei365/order/components/OrderCommonService.java

@@ -141,15 +141,27 @@ public class OrderCommonService {
         });
         // 拼接运费信息--联合丽格
         if (null != order.getColdChina()) {
+            String open = "";
+            String close = "";
+            if (order.getIsColdChina()==1) {
+                open = "(";
+                close = ")";
+            } else if (!arrList.stream().allMatch(c -> c == 1)) {
+                open = "(";
+                close = ")";
+            } else {
+                open = "";
+                close = "";
+            }
             if (-1 == order.getPostageFlag()) {
                 // 到付
-                order.setPostageInfo("¥" + order.getPostage().doubleValue() + "("+(order.getIsColdChina()==1?"冷链费: ¥" + order.getColdChina().doubleValue():"") + (arrList.stream().allMatch(c -> c == 1)?")":" 其他: 到付)"));
+                order.setPostageInfo("¥" + order.getPostage().doubleValue() + open +(order.getIsColdChina()==1?"冷链费: ¥" + order.getColdChina().doubleValue():"") + (arrList.stream().allMatch(c -> c == 1)?"":" 其他: 到付")+close);
             } else if (0 == order.getPostageFlag()) {
                 // 包邮
-                order.setPostageInfo("¥" + order.getPostage().doubleValue() + "("+(order.getIsColdChina()==1?"冷链费: ¥" + order.getColdChina().doubleValue():"") + (arrList.stream().allMatch(c -> c == 1)?")":" 其他: 包邮)"));
+                order.setPostageInfo("¥" + order.getPostage().doubleValue() + open +(order.getIsColdChina()==1?"冷链费: ¥" + order.getColdChina().doubleValue():"") + (arrList.stream().allMatch(c -> c == 1)?"":" 其他: 包邮")+close);
             } else {
                 // 有运费
-                order.setPostageInfo("¥" + order.getPostage().doubleValue() + "("+(order.getIsColdChina()==1?"冷链费: ¥" + order.getColdChina().doubleValue():"") + (!arrList.stream().allMatch(c -> c == 1)?" 其他: ¥" + MathUtil.sub(order.getPostage(), order.getColdChina()).doubleValue():")") + ")");
+                order.setPostageInfo("¥" + order.getPostage().doubleValue() + open +(order.getIsColdChina()==1?"冷链费: ¥" + order.getColdChina().doubleValue():"") + (!arrList.stream().allMatch(c -> c == 1)?" 其他: ¥" + MathUtil.sub(order.getPostage(), order.getColdChina()).doubleValue():"") + close);
             }
         } else {
             order.setPostageInfo(order.getPostage().doubleValue() == -1?"到付":order.getPostageFlag() == 0?"包邮":"¥" + order.getPostage().doubleValue());

+ 2 - 2
src/main/java/com/caimei365/order/service/impl/CartClubServiceImpl.java

@@ -1304,7 +1304,7 @@ public class CartClubServiceImpl implements CartClubService {
             if (null != totalProductList) {
                 for (CartItemVo cart :totalProductList) {
                     if (7881 == cart.getProductId()) {
-                        if (cart.getNumber() >= 100) {
+                        if (cart.getNumber() >= 10) {
                             coldChain = 0.00d;
                         } else {
                             coldChain = 700.00d;
@@ -1999,7 +1999,7 @@ public class CartClubServiceImpl implements CartClubService {
         if (0 != organizeId) {
             double coldChain = 0.00d;
             if (7881 == cartDto.getProductId()) {
-                if (cartDto.getProductCount() >= 100) {
+                if (cartDto.getProductCount() >= 10) {
                     coldChain = 0.00d;
                 } else {
                     coldChain = 700.00d;

+ 1 - 1
src/main/java/com/caimei365/order/service/impl/SubmitServiceImpl.java

@@ -564,7 +564,7 @@ public class SubmitServiceImpl implements SubmitService {
                 // 联合丽格冷链费商品
                 if (1 == orderParamBo.getIsColdChain()) {
                     if (7881 == product.getProductId()) {
-                        if (productNum >= 100) {
+                        if (productNum >= 10) {
                             isColdChina.set(0.00d);
                         } else {
                             isColdChina.set(700.00d);