From 70af8656577dfc82b6f103eba1439a4e283f858e Mon Sep 17 00:00:00 2001 From: hjl <1657978663@qq.com> Date: 星期四, 04 七月 2024 15:14:46 +0800 Subject: [PATCH] fix: 学习端、家长端商城bug --- ruoyi-service/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/TGoodsController.java | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/ruoyi-service/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/TGoodsController.java b/ruoyi-service/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/TGoodsController.java index 7f9a4f5..247be0d 100644 --- a/ruoyi-service/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/TGoodsController.java +++ b/ruoyi-service/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/TGoodsController.java @@ -2,7 +2,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.core.constant.Constants; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.exception.GlobalException; @@ -89,11 +88,11 @@ // 类型匹配 todo if (goodQuery.getType() != null && goodQuery.getType().size() > 0) { for (int i = 0; i < goodQuery.getType().size(); i++) { - if (i == 0){ - wrapper.apply("FIND_IN_SET('" + goodQuery.getType().get(i) + "', typeIds)"); // 将每个类型 ID 应用于 FIND_IN_SET 函数 - }else{ +// if (i == 0){ +// wrapper.apply("FIND_IN_SET('" + goodQuery.getType().get(i) + "', typeIds)"); // 将每个类型 ID 应用于 FIND_IN_SET 函数 +// }else{ wrapper.or().apply("FIND_IN_SET('" + goodQuery.getType().get(i) + "', typeIds)"); // 将每个类型 ID 应用于 FIND_IN_SET 函数 - } +// } } } wrapper.eq("isDelete", 0); @@ -127,7 +126,7 @@ wrapper.eq("isDelete", 0); // sort排序 wrapper.orderByAsc("CASE WHEN sort IS NULL THEN 1 ELSE 0 END") - .orderByAsc("sort") + .orderByDesc("sort") .orderByDesc("createTime"); return R.ok(goodsService.page(new PageInfo<>(goodQuery.getPageNumber(), goodQuery.getPageSize()), wrapper)); } @@ -602,7 +601,7 @@ if (!Constants.ONE.equals(order.getState())) { throw new GlobalException("订单已发货,无法修改收货地址!"); } - order.setConsigneeName(recipient.getAddress()); + order.setConsigneeName(recipient.getRecipient()); order.setConsigneePhone(recipient.getRecipientPhone()); order.setConsigneeAddress(recipient.getProvince()+recipient.getCity()+recipient.getAddress()); orderService.updateById(order); @@ -628,7 +627,7 @@ if (!Constants.ONE.equals(order.getState())) { throw new GlobalException("订单已发货,无法修改收货地址!"); } - order.setConsigneeName(recipient.getAddress()); + order.setConsigneeName(recipient.getRecipient()); order.setConsigneePhone(recipient.getRecipientPhone()); order.setConsigneeAddress(recipient.getProvince()+recipient.getCity()+recipient.getAddress()); orderService.updateById(order); -- Gitblit v1.7.1