@Service public class UserServiceImpl extends Object implements UserService
| Constructor and Description |
|---|
UserServiceImpl(UserDao userDao,
WeChatUserManagement weChatUserManagement,
TokenCensor tokenCensor,
org.springframework.data.redis.core.RedisTemplate<String,Serializable> redisTemplate) |
| Modifier and Type | Method and Description |
|---|---|
void |
getUserHeadPicture(Long userId,
javax.servlet.http.HttpServletResponse response)
获取用户上传的头像
|
UserEnt |
getUserInfo(Long userId)
获取用户个人基本信息
|
void |
initRegister(String openId)
新增一个用户,仅包含openId信息和默认用户角色
|
void |
saveUserHeadPicture(Long userId,
org.springframework.web.multipart.MultipartFile pictureFile)
用户更换头像
|
void |
updateUserInformation(Long userId,
String name,
String teleNumber,
String orgDescription)
更新用户的个人信息
|
String |
userLogin(String code)
用户登录与注册;
- 存在用户信息则登录,数据库中如果没有该用户的openId则先完成基础的注册
|
@Autowired public UserServiceImpl(UserDao userDao, WeChatUserManagement weChatUserManagement, TokenCensor tokenCensor, org.springframework.data.redis.core.RedisTemplate<String,Serializable> redisTemplate)
public String userLogin(String code)
userLogin in interface UserServicecode - 登录codepublic UserEnt getUserInfo(Long userId)
getUserInfo in interface UserServiceuserId - 用户Idpublic void initRegister(String openId)
initRegister in interface UserServiceopenId - 用户openId@Transactional(rollbackFor=java.lang.Exception.class) public void updateUserInformation(Long userId, String name, String teleNumber, String orgDescription)
updateUserInformation in interface UserServiceuserId - 用户Idname - 用户新姓名teleNumber - 用户手机号orgDescription - 机构简介public void saveUserHeadPicture(Long userId, org.springframework.web.multipart.MultipartFile pictureFile)
saveUserHeadPicture in interface UserServiceuserId - 用户IdpictureFile - 用户上传的文件public void getUserHeadPicture(Long userId, javax.servlet.http.HttpServletResponse response)
getUserHeadPicture in interface UserServiceuserId - 用户Idresponse - httpServletResponseCopyright © 2022. All rights reserved.