Browse Source

🎉 增加用户平台拓展模块

test
smallchill 5 years ago
parent
commit
5ffc5da8e9
  1. 64
      blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/UserApp.java
  2. 64
      blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/UserOther.java
  3. 64
      blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/UserWeb.java
  4. 5
      blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/vo/UserVO.java
  5. 23
      blade-service/blade-user/src/main/java/org/springblade/system/user/controller/UserController.java
  6. 30
      blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserAppMapper.java
  7. 5
      blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserAppMapper.xml
  8. 30
      blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserOtherMapper.java
  9. 5
      blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserOtherMapper.xml
  10. 30
      blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserWebMapper.java
  11. 5
      blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserWebMapper.xml
  12. 19
      blade-service/blade-user/src/main/java/org/springblade/system/user/service/IUserService.java
  13. 85
      blade-service/blade-user/src/main/java/org/springblade/system/user/service/impl/UserServiceImpl.java
  14. 23
      doc/sql/db/database-info.md
  15. 43
      doc/sql/mysql/bladex-saber-mysql.sql
  16. 43
      doc/sql/mysql/bladex-sword-mysql.sql
  17. 5239
      doc/sql/oracle/bladex-saber-oracle.sql
  18. 5147
      doc/sql/oracle/bladex-sword-oracle.sql
  19. 66
      doc/sql/postgresql/bladex-saber-postgresql.sql
  20. 66
      doc/sql/postgresql/bladex-sword-postgresql.sql
  21. 166
      doc/sql/sqlserver/bladex-saber-sqlserver.sql
  22. 166
      doc/sql/sqlserver/bladex-sword-sqlserver.sql
  23. 24
      doc/sql/update/mysql-update-2.6.0~2.6.1.sql
  24. 40
      doc/sql/update/oracle-update-2.6.0~2.6.1.sql
  25. 39
      doc/sql/update/postgresql-update-2.6.0~2.6.1.sql
  26. 108
      doc/sql/update/sqlserver-update-2.6.0~2.6.1.sql

64
blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/UserApp.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.baomidou.mybatisplus.extension.activerecord.Model;
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 lombok.EqualsAndHashCode;
/**
* 实体类
*
* @author Chill
*/
@Data
@TableName("blade_user_app")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "UserApp对象", description = "UserApp对象")
public class UserApp extends Model<UserApp> {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID)
private Long id;
/**
* 用户ID
*/
@JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "用户ID")
private Long userId;
/**
* 用户拓展信息
*/
@ApiModelProperty(value = "用户拓展信息")
private String userExt;
}

64
blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/UserOther.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.baomidou.mybatisplus.extension.activerecord.Model;
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 lombok.EqualsAndHashCode;
/**
* 实体类
*
* @author Chill
*/
@Data
@TableName("blade_user_other")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "UserOther对象", description = "UserOther对象")
public class UserOther extends Model<UserOther> {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID)
private Long id;
/**
* 用户ID
*/
@JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "用户ID")
private Long userId;
/**
* 用户拓展信息
*/
@ApiModelProperty(value = "用户拓展信息")
private String userExt;
}

64
blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/entity/UserWeb.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.baomidou.mybatisplus.extension.activerecord.Model;
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 lombok.EqualsAndHashCode;
/**
* 实体类
*
* @author Chill
*/
@Data
@TableName("blade_user_web")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "UserWeb对象", description = "UserWeb对象")
public class UserWeb extends Model<UserWeb> {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID)
private Long id;
/**
* 用户ID
*/
@JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "用户ID")
private Long userId;
/**
* 用户拓展信息
*/
@ApiModelProperty(value = "用户拓展信息")
private String userExt;
}

5
blade-service-api/blade-user-api/src/main/java/org/springblade/system/user/vo/UserVO.java

@ -76,4 +76,9 @@ public class UserVO extends User {
* 性别
*/
private String sexName;
/**
* 拓展信息
*/
private String userExt;
}

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

@ -268,4 +268,27 @@ public class UserController {
return R.status(userService.registerGuest(user, oauthId));
}
/**
* 配置用户平台信息
*/
@PostMapping("/update-platform")
@ApiOperationSupport(order = 16)
@ApiOperation(value = "配置用户平台信息", notes = "传入user")
public R updatePlatform(Long userId, Integer userType, String userExt) {
return R.status(userService.updatePlatform(userId, userType, userExt));
}
/**
* 查看平台详情
*/
@ApiOperationSupport(order = 17)
@ApiOperation(value = "查看平台详情", notes = "传入id")
@GetMapping("/platform-detail")
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
public R<UserVO> platformDetail(User user) {
return R.data(userService.platformDetail(user));
}
}

30
blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserAppMapper.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.UserApp;
/**
* Mapper 接口
*
* @author Chill
*/
public interface UserAppMapper extends BaseMapper<UserApp> {
}

5
blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserAppMapper.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.UserAppMapper">
</mapper>

30
blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserOtherMapper.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.UserOther;
/**
* Mapper 接口
*
* @author Chill
*/
public interface UserOtherMapper extends BaseMapper<UserOther> {
}

5
blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserOtherMapper.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.UserOtherMapper">
</mapper>

30
blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserWebMapper.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.UserWeb;
/**
* Mapper 接口
*
* @author Chill
*/
public interface UserWebMapper extends BaseMapper<UserWeb> {
}

5
blade-service/blade-user/src/main/java/org/springblade/system/user/mapper/UserWebMapper.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.UserWebMapper">
</mapper>

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

