init
This commit is contained in:
23
blade-service-api/blade-system-api/pom.xml
Normal file
23
blade-service-api/blade-system-api/pom.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>blade-service-api</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>blade-system-api</artifactId>
|
||||
<name>${project.artifactId}</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-starter-cache</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
81
blade-service-api/blade-system-api/src/main/java/org/springblade/system/cache/ParamCache.java
vendored
Normal file
81
blade-service-api/blade-system-api/src/main/java/org/springblade/system/cache/ParamCache.java
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.cache;
|
||||
|
||||
import org.springblade.core.cache.utils.CacheUtil;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.SpringUtil;
|
||||
import org.springblade.system.pojo.entity.Param;
|
||||
import org.springblade.system.feign.ISysClient;
|
||||
|
||||
import static org.springblade.core.cache.constant.CacheConstant.PARAM_CACHE;
|
||||
|
||||
/**
|
||||
* 参数缓存工具类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class ParamCache {
|
||||
|
||||
private static final String PARAM_ID = "param:id:";
|
||||
private static final String PARAM_VALUE = "param:value:";
|
||||
|
||||
private static ISysClient sysClient;
|
||||
|
||||
private static ISysClient getSysClient() {
|
||||
if (sysClient == null) {
|
||||
sysClient = SpringUtil.getBean(ISysClient.class);
|
||||
}
|
||||
return sysClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取参数实体
|
||||
*
|
||||
* @param id 主键
|
||||
* @return Param
|
||||
*/
|
||||
public static Param getById(Long id) {
|
||||
return CacheUtil.get(PARAM_CACHE, PARAM_ID, id, () -> {
|
||||
R<Param> result = getSysClient().getParam(id);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取参数配置
|
||||
*
|
||||
* @param paramKey 参数值
|
||||
* @return String
|
||||
*/
|
||||
public static String getValue(String paramKey) {
|
||||
return CacheUtil.get(PARAM_CACHE, PARAM_VALUE, paramKey, () -> {
|
||||
R<String> result = getSysClient().getParamValue(paramKey);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
73
blade-service-api/blade-system-api/src/main/java/org/springblade/system/cache/RegionCache.java
vendored
Normal file
73
blade-service-api/blade-system-api/src/main/java/org/springblade/system/cache/RegionCache.java
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.cache;
|
||||
|
||||
import org.springblade.core.cache.utils.CacheUtil;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.SpringUtil;
|
||||
import org.springblade.system.pojo.entity.Region;
|
||||
import org.springblade.system.feign.ISysClient;
|
||||
|
||||
import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
|
||||
|
||||
/**
|
||||
* 行政区划缓存工具类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class RegionCache {
|
||||
public static final String MAIN_CODE = "00";
|
||||
public static final int PROVINCE_LEVEL = 1;
|
||||
public static final int CITY_LEVEL = 2;
|
||||
public static final int DISTRICT_LEVEL = 3;
|
||||
public static final int TOWN_LEVEL = 4;
|
||||
public static final int VILLAGE_LEVEL = 5;
|
||||
|
||||
private static final String REGION_CODE = "region:code:";
|
||||
|
||||
private static ISysClient sysClient;
|
||||
|
||||
private static ISysClient getSysClient() {
|
||||
if (sysClient == null) {
|
||||
sysClient = SpringUtil.getBean(ISysClient.class);
|
||||
}
|
||||
return sysClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取行政区划实体
|
||||
*
|
||||
* @param code 区划编号
|
||||
* @return Param
|
||||
*/
|
||||
public static Region getByCode(String code) {
|
||||
return CacheUtil.get(SYS_CACHE, REGION_CODE, code, () -> {
|
||||
R<Region> result = getSysClient().getRegion(code);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
384
blade-service-api/blade-system-api/src/main/java/org/springblade/system/cache/SysCache.java
vendored
Normal file
384
blade-service-api/blade-system-api/src/main/java/org/springblade/system/cache/SysCache.java
vendored
Normal file
@@ -0,0 +1,384 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.cache;
|
||||
|
||||
import org.springblade.core.cache.utils.CacheUtil;
|
||||
import org.springblade.core.mp.enums.StatusType;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.SpringUtil;
|
||||
import org.springblade.core.tool.utils.StringPool;
|
||||
import org.springblade.system.feign.ISysClient;
|
||||
import org.springblade.system.pojo.entity.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
|
||||
|
||||
/**
|
||||
* 系统缓存
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
public class SysCache {
|
||||
private static final String MENU_ID = "menu:id:";
|
||||
private static final String DEPT_ID = "dept:id:";
|
||||
private static final String DEPT_NAME = "dept:name:";
|
||||
private static final String DEPT_NAME_FUZZY = "dept:nameFuzzy:";
|
||||
private static final String DEPT_NAME_ID = "deptName:id:";
|
||||
private static final String DEPT_NAMES_ID = "deptNames:id:";
|
||||
private static final String DEPT_CHILD_ID = "deptChild:id:";
|
||||
private static final String DEPT_CHILDIDS_ID = "deptChildIds:id:";
|
||||
private static final String POST_ID = "post:id:";
|
||||
private static final String POST_NAME = "post:name:";
|
||||
private static final String POST_NAME_FUZZY = "post:nameFuzzy:";
|
||||
private static final String POST_NAME_ID = "postName:id:";
|
||||
private static final String POST_NAMES_ID = "postNames:id:";
|
||||
private static final String ROLE_ID = "role:id:";
|
||||
private static final String ROLE_NAME = "role:name:";
|
||||
private static final String ROLE_NAME_ID = "roleName:id:";
|
||||
private static final String ROLE_NAMES_ID = "roleNames:id:";
|
||||
private static final String ROLE_ALIAS_ID = "roleAlias:id:";
|
||||
private static final String ROLE_ALIASES_ID = "roleAliases:id:";
|
||||
public static final String TENANT_ID = "tenant:id:";
|
||||
public static final String TENANT_TENANT_ID = "tenant:tenantId:";
|
||||
public static final String TENANT_PACKAGE_ID = "tenant:packageId:";
|
||||
|
||||
private static ISysClient sysClient;
|
||||
|
||||
private static ISysClient getSysClient() {
|
||||
if (sysClient == null) {
|
||||
sysClient = SpringUtil.getBean(ISysClient.class);
|
||||
}
|
||||
return sysClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取菜单
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 菜单
|
||||
*/
|
||||
public static Menu getMenu(Long id) {
|
||||
return CacheUtil.get(SYS_CACHE, MENU_ID, id, () -> {
|
||||
R<Menu> result = getSysClient().getMenu(id);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 部门
|
||||
*/
|
||||
public static Dept getDept(Long id) {
|
||||
return CacheUtil.get(SYS_CACHE, DEPT_ID, id, () -> {
|
||||
R<Dept> result = getSysClient().getDept(id);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门id
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param deptNames 部门名
|
||||
* @return 部门id
|
||||
*/
|
||||
public static String getDeptIds(String tenantId, String deptNames) {
|
||||
return CacheUtil.get(SYS_CACHE, DEPT_NAME, tenantId + StringPool.DASH + deptNames, () -> {
|
||||
R<String> result = getSysClient().getDeptIds(tenantId, deptNames);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门id
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param deptNames 部门名模糊查询
|
||||
* @return 部门id
|
||||
*/
|
||||
public static String getDeptIdsByFuzzy(String tenantId, String deptNames) {
|
||||
return CacheUtil.get(SYS_CACHE, DEPT_NAME_FUZZY, tenantId + StringPool.DASH + deptNames, () -> {
|
||||
R<String> result = getSysClient().getDeptIdsByFuzzy(tenantId, deptNames);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门名
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 部门名
|
||||
*/
|
||||
public static String getDeptName(Long id) {
|
||||
return CacheUtil.get(SYS_CACHE, DEPT_NAME_ID, id, () -> {
|
||||
R<String> result = getSysClient().getDeptName(id);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取部门名集合
|
||||
*
|
||||
* @param deptIds 主键集合
|
||||
* @return 部门名
|
||||
*/
|
||||
public static List<String> getDeptNames(String deptIds) {
|
||||
return CacheUtil.get(SYS_CACHE, DEPT_NAMES_ID, deptIds, () -> {
|
||||
R<List<String>> result = getSysClient().getDeptNames(deptIds);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取子部门集合
|
||||
*
|
||||
* @param deptId 主键
|
||||
* @return 子部门
|
||||
*/
|
||||
public static List<Dept> getDeptChild(Long deptId) {
|
||||
return CacheUtil.get(SYS_CACHE, DEPT_CHILD_ID, deptId, () -> {
|
||||
R<List<Dept>> result = getSysClient().getDeptChild(deptId);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取子部门ID集合
|
||||
*
|
||||
* @param deptId 主键
|
||||
* @return 子部门ID
|
||||
*/
|
||||
public static List<Long> getDeptChildIds(Long deptId) {
|
||||
if (deptId == null) {
|
||||
return null;
|
||||
}
|
||||
List<Long> deptIdList = CacheUtil.get(SYS_CACHE, DEPT_CHILDIDS_ID, deptId, List.class);
|
||||
if (deptIdList == null) {
|
||||
deptIdList = new ArrayList<>();
|
||||
List<Dept> deptChild = getDeptChild(deptId);
|
||||
if (deptChild != null) {
|
||||
List<Long> collect = deptChild.stream().map(Dept::getId).collect(Collectors.toList());
|
||||
deptIdList.addAll(collect);
|
||||
}
|
||||
deptIdList.add(deptId);
|
||||
CacheUtil.put(SYS_CACHE, DEPT_CHILDIDS_ID, deptId, deptIdList);
|
||||
}
|
||||
return deptIdList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
public static Post getPost(Long id) {
|
||||
return CacheUtil.get(SYS_CACHE, POST_ID, id, () -> {
|
||||
R<Post> result = getSysClient().getPost(id);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位id
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param postNames 岗位名
|
||||
* @return
|
||||
*/
|
||||
public static String getPostIds(String tenantId, String postNames) {
|
||||
return CacheUtil.get(SYS_CACHE, POST_NAME, tenantId + StringPool.DASH + postNames, () -> {
|
||||
R<String> result = getSysClient().getPostIds(tenantId, postNames);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位id
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param postNames 岗位名模糊查询
|
||||
* @return
|
||||
*/
|
||||
public static String getPostIdsByFuzzy(String tenantId, String postNames) {
|
||||
return CacheUtil.get(SYS_CACHE, POST_NAME_FUZZY, tenantId + StringPool.DASH + postNames, () -> {
|
||||
R<String> result = getSysClient().getPostIdsByFuzzy(tenantId, postNames);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位名
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 岗位名
|
||||
*/
|
||||
public static String getPostName(Long id) {
|
||||
return CacheUtil.get(SYS_CACHE, POST_NAME_ID, id, () -> {
|
||||
R<String> result = getSysClient().getPostName(id);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位名集合
|
||||
*
|
||||
* @param postIds 主键集合
|
||||
* @return 岗位名
|
||||
*/
|
||||
public static List<String> getPostNames(String postIds) {
|
||||
return CacheUtil.get(SYS_CACHE, POST_NAMES_ID, postIds, () -> {
|
||||
R<List<String>> result = getSysClient().getPostNames(postIds);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色
|
||||
*
|
||||
* @param id 主键
|
||||
* @return Role
|
||||
*/
|
||||
public static Role getRole(Long id) {
|
||||
return CacheUtil.get(SYS_CACHE, ROLE_ID, id, () -> {
|
||||
R<Role> result = getSysClient().getRole(id);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色id
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param roleNames 角色名
|
||||
* @return
|
||||
*/
|
||||
public static String getRoleIds(String tenantId, String roleNames) {
|
||||
return CacheUtil.get(SYS_CACHE, ROLE_NAME, tenantId + StringPool.DASH + roleNames, () -> {
|
||||
R<String> result = getSysClient().getRoleIds(tenantId, roleNames);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色名
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 角色名
|
||||
*/
|
||||
public static String getRoleName(Long id) {
|
||||
return CacheUtil.get(SYS_CACHE, ROLE_NAME_ID, id, () -> {
|
||||
R<String> result = getSysClient().getRoleName(id);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色别名
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 角色别名
|
||||
*/
|
||||
public static String getRoleAlias(Long id) {
|
||||
return CacheUtil.get(SYS_CACHE, ROLE_ALIAS_ID, id, () -> {
|
||||
R<String> result = getSysClient().getRoleAlias(id);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色名集合
|
||||
*
|
||||
* @param roleIds 主键集合
|
||||
* @return 角色名
|
||||
*/
|
||||
public static List<String> getRoleNames(String roleIds) {
|
||||
return CacheUtil.get(SYS_CACHE, ROLE_NAMES_ID, roleIds, () -> {
|
||||
R<List<String>> result = getSysClient().getRoleNames(roleIds);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色别名集合
|
||||
*
|
||||
* @param roleIds 主键集合
|
||||
* @return 角色别名
|
||||
*/
|
||||
public static List<String> getRoleAliases(String roleIds) {
|
||||
return CacheUtil.get(SYS_CACHE, ROLE_ALIASES_ID, roleIds, () -> {
|
||||
R<List<String>> result = getSysClient().getRoleAliases(roleIds);
|
||||
return result.getData();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取租户
|
||||
*
|
||||
* @param id 主键
|
||||
* @return Tenant
|
||||
*/
|
||||
public static Tenant getTenant(Long id) {
|
||||
return CacheUtil.get(SYS_CACHE, TENANT_ID, id, () -> Optional.ofNullable(getSysClient().getTenant(id).getData())
|
||||
.filter(tenant -> tenant.getStatus() != null)
|
||||
.filter(tenant -> tenant.getStatus() == StatusType.ACTIVE.getType())
|
||||
.orElse(null), Boolean.FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取租户
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @return Tenant
|
||||
*/
|
||||
public static Tenant getTenant(String tenantId) {
|
||||
return CacheUtil.get(SYS_CACHE, TENANT_TENANT_ID, tenantId, () -> Optional.ofNullable(getSysClient().getTenant(tenantId).getData())
|
||||
.filter(tenant -> tenant.getStatus() != null)
|
||||
.filter(tenant -> tenant.getStatus() == StatusType.ACTIVE.getType())
|
||||
.orElse(null), Boolean.FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取租户产品包
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @return Tenant
|
||||
*/
|
||||
public static TenantPackage getTenantPackage(String tenantId) {
|
||||
return CacheUtil.get(SYS_CACHE, TENANT_PACKAGE_ID, tenantId, () -> {
|
||||
R<TenantPackage> result = getSysClient().getTenantPackage(tenantId);
|
||||
return result.getData();
|
||||
}, Boolean.FALSE);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.feign;
|
||||
|
||||
import org.springblade.core.launch.constant.AppConstant;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* 认证锁定 Feign接口类
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
@FeignClient(
|
||||
value = AppConstant.APPLICATION_SYSTEM_NAME,
|
||||
fallback = IAuthLockClientFallback.class
|
||||
)
|
||||
public interface IAuthLockClient {
|
||||
|
||||
String API_PREFIX = "/feign/client/auth-lock";
|
||||
String IS_ACCOUNT_LOCKED = API_PREFIX + "/is-account-locked";
|
||||
String IS_IP_LOCKED = API_PREFIX + "/is-ip-locked";
|
||||
String ADD_ACCOUNT_FAIL_COUNT = API_PREFIX + "/add-account-fail-count";
|
||||
String ADD_IP_FAIL_COUNT = API_PREFIX + "/add-ip-fail-count";
|
||||
String RELEASE_SYSTEM_LOCK = API_PREFIX + "/release-system-lock";
|
||||
String RELEASE_SYSTEM_IP_LOCK = API_PREFIX + "/release-system-ip-lock";
|
||||
|
||||
/**
|
||||
* 检查账号是否锁定
|
||||
*
|
||||
* @param tenantId 租户ID
|
||||
* @param account 账号
|
||||
* @return boolean
|
||||
*/
|
||||
@GetMapping(IS_ACCOUNT_LOCKED)
|
||||
R<Boolean> isAccountLocked(@RequestParam("tenantId") String tenantId, @RequestParam("account") String account);
|
||||
|
||||
/**
|
||||
* 检查IP是否锁定
|
||||
*
|
||||
* @param tenantId 租户ID
|
||||
* @param ip IP地址
|
||||
* @return boolean
|
||||
*/
|
||||
@GetMapping(IS_IP_LOCKED)
|
||||
R<Boolean> isIpLocked(@RequestParam("tenantId") String tenantId, @RequestParam("ip") String ip);
|
||||
|
||||
/**
|
||||
* 增加账号认证失败次数
|
||||
*
|
||||
* @param tenantId 租户ID
|
||||
* @param account 账号
|
||||
* @param userId 用户ID
|
||||
* @param ip IP地址
|
||||
* @param userAgent 用户代理
|
||||
* @return void
|
||||
*/
|
||||
@PostMapping(ADD_ACCOUNT_FAIL_COUNT)
|
||||
R<Void> addAccountFailCount(@RequestParam("tenantId") String tenantId, @RequestParam("account") String account,
|
||||
@RequestParam(value = "userId", required = false) Long userId,
|
||||
@RequestParam("ip") String ip, @RequestParam(value = "userAgent", required = false) String userAgent);
|
||||
|
||||
/**
|
||||
* 增加IP认证失败次数
|
||||
*
|
||||
* @param tenantId 租户ID
|
||||
* @param ip IP地址
|
||||
* @param userAgent 用户代理
|
||||
* @return void
|
||||
*/
|
||||
@PostMapping(ADD_IP_FAIL_COUNT)
|
||||
R<Void> addIpFailCount(@RequestParam("tenantId") String tenantId, @RequestParam("ip") String ip,
|
||||
@RequestParam(value = "userAgent", required = false) String userAgent);
|
||||
|
||||
/**
|
||||
* 释放账号的系统自动锁定
|
||||
*
|
||||
* @param tenantId 租户ID
|
||||
* @param account 账号
|
||||
* @return void
|
||||
*/
|
||||
@PostMapping(RELEASE_SYSTEM_LOCK)
|
||||
R<Void> releaseSystemLock(@RequestParam("tenantId") String tenantId, @RequestParam("account") String account);
|
||||
|
||||
/**
|
||||
* 释放IP的系统自动锁定
|
||||
*
|
||||
* @param tenantId 租户ID
|
||||
* @param ip IP地址
|
||||
* @return void
|
||||
*/
|
||||
@PostMapping(RELEASE_SYSTEM_IP_LOCK)
|
||||
R<Void> releaseSystemIpLock(@RequestParam("tenantId") String tenantId, @RequestParam("ip") String ip);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.feign;
|
||||
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 认证锁定 Feign失败配置
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
@Component
|
||||
public class IAuthLockClientFallback implements IAuthLockClient {
|
||||
|
||||
@Override
|
||||
public R<Boolean> isAccountLocked(String tenantId, String account) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Boolean> isIpLocked(String tenantId, String ip) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Void> addAccountFailCount(String tenantId, String account, Long userId, String ip, String userAgent) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Void> addIpFailCount(String tenantId, String ip, String userAgent) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Void> releaseSystemLock(String tenantId, String account) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Void> releaseSystemIpLock(String tenantId, String ip) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.feign;
|
||||
|
||||
import org.springblade.core.launch.constant.AppConstant;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.system.pojo.entity.AuthLog;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* 认证日志 Feign接口类
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
@FeignClient(
|
||||
value = AppConstant.APPLICATION_SYSTEM_NAME,
|
||||
fallback = IAuthLogClientFallback.class
|
||||
)
|
||||
public interface IAuthLogClient {
|
||||
|
||||
String API_PREFIX = "/feign/client/auth-log";
|
||||
String SAVE_AUTH_LOG = API_PREFIX + "/save";
|
||||
|
||||
/**
|
||||
* 保存认证日志
|
||||
*
|
||||
* @param authLog 认证日志实体
|
||||
* @return R<Void>
|
||||
*/
|
||||
@PostMapping(SAVE_AUTH_LOG)
|
||||
R<Void> saveAuthLog(@RequestBody AuthLog authLog);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.feign;
|
||||
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.system.pojo.entity.AuthLog;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 认证日志 Feign失败配置
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
@Component
|
||||
public class IAuthLogClientFallback implements IAuthLogClient {
|
||||
|
||||
@Override
|
||||
public R<Void> saveAuthLog(AuthLog authLog) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,295 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.feign;
|
||||
|
||||
import org.springblade.core.launch.constant.AppConstant;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.system.pojo.entity.*;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Feign接口类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@FeignClient(
|
||||
value = AppConstant.APPLICATION_SYSTEM_NAME,
|
||||
fallback = ISysClientFallback.class
|
||||
)
|
||||
public interface ISysClient {
|
||||
|
||||
String API_PREFIX = "/feign/client/system";
|
||||
String MENU = API_PREFIX + "/menu";
|
||||
String DEPT = API_PREFIX + "/dept";
|
||||
String DEPT_IDS = API_PREFIX + "/dept-ids";
|
||||
String DEPT_IDS_FUZZY = API_PREFIX + "/dept-ids-fuzzy";
|
||||
String DEPT_NAME = API_PREFIX + "/dept-name";
|
||||
String DEPT_NAMES = API_PREFIX + "/dept-names";
|
||||
String DEPT_CHILD = API_PREFIX + "/dept-child";
|
||||
String POST = API_PREFIX + "/post";
|
||||
String POST_IDS = API_PREFIX + "/post-ids";
|
||||
String POST_IDS_FUZZY = API_PREFIX + "/post-ids-fuzzy";
|
||||
String POST_NAME = API_PREFIX + "/post-name";
|
||||
String POST_NAMES = API_PREFIX + "/post-names";
|
||||
String ROLE = API_PREFIX + "/role";
|
||||
String ROLE_IDS = API_PREFIX + "/role-ids";
|
||||
String ROLE_NAME = API_PREFIX + "/role-name";
|
||||
String ROLE_NAMES = API_PREFIX + "/role-names";
|
||||
String ROLE_ALIAS = API_PREFIX + "/role-alias";
|
||||
String ROLE_ALIASES = API_PREFIX + "/role-aliases";
|
||||
String TENANT = API_PREFIX + "/tenant";
|
||||
String TENANT_ID = API_PREFIX + "/tenant-id";
|
||||
String TENANT_PACKAGE = API_PREFIX + "/tenant-package";
|
||||
String PARAM = API_PREFIX + "/param";
|
||||
String PARAM_VALUE = API_PREFIX + "/param-value";
|
||||
String REGION = API_PREFIX + "/region";
|
||||
|
||||
/**
|
||||
* 获取菜单
|
||||
*
|
||||
* @param id 主键
|
||||
* @return Menu
|
||||
*/
|
||||
@GetMapping(MENU)
|
||||
R<Menu> getMenu(@RequestParam("id") Long id);
|
||||
|
||||
/**
|
||||
* 获取部门
|
||||
*
|
||||
* @param id 主键
|
||||
* @return Dept
|
||||
*/
|
||||
@GetMapping(DEPT)
|
||||
R<Dept> getDept(@RequestParam("id") Long id);
|
||||
|
||||
/**
|
||||
* 获取部门id
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param deptNames 部门名
|
||||
* @return 部门id
|
||||
*/
|
||||
@GetMapping(DEPT_IDS)
|
||||
R<String> getDeptIds(@RequestParam("tenantId") String tenantId, @RequestParam("deptNames") String deptNames);
|
||||
|
||||
/**
|
||||
* 获取部门id
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param deptNames 部门名
|
||||
* @return 部门id
|
||||
*/
|
||||
@GetMapping(DEPT_IDS_FUZZY)
|
||||
R<String> getDeptIdsByFuzzy(@RequestParam("tenantId") String tenantId, @RequestParam("deptNames") String deptNames);
|
||||
|
||||
/**
|
||||
* 获取部门名
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 部门名
|
||||
*/
|
||||
@GetMapping(DEPT_NAME)
|
||||
R<String> getDeptName(@RequestParam("id") Long id);
|
||||
|
||||
/**
|
||||
* 获取部门名
|
||||
*
|
||||
* @param deptIds 主键
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(DEPT_NAMES)
|
||||
R<List<String>> getDeptNames(@RequestParam("deptIds") String deptIds);
|
||||
|
||||
/**
|
||||
* 获取子部门ID
|
||||
*
|
||||
* @param deptId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(DEPT_CHILD)
|
||||
R<List<Dept>> getDeptChild(@RequestParam("deptId") Long deptId);
|
||||
|
||||
/**
|
||||
* 获取岗位
|
||||
*
|
||||
* @param id 主键
|
||||
* @return Post
|
||||
*/
|
||||
@GetMapping(POST)
|
||||
R<Post> getPost(@RequestParam("id") Long id);
|
||||
|
||||
/**
|
||||
* 获取岗位id
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param postNames 岗位名
|
||||
* @return 岗位id
|
||||
*/
|
||||
@GetMapping(POST_IDS)
|
||||
R<String> getPostIds(@RequestParam("tenantId") String tenantId, @RequestParam("postNames") String postNames);
|
||||
|
||||
/**
|
||||
* 获取岗位id
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param postNames 岗位名
|
||||
* @return 岗位id
|
||||
*/
|
||||
@GetMapping(POST_IDS_FUZZY)
|
||||
R<String> getPostIdsByFuzzy(@RequestParam("tenantId") String tenantId, @RequestParam("postNames") String postNames);
|
||||
|
||||
/**
|
||||
* 获取岗位名
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 岗位名
|
||||
*/
|
||||
@GetMapping(POST_NAME)
|
||||
R<String> getPostName(@RequestParam("id") Long id);
|
||||
|
||||
/**
|
||||
* 获取岗位名
|
||||
*
|
||||
* @param postIds 主键
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(POST_NAMES)
|
||||
R<List<String>> getPostNames(@RequestParam("postIds") String postIds);
|
||||
|
||||
/**
|
||||
* 获取角色
|
||||
*
|
||||
* @param id 主键
|
||||
* @return Role
|
||||
*/
|
||||
@GetMapping(ROLE)
|
||||
R<Role> getRole(@RequestParam("id") Long id);
|
||||
|
||||
/**
|
||||
* 获取角色id
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @param roleNames 角色名
|
||||
* @return 角色id
|
||||
*/
|
||||
@GetMapping(ROLE_IDS)
|
||||
R<String> getRoleIds(@RequestParam("tenantId") String tenantId, @RequestParam("roleNames") String roleNames);
|
||||
|
||||
/**
|
||||
* 获取角色名
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 角色名
|
||||
*/
|
||||
@GetMapping(ROLE_NAME)
|
||||
R<String> getRoleName(@RequestParam("id") Long id);
|
||||
|
||||
/**
|
||||
* 获取角色别名
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 角色别名
|
||||
*/
|
||||
@GetMapping(ROLE_ALIAS)
|
||||
R<String> getRoleAlias(@RequestParam("id") Long id);
|
||||
|
||||
/**
|
||||
* 获取角色名
|
||||
*
|
||||
* @param roleIds 主键
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(ROLE_NAMES)
|
||||
R<List<String>> getRoleNames(@RequestParam("roleIds") String roleIds);
|
||||
|
||||
/**
|
||||
* 获取角色别名
|
||||
*
|
||||
* @param roleIds 主键
|
||||
* @return 角色别名
|
||||
*/
|
||||
@GetMapping(ROLE_ALIASES)
|
||||
R<List<String>> getRoleAliases(@RequestParam("roleIds") String roleIds);
|
||||
|
||||
/**
|
||||
* 获取租户
|
||||
*
|
||||
* @param id 主键
|
||||
* @return Tenant
|
||||
*/
|
||||
@GetMapping(TENANT)
|
||||
R<Tenant> getTenant(@RequestParam("id") Long id);
|
||||
|
||||
/**
|
||||
* 获取租户
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @return Tenant
|
||||
*/
|
||||
@GetMapping(TENANT_ID)
|
||||
R<Tenant> getTenant(@RequestParam("tenantId") String tenantId);
|
||||
|
||||
/**
|
||||
* 获取租户产品包
|
||||
*
|
||||
* @param tenantId 租户id
|
||||
* @return Tenant
|
||||
*/
|
||||
@GetMapping(TENANT_PACKAGE)
|
||||
R<TenantPackage> getTenantPackage(@RequestParam("tenantId") String tenantId);
|
||||
|
||||
/**
|
||||
* 获取参数
|
||||
*
|
||||
* @param id 主键
|
||||
* @return Param
|
||||
*/
|
||||
@GetMapping(PARAM)
|
||||
R<Param> getParam(@RequestParam("id") Long id);
|
||||
|
||||
/**
|
||||
* 获取参数配置
|
||||
*
|
||||
* @param paramKey 参数key
|
||||
* @return String
|
||||
*/
|
||||
@GetMapping(PARAM_VALUE)
|
||||
R<String> getParamValue(@RequestParam("paramKey") String paramKey);
|
||||
|
||||
/**
|
||||
* 获取行政区划
|
||||
*
|
||||
* @param code 主键
|
||||
* @return Region
|
||||
*/
|
||||
@GetMapping(REGION)
|
||||
R<Region> getRegion(@RequestParam("code") String code);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.feign;
|
||||
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.system.pojo.entity.*;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Feign失败配置
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Component
|
||||
public class ISysClientFallback implements ISysClient {
|
||||
|
||||
@Override
|
||||
public R<Menu> getMenu(Long id) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Dept> getDept(Long id) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<String> getDeptIds(String tenantId, String deptNames) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<String> getDeptIdsByFuzzy(String tenantId, String deptNames) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<String> getDeptName(Long id) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<List<String>> getDeptNames(String deptIds) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<List<Dept>> getDeptChild(Long deptId) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Post> getPost(Long id) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<String> getPostIds(String tenantId, String postNames) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<String> getPostIdsByFuzzy(String tenantId, String postNames) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<String> getPostName(Long id) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<List<String>> getPostNames(String postIds) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Role> getRole(Long id) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<String> getRoleIds(String tenantId, String roleNames) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<String> getRoleName(Long id) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<String> getRoleAlias(Long id) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<List<String>> getRoleNames(String roleIds) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<List<String>> getRoleAliases(String roleIds) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Tenant> getTenant(Long id) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Tenant> getTenant(String tenantId) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<TenantPackage> getTenantPackage(String tenantId) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Param> getParam(Long id) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<String> getParamValue(String paramKey) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Region> getRegion(String code) {
|
||||
return R.fail("获取数据失败");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.system.pojo.entity.Dept;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 数据传输对象实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DeptDTO extends Dept {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 数据传输对象实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
public class MenuDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String alias;
|
||||
private String path;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.system.pojo.entity.Param;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 数据传输对象实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ParamDTO extends Param {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.system.pojo.entity.Post;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 岗位表数据传输对象实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PostDTO extends Post {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.system.pojo.entity.Role;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 数据传输对象实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RoleDTO extends Role {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.system.pojo.entity.RoleMenu;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 数据传输对象实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RoleMenuDTO extends RoleMenu {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.tenant.mp.TenantEntity;
|
||||
import org.springblade.core.tool.jackson.Sensitive;
|
||||
import org.springblade.core.tool.sensitive.SensitiveType;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 令牌权限 实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_api_key")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "ApiKey对象")
|
||||
public class ApiKey extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 令牌权限
|
||||
*/
|
||||
@Sensitive(type = SensitiveType.KEYS)
|
||||
@Schema(description = "API Key")
|
||||
private String apiKey;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 密钥名称
|
||||
*/
|
||||
@Schema(description = "密钥名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 过期时间
|
||||
*/
|
||||
@Schema(description = "过期时间")
|
||||
private Date expireTime;
|
||||
|
||||
/**
|
||||
* 扩展参数 (JSON格式, 存储 userId, deptId, roleId 等)
|
||||
*/
|
||||
@Schema(description = "扩展参数")
|
||||
private String extParams;
|
||||
|
||||
/**
|
||||
* 访问权限 (逗号分隔的URL路径,支持Ant风格匹配)
|
||||
*/
|
||||
@Schema(description = "访问权限")
|
||||
private String apiPath;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_scope_api")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "ApiScope对象")
|
||||
public class ApiScope extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 菜单主键
|
||||
*/
|
||||
@Schema(description = "菜单主键")
|
||||
private Long menuId;
|
||||
/**
|
||||
* 资源编号
|
||||
*/
|
||||
@Schema(description = "资源编号")
|
||||
private String resourceCode;
|
||||
/**
|
||||
* 接口权限名称
|
||||
*/
|
||||
@Schema(description = "接口权限名称")
|
||||
private String scopeName;
|
||||
/**
|
||||
* 接口权限字段
|
||||
*/
|
||||
@Schema(description = "接口权限字段")
|
||||
private String scopePath;
|
||||
/**
|
||||
* 接口权限类型
|
||||
*/
|
||||
@Schema(description = "接口权限类型")
|
||||
private Integer scopeType;
|
||||
/**
|
||||
* 接口权限备注
|
||||
*/
|
||||
@Schema(description = "接口权限备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_client")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "Client对象")
|
||||
public class AuthClient extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 客户端id
|
||||
*/
|
||||
@Schema(description = "客户端id")
|
||||
private String clientId;
|
||||
/**
|
||||
* 客户端密钥
|
||||
*/
|
||||
@Schema(description = "客户端密钥")
|
||||
private String clientSecret;
|
||||
/**
|
||||
* 资源集合
|
||||
*/
|
||||
@Schema(description = "资源集合")
|
||||
private String resourceIds;
|
||||
/**
|
||||
* 授权范围
|
||||
*/
|
||||
@Schema(description = "授权范围")
|
||||
private String scope;
|
||||
/**
|
||||
* 授权类型
|
||||
*/
|
||||
@Schema(description = "授权类型")
|
||||
private String authorizedGrantTypes;
|
||||
/**
|
||||
* 回调地址
|
||||
*/
|
||||
@Schema(description = "回调地址")
|
||||
private String webServerRedirectUri;
|
||||
/**
|
||||
* 权限
|
||||
*/
|
||||
@Schema(description = "权限")
|
||||
private String authorities;
|
||||
/**
|
||||
* 令牌过期秒数
|
||||
*/
|
||||
@Schema(description = "令牌过期秒数")
|
||||
private Integer accessTokenValidity;
|
||||
/**
|
||||
* 刷新令牌过期秒数
|
||||
*/
|
||||
@Schema(description = "刷新令牌过期秒数")
|
||||
private Integer refreshTokenValidity;
|
||||
/**
|
||||
* 附加说明
|
||||
*/
|
||||
@JsonIgnore
|
||||
@Schema(description = "附加说明")
|
||||
private String additionalInformation;
|
||||
/**
|
||||
* 自动授权
|
||||
*/
|
||||
@Schema(description = "自动授权")
|
||||
private String autoapprove;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springblade.system.pojo.enums.AuthLockStatus;
|
||||
import org.springblade.system.pojo.enums.AuthLockType;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 认证锁定记录实体类
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_auth_lock")
|
||||
public class AuthLock implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
private String tenantId;
|
||||
private AuthLockType lockType;
|
||||
private AuthLockStatus lockStatus;
|
||||
private String lockTarget;
|
||||
private String remoteIp;
|
||||
private String userAgent;
|
||||
private Long userId;
|
||||
private Date lockBeginTime;
|
||||
private Date lockEndTime;
|
||||
private String lockReason;
|
||||
private String unlockReason;
|
||||
private Integer failCount;
|
||||
private Integer status;
|
||||
@TableLogic
|
||||
private Integer isDeleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 认证日志实体类
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_auth_log")
|
||||
public class AuthLog implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 服务ID
|
||||
*/
|
||||
private String serviceId;
|
||||
|
||||
/**
|
||||
* 服务器IP地址
|
||||
*/
|
||||
private String serverIp;
|
||||
|
||||
/**
|
||||
* 服务器名
|
||||
*/
|
||||
private String serverHost;
|
||||
|
||||
/**
|
||||
* 服务器环境
|
||||
*/
|
||||
private String env;
|
||||
|
||||
/**
|
||||
* 授权账号
|
||||
*/
|
||||
private String account;
|
||||
|
||||
/**
|
||||
* 用户姓名
|
||||
*/
|
||||
private String realName;
|
||||
|
||||
/**
|
||||
* 授权类型
|
||||
*/
|
||||
private String grantType;
|
||||
|
||||
/**
|
||||
* 请求IP
|
||||
*/
|
||||
private String remoteIp;
|
||||
|
||||
/**
|
||||
* 用户代理
|
||||
*/
|
||||
private String userAgent;
|
||||
|
||||
/**
|
||||
* 登录时间
|
||||
*/
|
||||
private Date loginTime;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 是否已删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer isDeleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_scope_data")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "DataScope对象")
|
||||
public class DataScope extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 菜单主键
|
||||
*/
|
||||
@Schema(description = "菜单主键")
|
||||
private Long menuId;
|
||||
/**
|
||||
* 资源编号
|
||||
*/
|
||||
@Schema(description = "资源编号")
|
||||
private String resourceCode;
|
||||
/**
|
||||
* 数据权限名称
|
||||
*/
|
||||
@Schema(description = "数据权限名称")
|
||||
private String scopeName;
|
||||
/**
|
||||
* 数据权限可见字段
|
||||
*/
|
||||
@Schema(description = "数据权限可见字段")
|
||||
private String scopeField;
|
||||
/**
|
||||
* 数据权限类名
|
||||
*/
|
||||
@Schema(description = "数据权限类名")
|
||||
private String scopeClass;
|
||||
/**
|
||||
* 数据权限字段
|
||||
*/
|
||||
@Schema(description = "数据权限字段")
|
||||
private String scopeColumn;
|
||||
/**
|
||||
* 数据权限类型
|
||||
*/
|
||||
@Schema(description = "数据权限类型")
|
||||
private Integer scopeType;
|
||||
/**
|
||||
* 数据权限值域
|
||||
*/
|
||||
@Schema(description = "数据权限值域")
|
||||
private String scopeValue;
|
||||
/**
|
||||
* 数据权限备注
|
||||
*/
|
||||
@Schema(description = "数据权限备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_dept")
|
||||
@Schema(description = "Dept对象")
|
||||
public class Dept implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@Schema(description = "租户ID")
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 父主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "父主键")
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 机构名
|
||||
*/
|
||||
@Schema(description = "机构名")
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 机构全称
|
||||
*/
|
||||
@Schema(description = "机构全称")
|
||||
private String fullName;
|
||||
|
||||
/**
|
||||
* 祖级机构主键
|
||||
*/
|
||||
@Schema(description = "祖级机构主键")
|
||||
private String ancestors;
|
||||
|
||||
/**
|
||||
* 部门主管id
|
||||
*/
|
||||
@Schema(description = "部门主管id")
|
||||
private String leaderId;
|
||||
|
||||
/**
|
||||
* 机构类型
|
||||
*/
|
||||
@Schema(description = "机构类型")
|
||||
private Integer deptCategory;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 业务状态
|
||||
*/
|
||||
@Schema(description = "业务状态")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 是否已删除
|
||||
*/
|
||||
@TableLogic
|
||||
@Schema(description = "是否已删除")
|
||||
private Integer isDeleted;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_menu")
|
||||
@Schema(description = "Menu对象")
|
||||
public class Menu implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 菜单父主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "菜单父主键")
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 菜单编号
|
||||
*/
|
||||
@Schema(description = "菜单编号")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
@Schema(description = "菜单名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 菜单别名
|
||||
*/
|
||||
@Schema(description = "菜单别名")
|
||||
private String alias;
|
||||
|
||||
/**
|
||||
* 请求地址
|
||||
*/
|
||||
@Schema(description = "请求地址")
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 菜单资源
|
||||
*/
|
||||
@Schema(description = "菜单资源")
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* 组件资源
|
||||
*/
|
||||
@Schema(description = "组件资源")
|
||||
private String component;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 菜单类型
|
||||
*/
|
||||
@Schema(description = "菜单类型")
|
||||
private Integer category;
|
||||
|
||||
/**
|
||||
* 操作按钮类型
|
||||
*/
|
||||
@Schema(description = "操作按钮类型")
|
||||
private Integer action;
|
||||
|
||||
/**
|
||||
* 是否打开新页面
|
||||
*/
|
||||
@Schema(description = "是否打开新页面")
|
||||
private Integer isOpen;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 是否已删除
|
||||
*/
|
||||
@TableLogic
|
||||
@Schema(description = "是否已删除")
|
||||
private Integer isDeleted;
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
Menu other = (Menu) obj;
|
||||
return Func.equals(this.getId(), other.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, parentId, code);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_param")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "Param对象")
|
||||
public class Param extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 参数名
|
||||
*/
|
||||
@Schema(description = "参数名")
|
||||
private String paramName;
|
||||
|
||||
/**
|
||||
* 参数键
|
||||
*/
|
||||
@Schema(description = "参数键")
|
||||
private String paramKey;
|
||||
|
||||
/**
|
||||
* 参数值
|
||||
*/
|
||||
@Schema(description = "参数值")
|
||||
private String paramValue;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.tenant.mp.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 岗位表实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_post")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "岗位表")
|
||||
public class Post extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@Schema(description = "类型")
|
||||
private Integer category;
|
||||
/**
|
||||
* 岗位编号
|
||||
*/
|
||||
@Schema(description = "岗位编号")
|
||||
private String postCode;
|
||||
/**
|
||||
* 岗位名称
|
||||
*/
|
||||
@Schema(description = "岗位名称")
|
||||
private String postName;
|
||||
/**
|
||||
* 岗位排序
|
||||
*/
|
||||
@Schema(description = "岗位排序")
|
||||
private Integer sort;
|
||||
/**
|
||||
* 岗位描述
|
||||
*/
|
||||
@Schema(description = "岗位描述")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.tenant.mp.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 限流规则 实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_rate_limit")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "RateLimit对象")
|
||||
public class RateLimit extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 规则名称
|
||||
*/
|
||||
@Schema(description = "规则名称")
|
||||
private String limitName;
|
||||
|
||||
/**
|
||||
* URL匹配模式, 支持 Ant 风格, 多个以逗号分隔 (如 /blade-system/user/**,/blade-system/role/**)
|
||||
*/
|
||||
@Schema(description = "URL匹配模式")
|
||||
private String limitPattern;
|
||||
|
||||
/**
|
||||
* 请求方法, GET/POST/PUT/DELETE/ALL, ALL 表示不限方法
|
||||
*/
|
||||
@Schema(description = "请求方法")
|
||||
private String requestMethod;
|
||||
|
||||
/**
|
||||
* 限流维度, GLOBAL/TENANT/IP/USER, 决定限流计数的隔离粒度
|
||||
*/
|
||||
@Schema(description = "限流维度")
|
||||
private String limitDimension;
|
||||
|
||||
/**
|
||||
* 时间窗口内允许的最大请求数
|
||||
*/
|
||||
@Schema(description = "请求阈值")
|
||||
private Integer limitCount;
|
||||
|
||||
/**
|
||||
* 时间窗口大小
|
||||
*/
|
||||
@Schema(description = "时间窗口")
|
||||
private Integer limitPeriod;
|
||||
|
||||
/**
|
||||
* 时间单位, SECONDS/MINUTES/HOURS, 映射 java.util.concurrent.TimeUnit
|
||||
*/
|
||||
@Schema(description = "时间单位")
|
||||
private String timeUnit;
|
||||
|
||||
/**
|
||||
* 优先级, 升序匹配, 数值越小越先命中
|
||||
*/
|
||||
@Schema(description = "优先级")
|
||||
private Integer priority;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 限流触发日志 实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_rate_limit_log")
|
||||
public class RateLimitLog implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 服务ID
|
||||
*/
|
||||
private String serviceId;
|
||||
|
||||
/**
|
||||
* 服务器IP
|
||||
*/
|
||||
private String serverIp;
|
||||
|
||||
/**
|
||||
* 服务器名
|
||||
*/
|
||||
private String serverHost;
|
||||
|
||||
/**
|
||||
* 环境
|
||||
*/
|
||||
private String env;
|
||||
|
||||
/**
|
||||
* 限流规则主键ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long limitId;
|
||||
|
||||
/**
|
||||
* 规则名称
|
||||
*/
|
||||
private String limitName;
|
||||
|
||||
/**
|
||||
* 限流维度
|
||||
*/
|
||||
private String limitDimension;
|
||||
|
||||
/**
|
||||
* 请求阈值
|
||||
*/
|
||||
private Integer limitCount;
|
||||
|
||||
/**
|
||||
* 时间窗口
|
||||
*/
|
||||
private Integer limitPeriod;
|
||||
|
||||
/**
|
||||
* 时间单位
|
||||
*/
|
||||
private String timeUnit;
|
||||
|
||||
/**
|
||||
* 限流计数key
|
||||
*/
|
||||
private String limitKey;
|
||||
|
||||
/**
|
||||
* 请求URI
|
||||
*/
|
||||
private String requestUri;
|
||||
|
||||
/**
|
||||
* 操作方式
|
||||
*/
|
||||
private String method;
|
||||
|
||||
/**
|
||||
* 操作IP地址
|
||||
*/
|
||||
private String remoteIp;
|
||||
|
||||
/**
|
||||
* 用户代理
|
||||
*/
|
||||
private String userAgent;
|
||||
|
||||
/**
|
||||
* 操作提交的数据
|
||||
*/
|
||||
private String params;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 数据审计表 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_record_data")
|
||||
@Schema(description = "RecordData对象")
|
||||
public class RecordData implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 服务ID
|
||||
*/
|
||||
@Schema(description = "服务ID")
|
||||
private String serviceId;
|
||||
/**
|
||||
* 服务器名
|
||||
*/
|
||||
@Schema(description = "服务器名")
|
||||
private String serverHost;
|
||||
/**
|
||||
* 服务器IP地址
|
||||
*/
|
||||
@Schema(description = "服务器IP地址")
|
||||
private String serverIp;
|
||||
/**
|
||||
* 服务器环境
|
||||
*/
|
||||
@Schema(description = "服务器环境")
|
||||
private String env;
|
||||
/**
|
||||
* 审计级别
|
||||
*/
|
||||
@Schema(description = "审计级别")
|
||||
private String recordLevel;
|
||||
/**
|
||||
* 操作方式
|
||||
*/
|
||||
@Schema(description = "操作方式")
|
||||
private String method;
|
||||
/**
|
||||
* 请求URI
|
||||
*/
|
||||
@Schema(description = "请求URI")
|
||||
private String requestUri;
|
||||
/**
|
||||
* 用户代理
|
||||
*/
|
||||
@Schema(description = "用户代理")
|
||||
private String userAgent;
|
||||
/**
|
||||
* 操作IP地址
|
||||
*/
|
||||
@Schema(description = "操作IP地址")
|
||||
private String remoteIp;
|
||||
/**
|
||||
* 操作类型
|
||||
*/
|
||||
@Schema(description = "操作类型")
|
||||
private String operation;
|
||||
/**
|
||||
* 数据表名
|
||||
*/
|
||||
@Schema(description = "数据表名")
|
||||
private String tableName;
|
||||
/**
|
||||
* 操作前参数
|
||||
*/
|
||||
@Schema(description = "操作前参数")
|
||||
private String oldData;
|
||||
/**
|
||||
* 操作后参数
|
||||
*/
|
||||
@Schema(description = "操作后参数")
|
||||
private String newData;
|
||||
/**
|
||||
* 审计消息
|
||||
*/
|
||||
@Schema(description = "审计消息")
|
||||
private String recordMessage;
|
||||
/**
|
||||
* 审计结果
|
||||
*/
|
||||
@Schema(description = "审计结果")
|
||||
private String recordResult;
|
||||
/**
|
||||
* 记录耗时
|
||||
*/
|
||||
@Schema(description = "记录耗时")
|
||||
private String recordCost;
|
||||
/**
|
||||
* 记录时间
|
||||
*/
|
||||
@Schema(description = "记录时间")
|
||||
private LocalDateTime recordTime;
|
||||
/**
|
||||
* 记录人
|
||||
*/
|
||||
@Schema(description = "记录人")
|
||||
private Long recordUser;
|
||||
|
||||
/**
|
||||
* 业务状态
|
||||
*/
|
||||
@Schema(description = "业务状态")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 是否已删除
|
||||
*/
|
||||
@TableLogic
|
||||
@Schema(description = "是否已删除")
|
||||
private Integer isDeleted;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 行政区划表实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_region")
|
||||
@Schema(description = "行政区划表")
|
||||
public class Region implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 区划编号
|
||||
*/
|
||||
@TableId(value = "code", type = IdType.INPUT)
|
||||
@Schema(description = "区划编号")
|
||||
private String code;
|
||||
/**
|
||||
* 父区划编号
|
||||
*/
|
||||
@Schema(description = "父区划编号")
|
||||
private String parentCode;
|
||||
/**
|
||||
* 祖区划编号
|
||||
*/
|
||||
@Schema(description = "祖区划编号")
|
||||
private String ancestors;
|
||||
/**
|
||||
* 区划名称
|
||||
*/
|
||||
@Schema(description = "区划名称")
|
||||
private String name;
|
||||
/**
|
||||
* 省级区划编号
|
||||
*/
|
||||
@Schema(description = "省级区划编号")
|
||||
private String provinceCode;
|
||||
/**
|
||||
* 省级名称
|
||||
*/
|
||||
@Schema(description = "省级名称")
|
||||
private String provinceName;
|
||||
/**
|
||||
* 市级区划编号
|
||||
*/
|
||||
@Schema(description = "市级区划编号")
|
||||
private String cityCode;
|
||||
/**
|
||||
* 市级名称
|
||||
*/
|
||||
@Schema(description = "市级名称")
|
||||
private String cityName;
|
||||
/**
|
||||
* 区级区划编号
|
||||
*/
|
||||
@Schema(description = "区级区划编号")
|
||||
private String districtCode;
|
||||
/**
|
||||
* 区级名称
|
||||
*/
|
||||
@Schema(description = "区级名称")
|
||||
private String districtName;
|
||||
/**
|
||||
* 镇级区划编号
|
||||
*/
|
||||
@Schema(description = "镇级区划编号")
|
||||
private String townCode;
|
||||
/**
|
||||
* 镇级名称
|
||||
*/
|
||||
@Schema(description = "镇级名称")
|
||||
private String townName;
|
||||
/**
|
||||
* 村级区划编号
|
||||
*/
|
||||
@Schema(description = "村级区划编号")
|
||||
private String villageCode;
|
||||
/**
|
||||
* 村级名称
|
||||
*/
|
||||
@Schema(description = "村级名称")
|
||||
private String villageName;
|
||||
/**
|
||||
* 层级
|
||||
*/
|
||||
@Schema(description = "层级")
|
||||
private Integer regionLevel;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_role")
|
||||
@Schema(description = "Role对象")
|
||||
public class Role implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@Schema(description = "租户ID")
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 父主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "父主键")
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 角色名
|
||||
*/
|
||||
@Schema(description = "角色名")
|
||||
private String roleName;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 角色别名
|
||||
*/
|
||||
@Schema(description = "角色别名")
|
||||
private String roleAlias;
|
||||
|
||||
/**
|
||||
* 业务状态
|
||||
*/
|
||||
@Schema(description = "业务状态")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 是否已删除
|
||||
*/
|
||||
@TableLogic
|
||||
@Schema(description = "是否已删除")
|
||||
private Integer isDeleted;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_role_menu")
|
||||
@Schema(description = "RoleMenu对象")
|
||||
public class RoleMenu implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 菜单id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "菜单id")
|
||||
private Long menuId;
|
||||
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "角色id")
|
||||
private Long roleId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_role_scope")
|
||||
@Schema(description = "RoleScope对象")
|
||||
public class RoleScope implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 权限类型
|
||||
*/
|
||||
@Schema(description = "权限类型")
|
||||
private Integer scopeCategory;
|
||||
|
||||
/**
|
||||
* 权限id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "权限id")
|
||||
private Long scopeId;
|
||||
|
||||
/**
|
||||
* 角色id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "角色id")
|
||||
private Long roleId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_tenant")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "Tenant对象")
|
||||
public class Tenant extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@Schema(description = "租户ID")
|
||||
private String tenantId;
|
||||
/**
|
||||
* 租户名称
|
||||
*/
|
||||
@Schema(description = "租户名称")
|
||||
private String tenantName;
|
||||
/**
|
||||
* 域名地址
|
||||
*/
|
||||
@Schema(description = "域名地址")
|
||||
private String domainUrl;
|
||||
/**
|
||||
* 系统背景
|
||||
*/
|
||||
@Schema(description = "系统背景")
|
||||
private String backgroundUrl;
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
@Schema(description = "联系人")
|
||||
private String linkman;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@Schema(description = "联系电话")
|
||||
private String contactNumber;
|
||||
/**
|
||||
* 联系地址
|
||||
*/
|
||||
@Schema(description = "联系地址")
|
||||
private String address;
|
||||
/**
|
||||
* 账号额度
|
||||
*/
|
||||
@Schema(description = "账号额度")
|
||||
private Integer accountNumber;
|
||||
/**
|
||||
* 过期时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
|
||||
@Schema(description = "过期时间")
|
||||
private Date expireTime;
|
||||
/**
|
||||
* 产品包ID
|
||||
*/
|
||||
@JsonSerialize(nullsUsing = NullSerializer.class)
|
||||
@Schema(description = "产品包ID")
|
||||
private Long packageId;
|
||||
/**
|
||||
* 数据源ID
|
||||
*/
|
||||
@JsonSerialize(nullsUsing = NullSerializer.class)
|
||||
@Schema(description = "数据源ID")
|
||||
private Long datasourceId;
|
||||
/**
|
||||
* 授权码
|
||||
*/
|
||||
@Schema(description = "授权码")
|
||||
private String licenseKey;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 多租户数据源表实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_tenant_datasource")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "多租户数据源表")
|
||||
public class TenantDatasource extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 数据源类型
|
||||
*/
|
||||
@Schema(description = "数据源类型")
|
||||
private Integer category;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@Schema(description = "名称")
|
||||
private String name;
|
||||
/**
|
||||
* 驱动类
|
||||
*/
|
||||
@Schema(description = "驱动类")
|
||||
private String driverClass;
|
||||
/**
|
||||
* 连接地址
|
||||
*/
|
||||
@Schema(description = "连接地址")
|
||||
private String url;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@Schema(description = "用户名")
|
||||
private String username;
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
@Schema(description = "密码")
|
||||
private String password;
|
||||
/**
|
||||
* 分库分表配置
|
||||
*/
|
||||
@Schema(description = "分库分表配置")
|
||||
private String shardingConfig;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 租户产品表实体类
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_tenant_package")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema( description = "租户产品表")
|
||||
public class TenantPackage extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 产品包名称
|
||||
*/
|
||||
@Schema(description = "产品包名称")
|
||||
private String packageName;
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
@Schema(description = "菜单ID")
|
||||
private String menuId;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.tenant.mp.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 顶部菜单表实体类
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_top_menu")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "顶部菜单表")
|
||||
public class TopMenu extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 顶部菜单编号
|
||||
*/
|
||||
@Schema(description = "顶部菜单编号")
|
||||
private String code;
|
||||
/**
|
||||
* 顶部菜单名
|
||||
*/
|
||||
@Schema(description = "顶部菜单名")
|
||||
private String name;
|
||||
/**
|
||||
* 顶部菜单资源
|
||||
*/
|
||||
@Schema(description = "顶部菜单资源")
|
||||
private String source;
|
||||
/**
|
||||
* 顶部菜单路由
|
||||
*/
|
||||
@Schema(description = "顶部菜单路由")
|
||||
private String path;
|
||||
/**
|
||||
* 顶部菜单排序
|
||||
*/
|
||||
@Schema(description = "顶部菜单排序")
|
||||
private Integer sort;
|
||||
/**
|
||||
* 是否主页
|
||||
*/
|
||||
@Schema(description = "是否主页")
|
||||
private Integer isMain;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package org.springblade.system.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* TopMenuSetting
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@TableName("blade_top_menu_setting")
|
||||
public class TopMenuSetting {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 顶部菜单id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long topMenuId;
|
||||
|
||||
/**
|
||||
* 菜单id
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long menuId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 认证锁定状态枚举
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum AuthLockStatus {
|
||||
|
||||
PRE_LOCKED("PRE_LOCKED", "待锁定"),
|
||||
LOCKED("LOCKED", "锁定中"),
|
||||
UN_LOCKED("UN_LOCKED", "已解锁");
|
||||
|
||||
@EnumValue
|
||||
@JsonValue
|
||||
private final String code;
|
||||
private final String description;
|
||||
|
||||
public static AuthLockStatus of(String code) {
|
||||
for (AuthLockStatus status : values()) {
|
||||
if (status.getCode().equals(code)) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("未知的锁定状态: " + code);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.enums;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.EnumValue;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 认证锁定类型枚举
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum AuthLockType {
|
||||
|
||||
SYSTEM("SYSTEM", "系统自动"),
|
||||
MANUAL("MANUAL", "人工手动");
|
||||
|
||||
@EnumValue
|
||||
@JsonValue
|
||||
private final String code;
|
||||
private final String description;
|
||||
|
||||
public static AuthLockType of(String code) {
|
||||
for (AuthLockType type : values()) {
|
||||
if (type.getCode().equals(code)) {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("未知的锁定类型: " + code);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.system.pojo.entity.ApiKey;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 令牌权限 视图对象
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "ApiKeyVO对象")
|
||||
public class ApiKeyVO extends ApiKey {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@Schema(description = "用户名")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 用户账号
|
||||
*/
|
||||
@Schema(description = "用户账号")
|
||||
private String account;
|
||||
|
||||
/**
|
||||
* 状态名称
|
||||
*/
|
||||
@Schema(description = "状态名称")
|
||||
private String statusName;
|
||||
|
||||
/**
|
||||
* 过期时间信息
|
||||
*/
|
||||
@Schema(description = "过期时间信息")
|
||||
private String expireTimeInfo;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.system.pojo.entity.ApiScope;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 视图实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "ApiScopeVO对象")
|
||||
public class ApiScopeVO extends ApiScope {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 规则类型名
|
||||
*/
|
||||
private String scopeTypeName;
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import org.springblade.system.pojo.entity.AuthLock;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 认证锁定记录视图实体类
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class AuthLockVO extends AuthLock {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "锁定类型描述")
|
||||
private String lockTypeName;
|
||||
|
||||
@Schema(description = "锁定状态描述")
|
||||
private String lockStatusName;
|
||||
|
||||
@Schema(description = "关联用户姓名")
|
||||
private String userName;
|
||||
|
||||
@Schema(description = "锁定是否已过期")
|
||||
private Boolean expired;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import org.springblade.system.pojo.entity.AuthLog;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 认证日志视图实体类
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class AuthLogVO extends AuthLog {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户姓名(关联查询)
|
||||
*/
|
||||
@Schema(description = "用户姓名")
|
||||
private String userName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* CheckedTreeVO
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
public class CheckedTreeVO {
|
||||
|
||||
private List<String> menu;
|
||||
|
||||
private List<String> dataScope;
|
||||
|
||||
private List<String> apiScope;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.system.pojo.entity.DataScope;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 视图实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "DataScopeVO对象")
|
||||
public class DataScopeVO extends DataScope {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 规则类型名
|
||||
*/
|
||||
private String scopeTypeName;
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.tool.node.INode;
|
||||
import org.springblade.system.pojo.entity.Dept;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 视图实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "DeptVO对象")
|
||||
public class DeptVO extends Dept implements INode<DeptVO> {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 父节点ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 子孙节点
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private List<DeptVO> children;
|
||||
|
||||
/**
|
||||
* 是否有子孙节点
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private Boolean hasChildren;
|
||||
|
||||
@Override
|
||||
public List<DeptVO> getChildren() {
|
||||
if (this.children == null) {
|
||||
this.children = new ArrayList<>();
|
||||
}
|
||||
return this.children;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上级机构
|
||||
*/
|
||||
private String parentName;
|
||||
|
||||
/**
|
||||
* 机构类型名称
|
||||
*/
|
||||
private String deptCategoryName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springblade.core.tool.node.TreeNode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* GrantTreeVO
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
public class GrantTreeVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private List<TreeNode> menu;
|
||||
|
||||
private List<TreeNode> dataScope;
|
||||
|
||||
private List<TreeNode> apiScope;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* GrantVO
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
public class GrantVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "roleIds集合")
|
||||
private List<Long> roleIds;
|
||||
|
||||
@Schema(description = "menuIds集合")
|
||||
private List<Long> menuIds;
|
||||
|
||||
@Schema(description = "topMenuIds集合")
|
||||
private List<Long> topMenuIds;
|
||||
|
||||
@Schema(description = "dataScopeIds集合")
|
||||
private List<Long> dataScopeIds;
|
||||
|
||||
@Schema(description = "apiScopeIds集合")
|
||||
private List<Long> apiScopeIds;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.tool.node.INode;
|
||||
import org.springblade.system.pojo.entity.Menu;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 视图实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "MenuVO对象")
|
||||
public class MenuVO extends Menu implements INode<MenuVO> {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 父节点ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 子孙节点
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private List<MenuVO> children;
|
||||
|
||||
/**
|
||||
* 是否有子孙节点
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private Boolean hasChildren;
|
||||
|
||||
@Override
|
||||
public List<MenuVO> getChildren() {
|
||||
if (this.children == null) {
|
||||
this.children = new ArrayList<>();
|
||||
}
|
||||
return this.children;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上级菜单
|
||||
*/
|
||||
private String parentName;
|
||||
|
||||
/**
|
||||
* 菜单类型
|
||||
*/
|
||||
private String categoryName;
|
||||
|
||||
/**
|
||||
* 按钮功能
|
||||
*/
|
||||
private String actionName;
|
||||
|
||||
/**
|
||||
* 是否新窗口打开
|
||||
*/
|
||||
private String isOpenName;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.system.pojo.entity.Param;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 视图实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "ParamVO对象")
|
||||
public class ParamVO extends Param {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.system.pojo.entity.Post;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 岗位表视图实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "岗位表")
|
||||
public class PostVO extends Post {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 岗位分类名
|
||||
*/
|
||||
private String categoryName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.system.pojo.entity.RateLimitLog;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 限流触发日志 视图对象
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RateLimitLogVO extends RateLimitLog {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 操作提交的数据 (列表不返回, 详情查看)
|
||||
*/
|
||||
@JsonIgnore
|
||||
private String params;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.system.pojo.entity.RateLimit;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 限流规则 视图对象
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "RateLimitVO对象")
|
||||
public class RateLimitVO extends RateLimit {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 状态名称
|
||||
*/
|
||||
@Schema(description = "状态名称")
|
||||
private String statusName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.system.pojo.entity.RecordData;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 数据审计表 视图实体类
|
||||
*
|
||||
* @author BladeX
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class RecordDataVO extends RecordData {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 记录账号
|
||||
*/
|
||||
@Schema(description = "记录账号")
|
||||
private String recordUserName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.tool.node.INode;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springblade.system.pojo.entity.Region;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 行政区划表视图实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "行政区划表")
|
||||
public class RegionVO extends Region implements INode<RegionVO> {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 父节点ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 父节点名称
|
||||
*/
|
||||
private String parentName;
|
||||
|
||||
/**
|
||||
* 是否有子孙节点
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private Boolean hasChildren;
|
||||
|
||||
/**
|
||||
* 子孙节点
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private List<RegionVO> children;
|
||||
|
||||
@Override
|
||||
public Long getId() {
|
||||
return Func.toLong(this.getCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getParentId() {
|
||||
return Func.toLong(this.getParentCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RegionVO> getChildren() {
|
||||
if (this.children == null) {
|
||||
this.children = new ArrayList<>();
|
||||
}
|
||||
return this.children;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.system.pojo.entity.RoleMenu;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 视图实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "RoleMenuVO对象")
|
||||
public class RoleMenuVO extends RoleMenu {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.tool.node.INode;
|
||||
import org.springblade.system.pojo.entity.Role;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 视图实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "RoleVO对象")
|
||||
public class RoleVO extends Role implements INode<RoleVO> {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 父节点ID
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 子孙节点
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private List<RoleVO> children;
|
||||
|
||||
@Override
|
||||
public List<RoleVO> getChildren() {
|
||||
if (this.children == null) {
|
||||
this.children = new ArrayList<>();
|
||||
}
|
||||
return this.children;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上级角色
|
||||
*/
|
||||
private String parentName;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.system.pojo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 实体类
|
||||
*
|
||||
* @author Chill
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "TenantVO对象")
|
||||
public class TenantVO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@Schema(description = "租户ID")
|
||||
private String tenantId;
|
||||
/**
|
||||
* 租户名称
|
||||
*/
|
||||
@Schema(description = "租户名称")
|
||||
private String tenantName;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user