Browse Source

chore: auto bump version and changelog [skip ci]

iwt 2 weeks ago
parent
commit
d3fdba62a1

+ 8 - 25
cfc-backend/src/main/java/com/etotem/cfc/service/PointsExchangeService.java

@@ -122,27 +122,15 @@ public class PointsExchangeService {
         }
 
         int totalCost = product.getPointsPrice() * quantity;
-        int minPoints = 100;
-        try {
-            String minStr = sysConfigService.getValue("exchange_points_min");
-            if (minStr != null && !minStr.isEmpty()) {
-                minPoints = Integer.parseInt(minStr);
-            }
-        } catch (Exception e) {
-            minPoints = 100;
-        }
+        int minPoints = configService.getIntConfig(CfConfigKeys.SPEND_EXCHANGE_MIN_POINTS, 100);
         if (totalCost < minPoints) {
             throw new RuntimeException("兑换积分不得低于最低限制");
         }
 
-        int deductResult = pointsService.deductCfPoints(targetFamilyMemberId, totalCost,
-            "积分兑换商品: " + product.getName());
-        if (deductResult < 0) {
-            throw new RuntimeException("积分不足");
-        }
-
         String redeemCode = UUID.randomUUID().toString().replace("-", "").substring(0, 12).toUpperCase();
 
+        // F-5:先落兑换记录(以记录 ID 作为扣减幂等 refId),再扣统一账本 cf_balance;
+        // 扣减失败(余额不足)抛业务异常并由 @Transactional 回滚记录
         PointsExchangeRecord record = new PointsExchangeRecord();
         record.setUserId(userId);
         record.setFamilyMemberId(targetFamilyMemberId);
@@ -161,6 +149,9 @@ public class PointsExchangeService {
         record.setUpdatedAt(new Date());
         pointsExchangeRecordMapper.insert(record);
 
+        cfSpendDispatchService.spendForMember(targetFamilyMemberId, totalCost, "exchange_product",
+                record.getId(), "积分兑换商品: " + product.getName());
+
         if (product.getStock() != null && product.getStock() >= 0) {
             product.setStock(product.getStock() - quantity);
             pointsExchangeProductMapper.updateById(product);
@@ -206,16 +197,8 @@ public class PointsExchangeService {
             throw new RuntimeException("未找到关联的家庭成员信息");
         }
 
-        // 全局日限次(复用 exchange_daily_limit)
-        int dailyLimit = 5;
-        try {
-            String limitStr = sysConfigService.getValue("exchange_daily_limit");
-            if (limitStr != null && !limitStr.isEmpty()) {
-                dailyLimit = Integer.parseInt(limitStr);
-            }
-        } catch (Exception e) {
-            dailyLimit = 5;
-        }
+        // 个人级日限次(L2:cf.spend.exchange.daily_limit,默认5)
+        int dailyLimit = configService.getIntConfig(CfConfigKeys.SPEND_EXCHANGE_DAILY_LIMIT, 5);
         Calendar cal = Calendar.getInstance();
         cal.set(Calendar.HOUR_OF_DAY, 0);
         cal.set(Calendar.MINUTE, 0);

+ 1 - 1
cfc-web/.last_build_commit

@@ -1 +1 @@
-29887b33b393c83067a14688607139e2fe3efeb9
+5a2a67f4a84f0957399ad24e5d5a9fe1ceb8e39d

+ 2 - 2
cfc-web/package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "cfc-web",
-  "version": "1.0.1788",
+  "version": "1.0.1789",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "cfc-web",
-      "version": "1.0.1788",
+      "version": "1.0.1789",
       "dependencies": {
         "@wangeditor/editor": "^5.1.23",
         "@wangeditor/editor-for-vue": "^1.0.2",

+ 1 - 1
cfc-web/package.json

@@ -1,6 +1,6 @@
 {
   "name": "cfc-web",
-  "version": "1.0.1789",
+  "version": "1.0.1790",
   "private": true,
   "scripts": {
     "dev": "vue-cli-service serve",

+ 16 - 0
cfc-web/public/CHANGELOG-v1.0.md

@@ -4,6 +4,22 @@
 
 ---
 
+## v1.0.1790 (2026-10-25)
+
+### Bug 修复
+- 修复编辑回显并保存时自动绑定标签维度
+- 修复商品编辑页无法滚动到底(style 块损坏)
+
+### 其他
+- 选择器一并删除,导致约 230 行布局 CSS(含 .product-edit-form-wrap
+- 滚动容器 overflow-y:auto)脱离 style 块成为孤儿文本,Vue 编译器忽略,
+- 编辑表单区无法滚动。
+- 补回 <style scoped>(工具类块)+ <style scoped>.product-edit {(布局块)
+- 两处开头标签,逐出完整滚动容器规则。全仓库 181 个 .vue 扫描确认仅
+- 此一文件受损;构建产物验证 .product-edit-form-wrap 已回归。
+- 
+
+
 ## v1.0.1789 (2026-10-25)
 
 ### 新功能

+ 17 - 1
cfc-web/public/CHANGELOG.md

@@ -1,6 +1,6 @@
 # 更新日志
 
-> 当前版本: v1.0.1789
+> 当前版本: v1.0.1790
 
 ## 历史版本
 
@@ -8,6 +8,22 @@
 
 ---
 
+## v1.0.1790 (2026-10-25)
+
+### Bug 修复
+- 修复编辑回显并保存时自动绑定标签维度
+- 修复商品编辑页无法滚动到底(style 块损坏)
+
+### 其他
+- 选择器一并删除,导致约 230 行布局 CSS(含 .product-edit-form-wrap
+- 滚动容器 overflow-y:auto)脱离 style 块成为孤儿文本,Vue 编译器忽略,
+- 编辑表单区无法滚动。
+- 补回 <style scoped>(工具类块)+ <style scoped>.product-edit {(布局块)
+- 两处开头标签,逐出完整滚动容器规则。全仓库 181 个 .vue 扫描确认仅
+- 此一文件受损;构建产物验证 .product-edit-form-wrap 已回归。
+- 
+
+
 ## v1.0.1789 (2026-10-25)
 
 ### 新功能