diff --git a/backend/microservice-provider-shop-8003/src/main/java/com/cxyxiaomo/epp/shop/controller/GoodController.java b/backend/microservice-provider-shop-8003/src/main/java/com/cxyxiaomo/epp/shop/controller/GoodController.java index 4ea8f19..25499e9 100644 --- a/backend/microservice-provider-shop-8003/src/main/java/com/cxyxiaomo/epp/shop/controller/GoodController.java +++ b/backend/microservice-provider-shop-8003/src/main/java/com/cxyxiaomo/epp/shop/controller/GoodController.java @@ -57,7 +57,15 @@ public class GoodController { } } List list = goodService.listOnSale(cateId, searchText); - return Res.success(list); + // return Res.success(list); + + // 小程序商品列表页 划线价格 和 未划线价格 写反了,所以接口这里也反过来写 + return Res.success(list.stream().map(i -> { + Double retailPrice = i.getRetailPrice(); + i.setCounterPrice(i.getCounterPrice()); + i.setRetailPrice(retailPrice); + return i; + }).collect(Collectors.toList())); } /**