mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2026-05-02 18:11:26 +08:00
add 新增 RemoteConfigService 配置服务 ;
add 新增 RemoteUserService#checkUserNameUnique 校验用户名称是否唯一 ; update 更新 TokenController#register 校验注册配置 ; update 更新 SysLoginService#register 增加验证码校验, 用户名唯一校验 ;
This commit is contained in:
@@ -26,6 +26,7 @@ import org.dromara.common.social.config.properties.SocialProperties;
|
||||
import org.dromara.common.social.utils.SocialUtils;
|
||||
import org.dromara.common.tenant.helper.TenantHelper;
|
||||
import org.dromara.system.api.RemoteClientService;
|
||||
import org.dromara.system.api.RemoteConfigService;
|
||||
import org.dromara.system.api.RemoteSocialService;
|
||||
import org.dromara.system.api.RemoteTenantService;
|
||||
import org.dromara.system.api.domain.vo.RemoteClientVo;
|
||||
@@ -52,6 +53,8 @@ public class TokenController {
|
||||
private final SocialProperties socialProperties;
|
||||
private final SysLoginService sysLoginService;
|
||||
|
||||
@DubboReference
|
||||
private final RemoteConfigService remoteConfigService;
|
||||
@DubboReference
|
||||
private final RemoteTenantService remoteTenantService;
|
||||
@DubboReference
|
||||
@@ -142,6 +145,9 @@ public class TokenController {
|
||||
*/
|
||||
@PostMapping("register")
|
||||
public R<Void> register(@RequestBody RegisterBody registerBody) {
|
||||
if (!remoteConfigService.selectRegisterEnabled(registerBody.getTenantId())) {
|
||||
return R.fail("当前系统没有开启注册功能!");
|
||||
}
|
||||
// 用户注册
|
||||
sysLoginService.register(registerBody);
|
||||
return R.ok();
|
||||
|
||||
Reference in New Issue
Block a user