Browse Source

更新脚本,用户管理增加左树右表功能

test
smallchill 5 years ago
parent
commit
058941367e
  1. 41
      blade-service-api/blade-system-api/src/main/java/org/springblade/system/cache/SysCache.java
  2. 10
      blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClient.java
  3. 5
      blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClientFallback.java
  4. 64
      blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/UserDept.java
  5. 7
      blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java
  6. 4
      blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleServiceImpl.java
  7. 17
      blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java
  8. 30
      blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserDeptMapper.java
  9. 5
      blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserDeptMapper.xml
  10. 29
      blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserMapper.java
  11. 25
      blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserMapper.xml
  12. 30
      blade-service/blade-user/src/main/java/org/springblade/system/user/service/IUserDeptService.java
  13. 2
      blade-service/blade-user/src/main/java/org/springblade/system/user/service/IUserService.java
  14. 34
      blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserDeptServiceImpl.java
  15. 32
      blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java
  16. 21
      doc/sql/mysql/bladex-saber-mysql.sql
  17. 21
      doc/sql/mysql/bladex-sword-mysql.sql
  18. 83
      doc/sql/oracle/bladex-saber-oracle.sql
  19. 113
      doc/sql/oracle/bladex-sword-oracle.sql
  20. 32
      doc/sql/postgresql/bladex-saber-postgresql.sql
  21. 32
      doc/sql/postgresql/bladex-sword-postgresql.sql
  22. 18
      doc/sql/update/mysql-update-2.2.1~2.2.2.sql
  23. 22
      doc/sql/update/oracle-update-2.2.1~2.2.2.sql
  24. 22
      doc/sql/update/postgresql-update-2.2.1~2.2.2.sql

41
blade-service-api/blade-system-api/src/main/java/org/springblade/system/cache/SysCache.java vendored

@ -25,7 +25,9 @@ import org.springblade.system.entity.Role;
import org.springblade.system.entity.Tenant;
import org.springblade.system.feign.ISysClient;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
@ -39,6 +41,8 @@ public class SysCache {
private static final String DEPT_ID = "dept:id:";
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 ROLE_ID = "role:id:";
private static final String ROLE_NAME_ID = "roleName:id:";
private static final String ROLE_NAMES_ID = "roleNames:id:";
@ -147,6 +151,43 @@ public class SysCache {
});
}
/**
* 获取子部门集合
*
* @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;
}
/**
* 获取角色名集合
*

10
blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClient.java

@ -44,6 +44,7 @@ public interface ISysClient {
String DEPT = API_PREFIX + "/dept";
String DEPT_NAME = API_PREFIX + "/dept-name";
String DEPT_NAMES = API_PREFIX + "/dept-names";
String DEPT_CHILD = API_PREFIX + "/dept-child";
String ROLE = API_PREFIX + "/role";
String ROLE_NAME = API_PREFIX + "/role-name";
String ROLE_NAMES = API_PREFIX + "/role-names";
@ -114,6 +115,15 @@ public interface ISysClient {
@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);
/**
* 获取角色名
*

5
blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClientFallback.java

@ -68,6 +68,11 @@ public class ISysClientFallback implements ISysClient {
return R.fail("获取数据失败");
}
@Override
public R<List<Dept>> getDeptChild(Long deptId) {
return R.fail("获取数据失败");
}
@Override
public R<List<String>> getRoleNames(String roleIds) {
return R.fail("获取数据失败");

64
blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/UserDept.java

@ -0,0 +1,64 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.springblade.system.user.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.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 实体类
*
* @author Chill
*/
@Data
@TableName("blade_user_dept")
@ApiModel(value = "UserDept对象", description = "UserDept对象")
public class UserDept implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.ID_WORKER)
private Long id;
/**
* 用户ID
*/
@JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "用户ID")
private Long userId;
/**
* 部门ID
*/
@JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "部门ID")
private Long deptId;
}

7
blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java

