fix: 修复商品图片管理和缓存一致性问题

- 重构 ImageUpload 组件,使用 rawUrl 跟踪原始路径
- 新增 normalizeStorageImageUrl 避免存储绝对 URL
- 商品增删改后同步清除缓存和旧图片文件
- 修复秒杀活动列表商品图片为空的问题
This commit is contained in:
2026-03-14 21:05:42 +08:00
parent 0f67f6cc49
commit 098ea9ad02
10 changed files with 193 additions and 39 deletions

View File

@@ -93,7 +93,7 @@ public class ApiController {
item.put("id", flashSale.getId());
item.put("productId", flashSale.getProductId());
item.put("productName", flashSale.getProductName());
item.put("productImage", "");
item.put("productImage", flashSale.getProductImageUrl());
item.put("originalPrice", flashSale.getOriginalPrice());
item.put("flashPrice", flashSale.getFlashPrice());
item.put("flashStock", flashSale.getFlashStock());