This commit is contained in:
haoxr committed 2024-12-01 21:31:09 +08:00
commit 07796fd62a
17 files changed
+175 -7

No files matched your search

@@ -158,4 +158,12 @@ 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);
}
@@ -83,6 +83,7 @@ public class ConfigServiceImpl extends ServiceImpl<ConfigMapper, Config> impleme
"配置键已存在");
Config config = configConverter.toEntity(configForm);
config.setCreateBy(SecurityUtils.getUserId());
config.setIsDeleted(0);
return this.save(config);
}
@@ -457,4 +457,15 @@ 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));
}
}