From 9acf504c9099fd02711d22ccd46879c8ccbc347d Mon Sep 17 00:00:00 2001 From: zhuyiyi <649091362@qq.com> Date: Wed, 1 Jul 2026 08:33:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=92=A5=E5=8C=99=E6=89=A3?= =?UTF-8?q?=E4=BB=B7=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/lingtao/net/service/PriceService.java | 7 +++++-- src/main/java/lingtao/net/service/ProductService.java | 4 ++-- src/main/webapp/views/product/keychain.jsp | 4 ++-- src/main/webapp/views/product/stickers.jsp | 1 + 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/lingtao/net/service/PriceService.java b/src/main/java/lingtao/net/service/PriceService.java index 4385617..083cc84 100644 --- a/src/main/java/lingtao/net/service/PriceService.java +++ b/src/main/java/lingtao/net/service/PriceService.java @@ -618,6 +618,9 @@ public class PriceService { if ("加厚铜版纸不干胶".equals(product.getKind())) { basePrice = 2; } + if ("铜板可移不干胶".equals(product.getKind())) { + basePrice = 2; + } if ("牛皮纸".equals(product.getKind())) { basePrice = 1.8; } @@ -634,7 +637,7 @@ public class PriceService { basePrice = 3.5; } - List base_2 = Arrays.asList("艾丽铜板不干胶", "特光不干胶", "铜板可移不干胶", "大红洒金", "白布纹纸"); + List base_2 = Arrays.asList("艾丽铜板不干胶", "特光不干胶", "大红洒金", "白布纹纸"); if (base_2.contains(product.getKind())) { basePrice = 2.5; } @@ -726,7 +729,7 @@ public class PriceService { double basePrice = PriceUtils.TableCountDoublePrice(requiredSheets, basePrices, counts); - BigDecimal price = new BigDecimal(basePrice).multiply(new BigDecimal(requiredSheets)).setScale(2, RoundingMode.HALF_UP); + BigDecimal price = new BigDecimal(basePrice / requiredSheets).multiply(new BigDecimal(requiredSheets)).setScale(2, RoundingMode.HALF_UP); ProductVo pro = new ProductVo(); pro.setPrice(price.doubleValue()); diff --git a/src/main/java/lingtao/net/service/ProductService.java b/src/main/java/lingtao/net/service/ProductService.java index 9feeade..8248132 100644 --- a/src/main/java/lingtao/net/service/ProductService.java +++ b/src/main/java/lingtao/net/service/ProductService.java @@ -4509,7 +4509,7 @@ public class ProductService { double min_price = 35; if (width * length / 10000 < 0.001) { double basePrice = 1; - price = basePrice * count * dto.getNumber(); + price = Math.max(min_price, basePrice * count * dto.getNumber() + 8 * dto.getNumber()); } else { double area = width * length / 10000 * count * dto.getNumber(); double[] areas = {0, 0.1, 0.15, 0.2, 0.3, 0.4, 0.5, 1, 2, 3, 5, 7, 9, 10, 20, 50}; @@ -6407,7 +6407,7 @@ public class ProductService { if ("4.2".equals(cailiao)) { basePrice = 1.5; } - price = basePrice * count * dto.getNumber(); + price = Math.max(basePrice * count * dto.getNumber() + 8 * dto.getNumber(), min_price); } else { double[] areas = {0, 0.1, 0.15, 0.2, 0.3, 0.4, 0.5, 1, 2, 3, 5, 7, 9, 10, 20, 50}; diff --git a/src/main/webapp/views/product/keychain.jsp b/src/main/webapp/views/product/keychain.jsp index 59b1673..7e2fe2a 100644 --- a/src/main/webapp/views/product/keychain.jsp +++ b/src/main/webapp/views/product/keychain.jsp @@ -245,8 +245,8 @@ }); return false; } - if ((size.split("*")[0] > 12 || size.split("*")[1] > 12)) { - layer.msg("最小尺寸不能小于12*12", {offset: ['300px', '300px']}, function () { + if ((size.split("*")[0] > 120 || size.split("*")[1] > 120)) { + layer.msg("最小尺寸不能超过120*120", {offset: ['300px', '300px']}, function () { }); return false; } diff --git a/src/main/webapp/views/product/stickers.jsp b/src/main/webapp/views/product/stickers.jsp index b96c1ca..1d851c7 100644 --- a/src/main/webapp/views/product/stickers.jsp +++ b/src/main/webapp/views/product/stickers.jsp @@ -2010,6 +2010,7 @@ }) if (padCraft) { span_result += "\n\n亲亲 当天15点之前定稿 可以当天发货哦!" + span_result += "\n\n亲亲 当天下单立享9折优惠 加购其他产品可享85折优惠" } } addLog(span_result);