@ -25,6 +25,7 @@ import org.springblade.system.user.entity.UserInfo;
import org.springblade.system.user.entity.UserOauth;
import org.springblade.system.user.enums.UserEnum;
import org.springblade.system.user.excel.UserExcel;
import org.springblade.system.user.vo.UserVO;
import java.util.List;
@ -175,4 +176,22 @@ public interface IUserService extends BaseService<User> {
* @return
*/
boolean registerGuest(User user, Long oauthId);
/**
* 配置用户平台
*
* @param userId
* @param userType
* @param userExt
* @return
*/
boolean updatePlatform(Long userId, Integer userType, String userExt);
/**
* 用户详细信息
*
* @param user
* @return
*/
UserVO platformDetail(User user);
}

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

@ -26,6 +26,7 @@ import org.springblade.common.constant.CommonConstant;
import org.springblade.common.constant.TenantConstant;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tenant.BladeTenantProperties;
import org.springblade.core.tool.api.R;
@ -38,16 +39,15 @@ import org.springblade.system.cache.SysCache;
import org.springblade.system.entity.Tenant;
import org.springblade.system.feign.ISysClient;
import org.springblade.system.user.cache.UserCache;
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.entity.UserOauth;
import org.springblade.system.user.entity.*;
import org.springblade.system.user.enums.UserEnum;
import org.springblade.system.user.excel.UserExcel;
import org.springblade.system.user.mapper.UserMapper;
import org.springblade.system.user.service.IUserDeptService;
import org.springblade.system.user.service.IUserOauthService;
import org.springblade.system.user.service.IUserService;
import org.springblade.system.user.vo.UserVO;
import org.springblade.system.user.wrapper.UserWrapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -182,13 +182,27 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
}
}
// 根据每个用户平台,建立对应的detail表,通过查询将结果集写入到detail字段
Kv detail = Kv.create().set("type", userEnum.getName());
if (userEnum == UserEnum.WEB) {
userInfo.setDetail(Kv.create().set("type", userEnum.getName()));
UserWeb userWeb = new UserWeb();
UserWeb query = userWeb.selectOne(Wrappers.<UserWeb>lambdaQuery().eq(UserWeb::getUserId, user.getId()));
if (ObjectUtil.isNotEmpty(query)) {
detail.set("ext", query.getUserExt());
}
} else if (userEnum == UserEnum.APP) {
userInfo.setDetail(Kv.create().set("type", userEnum.getName()));
UserApp userApp = new UserApp();
UserApp query = userApp.selectOne(Wrappers.<UserApp>lambdaQuery().eq(UserApp::getUserId, user.getId()));
if (ObjectUtil.isNotEmpty(query)) {
detail.set("ext", query.getUserExt());
}
} else {
userInfo.setDetail(Kv.create().set("type", userEnum.getName()));
UserOther userOther = new UserOther();
UserOther query = userOther.selectOne(Wrappers.<UserOther>lambdaQuery().eq(UserOther::getUserId, user.getId()));
if (ObjectUtil.isNotEmpty(query)) {
detail.set("ext", query.getUserExt());
}
}
userInfo.setDetail(detail);
return userInfo;
}
@ -317,5 +331,62 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
boolean oauthTemp = userOauthService.updateById(userOauth);
return (userTemp && oauthTemp);
}
@Override
public boolean updatePlatform(Long userId, Integer userType, String userExt) {
if (userType.equals(UserEnum.WEB.getCategory())) {
UserWeb userWeb = new UserWeb();
UserWeb query = userWeb.selectOne(Wrappers.<UserWeb>lambdaQuery().eq(UserWeb::getUserId, userId));
if (ObjectUtil.isNotEmpty(query)) {
userWeb.setId(query.getId());
}
userWeb.setUserId(userId);
userWeb.setUserExt(userExt);
return userWeb.insertOrUpdate();
} else if (userType.equals(UserEnum.APP.getCategory())) {
UserApp userApp = new UserApp();
UserApp query = userApp.selectOne(Wrappers.<UserApp>lambdaQuery().eq(UserApp::getUserId, userId));
if (ObjectUtil.isNotEmpty(query)) {
userApp.setId(query.getId());
}
userApp.setUserId(userId);
userApp.setUserExt(userExt);
return userApp.insertOrUpdate();
} else {
UserOther userOther = new UserOther();
UserOther query = userOther.selectOne(Wrappers.<UserOther>lambdaQuery().eq(UserOther::getUserId, userId));
if (ObjectUtil.isNotEmpty(query)) {
userOther.setId(query.getId());
}
userOther.setUserId(userId);
userOther.setUserExt(userExt);
return userOther.insertOrUpdate();
}
}
@Override
public UserVO platformDetail(User user) {
User detail = baseMapper.selectOne(Condition.getQueryWrapper(user));
UserVO userVO = UserWrapper.build().entityVO(detail);
if (userVO.getUserType().equals(UserEnum.WEB.getCategory())) {
UserWeb userWeb = new UserWeb();
UserWeb query = userWeb.selectOne(Wrappers.<UserWeb>lambdaQuery().eq(UserWeb::getUserId, user.getId()));
if (ObjectUtil.isNotEmpty(query)) {
userVO.setUserExt(query.getUserExt());
}
} else if (userVO.getUserType().equals(UserEnum.APP.getCategory())) {
UserApp userApp = new UserApp();
UserApp query = userApp.selectOne(Wrappers.<UserApp>lambdaQuery().eq(UserApp::getUserId, user.getId()));
if (ObjectUtil.isNotEmpty(query)) {
userVO.setUserExt(query.getUserExt());
}
} else {
UserOther userOther = new UserOther();
UserOther query = userOther.selectOne(Wrappers.<UserOther>lambdaQuery().eq(UserOther::getUserId, user.getId()));
if (ObjectUtil.isNotEmpty(query)) {
userVO.setUserExt(query.getUserExt());
}
}
return userVO;
}
}

23
doc/sql/db/database-info.md

