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/merchant/ManualConsumptionService.java | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/talent-card-server/src/main/java/com/talentcard/server/business/merchant/ManualConsumptionService.java b/talent-card-server/src/main/java/com/talentcard/server/business/merchant/ManualConsumptionService.java
index e8b609a..52542cf 100644
--- a/talent-card-server/src/main/java/com/talentcard/server/business/merchant/ManualConsumptionService.java
+++ b/talent-card-server/src/main/java/com/talentcard/server/business/merchant/ManualConsumptionService.java
@@ -68,16 +68,13 @@
return createdOrder(existingOrderId);
}
ensurePending(source);
- if (expired(source.get("expiresAt"))) {
- throw new BusinessException(ErrorCode.CONFLICT, "人才码已失效,请重新扫码");
- }
- Map<String, Object> rule = rule(principal.merchantId(), string(source.get("cardLevel")), request.ruleId());
+ Map<String, Object> rule = rule(principal.merchantId(), string(source.get("cardLevel")), request.ruleId());
Map<String, Object> coupon = usableCoupon(principal.merchantId(), number(source.get("talentId")), string(source.get("cardLevel")), request.couponId(), discountedAmount(rule, request.amount()));
Map<String, Object> amounts = quote(rule, coupon, request.amount());
Long dynamicCodeId = number(source.get("dynamicCodeId"));
int codeUpdated = jdbc.update("""
update talent_dynamic_code set status = 1, merchant_id = ?, used_at = now()
- where id = ? and status = 0 and expires_at > now()
+ where id = ? and status = 0
""", principal.merchantId(), dynamicCodeId);
if (codeUpdated == 0) {
throw new BusinessException(ErrorCode.CONFLICT, "人才码已被使用或已失效");
@@ -128,10 +125,7 @@
if (number(source.get("attemptStatus")) != ATTEMPT_PENDING) {
throw new BusinessException(ErrorCode.CONFLICT, "该人才码已处理,请重新扫码");
}
- if (expired(source.get("expiresAt"))) {
- throw new BusinessException(ErrorCode.CONFLICT, "人才码已失效,请重新扫码");
- }
- }
+ }
private List<Map<String, Object>> rules(Long merchantId, String cardLevel) {
List<Map<String, Object>> configured = configuredRules(merchantId, cardLevel);
@@ -336,6 +330,10 @@
.map(benefit -> string(benefit.get("benefitText"))).findFirst().orElse("以当前商户到店消费规则为准");
}
+ String benefitTextForMerchant(Long merchantId, String cardLevel) {
+ return benefitText(merchantId, cardLevel);
+ }
+
private boolean matchesCardLevel(String configured, String actual) {
return normalizedCardLevel(configured).equals(normalizedCardLevel(actual));
}
--
Gitblit v1.7.1