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)) // 去除分页参数