From bb151ef7a17087e3c7c9ce01caf39efad51ce840 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期三, 15 一月 2025 19:34:23 +0800
Subject: [PATCH] 修改bug
---
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipCenterServiceImpl.java | 2 +-
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java | 2 +-
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java | 8 ++++----
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysProfileController.java | 5 +++++
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java | 4 +++-
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/StoreClient.java | 3 ++-
6 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/StoreClient.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/StoreClient.java
index e65c65d..59fdb69 100644
--- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/StoreClient.java
+++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/StoreClient.java
@@ -5,6 +5,7 @@
import com.ruoyi.other.api.domain.Shop;
import com.ruoyi.other.api.factory.StoreFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
@@ -14,7 +15,7 @@
*/
@FeignClient(contextId = "StoreClient", value = ServiceNameConstants.OTHER_SERVICE, fallbackFactory = StoreFallbackFactory.class)
public interface StoreClient {
- @PostMapping(value = "/shop/getDetailById")
+ @GetMapping(value = "/shop/getDetailById")
R<Shop> getStoreById(@RequestParam("id") Integer id);
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysProfileController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysProfileController.java
index 49a0356..76e191a 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysProfileController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysProfileController.java
@@ -23,6 +23,7 @@
import org.springframework.web.multipart.MultipartFile;
import java.util.Arrays;
+import java.util.Objects;
/**
* 个人信息 业务处理
@@ -107,6 +108,10 @@
System.err.println(newPassword);
// String username = SecurityUtils.getUsername();
SysUser user = userService.selectUserByUserName(username);
+ if (Objects.isNull(user))
+ {
+ return error("未查询到该账号");
+ }
String password = user.getPassword();
if (!SecurityUtils.matchesPassword(oldPassword, password))
{
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java
index cde5da1..1e6bccb 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WalletController.java
@@ -121,8 +121,10 @@
orderList.stream().filter(o -> o.getId().equals(bc.getOrderId())).findFirst().ifPresent(o -> {
Long appUserId = o.getAppUserId();
AppUser appUser = appUserService.getById(appUserId);
- bc.setUserName(appUser.getName());
- bc.setAmount(o.getPaymentAmount());
+ if(null != appUser){
+ bc.setUserName(appUser.getName());
+ bc.setAmount(o.getPaymentAmount());
+ }
});
BigDecimal beforeAmount = bc.getBeforeAmount();
@@ -228,7 +230,5 @@
out.flush();
out.close();
}
-
-
}
}
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipCenterServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipCenterServiceImpl.java
index 402bd5d..a942c97 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipCenterServiceImpl.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/VipCenterServiceImpl.java
@@ -289,7 +289,7 @@
// 获取用户直推代理用户数量
List<AppUser> userAgentList = appUserService.list(new LambdaQueryWrapper<AppUser>()
.in(AppUser::getId, userShopList)
- .eq(AppUser::getVipId, 5));
+ .gt(AppUser::getVipId, 4));
// 代理下的准代理数量
List<Long> userQuasiAgent = userAgentList.stream().map(AppUser::getId).collect(Collectors.toList());
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 4904c61..22aae80 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
@@ -191,7 +191,7 @@
info.setVip(appUser.getVipId());
GoodsSeckill goodsSeckill = seckillActivityInfoClient.getSeckillActivityInfo(info).getData();
//没有秒杀活动或者添加的普通商品则不使用秒杀活动价格
- if((null == goodsSeckill || (null != goodsSeckill.getCashPayment() && null != goodsSeckill.getPointPayment())) || type == 1){
+ if((null == goodsSeckill || (null == goodsSeckill.getCashPayment() && null == goodsSeckill.getPointPayment())) || type == 1){
//没有秒杀价,则判断门店特价
GetGoodsBargainPrice goodsBargainPrice = new GetGoodsBargainPrice();
goodsBargainPrice.setGoodsId(goodsId);
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 89aae4e..93a1013 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
@@ -118,7 +118,9 @@
IPage<TechnicianSubscribeVO> technicianSubscribeByUser = technicianSubscribeMapper.getTechnicianSubscribeByUser(page, userId, status);
technicianSubscribeByUser.getRecords().forEach(technicianSubscribeVO -> {
UserAddress userAddress = JSON.parseObject(technicianSubscribeVO.getUserAddress(), UserAddress.class);
- technicianSubscribeVO.setUserAddress(userAddress.getProvince() + userAddress.getCity() + userAddress.getDistrict() + userAddress.getRecieveAddress());
+ if (userAddress != null){
+ technicianSubscribeVO.setUserAddress(userAddress.getProvince() + userAddress.getCity() + userAddress.getDistrict() + userAddress.getRecieveAddress());
+ }
});
return technicianSubscribeByUser;
}
--
Gitblit v1.7.1