@ -539,3 +539,26 @@ Table: blade_user_oauth(用户第三方认证表)
| gender | VARCHAR(16) | YES | | | 性别 |
| source | VARCHAR(16) | YES | | | 来源 |
Table: blade_user_web(用户平台拓展表)
| Field | Type | Null | Key | Default | Remarks |
| ------- | ---------- | ---- | --- | ------- | ------- |
| id | BIGINT(19) | NO | PRI | | 主键 |
| user_id | BIGINT(19) | YES | | 0 | 用户ID |
| user_ext | VARCHAR(255) | YES | | | 用户拓展信息 |
Table: blade_user_app(用户平台拓展表)
| Field | Type | Null | Key | Default | Remarks |
| ------- | ---------- | ---- | --- | ------- | ------- |
| id | BIGINT(19) | NO | PRI | | 主键 |
| user_id | BIGINT(19) | YES | | 0 | 用户ID |
| user_ext | VARCHAR(255) | YES | | | 用户拓展信息 |
Table: blade_user_other(用户平台拓展表)
| Field | Type | Null | Key | Default | Remarks |
| ------- | ---------- | ---- | --- | ------- | ------- |
| id | BIGINT(19) | NO | PRI | | 主键 |
| user_id | BIGINT(19) | YES | | 0 | 用户ID |
| user_ext | VARCHAR(255) | YES | | | 用户拓展信息 |

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

