From f40c2939c6f784fc6721554794154a336d12bc3a Mon Sep 17 00:00:00 2001
From: shinnosuke <tantao@1hoper.com>
Date: 星期三, 12 八月 2026 09:23:49 +0800
Subject: [PATCH] fix(ui): 移除返回图标旋转样式并优化商户页面功能
---
talent-card-server/src/main/java/com/talentcard/server/business/portal/ProductPriceCalculator.java | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/talent-card-server/src/main/java/com/talentcard/server/business/portal/ProductPriceCalculator.java b/talent-card-server/src/main/java/com/talentcard/server/business/portal/ProductPriceCalculator.java
index 0efd910..c058a80 100644
--- a/talent-card-server/src/main/java/com/talentcard/server/business/portal/ProductPriceCalculator.java
+++ b/talent-card-server/src/main/java/com/talentcard/server/business/portal/ProductPriceCalculator.java
@@ -9,7 +9,7 @@
import tools.jackson.core.type.TypeReference;
import tools.jackson.databind.ObjectMapper;
-final class ProductPriceCalculator {
+public final class ProductPriceCalculator {
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
private static final TypeReference<List<Map<String, Object>>> RIGHTS_TYPE = new TypeReference<>() {};
@@ -45,13 +45,15 @@
return new ProductPrice(original, calculatedSale.setScale(2, RoundingMode.HALF_UP), right != null);
}
- static ProductRight productRight(Object rightsConfig, Object cardLevel) {
+ public static ProductRight productRight(Object rightsConfig, Object cardLevel) {
Map<String, Object> right = matchingRight(rightsConfig, cardLevel);
if (right == null) return null;
+ boolean free = booleanValue(right.get("free"));
return new ProductRight(
- booleanValue(right.get("free")),
+ free,
intValue(right.get("limitCount")),
- text(right.get("resetCycle")));
+ text(right.get("resetCycle")),
+ discountValue(right.get(free ? "exceedDiscount" : "discount")));
}
private static Map<String, Object> matchingRight(Object rightsConfig, Object cardLevel) {
@@ -133,6 +135,6 @@
record ProductPrice(BigDecimal originalPrice, BigDecimal salePrice, boolean personalized) {
}
- record ProductRight(boolean free, int limitCount, String resetCycle) {
+ public record ProductRight(boolean free, int limitCount, String resetCycle, BigDecimal discount) {
}
}
--
Gitblit v1.7.1