From bc66e20b07ec89834919362c9e7f6fabc15144cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E5=B0=8F=E5=A2=A8?= <2291200076@qq.com> Date: Sat, 6 May 2023 20:29:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=A1=B5=20=E5=88=92=E7=BA=BF=E4=BB=B7?= =?UTF-8?q?=E6=A0=BC=20=E5=92=8C=20=E6=9C=AA=E5=88=92=E7=BA=BF=E4=BB=B7?= =?UTF-8?q?=E6=A0=BC=20=E5=86=99=E5=8F=8D=E4=BA=86=EF=BC=8C=E6=89=80?= =?UTF-8?q?=E4=BB=A5=E6=8E=A5=E5=8F=A3=E8=BF=99=E9=87=8C=E4=B9=9F=E5=8F=8D?= =?UTF-8?q?=E8=BF=87=E6=9D=A5=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cxyxiaomo/epp/shop/controller/GoodController.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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())); } /**