Merge branch 'master' of https://gitee.com/youlaiorg/youlai-boot
This commit is contained in:
@@ -163,10 +163,9 @@ public class SysUserController {
|
||||
}
|
||||
|
||||
@Operation(summary = "获取个人中心用户信息")
|
||||
@GetMapping("/{userId}/profile")
|
||||
public Result<UserProfileVO> getUserProfile(
|
||||
@Parameter(description = "用户ID") @PathVariable Long userId
|
||||
) {
|
||||
@GetMapping("/profile")
|
||||
public Result<UserProfileVO> getUserProfile() {
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
UserProfileVO userProfile = userService.getUserProfile(userId);
|
||||
return Result.success(userProfile);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
@Schema(description = "部门表单对象")
|
||||
@Getter
|
||||
@@ -24,6 +25,7 @@ public class DeptForm {
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description="状态(1:启用;0:禁用)", example = "1")
|
||||
@Range(min = 0, max = 1, message = "状态值不正确")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description="排序(数字越小排名越靠前)", example = "1")
|
||||
|
||||
@@ -5,6 +5,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -28,6 +29,7 @@ public class DictForm {
|
||||
private String code;
|
||||
|
||||
@Schema(description = "字典状态(1-启用,0-禁用)", example = "1")
|
||||
@Range(min = 0, max = 1, message = "字典状态不正确")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "字典数据项列表",example = "[{\"id\":1,\"name\":\"男\",\"value\":\"1\",\"sort\":1,\"status\":1},{\"id\":2,\"name\":\"女\",\"value\":\"2\",\"sort\":2,\"status\":1}]")
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.youlai.system.enums.MenuTypeEnum;
|
||||
import com.youlai.system.common.model.KeyValue;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -42,6 +43,7 @@ public class MenuForm {
|
||||
private String perm;
|
||||
|
||||
@Schema(description = "显示状态(1:显示;0:隐藏)")
|
||||
@Range(max = 1, min = 0, message = "显示状态不正确")
|
||||
private Integer visible;
|
||||
|
||||
@Schema(description = "排序(数字越小排名越靠前)")
|
||||
|
||||
@@ -5,6 +5,7 @@ import lombok.Data;
|
||||
|
||||
// import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
@Schema(description = "角色表单对象")
|
||||
@Data
|
||||
@@ -25,6 +26,7 @@ public class RoleForm {
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description="角色状态(1-正常;0-停用)")
|
||||
@Range(max = 1, min = 0, message = "角色状态不正确")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description="数据权限")
|
||||
|
||||
@@ -6,6 +6,8 @@ import lombok.Data;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -44,6 +46,7 @@ public class UserForm {
|
||||
private String email;
|
||||
|
||||
@Schema(description="用户状态(1:正常;0:禁用)")
|
||||
@Range(min = 0, max = 1, message = "用户状态不正确")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description="部门ID")
|
||||
|
||||
Reference in New Issue
Block a user