@ -16,6 +16,7 @@
*/
package org.springblade.system.feign;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springblade.system.entity.Dept;
@ -92,6 +93,12 @@ public class SysClient implements ISysClient {
return R.data(deptService.getDeptNames(deptIds));
}
@Override
@GetMapping(DEPT_CHILD)
public R<List<Dept>> getDeptChild(Long deptId) {
return R.data(deptService.list(Wrappers.<Dept>query().lambda().like(Dept::getAncestors, deptId)));
}
@Override
@GetMapping(ROLE_NAMES)
public R<List<String>> getRoleNames(String roleIds) {

4
blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleServiceImpl.java

@ -91,7 +91,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
roleMenuService.saveBatch(roleMenus);
// 删除角色配置的数据权限集合
roleScopeService.remove(Wrappers.<RoleScope>update().lambda().in(RoleScope::getRoleId, roleIds));
roleScopeService.remove(Wrappers.<RoleScope>update().lambda().eq(RoleScope::getScopeCategory, DATA_SCOPE_CATEGORY).in(RoleScope::getRoleId, roleIds));
// 组装配置
List<RoleScope> roleDataScopes = new ArrayList<>();
roleIds.forEach(roleId -> dataScopeIds.forEach(scopeId -> {
@ -104,7 +104,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
// 新增配置
roleScopeService.saveBatch(roleDataScopes);
// 删除角色配置的数据权限集合
// 删除角色配置的接口权限集合
roleScopeService.remove(Wrappers.<RoleScope>update().lambda().eq(RoleScope::getScopeCategory, API_SCOPE_CATEGORY).in(RoleScope::getRoleId, roleIds));
// 组装配置
List<RoleScope> roleApiScopes = new ArrayList<>();

17
blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java

@ -28,6 +28,7 @@ import org.springblade.core.secure.annotation.PreAuth;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.constant.RoleConstant;
import org.springblade.core.tool.utils.StringPool;
import org.springblade.system.user.entity.User;
import org.springblade.system.user.service.IUserService;
import org.springblade.system.user.vo.UserVO;
@ -94,6 +95,22 @@ public class UserController {
return R.data(UserWrapper.build().pageVO(pages));
}
/**
* 自定义用户列表
*/
@GetMapping("/page")
@ApiImplicitParams({
@ApiImplicitParam(name = "account", value = "账号名", paramType = "query", dataType = "string"),
@ApiImplicitParam(name = "realName", value = "姓名", paramType = "query", dataType = "string")
})
@ApiOperationSupport(order = 3)
@ApiOperation(value = "列表", notes = "传入account和realName")
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
public R<IPage<UserVO>> page(@ApiIgnore User user, Query query, Long deptId, BladeUser bladeUser) {
IPage<User> pages = userService.selectUserPage(Condition.getPage(query), user, deptId, (bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? StringPool.EMPTY : bladeUser.getTenantId()));
return R.data(UserWrapper.build().pageVO(pages));
}
/**
* 新增或修改
*/

30
blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserDeptMapper.java

@ -0,0 +1,30 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.springblade.system.user.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springblade.system.user.entity.UserDept;
/**
* Mapper 接口
*
* @author Chill
*/
public interface UserDeptMapper extends BaseMapper<UserDept> {
}

5
blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserDeptMapper.xml

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.system.user.mapper.UserDeptMapper">
</mapper>

29
blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserMapper.java

@ -18,6 +18,7 @@ package org.springblade.system.user.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springblade.system.user.entity.User;
import java.util.List;
@ -34,9 +35,11 @@ public interface UserMapper extends BaseMapper<User> {
*
* @param page
* @param user
* @param deptIdList
* @param tenantId
* @return
*/
List<User> selectUserPage(IPage page, User user);
List<User> selectUserPage(IPage<User> page, User user, @Param("deptIdList") List<Long> deptIdList, @Param("tenantId") String tenantId);
/**
* 获取用户
@ -47,28 +50,4 @@ public interface UserMapper extends BaseMapper<User> {
*/
User getUser(String tenantId, String account);
/**
* 获取角色名
*
* @param ids
* @return
*/
List<String> getRoleName(String[] ids);
/**
* 获取角色别名
*
* @param ids
* @return
*/
List<String> getRoleAlias(String[] ids);
/**
* 获取部门名
*
* @param ids
* @return
*/
List<String> getDeptName(String[] ids);
}

25
blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserMapper.xml

@ -38,6 +38,31 @@
<select id="selectUserPage" resultMap="userResultMap">
select * from blade_user where is_deleted = 0
<if test="tenantId!=null and tenantId != ''">
and tenant_id = #{tenantId}
</if>
<if test="user.tenantId!=null">
and tenant_id = #{user.tenantId}
</if>
<if test="user.account!=null">
and account = #{user.account}
</if>
<if test="user.realName!=null">
and real_name = #{user.realName}
</if>
<if test="deptIdList!=null and deptIdList.size>0">
and id in (
SELECT
user_id
FROM
blade_user_dept
WHERE
dept_id IN
<foreach collection="deptIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
)
</if>
</select>
<select id="getUser" resultMap="userResultMap">

30
blade-service/blade-user/src/main/java/org/springblade/system/user/service/IUserDeptService.java

@ -0,0 +1,30 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.springblade.system.user.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.system.user.entity.UserDept;
/**
* 服务类
*
* @author Chill
*/
public interface IUserDeptService extends IService<UserDept> {
}

2
blade-service/blade-user/src/main/java/org/springblade/system/user/service/IUserService.java

@ -52,7 +52,7 @@ public interface IUserService extends BaseService<User> {
* @param user
* @return
*/
IPage<User> selectUserPage(IPage<User> page, User user);
IPage<User> selectUserPage(IPage<User> page, User user, Long deptId, String tenantId);
/**
* 用户信息

34
blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserDeptServiceImpl.java

@ -0,0 +1,34 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.springblade.system.user.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.system.user.entity.UserDept;
import org.springblade.system.user.mapper.UserDeptMapper;
import org.springblade.system.user.service.IUserDeptService;
import org.springframework.stereotype.Service;
/**
* 服务实现类
*
* @author Chill
*/
@Service
public class UserDeptServiceImpl extends ServiceImpl<UserDeptMapper, UserDept> implements IUserDeptService {
}

32
blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java

@ -20,6 +20,7 @@ package org.springblade.system.user.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.exceptions.ApiException;
import lombok.AllArgsConstructor;
import org.springblade.common.constant.CommonConstant;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
@ -30,11 +31,15 @@ import org.springblade.core.tool.utils.DigestUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.system.cache.SysCache;
import org.springblade.system.user.entity.User;
import org.springblade.system.user.entity.UserDept;
import org.springblade.system.user.entity.UserInfo;
import org.springblade.system.user.mapper.UserMapper;
import org.springblade.system.user.service.IUserDeptService;
import org.springblade.system.user.service.IUserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
/**
@ -43,9 +48,13 @@ import java.util.List;
* @author Chill
*/
@Service
@AllArgsConstructor
public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implements IUserService {
private IUserDeptService userDeptService;
@Override
@Transactional(rollbackFor = Exception.class)
public boolean submit(User user) {
if (Func.isNotEmpty(user.getPassword())) {
user.setPassword(DigestUtil.encrypt(user.getPassword()));
@ -54,18 +63,33 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
if (cnt > 0 && Func.isEmpty(user.getId())) {
throw new ApiException("当前用户已存在!");
}
return save(user);
return save(user) && submitUserDept(user);
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean updateUser(User user) {
user.setPassword(null);
return updateById(user);
return updateById(user) && submitUserDept(user);
}
private boolean submitUserDept(User user) {
List<Long> deptIdList = Func.toLongList(user.getDeptId());
List<UserDept> userDeptList = new ArrayList<>();
deptIdList.forEach(deptId -> {
UserDept userDept = new UserDept();
userDept.setUserId(user.getId());
userDept.setDeptId(deptId);
userDeptList.add(userDept);
});
userDeptService.remove(Wrappers.<UserDept>query().lambda().eq(UserDept::getUserId, user.getId()));
return userDeptService.saveBatch(userDeptList);
}
@Override
public IPage<User> selectUserPage(IPage<User> page, User user) {
return page.setRecords(baseMapper.selectUserPage(page, user));
public IPage<User> selectUserPage(IPage<User> page, User user, Long deptId, String tenantId) {
List<Long> deptIdList = SysCache.getDeptChildIds(deptId);
return page.setRecords(baseMapper.selectUserPage(page, user, deptIdList, tenantId));
}
@Override

21
doc/sql/mysql/bladex-saber-mysql.sql

@ -585,4 +585,25 @@ BEGIN;
INSERT INTO `blade_user` VALUES (1123598821738675201, '000000', 'admin', '90b9aa7e25f80cf4f64e990b78a9fc5ebd6cecad', '管理员', '管理员', 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png', 'admin@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675201', '1123598813738675201', 1123598821738675201, 1123598813738675201, '2018-08-08 00:00:00', 1123598821738675201, '2018-08-08 00:00:00', 1, 0), (1123598821738675202, '000000', 'hr', '5e79b90f7bba52d54115f086e48f539016a27ec6', '人事', '人事', '', 'hr@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675203', '1123598813738675201', 1123598821738675201, 1123598813738675201, '2019-04-27 17:03:10', 1123598821738675201, '2019-04-27 17:03:10', 1, 0), (1123598821738675203, '000000', 'manager', 'dfbaa3b61caa3a319f463cc165085aa8c822d2ce', '经理', '经理', '', 'manager@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675204', '1123598813738675201', 1123598821738675201, 1123598813738675201, '2019-04-27 17:03:38', 1123598821738675201, '2019-04-27 17:03:38', 1, 0), (1123598821738675204, '000000', 'boss', 'abe57d23e18f7ad8ea99c86e430c90a05119a9d3', '老板', '老板', '', 'boss@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675205', '1123598813738675201', 1123598821738675201, 1123598813738675201, '2019-04-27 17:03:55', 1123598821738675201, '2019-04-27 17:03:55', 1, 0);
COMMIT;
-- ----------------------------
-- Table structure for blade_user_dept
-- ----------------------------
DROP TABLE IF EXISTS `blade_user_dept`;
CREATE TABLE `blade_user_dept` (
`id` bigint(64) NOT NULL COMMENT '主键',
`user_id` bigint(64) NULL DEFAULT 0 COMMENT '用户ID',
`dept_id` bigint(64) NULL DEFAULT 0 COMMENT '部门ID',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户部门表';
-- ----------------------------
-- Records of blade_user_dept
-- ----------------------------
BEGIN;
INSERT INTO `blade_user_dept`(`id`, `user_id`, `dept_id`) VALUES (1203503640757788674, 1123598821738675201, 1123598813738675201);
INSERT INTO `blade_user_dept`(`id`, `user_id`, `dept_id`) VALUES (1203503653323923458, 1123598821738675202, 1123598813738675202);
INSERT INTO `blade_user_dept`(`id`, `user_id`, `dept_id`) VALUES (1203503663402835969, 1123598821738675203, 1123598813738675202);
INSERT INTO `blade_user_dept`(`id`, `user_id`, `dept_id`) VALUES (1203503672911323137, 1123598821738675204, 1123598813738675202);
COMMIT;
SET FOREIGN_KEY_CHECKS = 1;

21
doc/sql/mysql/bladex-sword-mysql.sql

@ -585,4 +585,25 @@ BEGIN;
INSERT INTO `blade_user` VALUES (1123598821738675201, '000000', 'admin', '90b9aa7e25f80cf4f64e990b78a9fc5ebd6cecad', '管理员', '管理员', 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png', 'admin@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675201', '1123598813738675201', 1123598821738675201, 1123598813738675201, '2018-08-08 00:00:00', 1123598821738675201, '2018-08-08 00:00:00', 1, 0), (1123598821738675202, '000000', 'hr', '5e79b90f7bba52d54115f086e48f539016a27ec6', '人事', '人事', '', 'hr@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675203', '1123598813738675201', 1123598821738675201, 1123598813738675201, '2019-04-27 17:03:10', 1123598821738675201, '2019-04-27 17:03:10', 1, 0), (1123598821738675203, '000000', 'manager', 'dfbaa3b61caa3a319f463cc165085aa8c822d2ce', '经理', '经理', '', 'manager@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675204', '1123598813738675201', 1123598821738675201, 1123598813738675201, '2019-04-27 17:03:38', 1123598821738675201, '2019-04-27 17:03:38', 1, 0), (1123598821738675204, '000000', 'boss', 'abe57d23e18f7ad8ea99c86e430c90a05119a9d3', '老板', '老板', '', 'boss@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675205', '1123598813738675201', 1123598821738675201, 1123598813738675201, '2019-04-27 17:03:55', 1123598821738675201, '2019-04-27 17:03:55', 1, 0);
COMMIT;
-- ----------------------------
-- Table structure for blade_user_dept
-- ----------------------------
DROP TABLE IF EXISTS `blade_user_dept`;
CREATE TABLE `blade_user_dept` (
`id` bigint(64) NOT NULL COMMENT '主键',
`user_id` bigint(64) NULL DEFAULT 0 COMMENT '用户ID',
`dept_id` bigint(64) NULL DEFAULT 0 COMMENT '部门ID',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户部门表';
-- ----------------------------
-- Records of blade_user_dept
-- ----------------------------
BEGIN;
INSERT INTO `blade_user_dept`(`id`, `user_id`, `dept_id`) VALUES (1203503640757788674, 1123598821738675201, 1123598813738675201);
INSERT INTO `blade_user_dept`(`id`, `user_id`, `dept_id`) VALUES (1203503653323923458, 1123598821738675202, 1123598813738675202);
INSERT INTO `blade_user_dept`(`id`, `user_id`, `dept_id`) VALUES (1203503663402835969, 1123598821738675203, 1123598813738675202);
INSERT INTO `blade_user_dept`(`id`, `user_id`, `dept_id`) VALUES (1203503672911323137, 1123598821738675204, 1123598813738675202);
COMMIT;
SET FOREIGN_KEY_CHECKS = 1;

83
doc/sql/oracle/bladex-saber-oracle.sql

@ -11,7 +11,7 @@
Target Server Version : 110200
File Encoding : 65001
Date: 03/12/2019 16:43:44
Date: 08/12/2019 10:05:00
*/
@ -1647,6 +1647,45 @@ INSERT INTO "BLADE_USER" VALUES ('1123598821738675203', '000000', 'manager', 'df
INSERT INTO "BLADE_USER" VALUES ('1123598821738675204', '000000', 'boss', 'abe57d23e18f7ad8ea99c86e430c90a05119a9d3', '老板', '老板', 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png', 'boss@bladex.vip', '123333333333', TO_DATE('2018-08-08 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', '1123598816738675205', '1123598813738675201', '1123598821738675201', '1123598813738675201', TO_DATE('2019-04-27 17:03:55', 'SYYYY-MM-DD HH24:MI:SS'), '1123598821738675201', TO_DATE('2019-04-27 17:03:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0');
COMMIT;
-- ----------------------------
-- Table structure for BLADE_USER_DEPT
-- ----------------------------
-- DROP TABLE "BLADE_USER_DEPT";
CREATE TABLE "BLADE_USER_DEPT" (
"ID" NUMBER(20) NOT NULL ,
"USER_ID" NUMBER(20) ,
"DEPT_ID" NUMBER(20)
)
TABLESPACE "BLADEX"
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "BLADE_USER_DEPT"."ID" IS '主键';
COMMENT ON COLUMN "BLADE_USER_DEPT"."USER_ID" IS '用户ID';
COMMENT ON COLUMN "BLADE_USER_DEPT"."DEPT_ID" IS '部门ID';
COMMENT ON TABLE "BLADE_USER_DEPT" IS '用户部门表';
-- ----------------------------
-- Records of BLADE_USER_DEPT
-- ----------------------------
INSERT INTO "BLADE_USER_DEPT" VALUES (1203503640757788674, 1123598821738675201, 1123598813738675201);
INSERT INTO "BLADE_USER_DEPT" VALUES (1203503653323923458, 1123598821738675202, 1123598813738675202);
INSERT INTO "BLADE_USER_DEPT" VALUES (1203503663402835969, 1123598821738675203, 1123598813738675202);
INSERT INTO "BLADE_USER_DEPT" VALUES (1203503672911323137, 1123598821738675204, 1123598813738675202);
COMMIT;
-- ----------------------------
-- Primary Key structure for table BLADE_CLIENT
-- ----------------------------
@ -1682,6 +1721,15 @@ ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019186" CHECK ("ACCESS_TOKEN_VA
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019187" CHECK ("REFRESH_TOKEN_VALIDITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019188" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019189" CHECK ("IS_DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019472" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019473" CHECK ("CLIENT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019474" CHECK ("CLIENT_SECRET" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019475" CHECK ("SCOPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019476" CHECK ("AUTHORIZED_GRANT_TYPES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019477" CHECK ("ACCESS_TOKEN_VALIDITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019478" CHECK ("REFRESH_TOKEN_VALIDITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019479" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019480" CHECK ("IS_DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_CODE
@ -1694,6 +1742,7 @@ ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0012758" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0012736" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0017048" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0019190" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0019481" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DATASOURCE
@ -1705,6 +1754,7 @@ ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0017121" PRIMARY KEY ("ID");
-- ----------------------------
ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0017120" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0019191" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0019482" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DEPT
@ -1717,6 +1767,7 @@ ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0012759" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0012737" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0017049" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0019192" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0019483" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DICT
@ -1729,6 +1780,7 @@ ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0012760" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0012738" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0017050" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0019193" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0019484" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DICT_BIZ
@ -1739,6 +1791,7 @@ ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0019296" PRIMARY KEY ("ID");
-- Checks structure for table BLADE_DICT_BIZ
-- ----------------------------
ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0019295" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0019485" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_LOG_API
@ -1751,6 +1804,7 @@ ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0012761" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0012739" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0017051" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0019194" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0019486" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_LOG_ERROR
@ -1763,6 +1817,7 @@ ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0012762" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0012740" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0017052" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0019195" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0019487" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_LOG_USUAL
@ -1775,6 +1830,7 @@ ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0012763" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0012741" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0017053" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0019196" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0019488" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_MENU
@ -1787,6 +1843,7 @@ ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0012764" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0012742" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0017054" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0019197" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0019489" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_NOTICE
@ -1799,6 +1856,7 @@ ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0012765" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0012743" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0017055" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0019198" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0019490" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_OSS
@ -1811,6 +1869,7 @@ ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0012766" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0012744" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0017056" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0019199" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0019491" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_PARAM
@ -1823,6 +1882,7 @@ ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0012767" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0012745" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0017057" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0019200" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0019492" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_PROCESS_LEAVE
@ -1835,6 +1895,7 @@ ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0012768" PRIMARY KEY ("ID
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0012746" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0017058" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0019201" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0019493" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_ROLE
@ -1847,6 +1908,7 @@ ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0012769" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0012747" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0017059" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0019202" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0019494" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_ROLE_MENU
@ -1859,6 +1921,7 @@ ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0012770" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0012748" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0017060" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0019203" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0019495" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_ROLE_SCOPE
@ -1871,6 +1934,7 @@ ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0012771" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0012749" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0017061" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0019204" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0019496" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_SCOPE_API
@ -1883,6 +1947,7 @@ ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0012772" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0012750" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0017062" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0019205" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0019497" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_SCOPE_DATA
@ -1895,6 +1960,7 @@ ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0012773" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0012751" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0017063" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0019206" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0019498" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_TENANT
@ -1910,6 +1976,8 @@ ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0017064" CHECK ("ID" IS NOT NULL
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0017065" CHECK ("TENANT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019207" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019208" CHECK ("TENANT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019499" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019500" CHECK ("TENANT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_TOP_MENU
@ -1922,6 +1990,7 @@ ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0012775" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0012754" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0017066" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0019209" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0019501" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_TOP_MENU_SETTING
@ -1934,6 +2003,7 @@ ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0012776" PRIMARY KEY (
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0012755" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0017067" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0019210" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0019502" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_USER
@ -1946,3 +2016,14 @@ ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0012777" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0012756" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0017068" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0019211" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0019503" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_USER_DEPT
-- ----------------------------
ALTER TABLE "BLADE_USER_DEPT" ADD CONSTRAINT "SYS_C0019621" PRIMARY KEY ("ID");
-- ----------------------------
-- Checks structure for table BLADE_USER_DEPT
-- ----------------------------
ALTER TABLE "BLADE_USER_DEPT" ADD CONSTRAINT "SYS_C0019620" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

113
doc/sql/oracle/bladex-sword-oracle.sql

@ -11,7 +11,7 @@
Target Server Version : 110200
File Encoding : 65001
Date: 03/12/2019 16:46:45
Date: 08/12/2019 10:09:01
*/
@ -623,6 +623,20 @@ COMMENT ON TABLE "BLADE_MENU" IS '菜单表';
-- ----------------------------
-- Records of BLADE_MENU
-- ----------------------------
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675307', '0', 'authority', '权限管理', 'menu', '/authority', 'safety-certificate', '98', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675308', '1123598815738675307', 'role', '角色管理', 'menu', '/authority/role', NULL, '1', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675309', '1123598815738675307', 'data_scope', '数据权限', 'menu', '/authority/datascope', NULL, '2', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675310', '1123598815738675309', 'data_scope_setting', '权限配置', 'setting', NULL, 'setting', '1', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675311', '1123598815738675307', 'api_scope', '接口权限', 'menu', '/authority/apiscope', NULL, '3', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675312', '1123598815738675311', 'api_scope_setting', '权限配置', 'setting', NULL, 'setting', '1', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675313', '1123598815738675208', 'topmenu_add', '新增', 'add', '/system/topmenu/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675314', '1123598815738675208', 'topmenu_edit', '修改', 'edit', '/system/topmenu/edit', 'form', '2', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675315', '1123598815738675208', 'topmenu_delete', '删除', 'delete', '/api/blade-system/topmenu/remove', 'delete', '3', '2', '3', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675316', '1123598815738675208', 'topmenu_view', '查看', 'view', '/system/topmenu/view', 'file-text', '4', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675317', '1123598815738675208', 'topmenu_setting', '菜单配置', 'setting', NULL, 'setting', '5', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321991', '1123598815738675217', 'datasource', '数据源管理', 'menu', '/tool/datasource', 'iconfont icon-caidanguanli', '2', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321992', '1161272593873321991', 'datasource_add', '新增', 'add', '/tool/datasource/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321993', '1161272593873321991', 'datasource_edit', '修改', 'edit', '/tool/datasource/edit', 'form', '2', '2', '2', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321994', '1161272593873321991', 'datasource_delete', '删除', 'delete', '/api/blade-develop/datasource/remove', 'delete', '3', '2', '3', '3', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321995', '1161272593873321991', 'datasource_view', '查看', 'view', '/tool/datasource/view', 'file-text', '4', '2', '2', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733121140551682', '1123598815738675217', 'form', '表单设计', 'form', 'https://form.avuejs.com/', NULL, '3', '1', '0', '2', NULL, '0');
@ -632,7 +646,7 @@ INSERT INTO "BLADE_MENU" VALUES ('1164733369658963252', '1123598815738675210', '
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963253', '1123598815738675210', 'turbine', 'Turbine监控', 'menu', 'http://localhost:7003/hystrix', NULL, '5', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963254', '1123598815738675210', 'sentinel', 'Sentinel管理', 'menu', 'http://localhost:8858', NULL, '6', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963255', '1123598815738675210', 'es', 'Elasticsearch管理', 'menu', 'http://localhost:9100/', NULL, '7', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963251', '1123598815738675203', 'dictbiz', '业务字典', 'menu', '/system/dictbiz', '', '3', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963251', '1123598815738675203', 'dictbiz', '业务字典', 'menu', '/system/dictbiz', NULL, '3', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963252', '1164733379658963251', 'dictbiz_add', '新增', 'add', '/system/dictbiz/add', 'plus', '1', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963253', '1164733379658963251', 'dictbiz_edit', '修改', 'edit', '/system/dictbiz/edit', 'form', '2', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963254', '1164733379658963251', 'dictbiz_delete', '删除', 'delete', '/api/blade-system/dict-biz/remove', 'delete', '3', '2', '0', '1', NULL, '0');
@ -741,20 +755,6 @@ INSERT INTO "BLADE_MENU" VALUES ('1123598815738675302', '1123598815738675299', '
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675303', '1123598815738675299', 'oss_delete', '删除', 'delete', '/api/blade-resource/oss/remove', 'delete', '3', '2', '3', '3', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675304', '1123598815738675299', 'oss_view', '查看', 'view', '/resource/oss/view', 'file-text', '4', '2', '2', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675305', '1123598815738675299', 'oss_enable', '启用', 'enable', '/api/blade-resource/oss/enable', 'key', '5', '2', '2', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675307', '0', 'authority', '权限管理', 'menu', '/authority', 'safety-certificate', '98', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675308', '1123598815738675307', 'role', '角色管理', 'menu', '/authority/role', NULL, '1', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675309', '1123598815738675307', 'data_scope', '数据权限', 'menu', '/authority/datascope', NULL, '2', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675310', '1123598815738675309', 'data_scope_setting', '权限配置', 'setting', NULL, 'setting', '1', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675311', '1123598815738675307', 'api_scope', '接口权限', 'menu', '/authority/apiscope', NULL, '3', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675312', '1123598815738675311', 'api_scope_setting', '权限配置', 'setting', NULL, 'setting', '1', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675313', '1123598815738675208', 'topmenu_add', '新增', 'add', '/system/topmenu/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675314', '1123598815738675208', 'topmenu_edit', '修改', 'edit', '/system/topmenu/edit', 'form', '2', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675315', '1123598815738675208', 'topmenu_delete', '删除', 'delete', '/api/blade-system/topmenu/remove', 'delete', '3', '2', '3', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675316', '1123598815738675208', 'topmenu_view', '查看', 'view', '/system/topmenu/view', 'file-text', '4', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675317', '1123598815738675208', 'topmenu_setting', '菜单配置', 'setting', NULL, 'setting', '5', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321991', '1123598815738675217', 'datasource', '数据源管理', 'menu', '/tool/datasource', 'iconfont icon-caidanguanli', '2', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321992', '1161272593873321991', 'datasource_add', '新增', 'add', '/tool/datasource/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1161272593873321993', '1161272593873321991', 'datasource_edit', '修改', 'edit', '/tool/datasource/edit', 'form', '2', '2', '2', '2', NULL, '0');
COMMIT;
-- ----------------------------
@ -1647,6 +1647,45 @@ INSERT INTO "BLADE_USER" VALUES ('1123598821738675203', '000000', 'manager', 'df
INSERT INTO "BLADE_USER" VALUES ('1123598821738675204', '000000', 'boss', 'abe57d23e18f7ad8ea99c86e430c90a05119a9d3', '老板', '老板', 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png', 'boss@bladex.vip', '123333333333', TO_DATE('2018-08-08 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'), '1', '1123598816738675205', '1123598813738675201', '1123598821738675201', '1123598813738675201', TO_DATE('2019-04-27 17:03:55', 'SYYYY-MM-DD HH24:MI:SS'), '1123598821738675201', TO_DATE('2019-04-27 17:03:55', 'SYYYY-MM-DD HH24:MI:SS'), '1', '0');
COMMIT;
-- ----------------------------
-- Table structure for BLADE_USER_DEPT
-- ----------------------------
-- DROP TABLE "BLADE_USER_DEPT";
CREATE TABLE "BLADE_USER_DEPT" (
"ID" NUMBER(20) NOT NULL ,
"USER_ID" NUMBER(20) ,
"DEPT_ID" NUMBER(20)
)
TABLESPACE "BLADEX"
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
)
PARALLEL 1
NOCACHE
DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "BLADE_USER_DEPT"."ID" IS '主键';
COMMENT ON COLUMN "BLADE_USER_DEPT"."USER_ID" IS '用户ID';
COMMENT ON COLUMN "BLADE_USER_DEPT"."DEPT_ID" IS '部门ID';
COMMENT ON TABLE "BLADE_USER_DEPT" IS '用户部门表';
-- ----------------------------
-- Records of BLADE_USER_DEPT
-- ----------------------------
INSERT INTO "BLADE_USER_DEPT" VALUES (1203503640757788674, 1123598821738675201, 1123598813738675201);
INSERT INTO "BLADE_USER_DEPT" VALUES (1203503653323923458, 1123598821738675202, 1123598813738675202);
INSERT INTO "BLADE_USER_DEPT" VALUES (1203503663402835969, 1123598821738675203, 1123598813738675202);
INSERT INTO "BLADE_USER_DEPT" VALUES (1203503672911323137, 1123598821738675204, 1123598813738675202);
COMMIT;
-- ----------------------------
-- Primary Key structure for table BLADE_CLIENT
-- ----------------------------
@ -1682,6 +1721,15 @@ ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019302" CHECK ("ACCESS_TOKEN_VA
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019303" CHECK ("REFRESH_TOKEN_VALIDITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019304" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019305" CHECK ("IS_DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019622" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019623" CHECK ("CLIENT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019624" CHECK ("CLIENT_SECRET" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019625" CHECK ("SCOPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019626" CHECK ("AUTHORIZED_GRANT_TYPES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019627" CHECK ("ACCESS_TOKEN_VALIDITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019628" CHECK ("REFRESH_TOKEN_VALIDITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019629" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0019630" CHECK ("IS_DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_CODE
@ -1694,6 +1742,7 @@ ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0012675" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0012653" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0017228" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0019306" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0019631" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DATASOURCE
@ -1705,6 +1754,7 @@ ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0017301" PRIMARY KEY ("ID");
-- ----------------------------
ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0017300" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0019307" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0019632" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DEPT
@ -1717,6 +1767,7 @@ ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0012676" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0012654" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0017229" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0019308" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0019633" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DICT
@ -1729,6 +1780,7 @@ ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0012677" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0012655" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0017230" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0019309" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0019634" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DICT_BIZ
@ -1739,6 +1791,7 @@ ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0019412" PRIMARY KEY ("ID");
-- Checks structure for table BLADE_DICT_BIZ
-- ----------------------------
ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0019411" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0019635" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_LOG_API
@ -1751,6 +1804,7 @@ ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0012678" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0012656" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0017231" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0019310" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0019636" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_LOG_ERROR
@ -1763,6 +1817,7 @@ ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0012679" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0012657" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0017232" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0019311" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0019637" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_LOG_USUAL
@ -1775,6 +1830,7 @@ ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0012680" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0012658" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0017233" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0019312" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0019638" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_MENU
@ -1787,6 +1843,7 @@ ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0012681" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0012659" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0017234" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0019313" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0019639" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_NOTICE
@ -1799,6 +1856,7 @@ ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0012682" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0012660" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0017235" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0019314" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0019640" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_OSS
@ -1811,6 +1869,7 @@ ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0012683" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0012661" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0017236" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0019315" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0019641" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_PARAM
@ -1823,6 +1882,7 @@ ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0012684" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0012662" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0017237" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0019316" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0019642" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_PROCESS_LEAVE
@ -1835,6 +1895,7 @@ ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0012685" PRIMARY KEY ("ID
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0012663" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0017238" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0019317" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0019643" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_ROLE
@ -1847,6 +1908,7 @@ ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0012686" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0012664" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0017239" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0019318" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0019644" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_ROLE_MENU
@ -1859,6 +1921,7 @@ ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0012687" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0012665" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0017240" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0019319" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0019645" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_ROLE_SCOPE
@ -1871,6 +1934,7 @@ ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0012688" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0012666" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0017241" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0019320" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0019646" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_SCOPE_API
@ -1883,6 +1947,7 @@ ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0012689" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0012667" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0017242" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0019321" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0019647" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_SCOPE_DATA
@ -1895,6 +1960,7 @@ ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0012690" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0012668" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0017243" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0019322" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0019648" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_TENANT
@ -1910,6 +1976,8 @@ ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0017244" CHECK ("ID" IS NOT NULL
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0017245" CHECK ("TENANT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019323" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019324" CHECK ("TENANT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019649" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019650" CHECK ("TENANT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_TOP_MENU
@ -1922,6 +1990,7 @@ ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0012692" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0012671" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0017246" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0019325" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0019651" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_TOP_MENU_SETTING
@ -1934,6 +2003,7 @@ ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0012693" PRIMARY KEY (
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0012672" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0017247" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0019326" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0019652" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_USER
@ -1946,3 +2016,14 @@ ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0012694" PRIMARY KEY ("ID");
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0012673" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0017248" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0019327" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0019653" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_USER_DEPT
-- ----------------------------
ALTER TABLE "BLADE_USER_DEPT" ADD CONSTRAINT "SYS_C0019771" PRIMARY KEY ("ID");
-- ----------------------------
-- Checks structure for table BLADE_USER_DEPT
-- ----------------------------
ALTER TABLE "BLADE_USER_DEPT" ADD CONSTRAINT "SYS_C0019770" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

32
doc/sql/postgresql/bladex-saber-postgresql.sql

@ -12,7 +12,7 @@
Target Server Version : 110001
File Encoding : 65001
Date: 03/12/2019 15:24:05
Date: 08/12/2019 10:12:34
*/
@ -1317,6 +1317,31 @@ INSERT INTO "blade_user" VALUES (1123598821738675203, '000000', 'manager', 'dfba
INSERT INTO "blade_user" VALUES (1123598821738675204, '000000', 'boss', 'abe57d23e18f7ad8ea99c86e430c90a05119a9d3', '老板', '老板', 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png', 'boss@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675205', '1123598813738675201', 1123598821738675201, 1123598813738675201, '2019-04-27 17:03:55', 1123598821738675201, '2019-04-27 17:03:55', 1, 0);
COMMIT;
-- ----------------------------
-- Table structure for blade_user_dept
-- ----------------------------
DROP TABLE IF EXISTS "blade_user_dept";
CREATE TABLE "blade_user_dept" (
"id" int8 NOT NULL,
"user_id" int8,
"dept_id" int8
)
;
COMMENT ON COLUMN "blade_user_dept"."id" IS '主键';
COMMENT ON COLUMN "blade_user_dept"."user_id" IS '用户ID';
COMMENT ON COLUMN "blade_user_dept"."dept_id" IS '部门ID';
COMMENT ON TABLE "blade_user_dept" IS '用户部门表';
-- ----------------------------
-- Records of blade_user_dept
-- ----------------------------
BEGIN;
INSERT INTO "blade_user_dept" VALUES (1203503640757788674, 1123598821738675201, 1123598813738675201);
INSERT INTO "blade_user_dept" VALUES (1203503653323923458, 1123598821738675202, 1123598813738675202);
INSERT INTO "blade_user_dept" VALUES (1203503663402835969, 1123598821738675203, 1123598813738675202);
INSERT INTO "blade_user_dept" VALUES (1203503672911323137, 1123598821738675204, 1123598813738675202);
COMMIT;
-- ----------------------------
-- Primary Key structure for table blade_client
-- ----------------------------
@ -1431,3 +1456,8 @@ ALTER TABLE "blade_top_menu_setting" ADD CONSTRAINT "blade_top_menu_setting_pkey
-- Primary Key structure for table blade_user
-- ----------------------------
ALTER TABLE "blade_user" ADD CONSTRAINT "blade_user_pkey" PRIMARY KEY ("id");
-- ----------------------------
-- Primary Key structure for table blade_user_dept
-- ----------------------------
ALTER TABLE "blade_user_dept" ADD CONSTRAINT "blade_user_dept_pkey" PRIMARY KEY ("id");

32
doc/sql/postgresql/bladex-sword-postgresql.sql

@ -12,7 +12,7 @@
Target Server Version : 110001
File Encoding : 65001
Date: 03/12/2019 15:26:43
Date: 08/12/2019 10:13:15
*/
@ -1317,6 +1317,31 @@ INSERT INTO "blade_user" VALUES (1123598821738675203, '000000', 'manager', 'dfba
INSERT INTO "blade_user" VALUES (1123598821738675204, '000000', 'boss', 'abe57d23e18f7ad8ea99c86e430c90a05119a9d3', '老板', '老板', 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png', 'boss@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675205', '1123598813738675201', 1123598821738675201, 1123598813738675201, '2019-04-27 17:03:55', 1123598821738675201, '2019-04-27 17:03:55', 1, 0);
COMMIT;
-- ----------------------------
-- Table structure for blade_user_dept
-- ----------------------------
DROP TABLE IF EXISTS "blade_user_dept";
CREATE TABLE "blade_user_dept" (
"id" int8 NOT NULL,
"user_id" int8,
"dept_id" int8
)
;
COMMENT ON COLUMN "blade_user_dept"."id" IS '主键';
COMMENT ON COLUMN "blade_user_dept"."user_id" IS '用户ID';
COMMENT ON COLUMN "blade_user_dept"."dept_id" IS '部门ID';
COMMENT ON TABLE "blade_user_dept" IS '用户部门表';
-- ----------------------------
-- Records of blade_user_dept
-- ----------------------------
BEGIN;
INSERT INTO "blade_user_dept" VALUES (1203503640757788674, 1123598821738675201, 1123598813738675201);
INSERT INTO "blade_user_dept" VALUES (1203503653323923458, 1123598821738675202, 1123598813738675202);
INSERT INTO "blade_user_dept" VALUES (1203503663402835969, 1123598821738675203, 1123598813738675202);
INSERT INTO "blade_user_dept" VALUES (1203503672911323137, 1123598821738675204, 1123598813738675202);
COMMIT;
-- ----------------------------
-- Primary Key structure for table blade_client
-- ----------------------------
@ -1431,3 +1456,8 @@ ALTER TABLE "blade_top_menu_setting" ADD CONSTRAINT "blade_top_menu_setting_pkey
-- Primary Key structure for table blade_user
-- ----------------------------
ALTER TABLE "blade_user" ADD CONSTRAINT "blade_user_pkey" PRIMARY KEY ("id");
-- ----------------------------
-- Primary Key structure for table blade_user_dept
-- ----------------------------
ALTER TABLE "blade_user_dept" ADD CONSTRAINT "blade_user_dept_pkey" PRIMARY KEY ("id");

18
doc/sql/update/mysql-update-2.2.1~2.2.2.sql

@ -49,3 +49,21 @@ CREATE TABLE `blade_dict_biz` (
`is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '业务字典表';
-- ----------------------------
-- 创建用户部门表
-- ----------------------------
CREATE TABLE `blade_user_dept` (
`id` bigint(64) NOT NULL COMMENT '主键',
`user_id` bigint(64) NULL DEFAULT 0 COMMENT '用户ID',
`dept_id` bigint(64) NULL DEFAULT 0 COMMENT '部门ID',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户部门表';
-- ----------------------------
-- 新增用户部门表数据
-- ----------------------------
INSERT INTO `blade_user_dept`(`id`, `user_id`, `dept_id`) VALUES (1203503640757788674, 1123598821738675201, 1123598813738675201);
INSERT INTO `blade_user_dept`(`id`, `user_id`, `dept_id`) VALUES (1203503653323923458, 1123598821738675202, 1123598813738675202);
INSERT INTO `blade_user_dept`(`id`, `user_id`, `dept_id`) VALUES (1203503663402835969, 1123598821738675203, 1123598813738675202);
INSERT INTO `blade_user_dept`(`id`, `user_id`, `dept_id`) VALUES (1203503672911323137, 1123598821738675204, 1123598813738675202);

22
doc/sql/update/oracle-update-2.2.1~2.2.2.sql

@ -66,3 +66,25 @@ COMMENT ON COLUMN "BLADEX"."BLADE_DICT_BIZ"."REMARK" IS '字典备注';
COMMENT ON COLUMN "BLADEX"."BLADE_DICT_BIZ"."IS_SEALED" IS '是否已封存';
COMMENT ON COLUMN "BLADEX"."BLADE_DICT_BIZ"."IS_DELETED" IS '是否已删除';
COMMENT ON TABLE "BLADEX"."BLADE_DICT_BIZ" IS '数据源配置表';
-- ----------------------------
-- 创建用户部门表
-- ----------------------------
CREATE TABLE "BLADEX"."BLADE_USER_DEPT" (
"ID" NUMBER(20) NOT NULL ,
"USER_ID" NUMBER(20) ,
"DEPT_ID" NUMBER(20) ,
PRIMARY KEY ("ID")
);
COMMENT ON COLUMN "BLADEX"."BLADE_USER_DEPT"."ID" IS '主键';
COMMENT ON COLUMN "BLADEX"."BLADE_USER_DEPT"."USER_ID" IS '用户ID';
COMMENT ON COLUMN "BLADEX"."BLADE_USER_DEPT"."DEPT_ID" IS '部门ID';
COMMENT ON TABLE "BLADEX"."BLADE_USER_DEPT" IS '用户部门表';
-- ----------------------------
-- 新增用户部门表数据
-- ----------------------------
INSERT INTO "BLADEX"."BLADE_USER_DEPT" VALUES (1203503640757788674, 1123598821738675201, 1123598813738675201);
INSERT INTO "BLADEX"."BLADE_USER_DEPT" VALUES (1203503653323923458, 1123598821738675202, 1123598813738675202);
INSERT INTO "BLADEX"."BLADE_USER_DEPT" VALUES (1203503663402835969, 1123598821738675203, 1123598813738675202);
INSERT INTO "BLADEX"."BLADE_USER_DEPT" VALUES (1203503672911323137, 1123598821738675204, 1123598813738675202);

22
doc/sql/update/postgresql-update-2.2.1~2.2.2.sql

@ -57,3 +57,25 @@ COMMENT ON COLUMN "blade_dict_biz"."remark" IS '字典备注';
COMMENT ON COLUMN "blade_dict_biz"."is_sealed" IS '是否已封存';
COMMENT ON COLUMN "blade_dict_biz"."is_deleted" IS '是否已删除';
COMMENT ON TABLE "blade_dict_biz" IS '业务字典表';
-- ----------------------------
-- 创建用户部门表
-- ----------------------------
CREATE TABLE "blade_user_dept" (
"id" int8 NOT NULL,
"user_id" int8,
"dept_id" int8,
PRIMARY KEY ("id")
);
COMMENT ON COLUMN "blade_user_dept"."id" IS '主键';
COMMENT ON COLUMN "blade_user_dept"."user_id" IS '用户ID';
COMMENT ON COLUMN "blade_user_dept"."dept_id" IS '部门ID';
COMMENT ON TABLE "blade_user_dept" IS '用户部门表';
-- ----------------------------
-- 新增用户部门表数据
-- ----------------------------
INSERT INTO "blade_user_dept" VALUES (1203503640757788674, 1123598821738675201, 1123598813738675201);
INSERT INTO "blade_user_dept" VALUES (1203503653323923458, 1123598821738675202, 1123598813738675202);
INSERT INTO "blade_user_dept" VALUES (1203503663402835969, 1123598821738675203, 1123598813738675202);
INSERT INTO "blade_user_dept" VALUES (1203503672911323137, 1123598821738675204, 1123598813738675202);

Loading…
Cancel
Save