@ -1,17 +1,17 @@
/*
Navicat Premium Data Transfer
Source Server : mysql_localhost
Source Server : mysql_jd
Source Server Type : MySQL
Source Server Version : 50729
Source Host : localhost:3306
Source Server Version : 50723
Source Host : 127.0.0.1:3306
Source Schema : bladex
Target Server Type : MySQL
Target Server Version : 50729
Target Server Version : 50723
File Encoding : 65001
Date: 14/09/2020 18:35:27
Date: 22/10/2020 23:11:21
*/
SET NAMES utf8mb4;
@ -733,6 +733,17 @@ BEGIN;
INSERT INTO `blade_user` VALUES (1123598821738675201, '000000', NULL, 1, 'admin', '90b9aa7e25f80cf4f64e990b78a9fc5ebd6cecad', '管理员', '管理员', 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png', 'admin@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675201', '1123598813738675201', '1123598817738675201', 1123598821738675201, 1123598813738675201, '2018-08-08 00:00:00', 1123598821738675201, '2018-08-08 00:00:00', 1, 0), (1123598821738675202, '000000', NULL, 1, 'hr', '5e79b90f7bba52d54115f086e48f539016a27ec6', '人事', '人事', '', 'hr@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675203', '1123598813738675202', '1123598817738675207', 1123598821738675201, 1123598813738675201, '2019-04-27 17:03:10', 1123598821738675201, '2019-04-27 17:03:10', 1, 0), (1123598821738675203, '000000', NULL, 1, 'manager', 'dfbaa3b61caa3a319f463cc165085aa8c822d2ce', '经理', '经理', '', 'manager@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675204', '1123598813738675202', '1123598817738675206', 1123598821738675201, 1123598813738675201, '2019-04-27 17:03:38', 1123598821738675201, '2019-04-27 17:03:38', 1, 0), (1123598821738675204, '000000', NULL, 1, 'boss', 'abe57d23e18f7ad8ea99c86e430c90a05119a9d3', '老板', '老板', '', 'boss@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675205', '1123598813738675202', '1123598817738675201', 1123598821738675201, 1123598813738675201, '2019-04-27 17:03:55', 1123598821738675201, '2019-04-27 17:03:55', 1, 0);
COMMIT;
-- ----------------------------
-- Table structure for blade_user_app
-- ----------------------------
DROP TABLE IF EXISTS `blade_user_app`;
CREATE TABLE `blade_user_app` (
`id` bigint(64) NOT NULL COMMENT '主键',
`user_id` bigint(64) NULL DEFAULT 0 COMMENT '用户ID',
`user_ext` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户拓展信息',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户平台拓展表';
-- ----------------------------
-- Table structure for blade_user_dept
-- ----------------------------
@ -773,4 +784,26 @@ CREATE TABLE `blade_user_oauth` (
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户第三方认证表';
-- ----------------------------
-- Table structure for blade_user_other
-- ----------------------------
DROP TABLE IF EXISTS `blade_user_other`;
CREATE TABLE `blade_user_other` (
`id` bigint(64) NOT NULL COMMENT '主键',
`user_id` bigint(64) NULL DEFAULT 0 COMMENT '用户ID',
`user_ext` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户拓展信息',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户平台拓展表';
-- ----------------------------
-- Table structure for blade_user_web
-- ----------------------------
DROP TABLE IF EXISTS `blade_user_web`;
CREATE TABLE `blade_user_web` (
`id` bigint(64) NOT NULL COMMENT '主键',
`user_id` bigint(64) NULL DEFAULT 0 COMMENT '用户ID',
`user_ext` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户拓展信息',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户平台拓展表';
SET FOREIGN_KEY_CHECKS = 1;

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

@ -1,17 +1,17 @@
/*
Navicat Premium Data Transfer
Source Server : mysql_localhost
Source Server : mysql_jd
Source Server Type : MySQL
Source Server Version : 50729
Source Host : localhost:3306
Source Server Version : 50723
Source Host : 127.0.0.1:3306
Source Schema : bladex
Target Server Type : MySQL
Target Server Version : 50729
Target Server Version : 50723
File Encoding : 65001
Date: 14/09/2020 18:33:23
Date: 22/10/2020 23:12:09
*/
SET NAMES utf8mb4;
@ -733,6 +733,17 @@ BEGIN;
INSERT INTO `blade_user` VALUES (1123598821738675201, '000000', NULL, 1, 'admin', '90b9aa7e25f80cf4f64e990b78a9fc5ebd6cecad', '管理员', '管理员', 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png', 'admin@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675201', '1123598813738675201', '1123598817738675201', 1123598821738675201, 1123598813738675201, '2018-08-08 00:00:00', 1123598821738675201, '2018-08-08 00:00:00', 1, 0), (1123598821738675202, '000000', NULL, 1, 'hr', '5e79b90f7bba52d54115f086e48f539016a27ec6', '人事', '人事', '', 'hr@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675203', '1123598813738675202', '1123598817738675207', 1123598821738675201, 1123598813738675201, '2019-04-27 17:03:10', 1123598821738675201, '2019-04-27 17:03:10', 1, 0), (1123598821738675203, '000000', NULL, 1, 'manager', 'dfbaa3b61caa3a319f463cc165085aa8c822d2ce', '经理', '经理', '', 'manager@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675204', '1123598813738675202', '1123598817738675206', 1123598821738675201, 1123598813738675201, '2019-04-27 17:03:38', 1123598821738675201, '2019-04-27 17:03:38', 1, 0), (1123598821738675204, '000000', NULL, 1, 'boss', 'abe57d23e18f7ad8ea99c86e430c90a05119a9d3', '老板', '老板', '', 'boss@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675205', '1123598813738675202', '1123598817738675201', 1123598821738675201, 1123598813738675201, '2019-04-27 17:03:55', 1123598821738675201, '2019-04-27 17:03:55', 1, 0);
COMMIT;
-- ----------------------------
-- Table structure for blade_user_app
-- ----------------------------
DROP TABLE IF EXISTS `blade_user_app`;
CREATE TABLE `blade_user_app` (
`id` bigint(64) NOT NULL COMMENT '主键',
`user_id` bigint(64) NULL DEFAULT 0 COMMENT '用户ID',
`user_ext` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户拓展信息',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户平台拓展表';
-- ----------------------------
-- Table structure for blade_user_dept
-- ----------------------------
@ -773,4 +784,26 @@ CREATE TABLE `blade_user_oauth` (
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户第三方认证表';
-- ----------------------------
-- Table structure for blade_user_other
-- ----------------------------
DROP TABLE IF EXISTS `blade_user_other`;
CREATE TABLE `blade_user_other` (
`id` bigint(64) NOT NULL COMMENT '主键',
`user_id` bigint(64) NULL DEFAULT 0 COMMENT '用户ID',
`user_ext` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户拓展信息',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户平台拓展表';
-- ----------------------------
-- Table structure for blade_user_web
-- ----------------------------
DROP TABLE IF EXISTS `blade_user_web`;
CREATE TABLE `blade_user_web` (
`id` bigint(64) NOT NULL COMMENT '主键',
`user_id` bigint(64) NULL DEFAULT 0 COMMENT '用户ID',
`user_ext` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户拓展信息',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户平台拓展表';
SET FOREIGN_KEY_CHECKS = 1;

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

File diff suppressed because it is too large Load Diff

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

File diff suppressed because it is too large Load Diff

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

@ -1,10 +1,10 @@
/*
Navicat Premium Data Transfer
Source Server : postgres_localhost
Source Server : postgres_jd
Source Server Type : PostgreSQL
Source Server Version : 110001
Source Host : localhost:5432
Source Host : 127.0.0.1:5432
Source Catalog : bladex
Source Schema : public
@ -12,7 +12,7 @@
Target Server Version : 110001
File Encoding : 65001
Date: 14/09/2020 18:15:52
Date: 22/10/2020 22:50:40
*/
@ -4859,6 +4859,21 @@ INSERT INTO "blade_user" VALUES (1123598821738675203, '000000', NULL, 1, 'manage
INSERT INTO "blade_user" VALUES (1123598821738675204, '000000', NULL, 1, 'boss', 'abe57d23e18f7ad8ea99c86e430c90a05119a9d3', '老板', '老板', 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png', 'boss@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675205', '1123598813738675202', '1123598817738675201', 1123598821738675201, 1123598813738675201, '2019-04-27 17:03:55', 1123598821738675201, '2019-04-27 17:03:55', 1, 0);
COMMIT;
-- ----------------------------
-- Table structure for blade_user_app
-- ----------------------------
DROP TABLE IF EXISTS "blade_user_app";
CREATE TABLE "blade_user_app" (
"id" int8 NOT NULL,
"user_id" int8,
"user_ext" varchar(255) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "blade_user_app"."id" IS '主键';
COMMENT ON COLUMN "blade_user_app"."user_id" IS '用户ID';
COMMENT ON COLUMN "blade_user_app"."user_ext" IS '用户拓展信息';
COMMENT ON TABLE "blade_user_app" IS '用户平台拓展表';
-- ----------------------------
-- Table structure for blade_user_dept
-- ----------------------------
@ -4921,6 +4936,36 @@ COMMENT ON COLUMN "blade_user_oauth"."gender" IS '性别';
COMMENT ON COLUMN "blade_user_oauth"."source" IS '来源';
COMMENT ON TABLE "blade_user_oauth" IS '用户第三方认证表';
-- ----------------------------
-- Table structure for blade_user_other
-- ----------------------------
DROP TABLE IF EXISTS "blade_user_other";
CREATE TABLE "blade_user_other" (
"id" int8 NOT NULL,
"user_id" int8,
"user_ext" varchar(255) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "blade_user_other"."id" IS '主键';
COMMENT ON COLUMN "blade_user_other"."user_id" IS '用户ID';
COMMENT ON COLUMN "blade_user_other"."user_ext" IS '用户拓展信息';
COMMENT ON TABLE "blade_user_other" IS '用户平台拓展表';
-- ----------------------------
-- Table structure for blade_user_web
-- ----------------------------
DROP TABLE IF EXISTS "blade_user_web";
CREATE TABLE "blade_user_web" (
"id" int8 NOT NULL,
"user_id" int8,
"user_ext" varchar(255) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "blade_user_web"."id" IS '主键';
COMMENT ON COLUMN "blade_user_web"."user_id" IS '用户ID';
COMMENT ON COLUMN "blade_user_web"."user_ext" IS '用户拓展信息';
COMMENT ON TABLE "blade_user_web" IS '用户平台拓展表';
-- ----------------------------
-- Primary Key structure for table blade_attach
-- ----------------------------
@ -5061,6 +5106,11 @@ ALTER TABLE "blade_top_menu_setting" ADD CONSTRAINT "blade_top_menu_setting_pkey
-- ----------------------------
ALTER TABLE "blade_user" ADD CONSTRAINT "blade_user_pkey" PRIMARY KEY ("id");
-- ----------------------------
-- Primary Key structure for table blade_user_app
-- ----------------------------
ALTER TABLE "blade_user_app" ADD CONSTRAINT "blade_user_app_pkey" PRIMARY KEY ("id");
-- ----------------------------
-- Primary Key structure for table blade_user_dept
-- ----------------------------
@ -5070,3 +5120,13 @@ ALTER TABLE "blade_user_dept" ADD CONSTRAINT "blade_user_dept_pkey" PRIMARY KEY
-- Primary Key structure for table blade_user_oauth
-- ----------------------------
ALTER TABLE "blade_user_oauth" ADD CONSTRAINT "blade_user_oauth_pkey" PRIMARY KEY ("id");
-- ----------------------------
-- Primary Key structure for table blade_user_other
-- ----------------------------
ALTER TABLE "blade_user_other" ADD CONSTRAINT "blade_user_other_pkey" PRIMARY KEY ("id");
-- ----------------------------
-- Primary Key structure for table blade_user_web
-- ----------------------------
ALTER TABLE "blade_user_web" ADD CONSTRAINT "blade_user_web_pkey" PRIMARY KEY ("id");

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

@ -1,10 +1,10 @@
/*
Navicat Premium Data Transfer
Source Server : postgres_localhost
Source Server : postgres_jd
Source Server Type : PostgreSQL
Source Server Version : 110001
Source Host : localhost:5432
Source Host : 127.0.0.1:5432
Source Catalog : bladex
Source Schema : public
@ -12,7 +12,7 @@
Target Server Version : 110001
File Encoding : 65001
Date: 14/09/2020 18:14:59
Date: 22/10/2020 22:52:16
*/
@ -4857,6 +4857,21 @@ INSERT INTO "blade_user" VALUES (1123598821738675203, '000000', NULL, 1, 'manage
INSERT INTO "blade_user" VALUES (1123598821738675204, '000000', NULL, 1, 'boss', 'abe57d23e18f7ad8ea99c86e430c90a05119a9d3', '老板', '老板', 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png', 'boss@bladex.vip', '123333333333', '2018-08-08 00:00:00', 1, '1123598816738675205', '1123598813738675202', '1123598817738675201', 1123598821738675201, 1123598813738675201, '2019-04-27 17:03:55', 1123598821738675201, '2019-04-27 17:03:55', 1, 0);
COMMIT;
-- ----------------------------
-- Table structure for blade_user_app
-- ----------------------------
DROP TABLE IF EXISTS "blade_user_app";
CREATE TABLE "blade_user_app" (
"id" int8 NOT NULL,
"user_id" int8,
"user_ext" varchar(255) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "blade_user_app"."id" IS '主键';
COMMENT ON COLUMN "blade_user_app"."user_id" IS '用户ID';
COMMENT ON COLUMN "blade_user_app"."user_ext" IS '用户拓展信息';
COMMENT ON TABLE "blade_user_app" IS '用户平台拓展表';
-- ----------------------------
-- Table structure for blade_user_dept
-- ----------------------------
@ -4919,6 +4934,36 @@ COMMENT ON COLUMN "blade_user_oauth"."gender" IS '性别';
COMMENT ON COLUMN "blade_user_oauth"."source" IS '来源';
COMMENT ON TABLE "blade_user_oauth" IS '用户第三方认证表';
-- ----------------------------
-- Table structure for blade_user_other
-- ----------------------------
DROP TABLE IF EXISTS "blade_user_other";
CREATE TABLE "blade_user_other" (
"id" int8 NOT NULL,
"user_id" int8,
"user_ext" varchar(255) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "blade_user_other"."id" IS '主键';
COMMENT ON COLUMN "blade_user_other"."user_id" IS '用户ID';
COMMENT ON COLUMN "blade_user_other"."user_ext" IS '用户拓展信息';
COMMENT ON TABLE "blade_user_other" IS '用户平台拓展表';
-- ----------------------------
-- Table structure for blade_user_web
-- ----------------------------
DROP TABLE IF EXISTS "blade_user_web";
CREATE TABLE "blade_user_web" (
"id" int8 NOT NULL,
"user_id" int8,
"user_ext" varchar(255) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "blade_user_web"."id" IS '主键';
COMMENT ON COLUMN "blade_user_web"."user_id" IS '用户ID';
COMMENT ON COLUMN "blade_user_web"."user_ext" IS '用户拓展信息';
COMMENT ON TABLE "blade_user_web" IS '用户平台拓展表';
-- ----------------------------
-- Primary Key structure for table blade_attach
-- ----------------------------
@ -5059,6 +5104,11 @@ ALTER TABLE "blade_top_menu_setting" ADD CONSTRAINT "blade_top_menu_setting_pkey
-- ----------------------------
ALTER TABLE "blade_user" ADD CONSTRAINT "blade_user_pkey" PRIMARY KEY ("id");
-- ----------------------------
-- Primary Key structure for table blade_user_app
-- ----------------------------
ALTER TABLE "blade_user_app" ADD CONSTRAINT "blade_user_app_pkey" PRIMARY KEY ("id");
-- ----------------------------
-- Primary Key structure for table blade_user_dept
-- ----------------------------
@ -5068,3 +5118,13 @@ ALTER TABLE "blade_user_dept" ADD CONSTRAINT "blade_user_dept_pkey" PRIMARY KEY
-- Primary Key structure for table blade_user_oauth
-- ----------------------------
ALTER TABLE "blade_user_oauth" ADD CONSTRAINT "blade_user_oauth_pkey" PRIMARY KEY ("id");
-- ----------------------------
-- Primary Key structure for table blade_user_other
-- ----------------------------
ALTER TABLE "blade_user_other" ADD CONSTRAINT "blade_user_other_pkey" PRIMARY KEY ("id");
-- ----------------------------
-- Primary Key structure for table blade_user_web
-- ----------------------------
ALTER TABLE "blade_user_web" ADD CONSTRAINT "blade_user_web_pkey" PRIMARY KEY ("id");

166
doc/sql/sqlserver/bladex-saber-sqlserver.sql

@ -4,7 +4,7 @@
Source Server : sqlserver_remote
Source Server Type : SQL Server
Source Server Version : 10501600
Source Host : localhost:1433
Source Host : 127.0.0.1:1433
Source Catalog : bladex
Source Schema : dbo
@ -12,7 +12,7 @@
Target Server Version : 10501600
File Encoding : 65001
Date: 14/09/2020 23:26:28
Date: 22/10/2020 23:07:10
*/
@ -3825,6 +3825,51 @@ COMMIT
GO
-- ----------------------------
-- Table structure for blade_user_app
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[blade_user_app]') AND type IN ('U'))
DROP TABLE [dbo].[blade_user_app]
GO
CREATE TABLE [dbo].[blade_user_app] (
[id] bigint NOT NULL,
[user_id] bigint NULL,
[user_ext] varchar(255) COLLATE Chinese_PRC_CI_AS NULL
)
GO
ALTER TABLE [dbo].[blade_user_app] SET (LOCK_ESCALATION = TABLE)
GO
EXEC sp_addextendedproperty
'MS_Description', N'主键',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_app',
'COLUMN', N'id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户ID',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_app',
'COLUMN', N'user_id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户拓展信息',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_app',
'COLUMN', N'user_ext'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户平台拓展表',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_app'
GO
-- ----------------------------
-- Table structure for blade_user_dept
-- ----------------------------
@ -4016,6 +4061,96 @@ EXEC sp_addextendedproperty
GO
-- ----------------------------
-- Table structure for blade_user_other
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[blade_user_other]') AND type IN ('U'))
DROP TABLE [dbo].[blade_user_other]
GO
CREATE TABLE [dbo].[blade_user_other] (
[id] bigint NOT NULL,
[user_id] bigint NULL,
[user_ext] varchar(255) COLLATE Chinese_PRC_CI_AS NULL
)
GO
ALTER TABLE [dbo].[blade_user_other] SET (LOCK_ESCALATION = TABLE)
GO
EXEC sp_addextendedproperty
'MS_Description', N'主键',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_other',
'COLUMN', N'id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户ID',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_other',
'COLUMN', N'user_id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户拓展信息',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_other',
'COLUMN', N'user_ext'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户平台拓展表',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_other'
GO
-- ----------------------------
-- Table structure for blade_user_web
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[blade_user_web]') AND type IN ('U'))
DROP TABLE [dbo].[blade_user_web]
GO
CREATE TABLE [dbo].[blade_user_web] (
[id] bigint NOT NULL,
[user_id] bigint NULL,
[user_ext] varchar(255) COLLATE Chinese_PRC_CI_AS NULL
)
GO
ALTER TABLE [dbo].[blade_user_web] SET (LOCK_ESCALATION = TABLE)
GO
EXEC sp_addextendedproperty
'MS_Description', N'主键',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_web',
'COLUMN', N'id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户ID',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_web',
'COLUMN', N'user_id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户拓展信息',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_web',
'COLUMN', N'user_ext'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户平台拓展表',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_web'
GO
-- ----------------------------
-- Primary Key structure for table blade_attach
-- ----------------------------
@ -4268,6 +4403,15 @@ ON [PRIMARY]
GO
-- ----------------------------
-- Primary Key structure for table blade_user_app
-- ----------------------------
ALTER TABLE [dbo].[blade_user_app] ADD CONSTRAINT [PK__blade_us__3213E83F6BE40491] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO
-- ----------------------------
-- Primary Key structure for table blade_user_dept
-- ----------------------------
@ -4285,3 +4429,21 @@ WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW
ON [PRIMARY]
GO
-- ----------------------------
-- Primary Key structure for table blade_user_other
-- ----------------------------
ALTER TABLE [dbo].[blade_user_other] ADD CONSTRAINT [PK__blade_us__3213E83F6FB49575] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO
-- ----------------------------
-- Primary Key structure for table blade_user_web
-- ----------------------------
ALTER TABLE [dbo].[blade_user_web] ADD CONSTRAINT [PK__blade_us__3213E83F681373AD] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

166
doc/sql/sqlserver/bladex-sword-sqlserver.sql

@ -4,7 +4,7 @@
Source Server : sqlserver_remote
Source Server Type : SQL Server
Source Server Version : 10501600
Source Host : localhost:1433
Source Host : 127.0.0.1:1433
Source Catalog : bladex
Source Schema : dbo
@ -12,7 +12,7 @@
Target Server Version : 10501600
File Encoding : 65001
Date: 14/09/2020 23:24:49
Date: 22/10/2020 23:09:19
*/
@ -3825,6 +3825,51 @@ COMMIT
GO
-- ----------------------------
-- Table structure for blade_user_app
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[blade_user_app]') AND type IN ('U'))
DROP TABLE [dbo].[blade_user_app]
GO
CREATE TABLE [dbo].[blade_user_app] (
[id] bigint NOT NULL,
[user_id] bigint NULL,
[user_ext] varchar(255) COLLATE Chinese_PRC_CI_AS NULL
)
GO
ALTER TABLE [dbo].[blade_user_app] SET (LOCK_ESCALATION = TABLE)
GO
EXEC sp_addextendedproperty
'MS_Description', N'主键',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_app',
'COLUMN', N'id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户ID',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_app',
'COLUMN', N'user_id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户拓展信息',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_app',
'COLUMN', N'user_ext'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户平台拓展表',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_app'
GO
-- ----------------------------
-- Table structure for blade_user_dept
-- ----------------------------
@ -4016,6 +4061,96 @@ EXEC sp_addextendedproperty
GO
-- ----------------------------
-- Table structure for blade_user_other
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[blade_user_other]') AND type IN ('U'))
DROP TABLE [dbo].[blade_user_other]
GO
CREATE TABLE [dbo].[blade_user_other] (
[id] bigint NOT NULL,
[user_id] bigint NULL,
[user_ext] varchar(255) COLLATE Chinese_PRC_CI_AS NULL
)
GO
ALTER TABLE [dbo].[blade_user_other] SET (LOCK_ESCALATION = TABLE)
GO
EXEC sp_addextendedproperty
'MS_Description', N'主键',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_other',
'COLUMN', N'id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户ID',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_other',
'COLUMN', N'user_id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户拓展信息',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_other',
'COLUMN', N'user_ext'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户平台拓展表',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_other'
GO
-- ----------------------------
-- Table structure for blade_user_web
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[blade_user_web]') AND type IN ('U'))
DROP TABLE [dbo].[blade_user_web]
GO
CREATE TABLE [dbo].[blade_user_web] (
[id] bigint NOT NULL,
[user_id] bigint NULL,
[user_ext] varchar(255) COLLATE Chinese_PRC_CI_AS NULL
)
GO
ALTER TABLE [dbo].[blade_user_web] SET (LOCK_ESCALATION = TABLE)
GO
EXEC sp_addextendedproperty
'MS_Description', N'主键',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_web',
'COLUMN', N'id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户ID',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_web',
'COLUMN', N'user_id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户拓展信息',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_web',
'COLUMN', N'user_ext'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户平台拓展表',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_web'
GO
-- ----------------------------
-- Primary Key structure for table blade_attach
-- ----------------------------
@ -4268,6 +4403,15 @@ ON [PRIMARY]
GO
-- ----------------------------
-- Primary Key structure for table blade_user_app
-- ----------------------------
ALTER TABLE [dbo].[blade_user_app] ADD CONSTRAINT [PK__blade_us__3213E83F318258D2] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO
-- ----------------------------
-- Primary Key structure for table blade_user_dept
-- ----------------------------
@ -4285,3 +4429,21 @@ WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW
ON [PRIMARY]
GO
-- ----------------------------
-- Primary Key structure for table blade_user_other
-- ----------------------------
ALTER TABLE [dbo].[blade_user_other] ADD CONSTRAINT [PK__blade_us__3213E83F3552E9B6] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO
-- ----------------------------
-- Primary Key structure for table blade_user_web
-- ----------------------------
ALTER TABLE [dbo].[blade_user_web] ADD CONSTRAINT [PK__blade_us__3213E83F2DB1C7EE] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
GO

24
doc/sql/update/mysql-update-2.6.0~2.6.1.sql

@ -15,6 +15,30 @@ ALTER TABLE `blade_user`
-- ----------------------------
UPDATE `blade_user` set user_type = 1 WHERE is_deleted = 0;
-- ----------------------------
-- 创建用户拓展表
-- ----------------------------
CREATE TABLE `blade_user_web` (
`id` bigint(64) NOT NULL COMMENT '主键',
`user_id` bigint(64) NULL DEFAULT 0 COMMENT '用户ID',
`user_ext` varchar(255) NULL COMMENT '用户拓展信息',
PRIMARY KEY (`id`)
) COMMENT = '用户平台拓展表';
CREATE TABLE `blade_user_app` (
`id` bigint(64) NOT NULL COMMENT '主键',
`user_id` bigint(64) NULL DEFAULT 0 COMMENT '用户ID',
`user_ext` varchar(255) NULL COMMENT '用户拓展信息',
PRIMARY KEY (`id`)
) COMMENT = '用户平台拓展表';
CREATE TABLE `blade_user_other` (
`id` bigint(64) NOT NULL COMMENT '主键',
`user_id` bigint(64) NULL DEFAULT 0 COMMENT '用户ID',
`user_ext` varchar(255) NULL COMMENT '用户拓展信息',
PRIMARY KEY (`id`)
) COMMENT = '用户平台拓展表';
-- ----------------------------
-- 增加用户平台字典数据
-- ----------------------------

40
doc/sql/update/oracle-update-2.6.0~2.6.1.sql

@ -16,6 +16,46 @@ COMMENT ON COLUMN "BLADE_USER"."USER_TYPE" IS '用户平台';
-- ----------------------------
UPDATE "BLADE_USER" set USER_TYPE = 1 WHERE IS_DELETED = 0;
-- ----------------------------
-- 创建用户拓展表
-- ----------------------------
CREATE TABLE "BLADE_USER_WEB" (
"ID" NUMBER(20) NOT NULL ,
"USER_ID" NUMBER(20) ,
"USER_EXT" VARCHAR2(255) ,
PRIMARY KEY ("ID")
)
;
COMMENT ON COLUMN "BLADE_USER_WEB"."ID" IS '主键';
COMMENT ON COLUMN "BLADE_USER_WEB"."USER_ID" IS '用户ID';
COMMENT ON COLUMN "BLADE_USER_WEB"."USER_EXT" IS '用户拓展信息';
COMMENT ON TABLE "BLADE_USER_WEB" IS '用户平台拓展表';
CREATE TABLE "BLADE_USER_APP" (
"ID" NUMBER(20) NOT NULL ,
"USER_ID" NUMBER(20) ,
"USER_EXT" VARCHAR2(255) ,
PRIMARY KEY ("ID")
)
;
COMMENT ON COLUMN "BLADE_USER_APP"."ID" IS '主键';
COMMENT ON COLUMN "BLADE_USER_APP"."USER_ID" IS '用户ID';
COMMENT ON COLUMN "BLADE_USER_APP"."USER_EXT" IS '用户拓展信息';
COMMENT ON TABLE "BLADE_USER_APP" IS '用户平台拓展表';
CREATE TABLE "BLADE_USER_OTHER" (
"ID" NUMBER(20) NOT NULL ,
"USER_ID" NUMBER(20) ,
"USER_EXT" VARCHAR2(255) ,
PRIMARY KEY ("ID")
)
;
COMMENT ON COLUMN "BLADE_USER_OTHER"."ID" IS '主键';
COMMENT ON COLUMN "BLADE_USER_OTHER"."USER_ID" IS '用户ID';
COMMENT ON COLUMN "BLADE_USER_OTHER"."USER_EXT" IS '用户拓展信息';
COMMENT ON TABLE "BLADE_USER_OTHER" IS '用户平台拓展表';
-- ----------------------------
-- 增加用户平台字典数据
-- ----------------------------

39
doc/sql/update/postgresql-update-2.6.0~2.6.1.sql

@ -15,6 +15,45 @@ COMMENT ON COLUMN "public"."blade_user"."user_type" IS '用户平台';
-- ----------------------------
UPDATE "blade_user" set user_type = 1 WHERE is_deleted = 0;
-- ----------------------------
-- 创建用户拓展表
-- ----------------------------
CREATE TABLE "blade_user_web" (
"id" int8 NOT NULL,
"user_id" int8,
"user_ext" varchar(255),
PRIMARY KEY ("id")
)
;
COMMENT ON COLUMN "blade_user_web"."id" IS '主键';
COMMENT ON COLUMN "blade_user_web"."user_id" IS '用户ID';
COMMENT ON COLUMN "blade_user_web"."user_ext" IS '用户拓展信息';
COMMENT ON TABLE "blade_user_web" IS '用户平台拓展表';
CREATE TABLE "blade_user_app" (
"id" int8 NOT NULL,
"user_id" int8,
"user_ext" varchar(255),
PRIMARY KEY ("id")
)
;
COMMENT ON COLUMN "blade_user_app"."id" IS '主键';
COMMENT ON COLUMN "blade_user_app"."user_id" IS '用户ID';
COMMENT ON COLUMN "blade_user_app"."user_ext" IS '用户拓展信息';
COMMENT ON TABLE "blade_user_app" IS '用户平台拓展表';
CREATE TABLE "blade_user_other" (
"id" int8 NOT NULL,
"user_id" int8,
"user_ext" varchar(255),
PRIMARY KEY ("id")
)
;
COMMENT ON COLUMN "blade_user_other"."id" IS '主键';
COMMENT ON COLUMN "blade_user_other"."user_id" IS '用户ID';
COMMENT ON COLUMN "blade_user_other"."user_ext" IS '用户拓展信息';
COMMENT ON TABLE "blade_user_other" IS '用户平台拓展表';
-- ----------------------------
-- 增加用户平台字典数据
-- ----------------------------

108
doc/sql/update/sqlserver-update-2.6.0~2.6.1.sql

@ -20,6 +20,114 @@ ALTER TABLE [dbo].[blade_user] ADD [user_type] int
-- ----------------------------
UPDATE [dbo].[blade_user] set user_type = 1 WHERE is_deleted = 0;
-- ----------------------------
-- 创建用户拓展表
-- ----------------------------
CREATE TABLE [dbo].[blade_user_web] (
[id] bigint NOT NULL,
[user_id] bigint NULL,
[user_ext] varchar(255),
PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
)
GO
EXEC sp_addextendedproperty
'MS_Description', N'主键',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_web',
'COLUMN', N'id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户ID',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_web',
'COLUMN', N'user_id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户拓展信息',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_web',
'COLUMN', N'user_ext'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户平台拓展表',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_web';
CREATE TABLE [dbo].[blade_user_app] (
[id] bigint NOT NULL,
[user_id] bigint NULL,
[user_ext] varchar(255),
PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
)
GO
EXEC sp_addextendedproperty
'MS_Description', N'主键',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_app',
'COLUMN', N'id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户ID',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_app',
'COLUMN', N'user_id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户拓展信息',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_app',
'COLUMN', N'user_ext'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户平台拓展表',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_app';
CREATE TABLE [dbo].[blade_user_other] (
[id] bigint NOT NULL,
[user_id] bigint NULL,
[user_ext] varchar(255),
PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
)
GO
EXEC sp_addextendedproperty
'MS_Description', N'主键',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_other',
'COLUMN', N'id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户ID',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_other',
'COLUMN', N'user_id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户拓展信息',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_other',
'COLUMN', N'user_ext'
GO
EXEC sp_addextendedproperty
'MS_Description', N'用户平台拓展表',
'SCHEMA', N'dbo',
'TABLE', N'blade_user_other';
-- ----------------------------
-- 增加用户平台字典数据
-- ----------------------------

Loading…
Cancel
Save