From dc885d07f9f62c60ac90dbd0c44c5fdbb0b00486 Mon Sep 17 00:00:00 2001 From: 陶杰 <1378534974@qq.com> Date: 星期二, 31 十二月 2024 10:30:36 +0800 Subject: [PATCH] 1.微信登录-用户不存在新注册用户,昵称没有解决 --- src/main/java/com/mzl/flower/service/system/UserService.java | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/mzl/flower/service/system/UserService.java b/src/main/java/com/mzl/flower/service/system/UserService.java index fafa505..5bdb3f8 100644 --- a/src/main/java/com/mzl/flower/service/system/UserService.java +++ b/src/main/java/com/mzl/flower/service/system/UserService.java @@ -11,10 +11,7 @@ import com.mzl.flower.dto.request.customer.UpdateCustomerDTO; import com.mzl.flower.dto.request.system.*; import com.mzl.flower.dto.response.current.CurrentUserDTO; -import com.mzl.flower.dto.response.system.EmployeeDTO; -import com.mzl.flower.dto.response.system.MenuTreeDTO; -import com.mzl.flower.dto.response.system.UserDetailsDTO; -import com.mzl.flower.dto.response.system.UserListDTO; +import com.mzl.flower.dto.response.system.*; import com.mzl.flower.entity.point.CustomerPoint; import com.mzl.flower.entity.system.*; import com.mzl.flower.enums.TrueOrFalseEnum; @@ -103,7 +100,8 @@ if(user == null){ throw new ValidationException("请注册账号后至\"个人中心-绑定微信\"后再使用微信登录"); } - user.setNickName(nickname); +// user.setNickName(nickname); + user.setNickName(user.getLoginName()); user.setPicture(imgUrl); user.update(user.getId()); userMapper.updateById(user); @@ -544,6 +542,7 @@ updateCustomerDTO.setUserId(user.getId()); if (StringUtils.isNotBlank(dto.getPurePhoneNumber())) { updateCustomerDTO.setName("花满芫-" + dto.getPurePhoneNumber().substring(dto.getPurePhoneNumber().length() - 4)); + } customerService.addOrUpdateCustomer(updateCustomerDTO); } @@ -560,4 +559,12 @@ } } + public Page<UserListInfoDTO> searchUserInfos(SearchUserDTO dto, Page page) { + List<UserListInfoDTO> result = userMapper.searchUserInfo(page, dto); + + page.setRecords(result); + return page; + } + + } -- Gitblit v1.9.3