mirror of
https://github.com/chillzhuang/SpringBlade.git
synced 2024-12-22 17:19:23 +08:00
🎉 2.4.0.RELEASE
This commit is contained in:
parent
de204e7744
commit
c129a6ad4f
16
README.md
16
README.md
@ -62,11 +62,21 @@ SpringBlade
|
||||
## 技术文档
|
||||
* [SpringBlade开发手册](https://gitee.com/smallc/SpringBlade/wikis/SpringBlade开发手册)
|
||||
|
||||
# 开源协议
|
||||
Apache Licence 2.0 ([英文原文](http://www.apache.org/licenses/LICENSE-2.0.html))
|
||||
Apache Licence是著名的非盈利开源组织Apache采用的协议。该协议和BSD类似,同样鼓励代码共享和尊重原作者的著作权,同样允许代码修改,再发布(作为开源或商业软件)。
|
||||
需要满足的条件如下:
|
||||
* 需要给代码的用户一份Apache Licence
|
||||
* 如果你修改了代码,需要在被修改的文件中说明。
|
||||
* 在延伸的代码中(修改和有源代码衍生的代码中)需要带有原来代码中的协议,商标,专利声明和其他原来作者规定需要包含的说明。
|
||||
* 如果再发布的产品中包含一个Notice文件,则在Notice文件中需要带有Apache Licence。你可以在Notice中增加自己的许可,但不可以表现为对Apache Licence构成更改。
|
||||
Apache Licence也是对商业应用友好的许可。使用者也可以在需要的时候修改代码来满足需要并作为开源或商业产品发布/销售。
|
||||
|
||||
## 用户权益
|
||||
* 允许免费用于学习、毕设、公司项目、私活等。
|
||||
* 代码文件需保留相关license信息。
|
||||
* 禁止直接将本项目挂淘宝等商业平台出售。
|
||||
* 非界面代码50%以上相似度的二次开源,二次开源需先联系作者。
|
||||
* 对未经过授权和不遵循 Apache 2.0 协议二次开源或者商业化我们将追究到底。
|
||||
* 参考请注明:参考自 SpringBlade:https://gitee.com/smallc/SpringBlade 。另请遵循 Apache 2.0 协议。
|
||||
* `注意`:若禁止条款被发现有权追讨 **19999** 的授权费。
|
||||
|
||||
# 界面
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<artifactId>SpringBlade</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>blade-auth</artifactId>
|
||||
|
@ -43,17 +43,17 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
public class AuthController {
|
||||
|
||||
@PostMapping("token")
|
||||
@ApiOperation(value = "获取认证token", notes = "传入租户编号:tenantCode,账号:account,密码:password")
|
||||
@ApiOperation(value = "获取认证token", notes = "传入租户ID:tenantId,账号:account,密码:password")
|
||||
public R<AuthInfo> token(@ApiParam(value = "授权类型", required = true) @RequestParam(defaultValue = "password", required = false) String grantType,
|
||||
@ApiParam(value = "刷新令牌") @RequestParam(required = false) String refreshToken,
|
||||
@ApiParam(value = "租户编号", required = true) @RequestParam(defaultValue = "000000", required = false) String tenantCode,
|
||||
@ApiParam(value = "租户ID", required = true) @RequestParam(defaultValue = "000000", required = false) String tenantId,
|
||||
@ApiParam(value = "账号") @RequestParam(required = false) String account,
|
||||
@ApiParam(value = "密码") @RequestParam(required = false) String password) {
|
||||
|
||||
String userType = Func.toStr(WebUtil.getRequest().getHeader(TokenUtil.USER_TYPE_HEADER_KEY), TokenUtil.DEFAULT_USER_TYPE);
|
||||
|
||||
TokenParameter tokenParameter = new TokenParameter();
|
||||
tokenParameter.getArgs().set("tenantCode", tenantCode).set("account", account).set("password", password).set("grantType", grantType).set("refreshToken", refreshToken).set("userType", userType);
|
||||
tokenParameter.getArgs().set("tenantId", tenantId).set("account", account).set("password", password).set("grantType", grantType).set("refreshToken", refreshToken).set("userType", userType);
|
||||
|
||||
ITokenGranter granter = TokenGranterBuilder.getGranter(grantType);
|
||||
UserInfo userInfo = granter.grant(tokenParameter);
|
||||
|
@ -39,7 +39,7 @@ public class PasswordTokenGranter implements ITokenGranter {
|
||||
|
||||
@Override
|
||||
public UserInfo grant(TokenParameter tokenParameter) {
|
||||
String tenantCode = tokenParameter.getArgs().getStr("tenantCode");
|
||||
String tenantId = tokenParameter.getArgs().getStr("tenantId");
|
||||
String account = tokenParameter.getArgs().getStr("account");
|
||||
String password = tokenParameter.getArgs().getStr("password");
|
||||
UserInfo userInfo = null;
|
||||
@ -49,11 +49,11 @@ public class PasswordTokenGranter implements ITokenGranter {
|
||||
R<UserInfo> result;
|
||||
// 根据不同用户类型调用对应的接口返回数据,用户可自行拓展
|
||||
if (userType.equals(BladeUserEnum.WEB.getName())) {
|
||||
result = userClient.userInfo(tenantCode, account, DigestUtil.encrypt(password));
|
||||
result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(password));
|
||||
} else if (userType.equals(BladeUserEnum.APP.getName())) {
|
||||
result = userClient.userInfo(tenantCode, account, DigestUtil.encrypt(password));
|
||||
result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(password));
|
||||
} else {
|
||||
result = userClient.userInfo(tenantCode, account, DigestUtil.encrypt(password));
|
||||
result = userClient.userInfo(tenantId, account, DigestUtil.encrypt(password));
|
||||
}
|
||||
userInfo = result.isSuccess() ? result.getData() : null;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ import java.util.Map;
|
||||
*/
|
||||
public class TokenUtil {
|
||||
|
||||
public final static String TENANT_HEADER_KEY = "Tenant-Code";
|
||||
public final static String TENANT_HEADER_KEY = "Tenant-Id";
|
||||
public final static String DEFAULT_TENANT_ID = "000000";
|
||||
public final static String USER_TYPE_HEADER_KEY = "User-Type";
|
||||
public final static String DEFAULT_USER_TYPE = "web";
|
||||
@ -54,7 +54,7 @@ public class TokenUtil {
|
||||
//设置jwt参数
|
||||
Map<String, String> param = new HashMap<>(16);
|
||||
param.put(TokenConstant.TOKEN_TYPE, TokenConstant.ACCESS_TOKEN);
|
||||
param.put(TokenConstant.TENANT_CODE, user.getTenantCode());
|
||||
param.put(TokenConstant.TENANT_ID, user.getTenantId());
|
||||
param.put(TokenConstant.USER_ID, Func.toStr(user.getId()));
|
||||
param.put(TokenConstant.ROLE_ID, user.getRoleId());
|
||||
param.put(TokenConstant.ACCOUNT, user.getAccount());
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>SpringBlade</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>SpringBlade</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@ -66,13 +66,14 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- Nacos -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
<version>${alibaba.cloud.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
<version>${alibaba.cloud.version}</version>
|
||||
</dependency>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-ops</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-ops</artifactId>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-ops</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>SpringBlade</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-service-api</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-service-api</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-service-api</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -45,10 +45,10 @@ public class Dept implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
* 租户ID
|
||||
*/
|
||||
@ApiModelProperty(value = "租户编号")
|
||||
private String tenantCode;
|
||||
@ApiModelProperty(value = "租户ID")
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 父主键
|
||||
|
@ -45,10 +45,10 @@ public class Role implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
* 租户ID
|
||||
*/
|
||||
@ApiModelProperty(value = "租户编号")
|
||||
private String tenantCode;
|
||||
@ApiModelProperty(value = "租户ID")
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 父主键
|
||||
|
@ -45,10 +45,10 @@ public class Tenant extends BaseEntity {
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 租户编号
|
||||
* 租户ID
|
||||
*/
|
||||
@ApiModelProperty(value = "租户编号")
|
||||
private String tenantCode;
|
||||
@ApiModelProperty(value = "租户ID")
|
||||
private String tenantId;
|
||||
/**
|
||||
* 租户名称
|
||||
*/
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-service-api</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -48,12 +48,12 @@ public interface IUserClient {
|
||||
/**
|
||||
* 获取用户信息
|
||||
*
|
||||
* @param tenantCode 租户编号
|
||||
* @param tenantId 租户ID
|
||||
* @param account 账号
|
||||
* @param password 密码
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(API_PREFIX + "/user-info")
|
||||
R<UserInfo> userInfo(@RequestParam("tenantCode") String tenantCode, @RequestParam("account") String account, @RequestParam("password") String password);
|
||||
R<UserInfo> userInfo(@RequestParam("tenantId") String tenantId, @RequestParam("account") String account, @RequestParam("password") String password);
|
||||
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ public class IUserClientFallback implements IUserClient {
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<UserInfo> userInfo(String tenantCode, String account, String password) {
|
||||
public R<UserInfo> userInfo(String tenantId, String account, String password) {
|
||||
return R.fail("未获取到账号信息");
|
||||
}
|
||||
}
|
||||
|
@ -5,13 +5,13 @@
|
||||
<parent>
|
||||
<artifactId>SpringBlade</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>blade-service-api</artifactId>
|
||||
<name>${project.artifactId}</name>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
<packaging>pom</packaging>
|
||||
<description>SpringBlade 微服务API集合</description>
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>blade-service</artifactId>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-service</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-service</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -72,7 +72,7 @@ public class DeptController extends BladeController {
|
||||
@ApiOperation(value = "列表", notes = "传入dept")
|
||||
public R<List<INode>> list(@ApiIgnore @RequestParam Map<String, Object> dept, BladeUser bladeUser) {
|
||||
QueryWrapper<Dept> queryWrapper = Condition.getQueryWrapper(dept, Dept.class);
|
||||
List<Dept> list = deptService.list((!bladeUser.getTenantCode().equals(BladeConstant.ADMIN_TENANT_CODE)) ? queryWrapper.lambda().eq(Dept::getTenantCode, bladeUser.getTenantCode()) : queryWrapper);
|
||||
List<Dept> list = deptService.list((!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(Dept::getTenantId, bladeUser.getTenantId()) : queryWrapper);
|
||||
return R.data(DeptWrapper.build().listNodeVO(list));
|
||||
}
|
||||
|
||||
@ -84,8 +84,8 @@ public class DeptController extends BladeController {
|
||||
@GetMapping("/tree")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@ApiOperation(value = "树形结构", notes = "树形结构")
|
||||
public R<List<DeptVO>> tree(String tenantCode, BladeUser bladeUser) {
|
||||
List<DeptVO> tree = deptService.tree(Func.toStr(tenantCode, bladeUser.getTenantCode()));
|
||||
public R<List<DeptVO>> tree(String tenantId, BladeUser bladeUser) {
|
||||
List<DeptVO> tree = deptService.tree(Func.toStr(tenantId, bladeUser.getTenantId()));
|
||||
return R.data(tree);
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ public class DeptController extends BladeController {
|
||||
@ApiOperation(value = "新增或修改", notes = "传入dept")
|
||||
public R submit(@Valid @RequestBody Dept dept, BladeUser user) {
|
||||
if (Func.isEmpty(dept.getId())) {
|
||||
dept.setTenantCode(user.getTenantCode());
|
||||
dept.setTenantId(user.getTenantId());
|
||||
}
|
||||
return R.status(deptService.saveOrUpdate(dept));
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ public class RoleController extends BladeController {
|
||||
@ApiOperation(value = "列表", notes = "传入role")
|
||||
public R<List<INode>> list(@ApiIgnore @RequestParam Map<String, Object> role, BladeUser bladeUser) {
|
||||
QueryWrapper<Role> queryWrapper = Condition.getQueryWrapper(role, Role.class);
|
||||
List<Role> list = roleService.list((!bladeUser.getTenantCode().equals(BladeConstant.ADMIN_TENANT_CODE)) ? queryWrapper.lambda().eq(Role::getTenantCode, bladeUser.getTenantCode()) : queryWrapper);
|
||||
List<Role> list = roleService.list((!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(Role::getTenantId, bladeUser.getTenantId()) : queryWrapper);
|
||||
return R.data(RoleWrapper.build().listNodeVO(list));
|
||||
}
|
||||
|
||||
@ -82,8 +82,8 @@ public class RoleController extends BladeController {
|
||||
@GetMapping("/tree")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@ApiOperation(value = "树形结构", notes = "树形结构")
|
||||
public R<List<RoleVO>> tree(String tenantCode, BladeUser bladeUser) {
|
||||
List<RoleVO> tree = roleService.tree(Func.toStr(tenantCode, bladeUser.getTenantCode()));
|
||||
public R<List<RoleVO>> tree(String tenantId, BladeUser bladeUser) {
|
||||
List<RoleVO> tree = roleService.tree(Func.toStr(tenantId, bladeUser.getTenantId()));
|
||||
return R.data(tree);
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ public class RoleController extends BladeController {
|
||||
@ApiOperation(value = "新增或修改", notes = "传入role")
|
||||
public R submit(@Valid @RequestBody Role role, BladeUser user) {
|
||||
if (Func.isEmpty(role.getId())) {
|
||||
role.setTenantCode(user.getTenantCode());
|
||||
role.setTenantId(user.getTenantId());
|
||||
}
|
||||
return R.status(roleService.saveOrUpdate(role));
|
||||
}
|
||||
|
@ -64,14 +64,14 @@ public class TenantController extends BladeController {
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "tenantCode", value = "参数名称", paramType = "query", dataType = "string"),
|
||||
@ApiImplicitParam(name = "tenantId", value = "参数名称", paramType = "query", dataType = "string"),
|
||||
@ApiImplicitParam(name = "tenantName", value = "角色别名", paramType = "query", dataType = "string"),
|
||||
@ApiImplicitParam(name = "contactNumber", value = "联系电话", paramType = "query", dataType = "string")
|
||||
})
|
||||
@ApiOperation(value = "分页", notes = "传入tenant")
|
||||
public R<IPage<Tenant>> list(@ApiIgnore @RequestParam Map<String, Object> tenant, Query query, BladeUser bladeUser) {
|
||||
QueryWrapper<Tenant> queryWrapper = Condition.getQueryWrapper(tenant, Tenant.class);
|
||||
IPage<Tenant> pages = tenantService.page(Condition.getPage(query), (!bladeUser.getTenantCode().equals(BladeConstant.ADMIN_TENANT_CODE)) ? queryWrapper.lambda().eq(Tenant::getTenantCode, bladeUser.getTenantCode()) : queryWrapper);
|
||||
IPage<Tenant> pages = tenantService.page(Condition.getPage(query), (!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(Tenant::getTenantId, bladeUser.getTenantId()) : queryWrapper);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ public class TenantController extends BladeController {
|
||||
@ApiOperation(value = "下拉数据源", notes = "传入tenant")
|
||||
public R<List<Tenant>> select(Tenant tenant, BladeUser bladeUser) {
|
||||
QueryWrapper<Tenant> queryWrapper = Condition.getQueryWrapper(tenant);
|
||||
List<Tenant> list = tenantService.list((!bladeUser.getTenantCode().equals(BladeConstant.ADMIN_TENANT_CODE)) ? queryWrapper.lambda().eq(Tenant::getTenantCode, bladeUser.getTenantCode()) : queryWrapper);
|
||||
List<Tenant> list = tenantService.list((!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(Tenant::getTenantId, bladeUser.getTenantId()) : queryWrapper);
|
||||
return R.data(list);
|
||||
}
|
||||
|
||||
|
@ -41,9 +41,9 @@ public interface DeptMapper extends BaseMapper<Dept> {
|
||||
/**
|
||||
* 获取树形节点
|
||||
*
|
||||
* @param tenantCode
|
||||
* @param tenantId
|
||||
* @return
|
||||
*/
|
||||
List<DeptVO> tree(String tenantCode);
|
||||
List<DeptVO> tree(String tenantId);
|
||||
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
<select id="tree" resultMap="treeNodeResultMap">
|
||||
select id, parent_id, dept_name as title, id as 'value', id as 'key' from blade_dept where is_deleted = 0
|
||||
<if test="_parameter!=null">
|
||||
and tenant_code = #{_parameter}
|
||||
and tenant_id = #{_parameter}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
@ -41,10 +41,10 @@ public interface RoleMapper extends BaseMapper<Role> {
|
||||
/**
|
||||
* 获取树形节点
|
||||
*
|
||||
* @param tenantCode
|
||||
* @param tenantId
|
||||
* @param excludeRole
|
||||
* @return
|
||||
*/
|
||||
List<RoleVO> tree(String tenantCode, String excludeRole);
|
||||
List<RoleVO> tree(String tenantId, String excludeRole);
|
||||
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
<select id="tree" resultMap="treeNodeResultMap">
|
||||
select id, parent_id, role_name as title, id as 'value', id as 'key' from blade_role where is_deleted = 0
|
||||
<if test="param1!=null">
|
||||
and tenant_code = #{param1}
|
||||
and tenant_id = #{param1}
|
||||
</if>
|
||||
<if test="param2!=null">
|
||||
and role_alias <> #{param2}
|
||||
|
@ -41,9 +41,9 @@ public interface IDeptService extends IService<Dept> {
|
||||
/**
|
||||
* 树形结构
|
||||
*
|
||||
* @param tenantCode
|
||||
* @param tenantId
|
||||
* @return
|
||||
*/
|
||||
List<DeptVO> tree(String tenantCode);
|
||||
List<DeptVO> tree(String tenantId);
|
||||
|
||||
}
|
||||
|
@ -42,10 +42,10 @@ public interface IRoleService extends IService<Role> {
|
||||
/**
|
||||
* 树形结构
|
||||
*
|
||||
* @param tenantCode
|
||||
* @param tenantId
|
||||
* @return
|
||||
*/
|
||||
List<RoleVO> tree(String tenantCode);
|
||||
List<RoleVO> tree(String tenantId);
|
||||
|
||||
/**
|
||||
* 权限配置
|
||||
|
@ -40,8 +40,8 @@ public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements ID
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DeptVO> tree(String tenantCode) {
|
||||
return ForestNodeMerger.merge(baseMapper.tree(tenantCode));
|
||||
public List<DeptVO> tree(String tenantId) {
|
||||
return ForestNodeMerger.merge(baseMapper.tree(tenantId));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IM
|
||||
|
||||
@Override
|
||||
public List<MenuVO> grantTree(BladeUser user) {
|
||||
return ForestNodeMerger.merge(user.getTenantCode().equals(BladeConstant.ADMIN_TENANT_CODE) ? baseMapper.grantTree() : baseMapper.grantTreeByRole(Func.toIntList(user.getRoleId())));
|
||||
return ForestNodeMerger.merge(user.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? baseMapper.grantTree() : baseMapper.grantTreeByRole(Func.toIntList(user.getRoleId())));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -55,13 +55,13 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RoleVO> tree(String tenantCode) {
|
||||
public List<RoleVO> tree(String tenantId) {
|
||||
String userRole = SecureUtil.getUserRole();
|
||||
String excludeRole = null;
|
||||
if (!CollectionUtil.contains(Func.toStrArray(userRole), RoleConstant.ADMIN)) {
|
||||
excludeRole = RoleConstant.ADMIN;
|
||||
}
|
||||
return ForestNodeMerger.merge(baseMapper.tree(tenantCode, excludeRole));
|
||||
return ForestNodeMerger.merge(baseMapper.tree(tenantId, excludeRole));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -58,12 +58,12 @@ public class TenantServiceImpl extends BaseServiceImpl<TenantMapper, Tenant> imp
|
||||
public boolean saveTenant(Tenant tenant) {
|
||||
if (Func.isEmpty(tenant.getId())) {
|
||||
List<Tenant> tenants = baseMapper.selectList(Wrappers.<Tenant>query().lambda().eq(Tenant::getIsDeleted, BladeConstant.DB_NOT_DELETED));
|
||||
List<String> codes = tenants.stream().map(Tenant::getTenantCode).collect(Collectors.toList());
|
||||
String tenantCode = getTenantCode(codes);
|
||||
tenant.setTenantCode(tenantCode);
|
||||
List<String> codes = tenants.stream().map(Tenant::getTenantId).collect(Collectors.toList());
|
||||
String tenantId = getTenantId(codes);
|
||||
tenant.setTenantId(tenantId);
|
||||
// 新建租户对应的默认角色
|
||||
Role role = new Role();
|
||||
role.setTenantCode(tenantCode);
|
||||
role.setTenantId(tenantId);
|
||||
role.setParentId(0);
|
||||
role.setRoleName("管理员");
|
||||
role.setRoleAlias("admin");
|
||||
@ -72,7 +72,7 @@ public class TenantServiceImpl extends BaseServiceImpl<TenantMapper, Tenant> imp
|
||||
roleMapper.insert(role);
|
||||
// 新建租户对应的默认部门
|
||||
Dept dept = new Dept();
|
||||
dept.setTenantCode(tenantCode);
|
||||
dept.setTenantId(tenantId);
|
||||
dept.setParentId(0);
|
||||
dept.setDeptName(tenant.getTenantName());
|
||||
dept.setFullName(tenant.getTenantName());
|
||||
@ -83,10 +83,10 @@ public class TenantServiceImpl extends BaseServiceImpl<TenantMapper, Tenant> imp
|
||||
return super.saveOrUpdate(tenant);
|
||||
}
|
||||
|
||||
private String getTenantCode(List<String> codes) {
|
||||
private String getTenantId(List<String> codes) {
|
||||
String code = tenantId.generate();
|
||||
if (codes.contains(code)) {
|
||||
return getTenantCode(codes);
|
||||
return getTenantId(codes);
|
||||
}
|
||||
return code;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>blade-service</artifactId>
|
||||
<groupId>org.springblade</groupId>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -71,7 +71,7 @@ public class UserController {
|
||||
@ApiOperation(value = "列表", notes = "传入account和realName")
|
||||
public R<IPage<UserVO>> list(@ApiIgnore @RequestParam Map<String, Object> user, Query query, BladeUser bladeUser) {
|
||||
QueryWrapper<User> queryWrapper = Condition.getQueryWrapper(user, User.class);
|
||||
IPage<User> pages = userService.page(Condition.getPage(query), (!bladeUser.getTenantCode().equals(BladeConstant.ADMIN_TENANT_CODE)) ? queryWrapper.lambda().eq(User::getTenantCode, bladeUser.getTenantCode()) : queryWrapper);
|
||||
IPage<User> pages = userService.page(Condition.getPage(query), (!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(User::getTenantId, bladeUser.getTenantId()) : queryWrapper);
|
||||
return R.data(UserWrapper.build().pageVO(pages));
|
||||
}
|
||||
|
||||
|
@ -41,8 +41,8 @@ public class UserClient implements IUserClient {
|
||||
|
||||
@Override
|
||||
@GetMapping(API_PREFIX + "/user-info")
|
||||
public R<UserInfo> userInfo(String tenantCode, String account, String password) {
|
||||
return R.data(service.userInfo(tenantCode, account, password));
|
||||
public R<UserInfo> userInfo(String tenantId, String account, String password) {
|
||||
return R.data(service.userInfo(tenantId, account, password));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -40,12 +40,12 @@ public interface UserMapper extends BaseMapper<User> {
|
||||
/**
|
||||
* 获取用户
|
||||
*
|
||||
* @param tenantCode
|
||||
* @param tenantId
|
||||
* @param account
|
||||
* @param password
|
||||
* @return
|
||||
*/
|
||||
User getUser(String tenantCode, String account, String password);
|
||||
User getUser(String tenantId, String account, String password);
|
||||
|
||||
/**
|
||||
* 获取角色名
|
||||
|
@ -5,7 +5,7 @@
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="userResultMap" type="org.springblade.system.user.entity.User">
|
||||
<result column="id" property="id"/>
|
||||
<result column="tenant_code" property="tenantCode"/>
|
||||
<result column="tenant_id" property="tenantId"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
@ -46,7 +46,7 @@
|
||||
FROM
|
||||
blade_user
|
||||
WHERE
|
||||
tenant_code = #{param1} and account = #{param2} and password = #{param3} and is_deleted = 0
|
||||
tenant_id = #{param1} and account = #{param2} and password = #{param3} and is_deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="getRoleName" resultType="java.lang.String">
|
||||
|
@ -58,12 +58,12 @@ public interface IUserService extends BaseService<User> {
|
||||
/**
|
||||
* 用户信息
|
||||
*
|
||||
* @param tenantCode
|
||||
* @param tenantId
|
||||
* @param account
|
||||
* @param password
|
||||
* @return
|
||||
*/
|
||||
UserInfo userInfo(String tenantCode, String account, String password);
|
||||
UserInfo userInfo(String tenantId, String account, String password);
|
||||
|
||||
/**
|
||||
* 给用户设置角色
|
||||
|
@ -45,7 +45,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
||||
if (Func.isNotEmpty(user.getPassword())) {
|
||||
user.setPassword(DigestUtil.encrypt(user.getPassword()));
|
||||
}
|
||||
Integer cnt = baseMapper.selectCount(Wrappers.<User>query().lambda().eq(User::getTenantCode, user.getTenantCode()).eq(User::getAccount, user.getAccount()));
|
||||
Integer cnt = baseMapper.selectCount(Wrappers.<User>query().lambda().eq(User::getTenantId, user.getTenantId()).eq(User::getAccount, user.getAccount()));
|
||||
if (cnt > 0) {
|
||||
throw new ApiException("当前用户已存在!");
|
||||
}
|
||||
@ -70,9 +70,9 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserInfo userInfo(String tenantCode, String account, String password) {
|
||||
public UserInfo userInfo(String tenantId, String account, String password) {
|
||||
UserInfo userInfo = new UserInfo();
|
||||
User user = baseMapper.getUser(tenantCode, account, password);
|
||||
User user = baseMapper.getUser(tenantId, account, password);
|
||||
userInfo.setUser(user);
|
||||
if (Func.isNotEmpty(user)) {
|
||||
List<String> roleAlias = baseMapper.getRoleAlias(Func.toStrArray(user.getRoleId()));
|
||||
|
@ -7,12 +7,12 @@
|
||||
<parent>
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>SpringBlade</artifactId>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>blade-service</artifactId>
|
||||
<name>${project.artifactId}</name>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
<packaging>pom</packaging>
|
||||
<description>SpringBlade 微服务集合</description>
|
||||
|
||||
|
@ -84,7 +84,7 @@ blade:
|
||||
path-patterns:
|
||||
- /saber/**
|
||||
tenant:
|
||||
column: tenant_code
|
||||
column: tenant_id
|
||||
tables:
|
||||
- blade_notice
|
||||
|
||||
|
@ -81,7 +81,7 @@ COMMIT;
|
||||
DROP TABLE IF EXISTS `blade_dept`;
|
||||
CREATE TABLE `blade_dept` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`tenant_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
|
||||
`parent_id` int(11) NULL DEFAULT 0 COMMENT '父主键',
|
||||
`dept_name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门名',
|
||||
`full_name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门全称',
|
||||
@ -127,7 +127,7 @@ COMMIT;
|
||||
DROP TABLE IF EXISTS `blade_log_api`;
|
||||
CREATE TABLE `blade_log_api` (
|
||||
`id` bigint(64) NOT NULL COMMENT '编号',
|
||||
`tenant_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
|
||||
`service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务ID',
|
||||
`server_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器名',
|
||||
`server_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器IP地址',
|
||||
@ -153,7 +153,7 @@ CREATE TABLE `blade_log_api` (
|
||||
DROP TABLE IF EXISTS `blade_log_error`;
|
||||
CREATE TABLE `blade_log_error` (
|
||||
`id` bigint(64) NOT NULL COMMENT '编号',
|
||||
`tenant_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
|
||||
`service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务ID',
|
||||
`server_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器名',
|
||||
`server_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器IP地址',
|
||||
@ -182,7 +182,7 @@ CREATE TABLE `blade_log_error` (
|
||||
DROP TABLE IF EXISTS `blade_log_usual`;
|
||||
CREATE TABLE `blade_log_usual` (
|
||||
`id` bigint(64) NOT NULL COMMENT '编号',
|
||||
`tenant_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
|
||||
`service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务ID',
|
||||
`server_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器名',
|
||||
`server_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器IP地址',
|
||||
@ -237,7 +237,7 @@ COMMIT;
|
||||
DROP TABLE IF EXISTS `blade_notice`;
|
||||
CREATE TABLE `blade_notice` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`tenant_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
|
||||
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
|
||||
`category` int(11) NULL DEFAULT NULL COMMENT '类型',
|
||||
`release_time` datetime(0) NULL DEFAULT NULL COMMENT '发布时间',
|
||||
@ -290,7 +290,7 @@ COMMIT;
|
||||
DROP TABLE IF EXISTS `blade_role`;
|
||||
CREATE TABLE `blade_role` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`tenant_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
|
||||
`parent_id` int(11) NULL DEFAULT 0 COMMENT '父主键',
|
||||
`role_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色名',
|
||||
`sort` int(11) NULL DEFAULT NULL COMMENT '排序',
|
||||
@ -330,7 +330,7 @@ COMMIT;
|
||||
DROP TABLE IF EXISTS `blade_tenant`;
|
||||
CREATE TABLE `blade_tenant` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`tenant_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户编号',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户ID',
|
||||
`tenant_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户名称',
|
||||
`linkman` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人',
|
||||
`contact_number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话',
|
||||
@ -357,7 +357,7 @@ COMMIT;
|
||||
DROP TABLE IF EXISTS `blade_user`;
|
||||
CREATE TABLE `blade_user` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`tenant_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
|
||||
`account` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '账号',
|
||||
`password` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码',
|
||||
`name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '昵称',
|
||||
|
@ -81,7 +81,7 @@ COMMIT;
|
||||
DROP TABLE IF EXISTS `blade_dept`;
|
||||
CREATE TABLE `blade_dept` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`tenant_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
|
||||
`parent_id` int(11) NULL DEFAULT 0 COMMENT '父主键',
|
||||
`dept_name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门名',
|
||||
`full_name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门全称',
|
||||
@ -127,7 +127,7 @@ COMMIT;
|
||||
DROP TABLE IF EXISTS `blade_log_api`;
|
||||
CREATE TABLE `blade_log_api` (
|
||||
`id` bigint(64) NOT NULL COMMENT '编号',
|
||||
`tenant_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
|
||||
`service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务ID',
|
||||
`server_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器名',
|
||||
`server_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器IP地址',
|
||||
@ -153,7 +153,7 @@ CREATE TABLE `blade_log_api` (
|
||||
DROP TABLE IF EXISTS `blade_log_error`;
|
||||
CREATE TABLE `blade_log_error` (
|
||||
`id` bigint(64) NOT NULL COMMENT '编号',
|
||||
`tenant_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
|
||||
`service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务ID',
|
||||
`server_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器名',
|
||||
`server_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器IP地址',
|
||||
@ -182,7 +182,7 @@ CREATE TABLE `blade_log_error` (
|
||||
DROP TABLE IF EXISTS `blade_log_usual`;
|
||||
CREATE TABLE `blade_log_usual` (
|
||||
`id` bigint(64) NOT NULL COMMENT '编号',
|
||||
`tenant_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
|
||||
`service_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务ID',
|
||||
`server_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器名',
|
||||
`server_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务器IP地址',
|
||||
@ -237,7 +237,7 @@ COMMIT;
|
||||
DROP TABLE IF EXISTS `blade_notice`;
|
||||
CREATE TABLE `blade_notice` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`tenant_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
|
||||
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
|
||||
`category` int(11) NULL DEFAULT NULL COMMENT '类型',
|
||||
`release_time` datetime(0) NULL DEFAULT NULL COMMENT '发布时间',
|
||||
@ -290,7 +290,7 @@ COMMIT;
|
||||
DROP TABLE IF EXISTS `blade_role`;
|
||||
CREATE TABLE `blade_role` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`tenant_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
|
||||
`parent_id` int(11) NULL DEFAULT 0 COMMENT '父主键',
|
||||
`role_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色名',
|
||||
`sort` int(11) NULL DEFAULT NULL COMMENT '排序',
|
||||
@ -330,7 +330,7 @@ COMMIT;
|
||||
DROP TABLE IF EXISTS `blade_tenant`;
|
||||
CREATE TABLE `blade_tenant` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`tenant_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户编号',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户ID',
|
||||
`tenant_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户名称',
|
||||
`linkman` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人',
|
||||
`contact_number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话',
|
||||
@ -357,7 +357,7 @@ COMMIT;
|
||||
DROP TABLE IF EXISTS `blade_user`;
|
||||
CREATE TABLE `blade_user` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`tenant_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户编号',
|
||||
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
|
||||
`account` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '账号',
|
||||
`password` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码',
|
||||
`name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '昵称',
|
||||
|
10
pom.xml
10
pom.xml
@ -5,22 +5,22 @@
|
||||
|
||||
<groupId>org.springblade</groupId>
|
||||
<artifactId>SpringBlade</artifactId>
|
||||
<version>2.3.3</version>
|
||||
<version>2.4.0</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<blade.tool.version>2.3.3</blade.tool.version>
|
||||
<blade.project.version>2.3.3</blade.project.version>
|
||||
<blade.tool.version>2.4.0</blade.tool.version>
|
||||
<blade.project.version>2.4.0</blade.project.version>
|
||||
|
||||
<java.version>1.8</java.version>
|
||||
<swagger.version>2.9.2</swagger.version>
|
||||
<swagger.models.version>1.5.21</swagger.models.version>
|
||||
<swagger.bootstrapui.version>1.9.4</swagger.bootstrapui.version>
|
||||
<swagger.bootstrapui.version>1.9.5</swagger.bootstrapui.version>
|
||||
<mybatis.plus.version>3.1.2</mybatis.plus.version>
|
||||
<curator.framework.version>4.0.1</curator.framework.version>
|
||||
<protostuff.version>1.6.0</protostuff.version>
|
||||
<mica.auto.version>1.1.0</mica.auto.version>
|
||||
<alibaba.cloud.version>0.9.0.RELEASE</alibaba.cloud.version>
|
||||
<alibaba.cloud.version>2.1.0.RELEASE</alibaba.cloud.version>
|
||||
<spring.boot.admin.version>2.1.5</spring.boot.admin.version>
|
||||
|
||||
<spring.boot.version>2.1.6.RELEASE</spring.boot.version>
|
||||
|
@ -1,2 +1,2 @@
|
||||
REGISTER=192.168.0.157/blade
|
||||
TAG=2.3.3
|
||||
TAG=2.4.0
|
||||
|
Loading…
Reference in New Issue
Block a user