Browse Source

🎉 增加短信封装、优化oss配置

test
smallchill 5 years ago
parent
commit
0c215179bb
  1. 2
      README.md
  2. 12
      blade-ops/blade-resource/pom.xml
  3. 4
      blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/AliOssBuilder.java
  4. 4
      blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/MinioOssBuilder.java
  5. 12
      blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/OssBuilder.java
  6. 4
      blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/QiniuOssBuilder.java
  7. 4
      blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/TencentOssBuilder.java
  8. 50
      blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/sms/AliSmsBuilder.java
  9. 47
      blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/sms/QiniuSmsBuilder.java
  10. 138
      blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/sms/SmsBuilder.java
  11. 46
      blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/sms/TencentSmsBuilder.java
  12. 44
      blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/sms/YunpianSmsBuilder.java
  13. 2
      blade-ops/blade-resource/src/main/java/org/springblade/resource/config/BladeOssConfiguration.java
  14. 47
      blade-ops/blade-resource/src/main/java/org/springblade/resource/config/BladeSmsConfiguration.java
  15. 4
      blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/OssController.java
  16. 151
      blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/SmsController.java
  17. 2
      blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java
  18. 164
      blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/SmsEndpoint.java
  19. 23
      blade-ops/blade-resource/src/main/java/org/springblade/resource/entity/OssVO.java
  20. 83
      blade-ops/blade-resource/src/main/java/org/springblade/resource/entity/Sms.java
  21. 2
      blade-ops/blade-resource/src/main/java/org/springblade/resource/mapper/OssMapper.java
  22. 42
      blade-ops/blade-resource/src/main/java/org/springblade/resource/mapper/SmsMapper.java
  23. 30
      blade-ops/blade-resource/src/main/java/org/springblade/resource/mapper/SmsMapper.xml
  24. 2
      blade-ops/blade-resource/src/main/java/org/springblade/resource/service/IOssService.java
  25. 57
      blade-ops/blade-resource/src/main/java/org/springblade/resource/service/ISmsService.java
  26. 2
      blade-ops/blade-resource/src/main/java/org/springblade/resource/service/impl/OssServiceImpl.java
  27. 68
      blade-ops/blade-resource/src/main/java/org/springblade/resource/service/impl/SmsServiceImpl.java
  28. 29
      blade-ops/blade-resource/src/main/java/org/springblade/resource/vo/OssVO.java
  29. 46
      blade-ops/blade-resource/src/main/java/org/springblade/resource/vo/SmsVO.java
  30. 2
      blade-ops/blade-resource/src/main/java/org/springblade/resource/wrapper/OssWrapper.java
  31. 49
      blade-ops/blade-resource/src/main/java/org/springblade/resource/wrapper/SmsWrapper.java
  32. 35
      doc/sql/mysql/bladex-saber-mysql.sql
  33. 35
      doc/sql/mysql/bladex-sword-mysql.sql
  34. 372
      doc/sql/oracle/bladex-saber-oracle.sql
  35. 208
      doc/sql/oracle/bladex-sword-oracle.sql
  36. 75
      doc/sql/postgresql/bladex-saber-postgresql.sql
  37. 109
      doc/sql/postgresql/bladex-sword-postgresql.sql
  38. 73
      doc/sql/update/mysql-update-2.3.1~2.4.0.sql
  39. 89
      doc/sql/update/oracle-update-2.3.1~2.4.0.sql
  40. 90
      doc/sql/update/postgresql-update-2.3.1~2.4.0.sql

2
README.md

@ -40,4 +40,4 @@
## 举报有奖
* 向官方提供有用线索并成功捣毁盗版个人或窝点,将会看成果给予 500~10000 不等的现金奖励
* 官方唯一指定QQ:85088620
* 官方唯一指定QQ:1272154962

12
blade-ops/blade-resource/pom.xml

@ -29,19 +29,11 @@
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-oss-aliyun</artifactId>
<artifactId>blade-starter-oss-all</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-oss-minio</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-oss-qiniu</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-oss-tencent</artifactId>
<artifactId>blade-starter-sms-all</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>

4
blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/AliBuilder.java → blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/AliOssBuilder.java

