From 9e0663bbc0b40f3153d9222ff40c1261727ac4e2 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: Sun, 16 Jul 2023 12:12:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cxyxiaomo/epp/shop/controller/GoodController.java | 7 +++---- frontend/src/components/manage-list.vue | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) 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 25499e9..1122b19 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 @@ -60,11 +60,10 @@ public class GoodController { // return Res.success(list); // 小程序商品列表页 划线价格 和 未划线价格 写反了,所以接口这里也反过来写 - return Res.success(list.stream().map(i -> { + return Res.success(list.stream().peek(i -> { Double retailPrice = i.getRetailPrice(); - i.setCounterPrice(i.getCounterPrice()); - i.setRetailPrice(retailPrice); - return i; + i.setRetailPrice(i.getCounterPrice()); + i.setCounterPrice(retailPrice); }).collect(Collectors.toList())); } diff --git a/frontend/src/components/manage-list.vue b/frontend/src/components/manage-list.vue index 2cb713a..6441283 100644 --- a/frontend/src/components/manage-list.vue +++ b/frontend/src/components/manage-list.vue @@ -506,7 +506,7 @@ const handleDelete = (index: number, row: any) => { // 导出数据到文件 const handleExport = async () => { let params = {}; - // 如果选择仅导出满肚条件的数据,那么这里就填上查询参数 + // 如果选择仅导出满足条件的数据,那么这里就填上查询参数 if (exportConfig.value.withFilter) { params = JSON.parse(JSON.stringify(query)) // 去除分页参数