From 9b4a907e7d72be69c667638445c555003585f51c Mon Sep 17 00:00:00 2001 From: pikaqiudeshujia Date: Sat, 11 May 2024 15:43:20 +0800 Subject: [PATCH] =?UTF-8?q?release-=20=E4=BF=AE=E5=A4=8Did=E4=B8=BAnull?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/luoo/user/service/UserInfoService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java b/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java index f2ed7d5..9b33001 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/UserInfoService.java @@ -581,6 +581,7 @@ public class UserInfoService { public void addUserBank(String token, UserBankAddDto userBankAddDto) { UserBank userBank = new UserBank(); BeanUtils.copyProperties(userBankAddDto, userBank); + userBank.setId(String.valueOf(idWorker.nextId())); UserLoginDto user = jwtUtil.getUserLoginDto(token); if (user != null) { @@ -661,6 +662,7 @@ public class UserInfoService { UserLoginDto user = jwtUtil.getUserLoginDto(token); Withdraw withdraw = Withdraw.builder() + .id(String.valueOf(idWorker.nextId())) .userId(user.getUserId()) .createUser(user.getUserId()) .amount(amount) @@ -679,7 +681,6 @@ public class UserInfoService { */ public PageResult withdrawPageResult(String token, Integer page, Integer size) { Pageable pageable = PageRequest.of(page - 1, size); - UserBank userBank = getUserBank(token); UserLoginDto user = jwtUtil.getUserLoginDto(token); if (user == null) { // 用户校验失败,请重新登录