From 9d809221eb4debba088ac2e56e63315b7596a30b Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期二, 16 九月 2025 14:50:41 +0800
Subject: [PATCH] 解决图片显示问题和实物商品与虚拟商品中不包含礼品卡时去除优惠卷id和名称
---
framework/src/main/java/cn/lili/modules/goods/entity/dos/Goods.java | 6 ++++++
buyer-api/src/main/java/cn/lili/controller/order/AfterSaleBuyerController.java | 4 ++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/buyer-api/src/main/java/cn/lili/controller/order/AfterSaleBuyerController.java b/buyer-api/src/main/java/cn/lili/controller/order/AfterSaleBuyerController.java
index 68a8a0f..b053c7a 100644
--- a/buyer-api/src/main/java/cn/lili/controller/order/AfterSaleBuyerController.java
+++ b/buyer-api/src/main/java/cn/lili/controller/order/AfterSaleBuyerController.java
@@ -64,6 +64,10 @@
@GetMapping(value = "/get/{sn}")
public ResultMessage<AfterSaleVO> get(@NotNull(message = "鍞悗鍗曞彿") @PathVariable("sn") String sn) {
AfterSaleVO afterSale = OperationalJudgment.judgment(afterSaleService.getAfterSale(sn));
+ String goodsImage = afterSale.getGoodsImage();
+ if (StringUtils.isNotBlank(goodsImage)&&!goodsImage.contains("http")) {
+ afterSale.setGoodsImage(cosUtil.getPreviewUrl(goodsImage));
+ }
return ResultUtil.data(afterSale);
}
diff --git a/framework/src/main/java/cn/lili/modules/goods/entity/dos/Goods.java b/framework/src/main/java/cn/lili/modules/goods/entity/dos/Goods.java
index 5acdfae..531cdd9 100644
--- a/framework/src/main/java/cn/lili/modules/goods/entity/dos/Goods.java
+++ b/framework/src/main/java/cn/lili/modules/goods/entity/dos/Goods.java
@@ -236,6 +236,12 @@
if (!sku.containsKey("quantity") || StringUtil.isEmpty(sku.get("quantity").toString()) || Convert.toInt(sku.get("quantity").toString()) < 0) {
throw new ServiceException(ResultCode.GOODS_SKU_QUANTITY_ERROR);
}
+ //娌℃湁浼樻儬鍗风殑鍟嗗搧闇�瑕佺Щ闄や紭鎯犲嵎淇℃伅
+ Object couponId = sku.get("couponId");
+ if (couponId == null || StringUtil.isEmpty(couponId.toString())) {
+ sku.remove("couponId");
+ sku.remove("couponName");
+ }
sku.values().forEach(i -> {
if (CharSequenceUtil.isBlank(i.toString())) {
throw new ServiceException(ResultCode.MUST_HAVE_GOODS_SKU_VALUE);
--
Gitblit v1.8.0