!149 优化代码格式

Merge pull request !149 from AprilWind/feat/dev-docs
This commit is contained in:
疯狂的狮子Li
2024-01-19 09:51:36 +00:00
committed by Gitee
35 changed files with 332 additions and 30 deletions

View File

@@ -64,6 +64,7 @@ public class CaptchaController {
AbstractCaptcha captcha = SpringUtils.getBean(captchaProperties.getCategory().getClazz());
captcha.setGenerator(codeGenerator);
captcha.createCode();
// 如果是数学验证码使用SpEL表达式处理验证码结果
String code = captcha.getCode();
if (isMath) {
ExpressionParser parser = new SpelExpressionParser();

View File

@@ -10,10 +10,19 @@ import lombok.Data;
@Data
public class TenantListVo {
/**
* 租户编号
*/
private String tenantId;
/**
* 企业名称
*/
private String companyName;
/**
* 域名
*/
private String domain;
}

View File

@@ -11,7 +11,6 @@ import org.dromara.common.core.domain.model.LoginBody;
*
* @author Lion Li
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class EmailLoginBody extends LoginBody {

View File

@@ -31,6 +31,9 @@ public class RegisterBody extends LoginBody {
@Length(min = PASSWORD_MIN_LENGTH, max = PASSWORD_MAX_LENGTH, message = "{user.password.length.valid}")
private String password;
/**
* 用户类型
*/
private String userType;
}

View File

@@ -10,7 +10,6 @@ import org.dromara.common.core.domain.model.LoginBody;
*
* @author Lion Li
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class SmsLoginBody extends LoginBody {

View File

@@ -10,7 +10,6 @@ import org.dromara.common.core.domain.model.LoginBody;
*
* @author Lion Li
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class SocialLoginBody extends LoginBody {

View File

@@ -10,7 +10,6 @@ import org.dromara.common.core.domain.model.LoginBody;
*
* @author Lion Li
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class XcxLoginBody extends LoginBody {

View File

@@ -17,6 +17,7 @@ import org.springframework.context.annotation.Configuration;
@RefreshScope
@ConfigurationProperties(prefix = "security.captcha")
public class CaptchaProperties {
/**
* 验证码类型
*/

View File

@@ -16,6 +16,11 @@ public interface IAuthStrategy {
/**
* 登录
*
* @param body 登录对象
* @param client 授权管理视图对象
* @param grantType 授权类型
* @return 登录验证信息
*/
static LoginVo login(String body, RemoteClientVo client, String grantType) {
// 授权类型和客户端id
@@ -29,6 +34,10 @@ public interface IAuthStrategy {
/**
* 登录
*
* @param body 登录对象
* @param client 授权管理视图对象
* @return 登录验证信息
*/
LoginVo login(String body, RemoteClientVo client);