Merge branch 'master' of https://gitee.com/youlaiorg/youlai-boot
This commit is contained in:
@@ -25,9 +25,9 @@ SET FOREIGN_KEY_CHECKS = 0;
|
|||||||
DROP TABLE IF EXISTS `sys_config`;
|
DROP TABLE IF EXISTS `sys_config`;
|
||||||
CREATE TABLE `sys_config` (
|
CREATE TABLE `sys_config` (
|
||||||
`id` bigint NOT NULL AUTO_INCREMENT,
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
||||||
`sys_name` varchar(50) NOT NULL COMMENT '配置名称',
|
`config_name` varchar(50) NOT NULL COMMENT '配置名称',
|
||||||
`sys_key` varchar(50) NOT NULL COMMENT '配置key',
|
`config_key` varchar(50) NOT NULL COMMENT '配置key',
|
||||||
`sys_value` varchar(100) NOT NULL COMMENT '配置值',
|
`config_value` varchar(100) NOT NULL COMMENT '配置值',
|
||||||
`remark` varchar(200) DEFAULT NULL COMMENT '描述、备注',
|
`remark` varchar(200) DEFAULT NULL COMMENT '描述、备注',
|
||||||
`create_time` datetime NOT NULL COMMENT '创建时间',
|
`create_time` datetime NOT NULL COMMENT '创建时间',
|
||||||
`create_by` bigint NOT NULL COMMENT '创建人ID',
|
`create_by` bigint NOT NULL COMMENT '创建人ID',
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ SET FOREIGN_KEY_CHECKS = 0;
|
|||||||
DROP TABLE IF EXISTS `sys_config`;
|
DROP TABLE IF EXISTS `sys_config`;
|
||||||
CREATE TABLE `sys_config` (
|
CREATE TABLE `sys_config` (
|
||||||
`id` bigint NOT NULL AUTO_INCREMENT,
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
||||||
`sys_name` varchar(50) NOT NULL COMMENT '配置名称',
|
`config_name` varchar(50) NOT NULL COMMENT '配置名称',
|
||||||
`sys_key` varchar(50) NOT NULL COMMENT '配置key',
|
`config_key` varchar(50) NOT NULL COMMENT '配置key',
|
||||||
`sys_value` varchar(100) NOT NULL COMMENT '配置值',
|
`config_value` varchar(100) NOT NULL COMMENT '配置值',
|
||||||
`remark` varchar(200) DEFAULT NULL COMMENT '描述、备注',
|
`remark` varchar(200) DEFAULT NULL COMMENT '描述、备注',
|
||||||
`create_time` datetime NOT NULL COMMENT '创建时间',
|
`create_time` datetime NOT NULL COMMENT '创建时间',
|
||||||
`create_by` bigint NOT NULL COMMENT '创建人ID',
|
`create_by` bigint NOT NULL COMMENT '创建人ID',
|
||||||
|
|||||||
@@ -163,10 +163,9 @@ public class SysUserController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "获取个人中心用户信息")
|
@Operation(summary = "获取个人中心用户信息")
|
||||||
@GetMapping("/{userId}/profile")
|
@GetMapping("/profile")
|
||||||
public Result<UserProfileVO> getUserProfile(
|
public Result<UserProfileVO> getUserProfile() {
|
||||||
@Parameter(description = "用户ID") @PathVariable Long userId
|
Long userId = SecurityUtils.getUserId();
|
||||||
) {
|
|
||||||
UserProfileVO userProfile = userService.getUserProfile(userId);
|
UserProfileVO userProfile = userService.getUserProfile(userId);
|
||||||
return Result.success(userProfile);
|
return Result.success(userProfile);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
import org.hibernate.validator.constraints.Range;
|
||||||
|
|
||||||
@Schema(description = "部门表单对象")
|
@Schema(description = "部门表单对象")
|
||||||
@Getter
|
@Getter
|
||||||
@@ -24,6 +25,7 @@ public class DeptForm {
|
|||||||
private Long parentId;
|
private Long parentId;
|
||||||
|
|
||||||
@Schema(description="状态(1:启用;0:禁用)", example = "1")
|
@Schema(description="状态(1:启用;0:禁用)", example = "1")
|
||||||
|
@Range(min = 0, max = 1, message = "状态值不正确")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@Schema(description="排序(数字越小排名越靠前)", example = "1")
|
@Schema(description="排序(数字越小排名越靠前)", example = "1")
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
import org.hibernate.validator.constraints.Range;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -28,6 +29,7 @@ public class DictForm {
|
|||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
@Schema(description = "字典状态(1-启用,0-禁用)", example = "1")
|
@Schema(description = "字典状态(1-启用,0-禁用)", example = "1")
|
||||||
|
@Range(min = 0, max = 1, message = "字典状态不正确")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@Schema(description = "字典数据项列表",example = "[{\"id\":1,\"name\":\"男\",\"value\":\"1\",\"sort\":1,\"status\":1},{\"id\":2,\"name\":\"女\",\"value\":\"2\",\"sort\":2,\"status\":1}]")
|
@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 com.youlai.system.common.model.KeyValue;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.hibernate.validator.constraints.Range;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -42,6 +43,7 @@ public class MenuForm {
|
|||||||
private String perm;
|
private String perm;
|
||||||
|
|
||||||
@Schema(description = "显示状态(1:显示;0:隐藏)")
|
@Schema(description = "显示状态(1:显示;0:隐藏)")
|
||||||
|
@Range(max = 1, min = 0, message = "显示状态不正确")
|
||||||
private Integer visible;
|
private Integer visible;
|
||||||
|
|
||||||
@Schema(description = "排序(数字越小排名越靠前)")
|
@Schema(description = "排序(数字越小排名越靠前)")
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import lombok.Data;
|
|||||||
|
|
||||||
// import jakarta.validation.constraints.NotBlank;
|
// import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import org.hibernate.validator.constraints.Range;
|
||||||
|
|
||||||
@Schema(description = "角色表单对象")
|
@Schema(description = "角色表单对象")
|
||||||
@Data
|
@Data
|
||||||
@@ -25,6 +26,7 @@ public class RoleForm {
|
|||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
@Schema(description="角色状态(1-正常;0-停用)")
|
@Schema(description="角色状态(1-正常;0-停用)")
|
||||||
|
@Range(max = 1, min = 0, message = "角色状态不正确")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@Schema(description="数据权限")
|
@Schema(description="数据权限")
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ import lombok.Data;
|
|||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
import jakarta.validation.constraints.Pattern;
|
import jakarta.validation.constraints.Pattern;
|
||||||
|
import org.hibernate.validator.constraints.Range;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,6 +46,7 @@ public class UserForm {
|
|||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
@Schema(description="用户状态(1:正常;0:禁用)")
|
@Schema(description="用户状态(1:正常;0:禁用)")
|
||||||
|
@Range(min = 0, max = 1, message = "用户状态不正确")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@Schema(description="部门ID")
|
@Schema(description="部门ID")
|
||||||
|
|||||||
Reference in New Issue
Block a user