From 9218055d64d515d83312f15d7bbe0fa5bd22eee5 Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Sat, 18 Jul 2026 17:11:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A7=8D=E5=AD=90=E7=BA=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lingtao/net/service/ProductService.java | 27 ++++++++-- src/main/webapp/views/product/coupon.jsp | 49 ++++++++++++------- src/main/webapp/views/product/keychain.jsp | 8 +-- 3 files changed, 58 insertions(+), 26 deletions(-) diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index 7aa20a1..9883ff9 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -2791,7 +2791,7 @@ public class ProductService { price += Math.ceil(Math.max(count * 0.3 * number, 5)); } } else { - + double maxPrice = 50; if (count <= 50) { unitPrice = 140; } else if (count > 50 && count <= 100) { @@ -2807,7 +2807,7 @@ public class ProductService { } else { unitPrice = 90; } - if ("4".equals(dto.getZ3type())) { + if ("4".equals(dto.getZ3type()) && "400".equals(dto.getKindLabel())) { if (count <= 50) { unitPrice = 160; } else if (count > 50 && count <= 100) { @@ -2824,7 +2824,25 @@ public class ProductService { unitPrice = 130; } } - price = Math.ceil((length * width * count * unitPrice) / 10000);//价格计算尺寸*数量*200/10000 + if ("4".equals(dto.getZ3type()) && "1000".equals(dto.getKindLabel())) { + if (count <= 50) { + unitPrice = 400; + } else if (count > 50 && count <= 100) { + unitPrice = 380; + } else if (count > 100 && count <= 200) { + unitPrice = 360; + } else if (count > 200 && count <= 500) { + unitPrice = 340; + } else if (count > 500 && count <= 1000) { + unitPrice = 300; + } else if (count > 1000 && count <= 2000) { + unitPrice = 280; + } else { + unitPrice = 260; + } + maxPrice = 60; + } + price = Math.max(Math.ceil((length * width * count * unitPrice) / 10000), maxPrice);//价格计算尺寸*数量*200/10000 if (!StringUtils.isEmpty(crafts) && Arrays.asList(crafts).contains("编码")) {//起步价10 price += Math.max(count * 0.5, 10); @@ -2856,6 +2874,9 @@ public class ProductService { if (craft_list.size() > 0 && craft_list.contains("棉绳")) { price += Math.max(Math.ceil(0.1 * number * count), 5); } + if ("4".equals(dto.getZ3type()) && craft_list.size() > 0 && craft_list.contains("挂绳")) { + price += Math.max(Math.ceil(0.6 * number * count), 5); + } } Product dto2 = new Product(); diff --git a/src/main/webapp/views/product/coupon.jsp b/src/main/webapp/views/product/coupon.jsp index 03df172..6d6cf08 100644 --- a/src/main/webapp/views/product/coupon.jsp +++ b/src/main/webapp/views/product/coupon.jsp @@ -169,13 +169,13 @@ - +<%-- --%>
材质