@ -14,7 +14,7 @@
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.springblade.resource.builder;
package org.springblade.resource.builder.oss;
import com.aliyun.oss.ClientConfiguration;
import com.aliyun.oss.OSSClient;
@ -32,7 +32,7 @@ import org.springblade.resource.entity.Oss;
*
* @author Chill
*/
public class AliBuilder {
public class AliOssBuilder {
@SneakyThrows
public static OssTemplate template(Oss oss, OssRule ossRule) {

4
blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/MinioBuilder.java → blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/MinioOssBuilder.java

@ -14,7 +14,7 @@
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.springblade.resource.builder;
package org.springblade.resource.builder.oss;
import io.minio.MinioClient;
import lombok.SneakyThrows;
@ -29,7 +29,7 @@ import org.springblade.resource.entity.Oss;
*
* @author Chill
*/
public class MinioBuilder {
public class MinioOssBuilder {
@SneakyThrows
public static OssTemplate template(Oss oss, OssRule ossRule) {

12
blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/OssBuilder.java → blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/OssBuilder.java

@ -14,7 +14,7 @@
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.springblade.resource.builder;
package org.springblade.resource.builder.oss;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@ -89,13 +89,13 @@ public class OssBuilder {
ossRule = new BladeOssRule(Boolean.FALSE);
}
if (oss.getCategory() == OssEnum.MINIO.getCategory()) {
template = MinioBuilder.template(oss, ossRule);
template = MinioOssBuilder.template(oss, ossRule);
} else if (oss.getCategory() == OssEnum.QINIU.getCategory()) {
template = QiniuBuilder.template(oss, ossRule);
template = QiniuOssBuilder.template(oss, ossRule);
} else if (oss.getCategory() == OssEnum.ALI.getCategory()) {
template = AliBuilder.template(oss, ossRule);
template = AliOssBuilder.template(oss, ossRule);
} else if (oss.getCategory() == OssEnum.TENCENT.getCategory()) {
template = TencentBuilder.template(oss, ossRule);
template = TencentOssBuilder.template(oss, ossRule);
}
templatePool.put(tenantId, template);
ossPool.put(tenantId, oss);
@ -109,7 +109,7 @@ public class OssBuilder {
* 获取对象存储实体
*
* @param tenantId 租户ID
* @return Role
* @return Oss
*/
public Oss getOss(String tenantId) {
String key = tenantId;

4
blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/QiniuBuilder.java → blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/QiniuOssBuilder.java

@ -14,7 +14,7 @@
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.springblade.resource.builder;
package org.springblade.resource.builder.oss;
import com.qiniu.common.Zone;
import com.qiniu.storage.BucketManager;
@ -33,7 +33,7 @@ import org.springblade.resource.entity.Oss;
*
* @author Chill
*/
public class QiniuBuilder {
public class QiniuOssBuilder {
@SneakyThrows
public static OssTemplate template(Oss oss, OssRule ossRule) {

4
blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/TencentBuilder.java → blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/TencentOssBuilder.java

@ -14,7 +14,7 @@
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.springblade.resource.builder;
package org.springblade.resource.builder.oss;
import com.qcloud.cos.COSClient;
import com.qcloud.cos.ClientConfig;
@ -33,7 +33,7 @@ import org.springblade.resource.entity.Oss;
*
* @author Chill
*/
public class TencentBuilder {
public class TencentOssBuilder {
@SneakyThrows
public static OssTemplate template(Oss oss, OssRule ossRule) {

50
blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/sms/AliSmsBuilder.java

@ -0,0 +1,50 @@
/*
* 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.resource.builder.sms;
import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
import com.aliyuncs.profile.DefaultProfile;
import com.aliyuncs.profile.IClientProfile;
import lombok.SneakyThrows;
import org.springblade.core.redis.cache.BladeRedisCache;
import org.springblade.core.sms.SmsTemplate;
import org.springblade.core.sms.aliyun.AliSmsTemplate;
import org.springblade.core.sms.props.SmsProperties;
import org.springblade.resource.entity.Sms;
/**
* 阿里云短信构建类
*
* @author Chill
*/
public class AliSmsBuilder {
@SneakyThrows
public static SmsTemplate template(Sms sms, BladeRedisCache redisCache) {
SmsProperties smsProperties = new SmsProperties();
smsProperties.setTemplateId(sms.getTemplateId());
smsProperties.setAccessKey(sms.getAccessKey());
smsProperties.setSecretKey(sms.getSecretKey());
smsProperties.setRegionId(sms.getRegionId());
smsProperties.setSignName(sms.getSignName());
IClientProfile profile = DefaultProfile.getProfile(smsProperties.getRegionId(), smsProperties.getAccessKey(), smsProperties.getSecretKey());
IAcsClient acsClient = new DefaultAcsClient(profile);
return new AliSmsTemplate(smsProperties, acsClient, redisCache);
}
}

47
blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/sms/QiniuSmsBuilder.java

@ -0,0 +1,47 @@
/*
* 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.resource.builder.sms;
import com.qiniu.sms.SmsManager;
import com.qiniu.util.Auth;
import lombok.SneakyThrows;
import org.springblade.core.redis.cache.BladeRedisCache;
import org.springblade.core.sms.SmsTemplate;
import org.springblade.core.sms.props.SmsProperties;
import org.springblade.core.sms.qiniu.QiniuSmsTemplate;
import org.springblade.resource.entity.Sms;
/**
* 七牛云短信构建类
*
* @author Chill
*/
public class QiniuSmsBuilder {
@SneakyThrows
public static SmsTemplate template(Sms sms, BladeRedisCache redisCache) {
SmsProperties smsProperties = new SmsProperties();
smsProperties.setTemplateId(sms.getTemplateId());
smsProperties.setAccessKey(sms.getAccessKey());
smsProperties.setSecretKey(sms.getSecretKey());
smsProperties.setSignName(sms.getSignName());
Auth auth = Auth.create(smsProperties.getAccessKey(), smsProperties.getSecretKey());
SmsManager smsManager = new SmsManager(auth);
return new QiniuSmsTemplate(smsProperties, smsManager, redisCache);
}
}

138
blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/sms/SmsBuilder.java

@ -0,0 +1,138 @@
/*
* 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.resource.builder.sms;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.springblade.core.cache.utils.CacheUtil;
import org.springblade.core.redis.cache.BladeRedisCache;
import org.springblade.core.secure.utils.SecureUtil;
import org.springblade.core.sms.SmsTemplate;
import org.springblade.core.sms.enums.SmsEnum;
import org.springblade.core.sms.enums.SmsStatusEnum;
import org.springblade.core.sms.props.SmsProperties;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringPool;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.core.tool.utils.WebUtil;
import org.springblade.resource.entity.Sms;
import org.springblade.resource.mapper.SmsMapper;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import static org.springblade.core.cache.constant.CacheConstant.RESOURCE_CACHE;
/**
* Sms短信服务统一构建类
*
* @author Chill
*/
public class SmsBuilder {
public static final String SMS_CODE = "sms:code:";
public static final String SMS_PARAM_KEY = "code";
private final SmsProperties smsProperties;
private final SmsMapper smsMapper;
private final BladeRedisCache redisCache;
public SmsBuilder(SmsProperties smsProperties, SmsMapper smsMapper, BladeRedisCache redisCache) {
this.smsProperties = smsProperties;
this.smsMapper = smsMapper;
this.redisCache = redisCache;
}
/**
* SmsTemplate配置缓存池
*/
private Map<String, SmsTemplate> templatePool = new ConcurrentHashMap<>();
/**
* Sms配置缓存池
*/
private Map<String, Sms> smsPool = new ConcurrentHashMap<>();
/**
* 获取template
*
* @return SmsTemplate
*/
public SmsTemplate template() {
String tenantId = SecureUtil.getTenantId();
Sms sms = getSms(tenantId);
Sms smsCached = smsPool.get(tenantId);
SmsTemplate template = templatePool.get(tenantId);
// 若为空或者不一致,则重新加载
if (Func.hasEmpty(template, smsCached) || !sms.getTemplateId().equals(smsCached.getTemplateId()) || !sms.getAccessKey().equals(smsCached.getAccessKey())) {
synchronized (SmsBuilder.class) {
template = templatePool.get(tenantId);
if (Func.hasEmpty(template, smsCached) || !sms.getAccessKey().equals(smsCached.getAccessKey())) {
if (sms.getCategory() == SmsEnum.YUNPIAN.getCategory()) {
template = YunpianSmsBuilder.template(sms, redisCache);
} else if (sms.getCategory() == SmsEnum.QINIU.getCategory()) {
template = QiniuSmsBuilder.template(sms, redisCache);
} else if (sms.getCategory() == SmsEnum.ALI.getCategory()) {
template = AliSmsBuilder.template(sms, redisCache);
} else if (sms.getCategory() == SmsEnum.TENCENT.getCategory()) {
template = YunpianSmsBuilder.template(sms, redisCache);
}
templatePool.put(tenantId, template);
smsPool.put(tenantId, sms);
}
}
}
return template;
}
/**
* 获取短信实体
*
* @param tenantId 租户ID
* @return Sms
*/
public Sms getSms(String tenantId) {
String key = tenantId;
LambdaQueryWrapper<Sms> lqw = Wrappers.<Sms>query().lambda().eq(Sms::getTenantId, tenantId);
// 获取传参的资源编号并查询,若有则返回,若没有则调启用的配置
String smsCode = WebUtil.getParameter(SMS_PARAM_KEY);
if (StringUtil.isNotBlank(smsCode)) {
key = key.concat(StringPool.DASH).concat(smsCode);
lqw.eq(Sms::getSmsCode, smsCode);
} else {
lqw.eq(Sms::getStatus, SmsStatusEnum.ENABLE.getNum());
}
return CacheUtil.get(RESOURCE_CACHE, SMS_CODE, key, () -> {
Sms s = smsMapper.selectOne(lqw);
// 若为空则调用默认配置
if ((Func.isEmpty(s))) {
Sms defaultSms = new Sms();
defaultSms.setCategory(SmsEnum.QINIU.getCategory());
defaultSms.setAccessKey(smsProperties.getAccessKey());
defaultSms.setSecretKey(smsProperties.getSecretKey());
defaultSms.setSignName(smsProperties.getSignName());
return defaultSms;
} else {
return s;
}
});
}
}

46
blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/sms/TencentSmsBuilder.java

@ -0,0 +1,46 @@
/*
* 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.resource.builder.sms;
import com.github.qcloudsms.SmsMultiSender;
import lombok.SneakyThrows;
import org.springblade.core.redis.cache.BladeRedisCache;
import org.springblade.core.sms.SmsTemplate;
import org.springblade.core.sms.props.SmsProperties;
import org.springblade.core.sms.tencent.TencentSmsTemplate;
import org.springblade.core.tool.utils.Func;
import org.springblade.resource.entity.Sms;
/**
* 腾讯云短信构建类
*
* @author Chill
*/
public class TencentSmsBuilder {
@SneakyThrows
public static SmsTemplate template(Sms sms, BladeRedisCache redisCache) {
SmsProperties smsProperties = new SmsProperties();
smsProperties.setTemplateId(sms.getTemplateId());
smsProperties.setAccessKey(sms.getAccessKey());
smsProperties.setSecretKey(sms.getSecretKey());
smsProperties.setSignName(sms.getSignName());
SmsMultiSender smsSender = new SmsMultiSender(Func.toInt(smsProperties.getAccessKey()), sms.getSecretKey());
return new TencentSmsTemplate(smsProperties, smsSender, redisCache);
}
}

44
blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/sms/YunpianSmsBuilder.java

@ -0,0 +1,44 @@
/*
* 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.resource.builder.sms;
import com.yunpian.sdk.YunpianClient;
import lombok.SneakyThrows;
import org.springblade.core.redis.cache.BladeRedisCache;
import org.springblade.core.sms.SmsTemplate;
import org.springblade.core.sms.props.SmsProperties;
import org.springblade.core.sms.yunpian.YunpianSmsTemplate;
import org.springblade.resource.entity.Sms;
/**
* 云片短信构建类
*
* @author Chill
*/
public class YunpianSmsBuilder {
@SneakyThrows
public static SmsTemplate template(Sms sms, BladeRedisCache redisCache) {
SmsProperties smsProperties = new SmsProperties();
smsProperties.setTemplateId(sms.getTemplateId());
smsProperties.setAccessKey(sms.getAccessKey());
smsProperties.setSignName(sms.getSignName());
YunpianClient client = new YunpianClient(smsProperties.getAccessKey()).init();
return new YunpianSmsTemplate(smsProperties, client, redisCache);
}
}

2
blade-ops/blade-resource/src/main/java/org/springblade/resource/config/BladeOssConfiguration.java

@ -18,7 +18,7 @@ package org.springblade.resource.config;
import lombok.AllArgsConstructor;
import org.springblade.core.oss.props.OssProperties;
import org.springblade.resource.builder.OssBuilder;
import org.springblade.resource.builder.oss.OssBuilder;
import org.springblade.resource.mapper.OssMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

47
blade-ops/blade-resource/src/main/java/org/springblade/resource/config/BladeSmsConfiguration.java

@ -0,0 +1,47 @@
/*
* 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.resource.config;
import lombok.AllArgsConstructor;
import org.springblade.core.redis.cache.BladeRedisCache;
import org.springblade.core.sms.props.SmsProperties;
import org.springblade.resource.builder.sms.SmsBuilder;
import org.springblade.resource.mapper.SmsMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Sms配置类
*
* @author Chill
*/
@Configuration
@AllArgsConstructor
public class BladeSmsConfiguration {
private SmsProperties smsProperties;
private SmsMapper smsMapper;
private BladeRedisCache redisCache;
@Bean
public SmsBuilder smsBuilder() {
return new SmsBuilder(smsProperties, smsMapper, redisCache);
}
}

4
blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/OssController.java

@ -30,7 +30,7 @@ import org.springblade.core.tool.api.R;
import org.springblade.core.tool.constant.RoleConstant;
import org.springblade.core.tool.utils.Func;
import org.springblade.resource.entity.Oss;
import org.springblade.resource.entity.OssVO;
import org.springblade.resource.vo.OssVO;
import org.springblade.resource.service.IOssService;
import org.springblade.resource.wrapper.OssWrapper;
import org.springframework.cache.annotation.CacheEvict;
@ -47,11 +47,11 @@ import static org.springblade.core.cache.constant.CacheConstant.RESOURCE_CACHE;
* @author BladeX
* @since 2019-05-26
*/
@ApiIgnore
@RestController
@AllArgsConstructor
@RequestMapping("/oss")
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
@ApiIgnore
@Api(value = "对象存储接口", tags = "对象存储接口")
public class OssController extends BladeController {

151
blade-ops/blade-resource/src/main/java/org/springblade/resource/controller/SmsController.java

@ -0,0 +1,151 @@
/*
* 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.resource.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.annotation.PreAuth;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.constant.RoleConstant;
import org.springblade.core.tool.utils.Func;
import org.springblade.resource.entity.Sms;
import org.springblade.resource.service.ISmsService;
import org.springblade.resource.vo.SmsVO;
import org.springblade.resource.wrapper.SmsWrapper;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.Valid;
import static org.springblade.core.cache.constant.CacheConstant.RESOURCE_CACHE;
/**
* 短信配置表 控制器
*
* @author BladeX
* @since 2020-02-20
*/
@ApiIgnore
@RestController
@AllArgsConstructor
@RequestMapping("/sms")
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
@Api(value = "短信配置表", tags = "短信配置表接口")
public class SmsController extends BladeController {
private ISmsService smsService;
/**
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入sms")
public R<SmsVO> detail(Sms sms) {
Sms detail = smsService.getOne(Condition.getQueryWrapper(sms));
return R.data(SmsWrapper.build().entityVO(detail));
}
/**
* 分页 短信配置表
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入sms")
public R<IPage<SmsVO>> list(Sms sms, Query query) {
IPage<Sms> pages = smsService.page(Condition.getPage(query), Condition.getQueryWrapper(sms));
return R.data(SmsWrapper.build().pageVO(pages));
}
/**
* 自定义分页 短信配置表
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入sms")
public R<IPage<SmsVO>> page(SmsVO sms, Query query) {
IPage<SmsVO> pages = smsService.selectSmsPage(Condition.getPage(query), sms);
return R.data(pages);
}
/**
* 新增 短信配置表
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入sms")
@CacheEvict(cacheNames = {RESOURCE_CACHE}, allEntries = true)
public R save(@Valid @RequestBody Sms sms) {
return R.status(smsService.save(sms));
}
/**
* 修改 短信配置表
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入sms")
@CacheEvict(cacheNames = {RESOURCE_CACHE}, allEntries = true)
public R update(@Valid @RequestBody Sms sms) {
return R.status(smsService.updateById(sms));
}
/**
* 新增或修改 短信配置表
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入sms")
@CacheEvict(cacheNames = {RESOURCE_CACHE}, allEntries = true)
public R submit(@Valid @RequestBody Sms sms) {
return R.status(smsService.submit(sms));
}
/**
* 删除 短信配置表
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
@CacheEvict(cacheNames = {RESOURCE_CACHE}, allEntries = true)
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(smsService.deleteLogic(Func.toLongList(ids)));
}
/**
* 启用
*/
@PostMapping("/enable")
@ApiOperationSupport(order = 8)
@ApiOperation(value = "配置启用", notes = "传入id")
@CacheEvict(cacheNames = {RESOURCE_CACHE}, allEntries = true)
public R enable(@ApiParam(value = "主键", required = true) @RequestParam Long id) {
return R.status(smsService.enable(id));
}
}

2
blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java

@ -25,7 +25,7 @@ import org.springblade.core.secure.annotation.PreAuth;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.constant.RoleConstant;
import org.springblade.core.tool.utils.Func;
import org.springblade.resource.builder.OssBuilder;
import org.springblade.resource.builder.oss.OssBuilder;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

164
blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/SmsEndpoint.java

@ -0,0 +1,164 @@
/*
* 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.resource.endpoint;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import lombok.SneakyThrows;
import org.springblade.core.sms.model.SmsCode;
import org.springblade.core.sms.model.SmsData;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.jackson.JsonUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.RandomType;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.resource.builder.sms.SmsBuilder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
/**
* 短信服务端点
*
* @author Chill
*/
@RestController
@AllArgsConstructor
@RequestMapping("/sms/endpoint")
@Api(value = "短信服务端点", tags = "短信服务端点")
public class SmsEndpoint {
private static final String PARAM_KEY = "code";
private static final String SEND_SUCCESS = "短信发送成功";
private static final String SEND_FAIL = "短信发送失败";
private static final String VALIDATE_SUCCESS = "验证码校验成功";
private static final String VALIDATE_FAIL = "验证码校验失败";
private SmsBuilder smsBuilder;
//================================= 短信服务校验 =================================
/**
* 短信验证码发送
*
* @param phone 手机号
*/
@SneakyThrows
@PostMapping("/send-validate")
public R sendValidate(@RequestParam String phone) {
Map<String, String> params = new HashMap<>(1);
params.put(PARAM_KEY, StringUtil.random(6, RandomType.INT));
SmsCode smsCode = smsBuilder.template().sendValidate(new SmsData(params).setKey(PARAM_KEY), phone);
return smsCode.isSuccess() ? R.data(smsCode, SEND_SUCCESS) : R.fail(SEND_FAIL);
}
/**
* 校验短信
*
* @param smsCode 短信校验信息
*/
@SneakyThrows
@PostMapping("/validate-message")
public R validateMessage(SmsCode smsCode) {
boolean validate = smsBuilder.template().validateMessage(smsCode);
return validate ? R.success(VALIDATE_SUCCESS) : R.fail(VALIDATE_FAIL);
}
//========== 通用短信自定义发送(支持自定义params参数传递, 推荐用于测试, 不推荐用于生产环境) ==========
/**
* 发送信息
*
* @param params 自定义短信参数
* @param phones 手机号集合
*/
@SneakyThrows
@PostMapping("/send-message")
public R sendMessage(@RequestParam String params, @RequestParam String phones) {
SmsData smsData = new SmsData(JsonUtil.readMap(params, String.class, String.class));
return send(smsData, phones);
}
//========== 指定短信服务发送(可根据各种场景自定拓展定制, 损失灵活性增加安全性, 推荐用于生产环境) ==========
/**
* 短信通知
*
* @param phones 手机号集合
*/
@SneakyThrows
@PostMapping("/send-notice")
public R sendNotice(@RequestParam String phones) {
Map<String, String> params = new HashMap<>(3);
params.put("title", "通知标题");
params.put("content", "通知内容");
params.put("date", "通知时间");
SmsData smsData = new SmsData(params);
return send(smsData, phones);
}
/**
* 订单通知
*
* @param phones 手机号集合
*/
@SneakyThrows
@PostMapping("/send-order")
public R sendOrder(@RequestParam String phones) {
Map<String, String> params = new HashMap<>(3);
params.put("orderNo", "订单编号");
params.put("packageNo", "快递单号");
params.put("user", "收件人");
SmsData smsData = new SmsData(params);
return send(smsData, phones);
}
/**
* 会议通知
*
* @param phones 手机号集合
*/
@SneakyThrows
@PostMapping("/send-meeting")
public R sendMeeting(@RequestParam String phones) {
Map<String, String> params = new HashMap<>(2);
params.put("roomId", "会议室");
params.put("topic", "会议主题");
params.put("date", "会议时间");
SmsData smsData = new SmsData(params);
return send(smsData, phones);
}
//================================= 通用短信发送接口 =================================
/**
* 通用短信发送接口
*
* @param smsData 短信内容
* @param phones 手机号列表
* @return 是否发送成功
*/
private R send(SmsData smsData, String phones) {
SmsCode smsCode = smsBuilder.template().sendMulti(smsData, Func.toStrList(phones));
return smsCode.isSuccess() ? R.data(smsCode, SEND_SUCCESS) : R.fail(SEND_FAIL);
}
}

23
blade-ops/blade-resource/src/main/java/org/springblade/resource/entity/OssVO.java

@ -1,23 +0,0 @@
package org.springblade.resource.entity;
import lombok.Data;
/**
* OssVO
*
* @author Chill
*/
@Data
public class OssVO extends Oss {
/**
* 分类名
*/
private String categoryName;
/**
* 是否启用
*/
private String statusName;
}

83
blade-ops/blade-resource/src/main/java/org/springblade/resource/entity/Sms.java

@ -0,0 +1,83 @@
/*
* 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.resource.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
/**
* 短信配置表实体类
*
* @author BladeX
* @since 2020-02-20
*/
@Data
@TableName("blade_sms")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Sms对象", description = "短信配置表")
public class Sms extends TenantEntity {
private static final long serialVersionUID = 1L;
/**
* 资源编号
*/
@ApiModelProperty(value = "资源编号")
private String smsCode;
/**
* 模板ID
*/
@ApiModelProperty(value = "模板ID")
private String templateId;
/**
* 分类
*/
@ApiModelProperty(value = "分类")
private Integer category;
/**
* accessKey
*/
@ApiModelProperty(value = "accessKey")
private String accessKey;
/**
* secretKey
*/
@ApiModelProperty(value = "secretKey")
private String secretKey;
/**
* regionId
*/
@ApiModelProperty(value = "regionId")
private String regionId;
/**
* 短信签名
*/
@ApiModelProperty(value = "短信签名")
private String signName;
/**
* 备注
*/
@ApiModelProperty(value = "备注")
private String remark;
}

2
blade-ops/blade-resource/src/main/java/org/springblade/resource/mapper/OssMapper.java

@ -19,7 +19,7 @@ package org.springblade.resource.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.resource.entity.Oss;
import org.springblade.resource.entity.OssVO;
import org.springblade.resource.vo.OssVO;
import java.util.List;

42
blade-ops/blade-resource/src/main/java/org/springblade/resource/mapper/SmsMapper.java

@ -0,0 +1,42 @@
/*
* 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.resource.mapper;
import org.springblade.resource.entity.Sms;
import org.springblade.resource.vo.SmsVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.List;
/**
* 短信配置表 Mapper 接口
*
* @author BladeX
* @since 2020-02-20
*/
public interface SmsMapper extends BaseMapper<Sms> {
/**
* 自定义分页
*
* @param page
* @param sms
* @return
*/
List<SmsVO> selectSmsPage(IPage page, SmsVO sms);
}

30
blade-ops/blade-resource/src/main/java/org/springblade/resource/mapper/SmsMapper.xml

@ -0,0 +1,30 @@
<?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.resource.mapper.SmsMapper">
<!-- 通用查询映射结果 -->
<resultMap id="smsResultMap" type="org.springblade.resource.entity.Sms">
<result column="id" property="id"/>
<result column="create_user" property="createUser"/>
<result column="create_dept" property="createDept"/>
<result column="create_time" property="createTime"/>
<result column="update_user" property="updateUser"/>
<result column="update_time" property="updateTime"/>
<result column="status" property="status"/>
<result column="is_deleted" property="isDeleted"/>
<result column="sms_code" property="smsCode"/>
<result column="template_id" property="templateId"/>
<result column="category" property="category"/>
<result column="access_key" property="accessKey"/>
<result column="secret_key" property="secretKey"/>
<result column="region_id" property="regionId"/>
<result column="sign_name" property="signName"/>
<result column="remark" property="remark"/>
</resultMap>
<select id="selectSmsPage" resultMap="smsResultMap">
select * from blade_sms where is_deleted = 0
</select>
</mapper>

2
blade-ops/blade-resource/src/main/java/org/springblade/resource/service/IOssService.java

@ -19,7 +19,7 @@ package org.springblade.resource.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import org.springblade.resource.entity.Oss;
import org.springblade.resource.entity.OssVO;
import org.springblade.resource.vo.OssVO;
/**
* 服务类

57
blade-ops/blade-resource/src/main/java/org/springblade/resource/service/ISmsService.java

@ -0,0 +1,57 @@
/*
* 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.resource.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import org.springblade.resource.entity.Sms;
import org.springblade.resource.vo.SmsVO;
/**
* 短信配置表 服务类
*
* @author BladeX
* @since 2020-02-20
*/
public interface ISmsService extends BaseService<Sms> {
/**
* 自定义分页
*
* @param page
* @param sms
* @return
*/
IPage<SmsVO> selectSmsPage(IPage<SmsVO> page, SmsVO sms);
/**
* 提交oss信息
*
* @param oss
* @return
*/
boolean submit(Sms oss);
/**
* 启动配置
*
* @param id
* @return
*/
boolean enable(Long id);
}

2
blade-ops/blade-resource/src/main/java/org/springblade/resource/service/impl/OssServiceImpl.java

@ -24,7 +24,7 @@ import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.resource.entity.Oss;
import org.springblade.resource.entity.OssVO;
import org.springblade.resource.vo.OssVO;
import org.springblade.resource.mapper.OssMapper;
import org.springblade.resource.service.IOssService;
import org.springframework.stereotype.Service;

68
blade-ops/blade-resource/src/main/java/org/springblade/resource/service/impl/SmsServiceImpl.java

@ -0,0 +1,68 @@
/*
* 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.resource.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.resource.entity.Sms;
import org.springblade.resource.mapper.SmsMapper;
import org.springblade.resource.service.ISmsService;
import org.springblade.resource.vo.SmsVO;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* 短信配置表 服务实现类
*
* @author BladeX
* @since 2020-02-20
*/
@Service
public class SmsServiceImpl extends BaseServiceImpl<SmsMapper, Sms> implements ISmsService {
@Override
public IPage<SmsVO> selectSmsPage(IPage<SmsVO> page, SmsVO sms) {
return page.setRecords(baseMapper.selectSmsPage(page, sms));
}
@Override
public boolean submit(Sms sms) {
LambdaQueryWrapper<Sms> lqw = Wrappers.<Sms>query().lambda()
.eq(Sms::getSmsCode, sms.getSmsCode()).eq(Sms::getTenantId, AuthUtil.getTenantId());
Integer cnt = baseMapper.selectCount(Func.isEmpty(sms.getId()) ? lqw : lqw.notIn(Sms::getId, sms.getId()));
if (cnt > 0) {
throw new ServiceException("当前资源编号已存在!");
}
return this.saveOrUpdate(sms);
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean enable(Long id) {
// 先禁用
boolean temp1 = this.update(Wrappers.<Sms>update().lambda().set(Sms::getStatus, 1));
// 在启用
boolean temp2 = this.update(Wrappers.<Sms>update().lambda().set(Sms::getStatus, 2).eq(Sms::getId, id));
return temp1 && temp2;
}
}

29
blade-ops/blade-resource/src/main/java/org/springblade/resource/vo/OssVO.java

@ -0,0 +1,29 @@
package org.springblade.resource.vo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.resource.entity.Oss;
/**
* OssVO
*
* @author Chill
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "OssVO对象", description = "对象存储表")
public class OssVO extends Oss {
private static final long serialVersionUID = 1L;
/**
* 分类名
*/
private String categoryName;
/**
* 是否启用
*/
private String statusName;
}

46
blade-ops/blade-resource/src/main/java/org/springblade/resource/vo/SmsVO.java

@ -0,0 +1,46 @@
/*
* 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.resource.vo;
import org.springblade.resource.entity.Sms;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
/**
* 短信配置表视图实体类
*
* @author BladeX
* @since 2020-02-20
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SmsVO对象", description = "短信配置表")
public class SmsVO extends Sms {
private static final long serialVersionUID = 1L;
/**
* 分类名
*/
private String categoryName;
/**
* 是否启用
*/
private String statusName;
}

2
blade-ops/blade-resource/src/main/java/org/springblade/resource/wrapper/OssWrapper.java

@ -19,7 +19,7 @@ package org.springblade.resource.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.resource.entity.Oss;
import org.springblade.resource.entity.OssVO;
import org.springblade.resource.vo.OssVO;
import org.springblade.system.cache.DictCache;
import java.util.Objects;

49
blade-ops/blade-resource/src/main/java/org/springblade/resource/wrapper/SmsWrapper.java

@ -0,0 +1,49 @@
/*
* 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.resource.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.resource.entity.Sms;
import org.springblade.resource.vo.SmsVO;
import org.springblade.system.cache.DictCache;
import java.util.Objects;
/**
* 短信配置表包装类,返回视图层所需的字段
*
* @author BladeX
* @since 2020-02-20
*/
public class SmsWrapper extends BaseEntityWrapper<Sms, SmsVO> {
public static SmsWrapper build() {
return new SmsWrapper();
}
@Override
public SmsVO entityVO(Sms sms) {
SmsVO smsVO = Objects.requireNonNull(BeanUtil.copy(sms, SmsVO.class));
String categoryName = DictCache.getValue("sms", sms.getCategory());
String statusName = DictCache.getValue("yes_no", sms.getStatus());
smsVO.setCategoryName(categoryName);
smsVO.setStatusName(statusName);
return smsVO;
}
}

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

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

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

@ -11,14 +11,14 @@
Target Server Version : 110200
File Encoding : 65001
Date: 02/01/2020 14:04:40
Date: 22/02/2020 00:20:17
*/
-- ----------------------------
-- Table structure for BLADE_CLIENT
-- ----------------------------
-- DROP TABLE "BLADE_CLIENT";
DROP TABLE "BLADE_CLIENT";
CREATE TABLE "BLADE_CLIENT" (
"ID" NUMBER(20) NOT NULL ,
"CLIENT_ID" NVARCHAR2(48) NOT NULL ,
@ -87,7 +87,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_CODE
-- ----------------------------
-- DROP TABLE "BLADE_CODE";
DROP TABLE "BLADE_CODE";
CREATE TABLE "BLADE_CODE" (
"ID" NUMBER(20) NOT NULL ,
"DATASOURCE_ID" NUMBER(20) ,
@ -143,7 +143,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_DATASOURCE
-- ----------------------------
-- DROP TABLE "BLADE_DATASOURCE";
DROP TABLE "BLADE_DATASOURCE";
CREATE TABLE "BLADE_DATASOURCE" (
"ID" NUMBER(20) NOT NULL ,
"NAME" NVARCHAR2(100) ,
@ -203,7 +203,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_DEPT
-- ----------------------------
-- DROP TABLE "BLADE_DEPT";
DROP TABLE "BLADE_DEPT";
CREATE TABLE "BLADE_DEPT" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -255,7 +255,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_DICT
-- ----------------------------
-- DROP TABLE "BLADE_DICT";
DROP TABLE "BLADE_DICT";
CREATE TABLE "BLADE_DICT" (
"ID" NUMBER(20) NOT NULL ,
"PARENT_ID" NUMBER(20) ,
@ -341,12 +341,17 @@ INSERT INTO "BLADE_DICT" VALUES ('1123598814738676225', '1123598814738676224', '
INSERT INTO "BLADE_DICT" VALUES ('1123598814738676226', '1123598814738676224', 'oss', '2', 'qiniu', '2', NULL, '0', '0');
INSERT INTO "BLADE_DICT" VALUES ('1123598814738676227', '1123598814738676224', 'oss', '3', 'ali', '3', NULL, '0', '0');
INSERT INTO "BLADE_DICT" VALUES ('1123598814738676228', '1123598814738676224', 'oss', '4', 'tencent', '4', NULL, '0', '0');
INSERT INTO "BLADE_DICT" VALUES ('1123598814738677220', '0', 'sms', '-1', '短信服务类型', '11', NULL, '0', '0');
INSERT INTO "BLADE_DICT" VALUES ('1123598814738677221', '1123598814738677220', 'sms', '1', 'yunpian', '1', NULL, '0', '0');
INSERT INTO "BLADE_DICT" VALUES ('1123598814738677222', '1123598814738677220', 'sms', '2', 'qiniu', '2', NULL, '0', '0');
INSERT INTO "BLADE_DICT" VALUES ('1123598814738677223', '1123598814738677220', 'sms', '3', 'ali', '3', NULL, '0', '0');
INSERT INTO "BLADE_DICT" VALUES ('1123598814738677224', '1123598814738677220', 'sms', '4', 'tencent', '4', NULL, '0', '0');
COMMIT;
-- ----------------------------
-- Table structure for BLADE_DICT_BIZ
-- ----------------------------
-- DROP TABLE "BLADE_DICT_BIZ";
DROP TABLE "BLADE_DICT_BIZ";
CREATE TABLE "BLADE_DICT_BIZ" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -390,7 +395,7 @@ COMMENT ON TABLE "BLADE_DICT_BIZ" IS '数据源配置表';
-- ----------------------------
-- Table structure for BLADE_LOG_API
-- ----------------------------
-- DROP TABLE "BLADE_LOG_API";
DROP TABLE "BLADE_LOG_API";
CREATE TABLE "BLADE_LOG_API" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -450,7 +455,7 @@ COMMENT ON TABLE "BLADE_LOG_API" IS '接口日志表';
-- ----------------------------
-- Table structure for BLADE_LOG_ERROR
-- ----------------------------
-- DROP TABLE "BLADE_LOG_ERROR";
DROP TABLE "BLADE_LOG_ERROR";
CREATE TABLE "BLADE_LOG_ERROR" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -514,7 +519,7 @@ COMMENT ON TABLE "BLADE_LOG_ERROR" IS '错误日志表';
-- ----------------------------
-- Table structure for BLADE_LOG_USUAL
-- ----------------------------
-- DROP TABLE "BLADE_LOG_USUAL";
DROP TABLE "BLADE_LOG_USUAL";
CREATE TABLE "BLADE_LOG_USUAL" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -574,7 +579,7 @@ COMMENT ON TABLE "BLADE_LOG_USUAL" IS '通用日志表';
-- ----------------------------
-- Table structure for BLADE_MENU
-- ----------------------------
-- DROP TABLE "BLADE_MENU";
DROP TABLE "BLADE_MENU";
CREATE TABLE "BLADE_MENU" (
"ID" NUMBER(20) NOT NULL ,
"PARENT_ID" NUMBER(20) ,
@ -624,55 +629,6 @@ COMMENT ON TABLE "BLADE_MENU" IS '菜单表';
-- ----------------------------
-- Records of BLADE_MENU
-- ----------------------------
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', 'iconfont icon-iconset0216', '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/', 'iconfont iconicon_compile', '3', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733349637844993', '1123598815738675217', 'crud', '表格设计', 'crud', 'https://crud.avuejs.com/', 'iconfont iconicon_work', '4', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963251', '1123598815738675210', 'elk', 'ELK监控', 'menu', 'http://localhost:5601/', 'iconfont iconicon_cspace', '3', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963252', '1123598815738675210', 'zipkin', 'Zipkin监控', 'menu', 'http://localhost:9411/', 'iconfont iconicon_task', '4', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963253', '1123598815738675210', 'turbine', 'Turbine监控', 'menu', 'http://localhost:7003/hystrix', 'iconfont iconicon_subordinate', '5', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963254', '1123598815738675210', 'sentinel', 'Sentinel管理', 'menu', 'http://localhost:8858', 'iconfont iconicon_safety', '6', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963255', '1123598815738675210', 'es', 'Elasticsearch管理', 'menu', 'http://localhost:9100/', 'iconfont iconfont iconicon_search', '7', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963251', '1123598815738675203', 'dictbiz', '业务字典', 'menu', '/system/dictbiz', 'iconfont iconicon_study', '3', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963252', '1164733379658963251', 'dictbiz_add', '新增', 'add', '/system/dictbiz/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963253', '1164733379658963251', 'dictbiz_edit', '修改', 'edit', '/system/dictbiz/edit', 'form', '2', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963254', '1164733379658963251', 'dictbiz_delete', '删除', 'delete', '/api/blade-system/dict-biz/remove', 'delete', '3', '2', '3', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963255', '1164733379658963251', 'dictbiz_view', '查看', 'view', '/system/dictbiz/view', 'file-text', '4', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733389658963251', '1123598815738675298', 'xxljob', '任务调度', 'menu', 'http://localhost:7009/xxl-job-admin', 'iconfont iconicon_cspace', '2', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675201', '0', 'desk', '工作台', 'menu', '/desk', 'iconfont iconicon_airplay', '1', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675202', '1123598815738675201', 'notice', '通知公告', 'menu', '/desk/notice', 'iconfont iconicon_sms', '1', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675203', '0', 'system', '系统管理', 'menu', '/system', 'iconfont iconicon_setting', '99', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675204', '1123598815738675203', 'user', '用户管理', 'menu', '/system/user', 'iconfont iconicon_principal', '1', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675205', '1123598815738675203', 'dept', '机构管理', 'menu', '/system/dept', 'iconfont iconicon_group', '2', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675206', '1123598815738675203', 'dict', '系统字典', 'menu', '/system/dict', 'iconfont iconicon_addresslist', '3', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675207', '1123598815738675203', 'menu', '菜单管理', 'menu', '/system/menu', 'iconfont iconicon_subordinate', '4', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675208', '1123598815738675203', 'topmenu', '顶部菜单', 'menu', '/system/topmenu', 'iconfont icon-canshu', '5', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675209', '1123598815738675203', 'param', '参数管理', 'menu', '/system/param', 'iconfont iconicon_community_line', '6', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675210', '0', 'monitor', '系统监控', 'menu', '/monitor', 'iconfont icon-yanzhengma', '3', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675211', '1123598815738675210', 'doc', '接口文档', 'menu', 'http://localhost/doc.html', 'iconfont iconicon_study', '1', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675212', '1123598815738675210', 'admin', '服务治理', 'menu', 'http://localhost:7002', 'iconfont icon-canshu', '2', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675213', '1123598815738675210', 'log', '日志管理', 'menu', '/monitor/log', 'iconfont iconicon_doc', '8', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675214', '1123598815738675213', 'log_usual', '通用日志', 'menu', '/monitor/log/usual', NULL, '1', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675215', '1123598815738675213', 'log_api', '接口日志', 'menu', '/monitor/log/api', NULL, '2', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675216', '1123598815738675213', 'log_error', '错误日志', 'menu', '/monitor/log/error', NULL, '3', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675217', '0', 'tool', '研发工具', 'menu', '/tool', 'iconfont icon-wxbgongju', '4', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675218', '1123598815738675217', 'code', '代码生成', 'menu', '/tool/code', 'iconfont iconicon_savememo', '1', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675219', '1123598815738675202', 'notice_add', '新增', 'add', '/desk/notice/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675220', '1123598815738675202', 'notice_edit', '修改', 'edit', '/desk/notice/edit', 'form', '2', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675221', '1123598815738675202', 'notice_delete', '删除', 'delete', '/api/blade-desk/notice/remove', 'delete', '3', '2', '3', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675222', '1123598815738675202', 'notice_view', '查看', 'view', '/desk/notice/view', 'file-text', '4', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675223', '1123598815738675204', 'user_add', '新增', 'add', '/system/user/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675224', '1123598815738675204', 'user_edit', '修改', 'edit', '/system/user/edit', 'form', '2', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675225', '1123598815738675204', 'user_delete', '删除', 'delete', '/api/blade-user/remove', 'delete', '3', '2', '3', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675226', '1123598815738675204', 'user_role', '角色配置', 'role', NULL, 'user-add', '4', '2', '1', '1', NULL, '0');
@ -757,12 +713,67 @@ INSERT INTO "BLADE_MENU" VALUES ('1123598815738675305', '1123598815738675299', '
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675307', '0', 'authority', '权限管理', 'menu', '/authority', 'iconfont icon-bofangqi-suoping', '98', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675308', '1123598815738675307', 'role', '角色管理', 'menu', '/authority/role', 'iconfont iconicon_boss', '1', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675309', '1123598815738675307', 'data_scope', '数据权限', 'menu', '/authority/datascope', 'iconfont icon-shujuzhanshi2', '2', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733389658962251', '1123598815738675298', 'sms', '短信配置', 'menu', '/resource/sms', 'iconfont iconicon_message', '2', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733389658962252', '1164733389658962251', 'sms_add', '新增', 'add', '/resource/sms/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733389658962253', '1164733389658962251', 'sms_edit', '修改', 'edit', '/resource/sms/edit', 'form', '2', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733389658962254', '1164733389658962251', 'sms_delete', '删除', 'delete', '/api/blade-resource/sms/remove', 'delete', '3', '2', '3', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733389658962255', '1164733389658962251', 'sms_view', '查看', 'view', '/resource/sms/view', 'file-text', '4', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733389658962256', '1164733389658962251', 'sms_enable', '启用', 'enable', '/api/blade-resource/sms/enable', 'key', '5', '2', '2', '2', 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', 'iconfont icon-iconset0216', '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/', 'iconfont iconicon_compile', '3', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733349637844993', '1123598815738675217', 'crud', '表格设计', 'crud', 'https://crud.avuejs.com/', 'iconfont iconicon_work', '4', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963251', '1123598815738675210', 'elk', 'ELK监控', 'menu', 'http://localhost:5601/', 'iconfont iconicon_cspace', '3', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963252', '1123598815738675210', 'zipkin', 'Zipkin监控', 'menu', 'http://localhost:9411/', 'iconfont iconicon_task', '4', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963253', '1123598815738675210', 'turbine', 'Turbine监控', 'menu', 'http://localhost:7003/hystrix', 'iconfont iconicon_subordinate', '5', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963254', '1123598815738675210', 'sentinel', 'Sentinel管理', 'menu', 'http://localhost:8858', 'iconfont iconicon_safety', '6', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733369658963255', '1123598815738675210', 'es', 'Elasticsearch管理', 'menu', 'http://localhost:9100/', 'iconfont iconfont iconicon_search', '7', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963251', '1123598815738675203', 'dictbiz', '业务字典', 'menu', '/system/dictbiz', 'iconfont iconicon_study', '3', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963252', '1164733379658963251', 'dictbiz_add', '新增', 'add', '/system/dictbiz/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963253', '1164733379658963251', 'dictbiz_edit', '修改', 'edit', '/system/dictbiz/edit', 'form', '2', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963254', '1164733379658963251', 'dictbiz_delete', '删除', 'delete', '/api/blade-system/dict-biz/remove', 'delete', '3', '2', '3', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963255', '1164733379658963251', 'dictbiz_view', '查看', 'view', '/system/dictbiz/view', 'file-text', '4', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733389658963251', '1123598815738675298', 'xxljob', '任务调度', 'menu', 'http://localhost:7009/xxl-job-admin', 'iconfont iconicon_cspace', '3', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675201', '0', 'desk', '工作台', 'menu', '/desk', 'iconfont iconicon_airplay', '1', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675202', '1123598815738675201', 'notice', '通知公告', 'menu', '/desk/notice', 'iconfont iconicon_sms', '1', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675203', '0', 'system', '系统管理', 'menu', '/system', 'iconfont iconicon_setting', '99', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675204', '1123598815738675203', 'user', '用户管理', 'menu', '/system/user', 'iconfont iconicon_principal', '1', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675205', '1123598815738675203', 'dept', '机构管理', 'menu', '/system/dept', 'iconfont iconicon_group', '2', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675206', '1123598815738675203', 'dict', '系统字典', 'menu', '/system/dict', 'iconfont iconicon_addresslist', '3', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675207', '1123598815738675203', 'menu', '菜单管理', 'menu', '/system/menu', 'iconfont iconicon_subordinate', '4', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675208', '1123598815738675203', 'topmenu', '顶部菜单', 'menu', '/system/topmenu', 'iconfont icon-canshu', '5', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675209', '1123598815738675203', 'param', '参数管理', 'menu', '/system/param', 'iconfont iconicon_community_line', '6', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675210', '0', 'monitor', '系统监控', 'menu', '/monitor', 'iconfont icon-yanzhengma', '3', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675211', '1123598815738675210', 'doc', '接口文档', 'menu', 'http://localhost/doc.html', 'iconfont iconicon_study', '1', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675212', '1123598815738675210', 'admin', '服务治理', 'menu', 'http://localhost:7002', 'iconfont icon-canshu', '2', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675213', '1123598815738675210', 'log', '日志管理', 'menu', '/monitor/log', 'iconfont iconicon_doc', '8', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675214', '1123598815738675213', 'log_usual', '通用日志', 'menu', '/monitor/log/usual', NULL, '1', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675215', '1123598815738675213', 'log_api', '接口日志', 'menu', '/monitor/log/api', NULL, '2', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675216', '1123598815738675213', 'log_error', '错误日志', 'menu', '/monitor/log/error', NULL, '3', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675217', '0', 'tool', '研发工具', 'menu', '/tool', 'iconfont icon-wxbgongju', '4', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675218', '1123598815738675217', 'code', '代码生成', 'menu', '/tool/code', 'iconfont iconicon_savememo', '1', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675219', '1123598815738675202', 'notice_add', '新增', 'add', '/desk/notice/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675220', '1123598815738675202', 'notice_edit', '修改', 'edit', '/desk/notice/edit', 'form', '2', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675221', '1123598815738675202', 'notice_delete', '删除', 'delete', '/api/blade-desk/notice/remove', 'delete', '3', '2', '3', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675222', '1123598815738675202', 'notice_view', '查看', 'view', '/desk/notice/view', 'file-text', '4', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675223', '1123598815738675204', 'user_add', '新增', 'add', '/system/user/add', 'plus', '1', '2', '1', '1', NULL, '0');
COMMIT;
-- ----------------------------
-- Table structure for BLADE_NOTICE
-- ----------------------------
-- DROP TABLE "BLADE_NOTICE";
DROP TABLE "BLADE_NOTICE";
CREATE TABLE "BLADE_NOTICE" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -820,7 +831,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_OSS
-- ----------------------------
-- DROP TABLE "BLADE_OSS";
DROP TABLE "BLADE_OSS";
CREATE TABLE "BLADE_OSS" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -887,7 +898,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_PARAM
-- ----------------------------
-- DROP TABLE "BLADE_PARAM";
DROP TABLE "BLADE_PARAM";
CREATE TABLE "BLADE_PARAM" (
"ID" NUMBER(20) NOT NULL ,
"PARAM_NAME" NVARCHAR2(255) ,
@ -942,7 +953,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_PROCESS_LEAVE
-- ----------------------------
-- DROP TABLE "BLADE_PROCESS_LEAVE";
DROP TABLE "BLADE_PROCESS_LEAVE";
CREATE TABLE "BLADE_PROCESS_LEAVE" (
"ID" NUMBER(20) NOT NULL ,
"PROCESS_DEFINITION_ID" NVARCHAR2(64) ,
@ -996,7 +1007,7 @@ COMMENT ON TABLE "BLADE_PROCESS_LEAVE" IS '流程请假业务表';
-- ----------------------------
-- Table structure for BLADE_ROLE
-- ----------------------------
-- DROP TABLE "BLADE_ROLE";
DROP TABLE "BLADE_ROLE";
CREATE TABLE "BLADE_ROLE" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -1044,7 +1055,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_ROLE_MENU
-- ----------------------------
-- DROP TABLE "BLADE_ROLE_MENU";
DROP TABLE "BLADE_ROLE_MENU";
CREATE TABLE "BLADE_ROLE_MENU" (
"ID" NUMBER(20) NOT NULL ,
"MENU_ID" NUMBER(20) ,
@ -1074,6 +1085,65 @@ COMMENT ON TABLE "BLADE_ROLE_MENU" IS '角色菜单关联表';
-- ----------------------------
-- Records of BLADE_ROLE_MENU
-- ----------------------------
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891669696933889', '1123598815738675229', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891669743071234', '1123598815738675230', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891669797597186', '1123598815738675231', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891669847928834', '1123598815738675232', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891669919232001', '1123598815738675206', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891669973757954', '1123598815738675233', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670019895298', '1123598815738675234', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670045061121', '1123598815738675235', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670095392770', '1123598815738675236', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670137335809', '1123598815738675207', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670196056065', '1123598815738675237', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670229610498', '1123598815738675238', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670267359234', '1123598815738675239', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670292525057', '1123598815738675240', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670355439617', '1123598815738675306', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670380605442', '1123598815738675208', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670443520001', '1123598815738675313', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670481268737', '1123598815738675314', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670506434561', '1123598815738675315', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670569349121', '1123598815738675316', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670594514945', '1123598815738675209', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670657429506', '1123598815738675245', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670682595330', '1123598815738675246', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670711955457', '1123598815738675247', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670745509889', '1123598815738675248', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670804230146', '1123598815738675256', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670841978881', '1123598815738675257', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670879727617', '1123598815738675258', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670913282050', '1123598815738675259', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670959419394', '1123598815738675260', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670988779521', '1123598815738675261', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891671039111170', '1123598815738675262', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891671068471297', '1123598815738675263', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891671110414338', '1123598815738675264', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891671152357378', '1123598815738675265', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272593873322991', '1161272593873321991', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272593873322992', '1161272593873321992', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272593873322993', '1161272593873321993', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272593873322994', '1161272593873321994', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272593873322995', '1161272593873321995', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272593873322996', '1164733121140551682', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272593873322997', '1164733349637844993', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272693873322991', '1164733369658963251', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272693873322992', '1164733369658963252', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272693873322993', '1164733369658963253', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272693873322994', '1164733369658963254', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272693873322995', '1164733369658963255', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322991', '1164733379658963251', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322992', '116473337658963252', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322993', '1164733379658963253', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322994', '1164733379658963254', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322995', '1164733379658963255', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272893873322991', '1164733389658963251', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272893873222991', '1164733389658962251', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272893873222992', '1164733389658962252', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272893873222993', '1164733389658962253', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272893873222994', '1164733389658962254', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272893873222995', '1164733389658962255', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272893873222996', '1164733389658962256', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1123598817738675363', '1123598815738675201', '1123598816738675202');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1123598817738675364', '1123598815738675202', '1123598816738675202');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1123598817738675365', '1123598815738675219', '1123598816738675202');
@ -1251,65 +1321,12 @@ INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891669533356033', '112359881573867522
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891669571104770', '1123598815738675227', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891669642407937', '1123598815738675228', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891669671768065', '1123598815738675205', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891669696933889', '1123598815738675229', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891669743071234', '1123598815738675230', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891669797597186', '1123598815738675231', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891669847928834', '1123598815738675232', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891669919232001', '1123598815738675206', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891669973757954', '1123598815738675233', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670019895298', '1123598815738675234', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670045061121', '1123598815738675235', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670095392770', '1123598815738675236', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670137335809', '1123598815738675207', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670196056065', '1123598815738675237', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670229610498', '1123598815738675238', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670267359234', '1123598815738675239', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670292525057', '1123598815738675240', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670355439617', '1123598815738675306', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670380605442', '1123598815738675208', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670443520001', '1123598815738675313', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670481268737', '1123598815738675314', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670506434561', '1123598815738675315', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670569349121', '1123598815738675316', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670594514945', '1123598815738675209', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670657429506', '1123598815738675245', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670682595330', '1123598815738675246', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670711955457', '1123598815738675247', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670745509889', '1123598815738675248', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670804230146', '1123598815738675256', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670841978881', '1123598815738675257', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670879727617', '1123598815738675258', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670913282050', '1123598815738675259', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670959419394', '1123598815738675260', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891670988779521', '1123598815738675261', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891671039111170', '1123598815738675262', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891671068471297', '1123598815738675263', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891671110414338', '1123598815738675264', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1149891671152357378', '1123598815738675265', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272593873322991', '1161272593873321991', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272593873322992', '1161272593873321992', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272593873322993', '1161272593873321993', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272593873322994', '1161272593873321994', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272593873322995', '1161272593873321995', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272593873322996', '1164733121140551682', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272593873322997', '1164733349637844993', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272693873322991', '1164733369658963251', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272693873322992', '1164733369658963252', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272693873322993', '1164733369658963253', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272693873322994', '1164733369658963254', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272693873322995', '1164733369658963255', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322991', '1164733379658963251', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322992', '116473337658963252', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322993', '1164733379658963253', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322994', '1164733379658963254', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322995', '1164733379658963255', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272893873322991', '1164733389658963251', '1123598816738675201');
COMMIT;
-- ----------------------------
-- Table structure for BLADE_ROLE_SCOPE
-- ----------------------------
-- DROP TABLE "BLADE_ROLE_SCOPE";
DROP TABLE "BLADE_ROLE_SCOPE";
CREATE TABLE "BLADE_ROLE_SCOPE" (
"ID" NUMBER(20) NOT NULL ,
"SCOPE_CATEGORY" NUMBER(11) ,
@ -1341,7 +1358,7 @@ COMMENT ON TABLE "BLADE_ROLE_SCOPE" IS '角色数据权限关联表';
-- ----------------------------
-- Table structure for BLADE_SCOPE_API
-- ----------------------------
-- DROP TABLE "BLADE_SCOPE_API";
DROP TABLE "BLADE_SCOPE_API";
CREATE TABLE "BLADE_SCOPE_API" (
"ID" NUMBER(20) NOT NULL ,
"MENU_ID" NUMBER(20) ,
@ -1393,7 +1410,7 @@ COMMENT ON TABLE "BLADE_SCOPE_API" IS '接口权限表';
-- ----------------------------
-- Table structure for BLADE_SCOPE_DATA
-- ----------------------------
-- DROP TABLE "BLADE_SCOPE_DATA";
DROP TABLE "BLADE_SCOPE_DATA";
CREATE TABLE "BLADE_SCOPE_DATA" (
"ID" NUMBER(20) NOT NULL ,
"MENU_ID" NUMBER(20) ,
@ -1448,10 +1465,68 @@ COMMENT ON COLUMN "BLADE_SCOPE_DATA"."STATUS" IS '状态';
COMMENT ON COLUMN "BLADE_SCOPE_DATA"."IS_DELETED" IS '是否已删除';
COMMENT ON TABLE "BLADE_SCOPE_DATA" IS '数据权限表';
-- ----------------------------
-- Table structure for BLADE_SMS
-- ----------------------------
DROP TABLE "BLADE_SMS";
CREATE TABLE "BLADE_SMS" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
"CATEGORY" NUMBER(11) ,
"SMS_CODE" VARCHAR2(12 BYTE) ,
"TEMPLATE_ID" VARCHAR2(64 BYTE) ,
"ACCESS_KEY" NVARCHAR2(255) ,
"SECRET_KEY" NVARCHAR2(255) ,
"REGION_ID" NVARCHAR2(255) ,
"SIGN_NAME" VARCHAR2(64 BYTE) ,
"REMARK" NVARCHAR2(255) ,
"CREATE_USER" NUMBER(20) ,
"CREATE_DEPT" NUMBER(20) ,
"CREATE_TIME" DATE ,
"UPDATE_USER" NUMBER(20) ,
"UPDATE_TIME" DATE ,
"STATUS" NUMBER(11) ,
"IS_DELETED" NUMBER(11)
)
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_SMS"."ID" IS '主键';
COMMENT ON COLUMN "BLADE_SMS"."TENANT_ID" IS '租户ID';
COMMENT ON COLUMN "BLADE_SMS"."CATEGORY" IS '分类';
COMMENT ON COLUMN "BLADE_SMS"."SMS_CODE" IS '资源编号';
COMMENT ON COLUMN "BLADE_SMS"."TEMPLATE_ID" IS '模板ID';
COMMENT ON COLUMN "BLADE_SMS"."ACCESS_KEY" IS 'accessKey';
COMMENT ON COLUMN "BLADE_SMS"."SECRET_KEY" IS 'secretKey';
COMMENT ON COLUMN "BLADE_SMS"."REGION_ID" IS 'regionId';
COMMENT ON COLUMN "BLADE_SMS"."SIGN_NAME" IS '短信签名';
COMMENT ON COLUMN "BLADE_SMS"."REMARK" IS '备注';
COMMENT ON COLUMN "BLADE_SMS"."CREATE_USER" IS '创建人';
COMMENT ON COLUMN "BLADE_SMS"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "BLADE_SMS"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "BLADE_SMS"."UPDATE_USER" IS '修改人';
COMMENT ON COLUMN "BLADE_SMS"."UPDATE_TIME" IS '修改时间';
COMMENT ON COLUMN "BLADE_SMS"."STATUS" IS '状态';
COMMENT ON COLUMN "BLADE_SMS"."IS_DELETED" IS '是否已删除';
COMMENT ON TABLE "BLADE_SMS" IS '短信配置表';
-- ----------------------------
-- Table structure for BLADE_TENANT
-- ----------------------------
-- DROP TABLE "BLADE_TENANT";
DROP TABLE "BLADE_TENANT";
CREATE TABLE "BLADE_TENANT" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -1515,7 +1590,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_TOP_MENU
-- ----------------------------
-- DROP TABLE "BLADE_TOP_MENU";
DROP TABLE "BLADE_TOP_MENU";
CREATE TABLE "BLADE_TOP_MENU" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -1565,7 +1640,7 @@ COMMENT ON TABLE "BLADE_TOP_MENU" IS '顶部菜单表';
-- ----------------------------
-- Table structure for BLADE_TOP_MENU_SETTING
-- ----------------------------
-- DROP TABLE "BLADE_TOP_MENU_SETTING";
DROP TABLE "BLADE_TOP_MENU_SETTING";
CREATE TABLE "BLADE_TOP_MENU_SETTING" (
"ID" NUMBER(20) NOT NULL ,
"TOP_MENU_ID" NUMBER(20) ,
@ -1595,7 +1670,7 @@ COMMENT ON TABLE "BLADE_TOP_MENU_SETTING" IS '顶部菜单配置表';
-- ----------------------------
-- Table structure for BLADE_USER
-- ----------------------------
-- DROP TABLE "BLADE_USER";
DROP TABLE "BLADE_USER";
CREATE TABLE "BLADE_USER" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -1667,7 +1742,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_USER_DEPT
-- ----------------------------
-- DROP TABLE "BLADE_USER_DEPT";
DROP TABLE "BLADE_USER_DEPT";
CREATE TABLE "BLADE_USER_DEPT" (
"ID" NUMBER(20) NOT NULL ,
"USER_ID" NUMBER(20) ,
@ -1756,6 +1831,15 @@ ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020251" CHECK ("ACCESS_TOKEN_VA
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020252" CHECK ("REFRESH_TOKEN_VALIDITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020253" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020254" CHECK ("IS_DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0021985" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0021986" CHECK ("CLIENT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0021987" CHECK ("CLIENT_SECRET" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0021988" CHECK ("SCOPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0021989" CHECK ("AUTHORIZED_GRANT_TYPES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0021990" CHECK ("ACCESS_TOKEN_VALIDITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0021991" CHECK ("REFRESH_TOKEN_VALIDITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0021992" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0021993" CHECK ("IS_DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_CODE
@ -1770,6 +1854,7 @@ ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0017048" CHECK ("ID" IS NOT NULL)
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;
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0020255" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0021994" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DATASOURCE
@ -1783,6 +1868,7 @@ ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0017120" CHECK ("ID" IS NOT
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;
ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0020256" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0021995" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DEPT
@ -1797,6 +1883,7 @@ ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0017049" CHECK ("ID" IS NOT NULL)
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;
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0020257" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0021996" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DICT
@ -1811,6 +1898,7 @@ ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0017050" CHECK ("ID" IS NOT NULL)
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;
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0020258" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0021997" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DICT_BIZ
@ -1823,6 +1911,7 @@ ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0019296" PRIMARY KEY ("ID");
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;
ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0020259" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0021998" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_LOG_API
@ -1837,6 +1926,7 @@ ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0017051" CHECK ("ID" IS NOT NUL
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;
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0020260" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0021999" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_LOG_ERROR
@ -1851,6 +1941,7 @@ ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0017052" CHECK ("ID" IS NOT N
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;
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0020261" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0022000" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_LOG_USUAL
@ -1865,6 +1956,7 @@ ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0017053" CHECK ("ID" IS NOT N
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;
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0020262" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0022001" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_MENU
@ -1879,6 +1971,7 @@ ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0017054" CHECK ("ID" IS NOT NULL)
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;
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0020263" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0022002" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_NOTICE
@ -1893,6 +1986,7 @@ ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0017055" CHECK ("ID" IS NOT NULL
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;
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0020264" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0022003" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_OSS
@ -1907,6 +2001,7 @@ ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0017056" CHECK ("ID" IS NOT NULL) N
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;
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0020265" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0022004" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_PARAM
@ -1921,6 +2016,7 @@ ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0017057" CHECK ("ID" IS NOT NULL)
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;
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0020266" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0022005" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_PROCESS_LEAVE
@ -1935,6 +2031,7 @@ ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0017058" CHECK ("ID" IS N
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;
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0020267" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0022006" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_ROLE
@ -1949,6 +2046,7 @@ ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0017059" CHECK ("ID" IS NOT NULL)
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;
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0020268" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0022007" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_ROLE_MENU
@ -1963,6 +2061,7 @@ ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0017060" CHECK ("ID" IS NOT N
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;
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0020269" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0022008" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_ROLE_SCOPE
@ -1977,6 +2076,7 @@ ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0017061" CHECK ("ID" IS NOT
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;
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0020270" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0022009" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_SCOPE_API
@ -1991,6 +2091,7 @@ ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0017062" CHECK ("ID" IS NOT N
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;
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0020271" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0022010" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_SCOPE_DATA
@ -2005,6 +2106,17 @@ ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0017063" CHECK ("ID" IS NOT
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;
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0020272" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0022011" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_SMS
-- ----------------------------
ALTER TABLE "BLADE_SMS" ADD CONSTRAINT "SYS_C0022202" PRIMARY KEY ("ID");
-- ----------------------------
-- Checks structure for table BLADE_SMS
-- ----------------------------
ALTER TABLE "BLADE_SMS" ADD CONSTRAINT "SYS_C0022201" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_TENANT
@ -2024,6 +2136,8 @@ ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019499" CHECK ("ID" IS NOT NULL
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019500" CHECK ("TENANT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0020273" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0020274" CHECK ("TENANT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0022012" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0022013" CHECK ("TENANT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_TOP_MENU
@ -2038,6 +2152,7 @@ ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0017066" CHECK ("ID" IS NOT NU
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;
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0020275" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0022014" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_TOP_MENU_SETTING
@ -2052,6 +2167,7 @@ ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0017067" CHECK ("ID" I
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;
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0020276" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0022015" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_USER
@ -2066,6 +2182,7 @@ ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0017068" CHECK ("ID" IS NOT NULL)
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;
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0020277" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0022016" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_USER_DEPT
@ -2077,3 +2194,4 @@ ALTER TABLE "BLADE_USER_DEPT" ADD CONSTRAINT "SYS_C0019621" PRIMARY KEY ("ID");
-- ----------------------------
ALTER TABLE "BLADE_USER_DEPT" ADD CONSTRAINT "SYS_C0019620" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER_DEPT" ADD CONSTRAINT "SYS_C0020278" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER_DEPT" ADD CONSTRAINT "SYS_C0022017" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

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

@ -11,14 +11,14 @@
Target Server Version : 110200
File Encoding : 65001
Date: 02/01/2020 14:09:24
Date: 22/02/2020 00:40:50
*/
-- ----------------------------
-- Table structure for BLADE_CLIENT
-- ----------------------------
-- DROP TABLE "BLADE_CLIENT";
DROP TABLE "BLADE_CLIENT";
CREATE TABLE "BLADE_CLIENT" (
"ID" NUMBER(20) NOT NULL ,
"CLIENT_ID" NVARCHAR2(48) NOT NULL ,
@ -87,7 +87,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_CODE
-- ----------------------------
-- DROP TABLE "BLADE_CODE";
DROP TABLE "BLADE_CODE";
CREATE TABLE "BLADE_CODE" (
"ID" NUMBER(20) NOT NULL ,
"DATASOURCE_ID" NUMBER(20) ,
@ -143,7 +143,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_DATASOURCE
-- ----------------------------
-- DROP TABLE "BLADE_DATASOURCE";
DROP TABLE "BLADE_DATASOURCE";
CREATE TABLE "BLADE_DATASOURCE" (
"ID" NUMBER(20) NOT NULL ,
"NAME" NVARCHAR2(100) ,
@ -203,7 +203,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_DEPT
-- ----------------------------
-- DROP TABLE "BLADE_DEPT";
DROP TABLE "BLADE_DEPT";
CREATE TABLE "BLADE_DEPT" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -255,7 +255,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_DICT
-- ----------------------------
-- DROP TABLE "BLADE_DICT";
DROP TABLE "BLADE_DICT";
CREATE TABLE "BLADE_DICT" (
"ID" NUMBER(20) NOT NULL ,
"PARENT_ID" NUMBER(20) ,
@ -297,6 +297,7 @@ COMMENT ON TABLE "BLADE_DICT" IS '字典表';
-- ----------------------------
-- Records of BLADE_DICT
-- ----------------------------
INSERT INTO "BLADE_DICT" VALUES ('1123598814738677220', '0', 'sms', '-1', '短信服务类型', '11', NULL, '0', '0');
INSERT INTO "BLADE_DICT" VALUES ('1123598814738675201', '0', 'sex', '-1', '性别', '1', NULL, '0', '0');
INSERT INTO "BLADE_DICT" VALUES ('1123598814738675202', '1123598814738675201', 'sex', '1', '', '1', NULL, '0', '0');
INSERT INTO "BLADE_DICT" VALUES ('1123598814738675203', '1123598814738675201', 'sex', '2', '', '2', NULL, '0', '0');
@ -341,12 +342,16 @@ INSERT INTO "BLADE_DICT" VALUES ('1123598814738676225', '1123598814738676224', '
INSERT INTO "BLADE_DICT" VALUES ('1123598814738676226', '1123598814738676224', 'oss', '2', 'qiniu', '2', NULL, '0', '0');
INSERT INTO "BLADE_DICT" VALUES ('1123598814738676227', '1123598814738676224', 'oss', '3', 'ali', '3', NULL, '0', '0');
INSERT INTO "BLADE_DICT" VALUES ('1123598814738676228', '1123598814738676224', 'oss', '4', 'tencent', '4', NULL, '0', '0');
INSERT INTO "BLADE_DICT" VALUES ('1123598814738677223', '1123598814738677220', 'sms', '3', 'ali', '3', NULL, '0', '0');
INSERT INTO "BLADE_DICT" VALUES ('1123598814738677224', '1123598814738677220', 'sms', '4', 'tencent', '4', NULL, '0', '0');
INSERT INTO "BLADE_DICT" VALUES ('1123598814738677221', '1123598814738677220', 'sms', '1', 'yunpian', '1', NULL, '0', '0');
INSERT INTO "BLADE_DICT" VALUES ('1123598814738677222', '1123598814738677220', 'sms', '2', 'qiniu', '2', NULL, '0', '0');
COMMIT;
-- ----------------------------
-- Table structure for BLADE_DICT_BIZ
-- ----------------------------
-- DROP TABLE "BLADE_DICT_BIZ";
DROP TABLE "BLADE_DICT_BIZ";
CREATE TABLE "BLADE_DICT_BIZ" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -390,7 +395,7 @@ COMMENT ON TABLE "BLADE_DICT_BIZ" IS '数据源配置表';
-- ----------------------------
-- Table structure for BLADE_LOG_API
-- ----------------------------
-- DROP TABLE "BLADE_LOG_API";
DROP TABLE "BLADE_LOG_API";
CREATE TABLE "BLADE_LOG_API" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -450,7 +455,7 @@ COMMENT ON TABLE "BLADE_LOG_API" IS '接口日志表';
-- ----------------------------
-- Table structure for BLADE_LOG_ERROR
-- ----------------------------
-- DROP TABLE "BLADE_LOG_ERROR";
DROP TABLE "BLADE_LOG_ERROR";
CREATE TABLE "BLADE_LOG_ERROR" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -514,7 +519,7 @@ COMMENT ON TABLE "BLADE_LOG_ERROR" IS '错误日志表';
-- ----------------------------
-- Table structure for BLADE_LOG_USUAL
-- ----------------------------
-- DROP TABLE "BLADE_LOG_USUAL";
DROP TABLE "BLADE_LOG_USUAL";
CREATE TABLE "BLADE_LOG_USUAL" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -574,7 +579,7 @@ COMMENT ON TABLE "BLADE_LOG_USUAL" IS '通用日志表';
-- ----------------------------
-- Table structure for BLADE_MENU
-- ----------------------------
-- DROP TABLE "BLADE_MENU";
DROP TABLE "BLADE_MENU";
CREATE TABLE "BLADE_MENU" (
"ID" NUMBER(20) NOT NULL ,
"PARENT_ID" NUMBER(20) ,
@ -624,6 +629,7 @@ COMMENT ON TABLE "BLADE_MENU" IS '菜单表';
-- ----------------------------
-- Records of BLADE_MENU
-- ----------------------------
INSERT INTO "BLADE_MENU" VALUES ('1164733389658962252', '1164733389658962251', 'sms_add', '新增', 'add', '/resource/sms/add', 'plus', '1', '2', '1', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675201', '0', 'desk', '工作台', 'menu', '/desk', 'desktop', '1', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675202', '1123598815738675201', 'notice', '通知公告', 'menu', '/desk/notice', NULL, '1', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675203', '0', 'system', '系统管理', 'menu', '/system', 'setting', '99', '1', '0', '1', NULL, '0');
@ -694,7 +700,7 @@ INSERT INTO "BLADE_MENU" VALUES ('1164733379658963252', '1164733379658963251', '
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963253', '1164733379658963251', 'dictbiz_edit', '修改', 'edit', '/system/dictbiz/edit', 'form', '2', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963254', '1164733379658963251', 'dictbiz_delete', '删除', 'delete', '/api/blade-system/dict-biz/remove', 'delete', '3', '2', '3', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733379658963255', '1164733379658963251', 'dictbiz_view', '查看', 'view', '/system/dictbiz/view', 'file-text', '4', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733389658963251', '1123598815738675298', 'xxljob', '任务调度', 'menu', 'http://localhost:7009/xxl-job-admin', NULL, '2', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733389658963251', '1123598815738675298', 'xxljob', '任务调度', 'menu', 'http://localhost:7009/xxl-job-admin', NULL, '3', '1', '0', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675260', '1123598815738675256', 'tenant_view', '查看', 'view', '/system/tenant/view', 'file-text', '4', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675261', '1123598815738675203', 'client', '应用管理', 'menu', '/system/client', NULL, '8', '1', '0', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1123598815738675262', '1123598815738675261', 'client_add', '新增', 'add', '/system/client/add', 'plus', '1', '2', '1', '1', NULL, '0');
@ -755,12 +761,17 @@ INSERT INTO "BLADE_MENU" VALUES ('1161272593873321991', '1123598815738675217', '
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 ('1164733389658962253', '1164733389658962251', 'sms_edit', '修改', 'edit', '/resource/sms/edit', 'form', '2', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733389658962254', '1164733389658962251', 'sms_delete', '删除', 'delete', '/api/blade-resource/sms/remove', 'delete', '3', '2', '3', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733389658962255', '1164733389658962251', 'sms_view', '查看', 'view', '/resource/sms/view', 'file-text', '4', '2', '2', '1', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733389658962256', '1164733389658962251', 'sms_enable', '启用', 'enable', '/api/blade-resource/sms/enable', 'key', '5', '2', '2', '2', NULL, '0');
INSERT INTO "BLADE_MENU" VALUES ('1164733389658962251', '1123598815738675298', 'sms', '短信配置', 'menu', '/resource/sms', NULL, '2', '1', '0', '1', NULL, '0');
COMMIT;
-- ----------------------------
-- Table structure for BLADE_NOTICE
-- ----------------------------
-- DROP TABLE "BLADE_NOTICE";
DROP TABLE "BLADE_NOTICE";
CREATE TABLE "BLADE_NOTICE" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -818,7 +829,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_OSS
-- ----------------------------
-- DROP TABLE "BLADE_OSS";
DROP TABLE "BLADE_OSS";
CREATE TABLE "BLADE_OSS" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -885,7 +896,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_PARAM
-- ----------------------------
-- DROP TABLE "BLADE_PARAM";
DROP TABLE "BLADE_PARAM";
CREATE TABLE "BLADE_PARAM" (
"ID" NUMBER(20) NOT NULL ,
"PARAM_NAME" NVARCHAR2(255) ,
@ -940,7 +951,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_PROCESS_LEAVE
-- ----------------------------
-- DROP TABLE "BLADE_PROCESS_LEAVE";
DROP TABLE "BLADE_PROCESS_LEAVE";
CREATE TABLE "BLADE_PROCESS_LEAVE" (
"ID" NUMBER(20) NOT NULL ,
"PROCESS_DEFINITION_ID" NVARCHAR2(64) ,
@ -994,7 +1005,7 @@ COMMENT ON TABLE "BLADE_PROCESS_LEAVE" IS '流程请假业务表';
-- ----------------------------
-- Table structure for BLADE_ROLE
-- ----------------------------
-- DROP TABLE "BLADE_ROLE";
DROP TABLE "BLADE_ROLE";
CREATE TABLE "BLADE_ROLE" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -1042,7 +1053,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_ROLE_MENU
-- ----------------------------
-- DROP TABLE "BLADE_ROLE_MENU";
DROP TABLE "BLADE_ROLE_MENU";
CREATE TABLE "BLADE_ROLE_MENU" (
"ID" NUMBER(20) NOT NULL ,
"MENU_ID" NUMBER(20) ,
@ -1072,6 +1083,7 @@ COMMENT ON TABLE "BLADE_ROLE_MENU" IS '角色菜单关联表';
-- ----------------------------
-- Records of BLADE_ROLE_MENU
-- ----------------------------
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272893873222994', '1164733389658962254', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1123598817738675363', '1123598815738675201', '1123598816738675202');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1123598817738675364', '1123598815738675202', '1123598816738675202');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1123598817738675365', '1123598815738675219', '1123598816738675202');
@ -1302,12 +1314,17 @@ INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322993', '116473337965896325
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322994', '1164733379658963254', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272793873322995', '1164733379658963255', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272893873322991', '1164733389658963251', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272893873222991', '1164733389658962251', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272893873222995', '1164733389658962255', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272893873222996', '1164733389658962256', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272893873222992', '1164733389658962252', '1123598816738675201');
INSERT INTO "BLADE_ROLE_MENU" VALUES ('1161272893873222993', '1164733389658962253', '1123598816738675201');
COMMIT;
-- ----------------------------
-- Table structure for BLADE_ROLE_SCOPE
-- ----------------------------
-- DROP TABLE "BLADE_ROLE_SCOPE";
DROP TABLE "BLADE_ROLE_SCOPE";
CREATE TABLE "BLADE_ROLE_SCOPE" (
"ID" NUMBER(20) NOT NULL ,
"SCOPE_CATEGORY" NUMBER(11) ,
@ -1339,7 +1356,7 @@ COMMENT ON TABLE "BLADE_ROLE_SCOPE" IS '角色数据权限关联表';
-- ----------------------------
-- Table structure for BLADE_SCOPE_API
-- ----------------------------
-- DROP TABLE "BLADE_SCOPE_API";
DROP TABLE "BLADE_SCOPE_API";
CREATE TABLE "BLADE_SCOPE_API" (
"ID" NUMBER(20) NOT NULL ,
"MENU_ID" NUMBER(20) ,
@ -1391,7 +1408,7 @@ COMMENT ON TABLE "BLADE_SCOPE_API" IS '接口权限表';
-- ----------------------------
-- Table structure for BLADE_SCOPE_DATA
-- ----------------------------
-- DROP TABLE "BLADE_SCOPE_DATA";
DROP TABLE "BLADE_SCOPE_DATA";
CREATE TABLE "BLADE_SCOPE_DATA" (
"ID" NUMBER(20) NOT NULL ,
"MENU_ID" NUMBER(20) ,
@ -1446,31 +1463,89 @@ COMMENT ON COLUMN "BLADE_SCOPE_DATA"."STATUS" IS '状态';
COMMENT ON COLUMN "BLADE_SCOPE_DATA"."IS_DELETED" IS '是否已删除';
COMMENT ON TABLE "BLADE_SCOPE_DATA" IS '数据权限表';
-- ----------------------------
-- Table structure for BLADE_SMS
-- ----------------------------
DROP TABLE "BLADE_SMS";
CREATE TABLE "BLADE_SMS" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
"CATEGORY" NUMBER(11) ,
"SMS_CODE" VARCHAR2(12 BYTE) ,
"TEMPLATE_ID" VARCHAR2(64 BYTE) ,
"ACCESS_KEY" NVARCHAR2(255) ,
"SECRET_KEY" NVARCHAR2(255) ,
"REGION_ID" NVARCHAR2(255) ,
"SIGN_NAME" VARCHAR2(64 BYTE) ,
"REMARK" NVARCHAR2(255) ,
"CREATE_USER" NUMBER(20) ,
"CREATE_DEPT" NUMBER(20) ,
"CREATE_TIME" DATE ,
"UPDATE_USER" NUMBER(20) ,
"UPDATE_TIME" DATE ,
"STATUS" NUMBER(11) ,
"IS_DELETED" NUMBER(11)
)
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_SMS"."ID" IS '主键';
COMMENT ON COLUMN "BLADE_SMS"."TENANT_ID" IS '租户ID';
COMMENT ON COLUMN "BLADE_SMS"."CATEGORY" IS '分类';
COMMENT ON COLUMN "BLADE_SMS"."SMS_CODE" IS '资源编号';
COMMENT ON COLUMN "BLADE_SMS"."TEMPLATE_ID" IS '模板ID';
COMMENT ON COLUMN "BLADE_SMS"."ACCESS_KEY" IS 'accessKey';
COMMENT ON COLUMN "BLADE_SMS"."SECRET_KEY" IS 'secretKey';
COMMENT ON COLUMN "BLADE_SMS"."REGION_ID" IS 'regionId';
COMMENT ON COLUMN "BLADE_SMS"."SIGN_NAME" IS '短信签名';
COMMENT ON COLUMN "BLADE_SMS"."REMARK" IS '备注';
COMMENT ON COLUMN "BLADE_SMS"."CREATE_USER" IS '创建人';
COMMENT ON COLUMN "BLADE_SMS"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "BLADE_SMS"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "BLADE_SMS"."UPDATE_USER" IS '修改人';
COMMENT ON COLUMN "BLADE_SMS"."UPDATE_TIME" IS '修改时间';
COMMENT ON COLUMN "BLADE_SMS"."STATUS" IS '状态';
COMMENT ON COLUMN "BLADE_SMS"."IS_DELETED" IS '是否已删除';
COMMENT ON TABLE "BLADE_SMS" IS '短信配置表';
-- ----------------------------
-- Table structure for BLADE_TENANT
-- ----------------------------
-- DROP TABLE "BLADE_TENANT";
DROP TABLE "BLADE_TENANT";
CREATE TABLE "BLADE_TENANT" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
"TENANT_NAME" NVARCHAR2(50) NOT NULL ,
"DOMAIN" VARCHAR2(255 BYTE) ,
"BACKGROUND_URL" VARCHAR2(1000 BYTE) ,
"LINKMAN" NVARCHAR2(20) ,
"CONTACT_NUMBER" NVARCHAR2(20) ,
"ADDRESS" NVARCHAR2(255) ,
"ACCOUNT_NUMBER" NUMBER DEFAULT -1 ,
"EXPIRE_TIME" DATE ,
"CREATE_USER" NUMBER(20) ,
"CREATE_DEPT" NUMBER(20) ,
"CREATE_TIME" DATE ,
"UPDATE_USER" NUMBER(20) ,
"UPDATE_TIME" DATE ,
"STATUS" NUMBER(11) ,
"IS_DELETED" NUMBER(11)
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
"TENANT_NAME" NVARCHAR2(50) NOT NULL ,
"DOMAIN" VARCHAR2(255 BYTE) ,
"BACKGROUND_URL" VARCHAR2(1000 BYTE) ,
"LINKMAN" NVARCHAR2(20) ,
"CONTACT_NUMBER" NVARCHAR2(20) ,
"ADDRESS" NVARCHAR2(255) ,
"ACCOUNT_NUMBER" NUMBER DEFAULT -1 ,
"EXPIRE_TIME" DATE ,
"CREATE_USER" NUMBER(20) ,
"CREATE_DEPT" NUMBER(20) ,
"CREATE_TIME" DATE ,
"UPDATE_USER" NUMBER(20) ,
"UPDATE_TIME" DATE ,
"STATUS" NUMBER(11) ,
"IS_DELETED" NUMBER(11)
)
TABLESPACE "BLADEX"
LOGGING
TABLESPACE "BLADEX"
LOGGING
NOCOMPRESS
PCTFREE 10
INITRANS 1
@ -1513,7 +1588,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_TOP_MENU
-- ----------------------------
-- DROP TABLE "BLADE_TOP_MENU";
DROP TABLE "BLADE_TOP_MENU";
CREATE TABLE "BLADE_TOP_MENU" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -1563,7 +1638,7 @@ COMMENT ON TABLE "BLADE_TOP_MENU" IS '顶部菜单表';
-- ----------------------------
-- Table structure for BLADE_TOP_MENU_SETTING
-- ----------------------------
-- DROP TABLE "BLADE_TOP_MENU_SETTING";
DROP TABLE "BLADE_TOP_MENU_SETTING";
CREATE TABLE "BLADE_TOP_MENU_SETTING" (
"ID" NUMBER(20) NOT NULL ,
"TOP_MENU_ID" NUMBER(20) ,
@ -1593,7 +1668,7 @@ COMMENT ON TABLE "BLADE_TOP_MENU_SETTING" IS '顶部菜单配置表';
-- ----------------------------
-- Table structure for BLADE_USER
-- ----------------------------
-- DROP TABLE "BLADE_USER";
DROP TABLE "BLADE_USER";
CREATE TABLE "BLADE_USER" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
@ -1665,7 +1740,7 @@ COMMIT;
-- ----------------------------
-- Table structure for BLADE_USER_DEPT
-- ----------------------------
-- DROP TABLE "BLADE_USER_DEPT";
DROP TABLE "BLADE_USER_DEPT";
CREATE TABLE "BLADE_USER_DEPT" (
"ID" NUMBER(20) NOT NULL ,
"USER_ID" NUMBER(20) ,
@ -1754,6 +1829,15 @@ ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020617" CHECK ("ACCESS_TOKEN_VA
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020618" CHECK ("REFRESH_TOKEN_VALIDITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020619" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0020620" CHECK ("IS_DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0022203" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0022204" CHECK ("CLIENT_ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0022205" CHECK ("CLIENT_SECRET" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0022206" CHECK ("SCOPE" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0022207" CHECK ("AUTHORIZED_GRANT_TYPES" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0022208" CHECK ("ACCESS_TOKEN_VALIDITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0022209" CHECK ("REFRESH_TOKEN_VALIDITY" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0022210" CHECK ("STATUS" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CLIENT" ADD CONSTRAINT "SYS_C0022211" CHECK ("IS_DELETED" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_CODE
@ -1768,6 +1852,7 @@ ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0017228" CHECK ("ID" IS NOT NULL)
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;
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0020621" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_CODE" ADD CONSTRAINT "SYS_C0022212" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DATASOURCE
@ -1781,6 +1866,7 @@ ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0017300" CHECK ("ID" IS NOT
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;
ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0020622" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DATASOURCE" ADD CONSTRAINT "SYS_C0022213" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DEPT
@ -1795,6 +1881,7 @@ ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0017229" CHECK ("ID" IS NOT NULL)
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;
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0020623" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DEPT" ADD CONSTRAINT "SYS_C0022214" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DICT
@ -1809,6 +1896,7 @@ ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0017230" CHECK ("ID" IS NOT NULL)
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;
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0020624" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT" ADD CONSTRAINT "SYS_C0022215" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_DICT_BIZ
@ -1821,6 +1909,7 @@ ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0019412" PRIMARY KEY ("ID");
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;
ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0020625" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_DICT_BIZ" ADD CONSTRAINT "SYS_C0022216" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_LOG_API
@ -1835,6 +1924,7 @@ ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0017231" CHECK ("ID" IS NOT NUL
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;
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0020626" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_API" ADD CONSTRAINT "SYS_C0022217" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_LOG_ERROR
@ -1849,6 +1939,7 @@ ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0017232" CHECK ("ID" IS NOT N
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;
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0020627" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_ERROR" ADD CONSTRAINT "SYS_C0022218" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_LOG_USUAL
@ -1863,6 +1954,7 @@ ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0017233" CHECK ("ID" IS NOT N
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;
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0020628" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_LOG_USUAL" ADD CONSTRAINT "SYS_C0022219" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_MENU
@ -1877,6 +1969,7 @@ ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0017234" CHECK ("ID" IS NOT NULL)
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;
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0020629" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_MENU" ADD CONSTRAINT "SYS_C0022220" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_NOTICE
@ -1891,6 +1984,7 @@ ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0017235" CHECK ("ID" IS NOT NULL
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;
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0020630" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_NOTICE" ADD CONSTRAINT "SYS_C0022221" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_OSS
@ -1905,6 +1999,7 @@ ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0017236" CHECK ("ID" IS NOT NULL) N
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;
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0020631" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_OSS" ADD CONSTRAINT "SYS_C0022222" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_PARAM
@ -1919,6 +2014,7 @@ ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0017237" CHECK ("ID" IS NOT NULL)
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;
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0020632" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PARAM" ADD CONSTRAINT "SYS_C0022223" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_PROCESS_LEAVE
@ -1933,6 +2029,7 @@ ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0017238" CHECK ("ID" IS N
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;
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0020633" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_PROCESS_LEAVE" ADD CONSTRAINT "SYS_C0022224" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_ROLE
@ -1947,6 +2044,7 @@ ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0017239" CHECK ("ID" IS NOT NULL)
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;
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0020634" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE" ADD CONSTRAINT "SYS_C0022225" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_ROLE_MENU
@ -1961,6 +2059,7 @@ ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0017240" CHECK ("ID" IS NOT N
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;
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0020635" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_MENU" ADD CONSTRAINT "SYS_C0022226" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_ROLE_SCOPE
@ -1975,6 +2074,7 @@ ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0017241" CHECK ("ID" IS NOT
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;
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0020636" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_ROLE_SCOPE" ADD CONSTRAINT "SYS_C0022227" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_SCOPE_API
@ -1989,6 +2089,7 @@ ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0017242" CHECK ("ID" IS NOT N
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;
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0020637" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_API" ADD CONSTRAINT "SYS_C0022228" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_SCOPE_DATA
@ -2003,6 +2104,17 @@ ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0017243" CHECK ("ID" IS NOT
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;
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0020638" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_SCOPE_DATA" ADD CONSTRAINT "SYS_C0022229" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_SMS
-- ----------------------------
ALTER TABLE "BLADE_SMS" ADD CONSTRAINT "SYS_C0022420" PRIMARY KEY ("ID");
-- ----------------------------
-- Checks structure for table BLADE_SMS
-- ----------------------------
ALTER TABLE "BLADE_SMS" ADD CONSTRAINT "SYS_C0022419" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_TENANT
@ -2022,6 +2134,8 @@ ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019649" CHECK ("ID" IS NOT NULL
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0019650" CHECK ("TENANT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0020639" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0020640" CHECK ("TENANT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0022230" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TENANT" ADD CONSTRAINT "SYS_C0022231" CHECK ("TENANT_NAME" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_TOP_MENU
@ -2036,6 +2150,7 @@ ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0017246" CHECK ("ID" IS NOT NU
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;
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0020641" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU" ADD CONSTRAINT "SYS_C0022232" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_TOP_MENU_SETTING
@ -2050,6 +2165,7 @@ ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0017247" CHECK ("ID" I
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;
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0020642" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_TOP_MENU_SETTING" ADD CONSTRAINT "SYS_C0022233" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_USER
@ -2064,6 +2180,7 @@ ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0017248" CHECK ("ID" IS NOT NULL)
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;
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0020643" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER" ADD CONSTRAINT "SYS_C0022234" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
-- ----------------------------
-- Primary Key structure for table BLADE_USER_DEPT
@ -2075,3 +2192,4 @@ ALTER TABLE "BLADE_USER_DEPT" ADD CONSTRAINT "SYS_C0019771" PRIMARY KEY ("ID");
-- ----------------------------
ALTER TABLE "BLADE_USER_DEPT" ADD CONSTRAINT "SYS_C0019770" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER_DEPT" ADD CONSTRAINT "SYS_C0020644" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;
ALTER TABLE "BLADE_USER_DEPT" ADD CONSTRAINT "SYS_C0022235" CHECK ("ID" IS NOT NULL) NOT DEFERRABLE INITIALLY IMMEDIATE NORELY VALIDATE;

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

@ -12,7 +12,7 @@
Target Server Version : 110001
File Encoding : 65001
Date: 02/01/2020 13:56:12
Date: 22/02/2020 00:47:58
*/
@ -269,9 +269,14 @@ INSERT INTO "blade_dict" VALUES (1123598814738675241, 1123598814738675240, 'scop
INSERT INTO "blade_dict" VALUES (1123598814738675242, 1123598814738675240, 'scope_category', '2', '接口权限', 2, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738676224, 0, 'oss', '-1', '对象存储类型', 6, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738676225, 1123598814738676224, 'oss', '1', 'minio', 1, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738676226, 1123598814738676224, 'oss', '2', 'qiniu', 2, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738676227, 1123598814738676224, 'oss', '3', 'ali', 3, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738676228, 1123598814738676224, 'oss', '4', 'tencent', 4, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738677220, 0, 'sms', '-1', '短信服务类型', 11, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738676226, 1123598814738676224, 'oss', '2', '七牛云', 2, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738677222, 1123598814738677220, 'sms', '2', '七牛云', 2, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738677221, 1123598814738677220, 'sms', '1', '云片', 1, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738676227, 1123598814738676224, 'oss', '3', '阿里云', 3, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738677223, 1123598814738677220, 'sms', '3', '阿里云', 3, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738677224, 1123598814738677220, 'sms', '4', '腾讯云', 4, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738676228, 1123598814738676224, 'oss', '4', '腾讯云', 4, NULL, 0, 0);
COMMIT;
-- ----------------------------
@ -613,7 +618,13 @@ INSERT INTO "blade_menu" VALUES (1164733379658963252, 1164733379658963251, 'dict
INSERT INTO "blade_menu" VALUES (1164733379658963253, 1164733379658963251, 'dictbiz_edit', '修改', 'edit', '/system/dictbiz/edit', 'form', 2, 2, 2, 1, '', 0);
INSERT INTO "blade_menu" VALUES (1164733379658963254, 1164733379658963251, 'dictbiz_delete', '删除', 'delete', '/api/blade-system/dict-biz/remove', 'delete', 3, 2, 3, 1, '', 0);
INSERT INTO "blade_menu" VALUES (1164733379658963255, 1164733379658963251, 'dictbiz_view', '查看', 'view', '/system/dictbiz/view', 'file-text', 4, 2, 2, 1, '', 0);
INSERT INTO "blade_menu" VALUES (1164733389658963251, 1123598815738675298, 'xxljob', '任务调度', 'menu', 'http://localhost:7009/xxl-job-admin', 'iconfont iconicon_cspace', 2, 1, 0, 2, '', 0);
INSERT INTO "blade_menu" VALUES (1164733389658962251, 1123598815738675298, 'sms', '短信配置', 'menu', '/resource/sms', 'iconfont iconicon_message', 2, 1, 0, 1, NULL, 0);
INSERT INTO "blade_menu" VALUES (1164733389658962252, 1164733389658962251, 'sms_add', '新增', 'add', '/resource/sms/add', 'plus', 1, 2, 1, 1, NULL, 0);
INSERT INTO "blade_menu" VALUES (1164733389658962253, 1164733389658962251, 'sms_edit', '修改', 'edit', '/resource/sms/edit', 'form', 2, 2, 2, 1, NULL, 0);
INSERT INTO "blade_menu" VALUES (1164733389658962254, 1164733389658962251, 'sms_delete', '删除', 'delete', '/api/blade-resource/sms/remove', 'delete', 3, 2, 3, 1, NULL, 0);
INSERT INTO "blade_menu" VALUES (1164733389658962255, 1164733389658962251, 'sms_view', '查看', 'view', '/resource/sms/view', 'file-text', 4, 2, 2, 1, NULL, 0);
INSERT INTO "blade_menu" VALUES (1164733389658962256, 1164733389658962251, 'sms_enable', '启用', 'enable', '/api/blade-resource/sms/enable', 'key', 5, 2, 2, 2, NULL, 0);
INSERT INTO "blade_menu" VALUES (1164733389658963251, 1123598815738675298, 'xxljob', '任务调度', 'menu', 'http://localhost:7009/xxl-job-admin', 'iconfont iconicon_cspace', 3, 1, 0, 2, '', 0);
COMMIT;
-- ----------------------------
@ -1076,6 +1087,12 @@ INSERT INTO "blade_role_menu" VALUES (1161272793873322993, 1164733379658963253,
INSERT INTO "blade_role_menu" VALUES (1161272793873322994, 1164733379658963254, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272793873322995, 1164733379658963255, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272893873322991, 1164733389658963251, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272893873222991, 1164733389658962251, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272893873222992, 1164733389658962252, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272893873222993, 1164733389658962253, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272893873222994, 1164733389658962254, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272893873222995, 1164733389658962255, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272893873222996, 1164733389658962256, 1123598816738675201);
COMMIT;
-- ----------------------------
@ -1175,6 +1192,49 @@ COMMENT ON COLUMN "blade_scope_data"."status" IS '状态';
COMMENT ON COLUMN "blade_scope_data"."is_deleted" IS '是否已删除';
COMMENT ON TABLE "blade_scope_data" IS '数据权限表';
-- ----------------------------
-- Table structure for blade_sms
-- ----------------------------
DROP TABLE IF EXISTS "blade_sms";
CREATE TABLE "blade_sms" (
"id" int8 NOT NULL,
"tenant_id" varchar(12) COLLATE "pg_catalog"."default",
"category" int4,
"sms_code" varchar(12) COLLATE "pg_catalog"."default",
"template_id" varchar(64) COLLATE "pg_catalog"."default",
"access_key" varchar(255) COLLATE "pg_catalog"."default",
"secret_key" varchar(255) COLLATE "pg_catalog"."default",
"region_id" varchar(255) COLLATE "pg_catalog"."default",
"sign_name" varchar(64) COLLATE "pg_catalog"."default",
"remark" varchar(255) COLLATE "pg_catalog"."default",
"create_user" int8,
"create_dept" int8,
"create_time" timestamp(6),
"update_user" int8,
"update_time" timestamp(6),
"status" int4,
"is_deleted" int4
)
;
COMMENT ON COLUMN "blade_sms"."id" IS '主键';
COMMENT ON COLUMN "blade_sms"."tenant_id" IS '租户ID';
COMMENT ON COLUMN "blade_sms"."category" IS '分类';
COMMENT ON COLUMN "blade_sms"."sms_code" IS '资源编号';
COMMENT ON COLUMN "blade_sms"."template_id" IS '模板ID';
COMMENT ON COLUMN "blade_sms"."access_key" IS 'accessKey';
COMMENT ON COLUMN "blade_sms"."secret_key" IS 'secretKey';
COMMENT ON COLUMN "blade_sms"."region_id" IS 'regionId';
COMMENT ON COLUMN "blade_sms"."sign_name" IS '短信签名';
COMMENT ON COLUMN "blade_sms"."remark" IS '备注';
COMMENT ON COLUMN "blade_sms"."create_user" IS '创建人';
COMMENT ON COLUMN "blade_sms"."create_dept" IS '创建部门';
COMMENT ON COLUMN "blade_sms"."create_time" IS '创建时间';
COMMENT ON COLUMN "blade_sms"."update_user" IS '修改人';
COMMENT ON COLUMN "blade_sms"."update_time" IS '修改时间';
COMMENT ON COLUMN "blade_sms"."status" IS '状态';
COMMENT ON COLUMN "blade_sms"."is_deleted" IS '是否已删除';
COMMENT ON TABLE "blade_sms" IS '短信配置表';
-- ----------------------------
-- Table structure for blade_tenant
-- ----------------------------
@ -1454,6 +1514,11 @@ ALTER TABLE "blade_scope_api" ADD CONSTRAINT "blade_scope_api_pkey" PRIMARY KEY
-- ----------------------------
ALTER TABLE "blade_scope_data" ADD CONSTRAINT "blade_scope_data_pkey" PRIMARY KEY ("id");
-- ----------------------------
-- Primary Key structure for table blade_sms
-- ----------------------------
ALTER TABLE "blade_sms" ADD CONSTRAINT "blade_sms_pkey" PRIMARY KEY ("id");
-- ----------------------------
-- Primary Key structure for table blade_tenant
-- ----------------------------

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

@ -12,7 +12,7 @@
Target Server Version : 110001
File Encoding : 65001
Date: 02/01/2020 13:56:57
Date: 22/02/2020 00:49:07
*/
@ -269,9 +269,14 @@ INSERT INTO "blade_dict" VALUES (1123598814738675241, 1123598814738675240, 'scop
INSERT INTO "blade_dict" VALUES (1123598814738675242, 1123598814738675240, 'scope_category', '2', '接口权限', 2, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738676224, 0, 'oss', '-1', '对象存储类型', 6, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738676225, 1123598814738676224, 'oss', '1', 'minio', 1, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738676226, 1123598814738676224, 'oss', '2', 'qiniu', 2, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738676227, 1123598814738676224, 'oss', '3', 'ali', 3, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738676228, 1123598814738676224, 'oss', '4', 'tencent', 4, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738677220, 0, 'sms', '-1', '短信服务类型', 11, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738676226, 1123598814738676224, 'oss', '2', '七牛云', 2, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738676227, 1123598814738676224, 'oss', '3', '阿里云', 3, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738677223, 1123598814738677220, 'sms', '3', '阿里云', 3, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738677221, 1123598814738677220, 'sms', '1', '云片', 1, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738677222, 1123598814738677220, 'sms', '2', '七牛云', 2, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738677224, 1123598814738677220, 'sms', '4', '腾讯云', 4, NULL, 0, 0);
INSERT INTO "blade_dict" VALUES (1123598814738676228, 1123598814738676224, 'oss', '4', '腾讯云', 4, NULL, 0, 0);
COMMIT;
-- ----------------------------
@ -611,7 +616,13 @@ INSERT INTO "blade_menu" VALUES (1164733379658963252, 1164733379658963251, 'dict
INSERT INTO "blade_menu" VALUES (1164733379658963253, 1164733379658963251, 'dictbiz_edit', '修改', 'edit', '/system/dictbiz/edit', 'form', 2, 2, 2, 1, '', 0);
INSERT INTO "blade_menu" VALUES (1164733379658963254, 1164733379658963251, 'dictbiz_delete', '删除', 'delete', '/api/blade-system/dict-biz/remove', 'delete', 3, 2, 3, 1, '', 0);
INSERT INTO "blade_menu" VALUES (1164733379658963255, 1164733379658963251, 'dictbiz_view', '查看', 'view', '/system/dictbiz/view', 'file-text', 4, 2, 2, 1, '', 0);
INSERT INTO "blade_menu" VALUES (1164733389658963251, 1123598815738675298, 'xxljob', '任务调度', 'menu', 'http://localhost:7009/xxl-job-admin', '', 2, 1, 0, 2, '', 0);
INSERT INTO "blade_menu" VALUES (1164733389658962252, 1164733389658962251, 'sms_add', '新增', 'add', '/resource/sms/add', 'plus', 1, 2, 1, 1, NULL, 0);
INSERT INTO "blade_menu" VALUES (1164733389658962251, 1123598815738675298, 'sms', '短信配置', 'menu', '/resource/sms', '', 2, 1, 0, 1, NULL, 0);
INSERT INTO "blade_menu" VALUES (1164733389658962253, 1164733389658962251, 'sms_edit', '修改', 'edit', '/resource/sms/edit', 'form', 2, 2, 2, 1, NULL, 0);
INSERT INTO "blade_menu" VALUES (1164733389658962254, 1164733389658962251, 'sms_delete', '删除', 'delete', '/api/blade-resource/sms/remove', 'delete', 3, 2, 3, 1, NULL, 0);
INSERT INTO "blade_menu" VALUES (1164733389658962255, 1164733389658962251, 'sms_view', '查看', 'view', '/resource/sms/view', 'file-text', 4, 2, 2, 1, NULL, 0);
INSERT INTO "blade_menu" VALUES (1164733389658962256, 1164733389658962251, 'sms_enable', '启用', 'enable', '/api/blade-resource/sms/enable', 'key', 5, 2, 2, 2, NULL, 0);
INSERT INTO "blade_menu" VALUES (1164733389658963251, 1123598815738675298, 'xxljob', '任务调度', 'menu', 'http://localhost:7009/xxl-job-admin', '', 3, 1, 0, 2, '', 0);
COMMIT;
-- ----------------------------
@ -1074,6 +1085,12 @@ INSERT INTO "blade_role_menu" VALUES (1161272793873322993, 1164733379658963253,
INSERT INTO "blade_role_menu" VALUES (1161272793873322994, 1164733379658963254, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272793873322995, 1164733379658963255, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272893873322991, 1164733389658963251, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272893873222991, 1164733389658962251, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272893873222992, 1164733389658962252, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272893873222993, 1164733389658962253, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272893873222994, 1164733389658962254, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272893873222995, 1164733389658962255, 1123598816738675201);
INSERT INTO "blade_role_menu" VALUES (1161272893873222996, 1164733389658962256, 1123598816738675201);
COMMIT;
-- ----------------------------
@ -1173,28 +1190,71 @@ COMMENT ON COLUMN "blade_scope_data"."status" IS '状态';
COMMENT ON COLUMN "blade_scope_data"."is_deleted" IS '是否已删除';
COMMENT ON TABLE "blade_scope_data" IS '数据权限表';
-- ----------------------------
-- Table structure for blade_sms
-- ----------------------------
DROP TABLE IF EXISTS "blade_sms";
CREATE TABLE "blade_sms" (
"id" int8 NOT NULL,
"tenant_id" varchar(12) COLLATE "pg_catalog"."default",
"category" int4,
"sms_code" varchar(12) COLLATE "pg_catalog"."default",
"template_id" varchar(64) COLLATE "pg_catalog"."default",
"access_key" varchar(255) COLLATE "pg_catalog"."default",
"secret_key" varchar(255) COLLATE "pg_catalog"."default",
"region_id" varchar(255) COLLATE "pg_catalog"."default",
"sign_name" varchar(64) COLLATE "pg_catalog"."default",
"remark" varchar(255) COLLATE "pg_catalog"."default",
"create_user" int8,
"create_dept" int8,
"create_time" timestamp(6),
"update_user" int8,
"update_time" timestamp(6),
"status" int4,
"is_deleted" int4
)
;
COMMENT ON COLUMN "blade_sms"."id" IS '主键';
COMMENT ON COLUMN "blade_sms"."tenant_id" IS '租户ID';
COMMENT ON COLUMN "blade_sms"."category" IS '分类';
COMMENT ON COLUMN "blade_sms"."sms_code" IS '资源编号';
COMMENT ON COLUMN "blade_sms"."template_id" IS '模板ID';
COMMENT ON COLUMN "blade_sms"."access_key" IS 'accessKey';
COMMENT ON COLUMN "blade_sms"."secret_key" IS 'secretKey';
COMMENT ON COLUMN "blade_sms"."region_id" IS 'regionId';
COMMENT ON COLUMN "blade_sms"."sign_name" IS '短信签名';
COMMENT ON COLUMN "blade_sms"."remark" IS '备注';
COMMENT ON COLUMN "blade_sms"."create_user" IS '创建人';
COMMENT ON COLUMN "blade_sms"."create_dept" IS '创建部门';
COMMENT ON COLUMN "blade_sms"."create_time" IS '创建时间';
COMMENT ON COLUMN "blade_sms"."update_user" IS '修改人';
COMMENT ON COLUMN "blade_sms"."update_time" IS '修改时间';
COMMENT ON COLUMN "blade_sms"."status" IS '状态';
COMMENT ON COLUMN "blade_sms"."is_deleted" IS '是否已删除';
COMMENT ON TABLE "blade_sms" IS '短信配置表';
-- ----------------------------
-- Table structure for blade_tenant
-- ----------------------------
DROP TABLE IF EXISTS "blade_tenant";
CREATE TABLE "blade_tenant" (
"id" int8 NOT NULL,
"tenant_id" varchar(12) COLLATE "pg_catalog"."default",
"tenant_name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
"domain" varchar(255) COLLATE "pg_catalog"."default",
"background_url" varchar(1000) COLLATE "pg_catalog"."default",
"linkman" varchar(20) COLLATE "pg_catalog"."default",
"contact_number" varchar(20) COLLATE "pg_catalog"."default",
"address" varchar(255) COLLATE "pg_catalog"."default",
"account_number" int2 DEFAULT '-1'::integer,
"expire_time" timestamp(6),
"create_user" int8,
"create_dept" int8,
"create_time" timestamp(6),
"update_user" int8,
"update_time" timestamp(6),
"status" int4,
"is_deleted" int4
"id" int8 NOT NULL,
"tenant_id" varchar(12) COLLATE "pg_catalog"."default",
"tenant_name" varchar(50) COLLATE "pg_catalog"."default" NOT NULL,
"domain" varchar(255) COLLATE "pg_catalog"."default",
"background_url" varchar(1000) COLLATE "pg_catalog"."default",
"linkman" varchar(20) COLLATE "pg_catalog"."default",
"contact_number" varchar(20) COLLATE "pg_catalog"."default",
"address" varchar(255) COLLATE "pg_catalog"."default",
"account_number" int2 DEFAULT '-1'::integer,
"expire_time" timestamp(6),
"create_user" int8,
"create_dept" int8,
"create_time" timestamp(6),
"update_user" int8,
"update_time" timestamp(6),
"status" int4,
"is_deleted" int4
)
;
COMMENT ON COLUMN "blade_tenant"."id" IS '主键';
@ -1452,6 +1512,11 @@ ALTER TABLE "blade_scope_api" ADD CONSTRAINT "blade_scope_api_pkey" PRIMARY KEY
-- ----------------------------
ALTER TABLE "blade_scope_data" ADD CONSTRAINT "blade_scope_data_pkey" PRIMARY KEY ("id");
-- ----------------------------
-- Primary Key structure for table blade_sms
-- ----------------------------
ALTER TABLE "blade_sms" ADD CONSTRAINT "blade_sms_pkey" PRIMARY KEY ("id");
-- ----------------------------
-- Primary Key structure for table blade_tenant
-- ----------------------------

73
doc/sql/update/mysql-update-2.3.1~2.4.0.sql

@ -1,5 +1,76 @@
-- ----------------------------
-- 增加资源编号字段
-- ----------------------------
ALTER TABLE `bladex`.`blade_oss`
ALTER TABLE `blade_oss`
ADD COLUMN `oss_code` varchar(32) NULL COMMENT '资源编号' AFTER `category`;
-- ----------------------------
-- 增加短信配置表
-- ----------------------------
CREATE TABLE `blade_sms` (
`id` bigint(64) NOT NULL COMMENT '主键',
`tenant_id` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
`category` int(2) NULL DEFAULT NULL COMMENT '分类',
`sms_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源编号',
`template_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '模板ID',
`access_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'accessKey',
`secret_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'secretKey',
`region_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'regionId',
`sign_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '短信签名',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`create_user` bigint(64) NULL DEFAULT NULL COMMENT '创建人',
`create_dept` bigint(64) NULL DEFAULT NULL COMMENT '创建部门',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`update_user` bigint(64) NULL DEFAULT NULL COMMENT '修改人',
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
`status` int(2) NULL DEFAULT NULL COMMENT '状态',
`is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除',
PRIMARY KEY (`id`)
) COMMENT = '短信配置表';
-- ----------------------------
-- 增加短信配置菜单数据
-- ----------------------------
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1164733389658962251', '1123598815738675298', 'sms', '短信配置', 'menu', '/resource/sms', 'iconfont iconicon_message', 2, 1, 0, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1164733389658962252', '1164733389658962251', 'sms_add', '新增', 'add', '/resource/sms/add', 'plus', 1, 2, 1, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1164733389658962253', '1164733389658962251', 'sms_edit', '修改', 'edit', '/resource/sms/edit', 'form', 2, 2, 2, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1164733389658962254', '1164733389658962251', 'sms_delete', '删除', 'delete', '/api/blade-resource/sms/remove', 'delete', 3, 2, 3, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1164733389658962255', '1164733389658962251', 'sms_view', '查看', 'view', '/resource/sms/view', 'file-text', 4, 2, 2, 1, NULL, 0);
INSERT INTO `blade_menu`(`id`, `parent_id`, `code`, `name`, `alias`, `path`, `source`, `sort`, `category`, `action`, `is_open`, `remark`, `is_deleted`)
VALUES ('1164733389658962256', '1164733389658962251', 'sms_enable', '启用', 'enable', '/api/blade-resource/sms/enable', 'key', 5, 2, 2, 2, NULL, 0);
-- ----------------------------
-- 增加短信配置菜单权限数据
-- ----------------------------
INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`)
VALUES ('1161272893873222991', '1164733389658962251', '1123598816738675201');
INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`)
VALUES ('1161272893873222992', '1164733389658962252', '1123598816738675201');
INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`)
VALUES ('1161272893873222993', '1164733389658962253', '1123598816738675201');
INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`)
VALUES ('1161272893873222994', '1164733389658962254', '1123598816738675201');
INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`)
VALUES ('1161272893873222995', '1164733389658962255', '1123598816738675201');
INSERT INTO `blade_role_menu`(`id`,`menu_id`,`role_id`)
VALUES ('1161272893873222996', '1164733389658962256', '1123598816738675201');
-- ----------------------------
-- 增加短信配置字典数据
-- ----------------------------
INSERT INTO `blade_dict`(`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`)
VALUES (1123598814738677220, 0, 'sms', '-1', '短信服务类型', 11, NULL, 0, 0);
INSERT INTO `blade_dict`(`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`)
VALUES (1123598814738677221, 1123598814738677220, 'sms', '1', 'yunpian', 1, NULL, 0, 0);
INSERT INTO `blade_dict`(`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`)
VALUES (1123598814738677222, 1123598814738677220, 'sms', '2', 'qiniu', 2, NULL, 0, 0);
INSERT INTO `blade_dict`(`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`)
VALUES (1123598814738677223, 1123598814738677220, 'sms', '3', 'ali', 3, NULL, 0, 0);
INSERT INTO `blade_dict`(`id`, `parent_id`, `code`, `dict_key`, `dict_value`, `sort`, `remark`, `is_sealed`, `is_deleted`)
VALUES (1123598814738677224, 1123598814738677220, 'sms', '4', 'tencent', 4, NULL, 0, 0);

89
doc/sql/update/oracle-update-2.3.1~2.4.0.sql

@ -5,3 +5,92 @@ ALTER TABLE "BLADEX"."BLADE_OSS"
ADD ("OSS_CODE" VARCHAR2(32) );
COMMENT ON COLUMN "BLADEX"."BLADE_OSS"."OSS_CODE" IS '资源编号'
-- ----------------------------
-- 增加短信配置表
-- ----------------------------
CREATE TABLE "BLADEX"."BLADE_SMS" (
"ID" NUMBER(20) NOT NULL ,
"TENANT_ID" NVARCHAR2(12) ,
"CATEGORY" NUMBER(11) ,
"SMS_CODE" VARCHAR2(12) ,
"TEMPLATE_ID" VARCHAR2(64) ,
"ACCESS_KEY" NVARCHAR2(255) ,
"SECRET_KEY" NVARCHAR2(255) ,
"REGION_ID" NVARCHAR2(255) ,
"SIGN_NAME" VARCHAR2(64) ,
"REMARK" NVARCHAR2(255) ,
"CREATE_USER" NUMBER(20) ,
"CREATE_DEPT" NUMBER(20) ,
"CREATE_TIME" DATE ,
"UPDATE_USER" NUMBER(20) ,
"UPDATE_TIME" DATE ,
"STATUS" NUMBER(11) ,
"IS_DELETED" NUMBER(11) ,
PRIMARY KEY ("ID")
)
;
COMMENT ON COLUMN "BLADEX"."BLADE_SMS"."ID" IS '主键';
COMMENT ON COLUMN "BLADEX"."BLADE_SMS"."TENANT_ID" IS '租户ID';
COMMENT ON COLUMN "BLADEX"."BLADE_SMS"."CATEGORY" IS '分类';
COMMENT ON COLUMN "BLADEX"."BLADE_SMS"."SMS_CODE" IS '资源编号';
COMMENT ON COLUMN "BLADEX"."BLADE_SMS"."TEMPLATE_ID" IS '模板ID';
COMMENT ON COLUMN "BLADEX"."BLADE_SMS"."ACCESS_KEY" IS 'accessKey';
COMMENT ON COLUMN "BLADEX"."BLADE_SMS"."SECRET_KEY" IS 'secretKey';
COMMENT ON COLUMN "BLADEX"."BLADE_SMS"."REGION_ID" IS 'regionId';
COMMENT ON COLUMN "BLADEX"."BLADE_SMS"."SIGN_NAME" IS '短信签名';
COMMENT ON COLUMN "BLADEX"."BLADE_SMS"."REMARK" IS '备注';
COMMENT ON COLUMN "BLADEX"."BLADE_SMS"."CREATE_USER" IS '创建人';
COMMENT ON COLUMN "BLADEX"."BLADE_SMS"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "BLADEX"."BLADE_SMS"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "BLADEX"."BLADE_SMS"."UPDATE_USER" IS '修改人';
COMMENT ON COLUMN "BLADEX"."BLADE_SMS"."UPDATE_TIME" IS '修改时间';
COMMENT ON COLUMN "BLADEX"."BLADE_SMS"."STATUS" IS '状态';
COMMENT ON COLUMN "BLADEX"."BLADE_SMS"."IS_DELETED" IS '是否已删除';
COMMENT ON TABLE "BLADEX"."BLADE_SMS" IS '短信配置表';
-- ----------------------------
-- 增加短信配置菜单数据
-- ----------------------------
INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED")
VALUES ('1164733389658962251', '1123598815738675298', 'sms', '短信配置', 'menu', '/resource/sms', 'iconfont iconicon_message', 2, 1, 0, 1, NULL, 0);
INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED")
VALUES ('1164733389658962252', '1164733389658962251', 'sms_add', '新增', 'add', '/resource/sms/add', 'plus', 1, 2, 1, 1, NULL, 0);
INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED")
VALUES ('1164733389658962253', '1164733389658962251', 'sms_edit', '修改', 'edit', '/resource/sms/edit', 'form', 2, 2, 2, 1, NULL, 0);
INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED")
VALUES ('1164733389658962254', '1164733389658962251', 'sms_delete', '删除', 'delete', '/api/blade-resource/sms/remove', 'delete', 3, 2, 3, 1, NULL, 0);
INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED")
VALUES ('1164733389658962255', '1164733389658962251', 'sms_view', '查看', 'view', '/resource/sms/view', 'file-text', 4, 2, 2, 1, NULL, 0);
INSERT INTO "BLADEX"."BLADE_MENU"("ID", "PARENT_ID", "CODE", "NAME", "ALIAS", "PATH", "SOURCE", "SORT", "CATEGORY", "ACTION", "IS_OPEN", "REMARK", "IS_DELETED")
VALUES ('1164733389658962256', '1164733389658962251', 'sms_enable', '启用', 'enable', '/api/blade-resource/sms/enable', 'key', 5, 2, 2, 2, NULL, 0);
-- ----------------------------
-- 增加短信配置菜单权限数据
-- ----------------------------
INSERT INTO "BLADEX"."BLADE_ROLE_MENU"(ID,MENU_ID,ROLE_ID)
VALUES ('1161272893873222991', '1164733389658962251', '1123598816738675201');
INSERT INTO "BLADEX"."BLADE_ROLE_MENU"(ID,MENU_ID,ROLE_ID)
VALUES ('1161272893873222992', '1164733389658962252', '1123598816738675201');
INSERT INTO "BLADEX"."BLADE_ROLE_MENU"(ID,MENU_ID,ROLE_ID)
VALUES ('1161272893873222993', '1164733389658962253', '1123598816738675201');
INSERT INTO "BLADEX"."BLADE_ROLE_MENU"(ID,MENU_ID,ROLE_ID)
VALUES ('1161272893873222994', '1164733389658962254', '1123598816738675201');
INSERT INTO "BLADEX"."BLADE_ROLE_MENU"(ID,MENU_ID,ROLE_ID)
VALUES ('1161272893873222995', '1164733389658962255', '1123598816738675201');
INSERT INTO "BLADEX"."BLADE_ROLE_MENU"(ID,MENU_ID,ROLE_ID)
VALUES ('1161272893873222996', '1164733389658962256', '1123598816738675201');
-- ----------------------------
-- 增加短信配置字典数据
-- ----------------------------
INSERT INTO "BLADEX"."BLADE_DICT"("ID", "PARENT_ID", "CODE", "DICT_KEY", "DICT_VALUE", "SORT", "REMARK", "IS_SEALED", "IS_DELETED")
VALUES (1123598814738677220, 0, 'sms', '-1', '短信服务类型', 11, NULL, 0, 0);
INSERT INTO "BLADEX"."BLADE_DICT"("ID", "PARENT_ID", "CODE", "DICT_KEY", "DICT_VALUE", "SORT", "REMARK", "IS_SEALED", "IS_DELETED")
VALUES (1123598814738677221, 1123598814738677220, 'sms', '1', 'yunpian', 1, NULL, 0, 0);
INSERT INTO "BLADEX"."BLADE_DICT"("ID", "PARENT_ID", "CODE", "DICT_KEY", "DICT_VALUE", "SORT", "REMARK", "IS_SEALED", "IS_DELETED")
VALUES (1123598814738677222, 1123598814738677220, 'sms', '2', 'qiniu', 2, NULL, 0, 0);
INSERT INTO "BLADEX"."BLADE_DICT"("ID", "PARENT_ID", "CODE", "DICT_KEY", "DICT_VALUE", "SORT", "REMARK", "IS_SEALED", "IS_DELETED")
VALUES (1123598814738677223, 1123598814738677220, 'sms', '3', 'ali', 3, NULL, 0, 0);
INSERT INTO "BLADEX"."BLADE_DICT"("ID", "PARENT_ID", "CODE", "DICT_KEY", "DICT_VALUE", "SORT", "REMARK", "IS_SEALED", "IS_DELETED")
VALUES (1123598814738677224, 1123598814738677220, 'sms', '4', 'tencent', 4, NULL, 0, 0);

90
doc/sql/update/postgresql-update-2.3.1~2.4.0.sql

@ -5,3 +5,93 @@ ALTER TABLE "public"."blade_oss"
ADD COLUMN "oss_code" varchar(32);
COMMENT ON COLUMN "public"."blade_oss"."oss_code" IS '资源编号';
-- ----------------------------
-- 增加短信配置表
-- ----------------------------
CREATE TABLE "public"."blade_sms" (
"id" int8 NOT NULL,
"tenant_id" varchar(12) COLLATE "pg_catalog"."default",
"category" int4,
"sms_code" varchar(12),
"template_id" varchar(64),
"access_key" varchar(255) COLLATE "pg_catalog"."default",
"secret_key" varchar(255) COLLATE "pg_catalog"."default",
"region_id" varchar(255),
"sign_name" varchar(64),
"remark" varchar(255) COLLATE "pg_catalog"."default",
"create_user" int8,
"create_dept" int8,
"create_time" timestamp(6),
"update_user" int8,
"update_time" timestamp(6),
"status" int4,
"is_deleted" int4,
PRIMARY KEY ("id")
)
;
COMMENT ON COLUMN "public"."blade_sms"."id" IS '主键';
COMMENT ON COLUMN "public"."blade_sms"."tenant_id" IS '租户ID';
COMMENT ON COLUMN "public"."blade_sms"."category" IS '分类';
COMMENT ON COLUMN "public"."blade_sms"."sms_code" IS '资源编号';
COMMENT ON COLUMN "public"."blade_sms"."template_id" IS '模板ID';
COMMENT ON COLUMN "public"."blade_sms"."access_key" IS 'accessKey';
COMMENT ON COLUMN "public"."blade_sms"."secret_key" IS 'secretKey';
COMMENT ON COLUMN "public"."blade_sms"."region_id" IS 'regionId';
COMMENT ON COLUMN "public"."blade_sms"."sign_name" IS '短信签名';
COMMENT ON COLUMN "public"."blade_sms"."remark" IS '备注';
COMMENT ON COLUMN "public"."blade_sms"."create_user" IS '创建人';
COMMENT ON COLUMN "public"."blade_sms"."create_dept" IS '创建部门';
COMMENT ON COLUMN "public"."blade_sms"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."blade_sms"."update_user" IS '修改人';
COMMENT ON COLUMN "public"."blade_sms"."update_time" IS '修改时间';
COMMENT ON COLUMN "public"."blade_sms"."status" IS '状态';
COMMENT ON COLUMN "public"."blade_sms"."is_deleted" IS '是否已删除';
COMMENT ON TABLE "public"."blade_sms" IS '短信配置表';
-- ----------------------------
-- 增加短信配置菜单数据
-- ----------------------------
INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted")
VALUES ('1164733389658962251', '1123598815738675298', 'sms', '短信配置', 'menu', '/resource/sms', 'iconfont iconicon_message', 2, 1, 0, 1, NULL, 0);
INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted")
VALUES ('1164733389658962252', '1164733389658962251', 'sms_add', '新增', 'add', '/resource/sms/add', 'plus', 1, 2, 1, 1, NULL, 0);
INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted")
VALUES ('1164733389658962253', '1164733389658962251', 'sms_edit', '修改', 'edit', '/resource/sms/edit', 'form', 2, 2, 2, 1, NULL, 0);
INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted")
VALUES ('1164733389658962254', '1164733389658962251', 'sms_delete', '删除', 'delete', '/api/blade-resource/sms/remove', 'delete', 3, 2, 3, 1, NULL, 0);
INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted")
VALUES ('1164733389658962255', '1164733389658962251', 'sms_view', '查看', 'view', '/resource/sms/view', 'file-text', 4, 2, 2, 1, NULL, 0);
INSERT INTO "blade_menu"("id", "parent_id", "code", "name", "alias", "path", "source", "sort", "category", "action", "is_open", "remark", "is_deleted")
VALUES ('1164733389658962256', '1164733389658962251', 'sms_enable', '启用', 'enable', '/api/blade-resource/sms/enable', 'key', 5, 2, 2, 2, NULL, 0);
-- ----------------------------
-- 增加短信配置菜单权限数据
-- ----------------------------
INSERT INTO "blade_role_menu"("id","menu_id","role_id")
VALUES (1161272893873222991, 1164733389658962251, 1123598816738675201);
INSERT INTO "blade_role_menu"("id","menu_id","role_id")
VALUES (1161272893873222992, 1164733389658962252, 1123598816738675201);
INSERT INTO "blade_role_menu"("id","menu_id","role_id")
VALUES (1161272893873222993, 1164733389658962253, 1123598816738675201);
INSERT INTO "blade_role_menu"("id","menu_id","role_id")
VALUES (1161272893873222994, 1164733389658962254, 1123598816738675201);
INSERT INTO "blade_role_menu"("id","menu_id","role_id")
VALUES (1161272893873222995, 1164733389658962255, 1123598816738675201);
INSERT INTO "blade_role_menu"("id","menu_id","role_id")
VALUES (1161272893873222996, 1164733389658962256, 1123598816738675201);
-- ----------------------------
-- 增加短信配置字典数据
-- ----------------------------
INSERT INTO "blade_dict"("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "is_deleted")
VALUES (1123598814738677220, 0, 'sms', '-1', '短信服务类型', 11, NULL, 0, 0);
INSERT INTO "blade_dict"("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "is_deleted")
VALUES (1123598814738677221, 1123598814738677220, 'sms', '1', 'yunpian', 1, NULL, 0, 0);
INSERT INTO "blade_dict"("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "is_deleted")
VALUES (1123598814738677222, 1123598814738677220, 'sms', '2', 'qiniu', 2, NULL, 0, 0);
INSERT INTO "blade_dict"("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "is_deleted")
VALUES (1123598814738677223, 1123598814738677220, 'sms', '3', 'ali', 3, NULL, 0, 0);
INSERT INTO "blade_dict"("id", "parent_id", "code", "dict_key", "dict_value", "sort", "remark", "is_sealed", "is_deleted")
VALUES (1123598814738677224, 1123598814738677220, 'sms', '4', 'tencent', 4, NULL, 0, 0);

Loading…
Cancel
Save