From 544c65fb91e6f9687917c5ce454ccedb70cd5f75 Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Wed, 29 Jul 2026 11:19:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E7=A0=81=E5=8D=A1=E7=89=87=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=AE=BE=E8=AE=A1=E8=B4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/lingtao/net/service/ProductService.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index 0b00d86..6ee37f8 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -2924,13 +2924,13 @@ public class ProductService { * 婚礼卡设计费成品尺寸90X54MM以内每款收10元 140X100MM以内每款收15元 210X140MM以内30元 210X285MM以内40元 420X285MM以内60元 大于420X285MM80元 */ // 设计费不带出血的尺寸 - if ((length - 4 <= 90 && width - 4 <= 54) || (length - 4 <= 54 && width - 4 <= 90)) { + /*if ((length - 4 <= 90 && width - 4 <= 54) || (length - 4 <= 54 && width - 4 <= 90)) { designFee = 8; designFee9 = 10; - } /*else if ((length - 4 <= 140 && width - 4 <= 100) || (length - 4 <= 100 && width - 4 <= 140)) { + } else if ((length - 4 <= 140 && width - 4 <= 100) || (length - 4 <= 100 && width - 4 <= 140)) { designFee = 16; designFee9 = 15; - }*/ else if ((length - 4 <= 210 && width - 4 <= 140) || (length - 4 <= 140 && width - 4 <= 210)) { + } else if ((length - 4 <= 210 && width - 4 <= 140) || (length - 4 <= 140 && width - 4 <= 210)) { designFee = 10; designFee9 = 15; } else if ((length - 4 <= 285 && width - 4 - 4 <= 210) || (length - 4 <= 210 && width - 4 <= 285)) { @@ -2942,7 +2942,8 @@ public class ProductService { } else { designFee = 45; designFee9 = 80; - } + }*/ + designFee = 20; if ("腰封".equals(dto.getKind())) { zhang = 8; } @@ -5290,6 +5291,7 @@ public class ProductService { int number = dto.getNumber(); double area = width * length; double price = 0; + double mini_price = 100; int[] counts = {1, 5, 10, 20, 30, 50, 100, 200}; double[] areas = {16, 25, 36, 49, 64, 100, 225, 400, 625, 900}; @@ -5326,14 +5328,14 @@ public class ProductService { Product pro = new Product(); pro.setCount(itemCount); pro.setNumber(dto.getNumber()); - pro.setPrice(Math.ceil(itemCount * base_price * number)); + pro.setPrice(Math.ceil(Math.max(itemCount * base_price, mini_price) * number)); priceList.add(pro); } if (priceList.size() == 0) { Product pro = new Product(); pro.setCount(count); pro.setNumber(number); - pro.setPrice(Math.ceil(prices[area_index][prices[area_index].length - 1] * count * number)); + pro.setPrice(Math.ceil(Math.max(mini_price, prices[area_index][prices[area_index].length - 1] * count) * number)); priceList.add(pro); } return priceList;