feat: 微信登录功能开发

This commit is contained in:
wangtaocs committed 2024-11-29 11:09:56 +08:00
1 parent d2f240776e
commit d24dafc1fb
14 files changed
+164 -2

No files matched your search

@@ -158,4 +158,11 @@ public interface UserService extends IService<User> {
* @return {@link List<Option<String>>} 用户选项列表
*/
List<Option<String>> listUserOptions();
/**
* 根据openId获取用户信息
* @param openId openId
* @return {@link User}
*/
User getUserByOpenId(String openId);
}
@@ -445,4 +445,14 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
}
return Collections.emptyList();
}
/**
* 根据openId获取用户信息
* @param openId openId
* @return {@link User}
*/
@Override
public User getUserByOpenId(String openId) {
return this.getOne(new LambdaQueryWrapper<User>().eq(User::getOpenId, openId));
}
}