From 0b9eab450f484c397e9515f23c9954a1fe2f5065 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期二, 14 一月 2025 11:05:02 +0800 Subject: [PATCH] 修改bug --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java | 2 +- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsEvaluateController.java | 9 +++++++-- ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Goods.java | 2 +- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java | 3 +-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Goods.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Goods.java index 2c342ff..63bc9aa 100644 --- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Goods.java +++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Goods.java @@ -48,7 +48,7 @@ @TableField("purchase_limit") private Integer purchaseLimit; - @ApiModelProperty(value = "配送方式(1=自提,2=快递,1,2 = 自提+快递)") + @ApiModelProperty(value = "配送方式(1=自提,2=快递)") @TableField("distribution_mode") private String distributionMode; diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java index cbc3f2d..7103759 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java @@ -984,7 +984,7 @@ if(null != orderActivityInfo1){ order.setActivityJson(JSON.toJSONString(orderActivityInfo1)); } - if(null != shoppingCartPayment.getUserAddressId()){ + if(2 == shoppingCartPayment.getDistributionMode()){ UserAddress address = userAddressClient.getUserAddressById(shoppingCartPayment.getUserAddressId()).getData(); order.setExpressAmount(expressFee); order.setAddressJson(JSON.toJSONString(address)); diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsEvaluateController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsEvaluateController.java index 5217eca..89470c5 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsEvaluateController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsEvaluateController.java @@ -131,7 +131,7 @@ List<Long> usersNameList = new ArrayList<>(); List<Long> usersPhoneList = new ArrayList<>(); - if (StringUtils.isNotEmpty(goodsEvaluate.getUserName())) { + if (StringUtils.isNotEmpty(goodsEvaluate.getGoodsName())) { goodsIds = goodsService.lambdaQuery() .like(Goods::getName, goodsEvaluate.getGoodsName()) .list().stream().map(Goods::getId).collect(Collectors.toList()); @@ -152,7 +152,12 @@ return R.ok(new Page<>()); } } - usersNameList.retainAll(usersPhoneList); + if (StringUtils.isNotEmpty(goodsEvaluate.getPhone())&&StringUtils.isNotEmpty(goodsEvaluate.getUserName())){ + // 取交集 + usersNameList.retainAll(usersPhoneList); + }else{ + usersNameList.addAll(usersPhoneList); + } Page<GoodsEvaluate> page = goodsEvaluateService.page(Page.of(pageNum, pageSize), new LambdaQueryWrapper<GoodsEvaluate>() .in(!goodsIds.isEmpty(), GoodsEvaluate::getGoodsId, goodsIds) .in(!usersNameList.isEmpty(), GoodsEvaluate::getAppUserId, usersNameList) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java index 77729d9..3fd7867 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java @@ -82,7 +82,6 @@ @Override public void subscribe(TechnicianSubscribe subscribe) { - Long userId = SecurityUtils.getUserId(); subscribe.setAppUserId(userId); subscribe.setStatus(TechnicianStatus.UNSUBSCRIBE.getCode()); @@ -104,7 +103,7 @@ throw new RuntimeException("不能切换相同的技师"); } subscribe.setTechnicianId(technicianSubscribe.getTechnicianId()); - + this.updateById(subscribe); } /** -- Gitblit v1.7.1