release- 修复id为null的bug

release-2024-08-08
pikaqiudeshujia 7 months ago
parent 75fb525425
commit 9b4a907e7d

@ -581,6 +581,7 @@ public class UserInfoService {
public void addUserBank(String token, UserBankAddDto userBankAddDto) { public void addUserBank(String token, UserBankAddDto userBankAddDto) {
UserBank userBank = new UserBank(); UserBank userBank = new UserBank();
BeanUtils.copyProperties(userBankAddDto, userBank); BeanUtils.copyProperties(userBankAddDto, userBank);
userBank.setId(String.valueOf(idWorker.nextId()));
UserLoginDto user = jwtUtil.getUserLoginDto(token); UserLoginDto user = jwtUtil.getUserLoginDto(token);
if (user != null) { if (user != null) {
@ -661,6 +662,7 @@ public class UserInfoService {
UserLoginDto user = jwtUtil.getUserLoginDto(token); UserLoginDto user = jwtUtil.getUserLoginDto(token);
Withdraw withdraw = Withdraw.builder() Withdraw withdraw = Withdraw.builder()
.id(String.valueOf(idWorker.nextId()))
.userId(user.getUserId()) .userId(user.getUserId())
.createUser(user.getUserId()) .createUser(user.getUserId())
.amount(amount) .amount(amount)
@ -679,7 +681,6 @@ public class UserInfoService {
*/ */
public PageResult<Withdraw> withdrawPageResult(String token, Integer page, Integer size) { public PageResult<Withdraw> withdrawPageResult(String token, Integer page, Integer size) {
Pageable pageable = PageRequest.of(page - 1, size); Pageable pageable = PageRequest.of(page - 1, size);
UserBank userBank = getUserBank(token);
UserLoginDto user = jwtUtil.getUserLoginDto(token); UserLoginDto user = jwtUtil.getUserLoginDto(token);
if (user == null) { if (user == null) {
// 用户校验失败,请重新登录 // 用户校验失败,请重新登录

Loading…
Cancel
Save