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. 518
      doc/sql/oracle/bladex-saber-oracle.sql
  35. 350
      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

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

File diff suppressed because it is too large Load Diff

350
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 ,
@ -38,7 +38,7 @@ CREATE TABLE "BLADE_CLIENT" (
"UPDATE_USER" NUMBER(20) ,
"UPDATE_TIME" DATE ,
"STATUS" NUMBER(11) NOT NULL ,
"IS_DELETED" NUMBER(11) NOT NULL
"IS_DELETED" NUMBER(11) NOT NULL
)
TABLESPACE "BLADEX"
LOGGING
@ -46,8 +46,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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) ,
@ -101,7 +101,7 @@ CREATE TABLE "BLADE_CODE" (
"WRAP_MODE" NUMBER(11) ,
"API_PATH" NCLOB ,
"WEB_PATH" NCLOB ,
"IS_DELETED" NUMBER(11)
"IS_DELETED" NUMBER(11)
)
TABLESPACE "BLADEX"
LOGGING
@ -109,8 +109,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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) ,
@ -158,7 +158,7 @@ CREATE TABLE "BLADE_DATASOURCE" (
"UPDATE_USER" NUMBER(20) ,
"UPDATE_TIME" DATE ,
"STATUS" NUMBER(11) ,
"IS_DELETED" NUMBER(11)
"IS_DELETED" NUMBER(11)
)
TABLESPACE "BLADEX"
LOGGING
@ -166,8 +166,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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) ,
@ -214,7 +214,7 @@ CREATE TABLE "BLADE_DEPT" (
"FULL_NAME" NVARCHAR2(45) ,
"SORT" NUMBER(11) ,
"REMARK" NVARCHAR2(255) ,
"IS_DELETED" NUMBER(11)
"IS_DELETED" NUMBER(11)
)
TABLESPACE "BLADEX"
LOGGING
@ -222,8 +222,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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) ,
@ -265,7 +265,7 @@ CREATE TABLE "BLADE_DICT" (
"SORT" NUMBER(11) ,
"REMARK" NVARCHAR2(255) ,
"IS_SEALED" NUMBER(11) ,
"IS_DELETED" NUMBER(11)
"IS_DELETED" NUMBER(11)
)
TABLESPACE "BLADEX"
LOGGING
@ -273,8 +273,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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) ,
@ -357,7 +362,7 @@ CREATE TABLE "BLADE_DICT_BIZ" (
"SORT" NUMBER(11) ,
"REMARK" NVARCHAR2(255) ,
"IS_SEALED" NUMBER(11) ,
"IS_DELETED" NUMBER(11)
"IS_DELETED" NUMBER(11)
)
TABLESPACE "BLADEX"
LOGGING
@ -365,8 +370,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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) ,
@ -409,7 +414,7 @@ CREATE TABLE "BLADE_LOG_API" (
"PARAMS" NCLOB ,
"TIME" NVARCHAR2(64) ,
"CREATE_BY" NVARCHAR2(64) ,
"CREATE_TIME" DATE
"CREATE_TIME" DATE
)
TABLESPACE "BLADEX"
LOGGING
@ -417,8 +422,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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) ,
@ -471,7 +476,7 @@ CREATE TABLE "BLADE_LOG_ERROR" (
"METHOD_NAME" NVARCHAR2(255) ,
"PARAMS" NCLOB ,
"CREATE_BY" NVARCHAR2(64) ,
"CREATE_TIME" DATE
"CREATE_TIME" DATE
)
TABLESPACE "BLADEX"
LOGGING
@ -479,8 +484,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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) ,
@ -533,7 +538,7 @@ CREATE TABLE "BLADE_LOG_USUAL" (
"USER_AGENT" NVARCHAR2(1000) ,
"PARAMS" NCLOB ,
"CREATE_BY" NVARCHAR2(64) ,
"CREATE_TIME" DATE
"CREATE_TIME" DATE
)
TABLESPACE "BLADEX"
LOGGING
@ -541,8 +546,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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) ,
@ -588,7 +593,7 @@ CREATE TABLE "BLADE_MENU" (
"ACTION" NUMBER(11) ,
"IS_OPEN" NUMBER(11) ,
"REMARK" NVARCHAR2(255) ,
"IS_DELETED" NUMBER(11)
"IS_DELETED" NUMBER(11)
)
TABLESPACE "BLADEX"
LOGGING
@ -596,8 +601,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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) ,
@ -774,7 +785,7 @@ CREATE TABLE "BLADE_NOTICE" (
"UPDATE_USER" NUMBER(20) ,
"UPDATE_TIME" DATE ,
"STATUS" NUMBER(11) ,
"IS_DELETED" NUMBER(11)
"IS_DELETED" NUMBER(11)
)
TABLESPACE "BLADEX"
LOGGING
@ -782,8 +793,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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) ,
@ -837,7 +848,7 @@ CREATE TABLE "BLADE_OSS" (
"UPDATE_USER" NUMBER(20) ,
"UPDATE_TIME" DATE ,
"STATUS" NUMBER(11) ,
"IS_DELETED" NUMBER(11)
"IS_DELETED" NUMBER(11)
)
TABLESPACE "BLADEX"
LOGGING
@ -845,8 +856,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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) ,
@ -898,7 +909,7 @@ CREATE TABLE "BLADE_PARAM" (
"UPDATE_USER" NUMBER(20) ,
"UPDATE_TIME" DATE ,
"STATUS" NUMBER(11) ,
"IS_DELETED" NUMBER(11)
"IS_DELETED" NUMBER(11)
)
TABLESPACE "BLADEX"
LOGGING
@ -906,8 +917,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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) ,
@ -956,7 +967,7 @@ CREATE TABLE "BLADE_PROCESS_LEAVE" (
"UPDATE_USER" NUMBER(20) ,
"UPDATE_TIME" DATE ,
"STATUS" NUMBER(11) ,
"IS_DELETED" NUMBER(11)
"IS_DELETED" NUMBER(11)
)
TABLESPACE "BLADEX"
LOGGING
@ -964,8 +975,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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) ,
@ -1002,7 +1013,7 @@ CREATE TABLE "BLADE_ROLE" (
"ROLE_NAME" NVARCHAR2(255) ,
"SORT" NUMBER(11) ,
"ROLE_ALIAS" NVARCHAR2(255) ,
"IS_DELETED" NUMBER(11)
"IS_DELETED" NUMBER(11)
)
TABLESPACE "BLADEX"
LOGGING
@ -1010,8 +1021,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -1042,11 +1053,11 @@ 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) ,
"ROLE_ID" NUMBER(20)
"ROLE_ID" NUMBER(20)
)
TABLESPACE "BLADEX"
LOGGING
@ -1054,8 +1065,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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,17 +1314,22 @@ 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) ,
"SCOPE_ID" NUMBER(20) ,
"ROLE_ID" NUMBER(20)
"ROLE_ID" NUMBER(20)
)
TABLESPACE "BLADEX"
LOGGING
@ -1320,8 +1337,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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) ,
@ -1354,7 +1371,7 @@ CREATE TABLE "BLADE_SCOPE_API" (
"UPDATE_USER" NUMBER(20) ,
"UPDATE_TIME" DATE ,
"STATUS" NUMBER(11) ,
"IS_DELETED" NUMBER(11)
"IS_DELETED" NUMBER(11)
)
TABLESPACE "BLADEX"
LOGGING
@ -1362,8 +1379,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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) ,
@ -1409,7 +1426,7 @@ CREATE TABLE "BLADE_SCOPE_DATA" (
"UPDATE_USER" NUMBER(20) ,
"UPDATE_TIME" DATE ,
"STATUS" NUMBER(11) ,
"IS_DELETED" NUMBER(11)
"IS_DELETED" NUMBER(11)
)
TABLESPACE "BLADEX"
LOGGING
@ -1417,8 +1434,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -1446,37 +1463,95 @@ 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
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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) ,
@ -1527,7 +1602,7 @@ CREATE TABLE "BLADE_TOP_MENU" (
"UPDATE_USER" NUMBER(20) ,
"UPDATE_TIME" DATE ,
"STATUS" NUMBER(11) ,
"IS_DELETED" NUMBER(11)
"IS_DELETED" NUMBER(11)
)
TABLESPACE "BLADEX"
LOGGING
@ -1535,8 +1610,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -1563,11 +1638,11 @@ 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) ,
"MENU_ID" NUMBER(20)
"MENU_ID" NUMBER(20)
)
TABLESPACE "BLADEX"
LOGGING
@ -1575,8 +1650,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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) ,
@ -1614,7 +1689,7 @@ CREATE TABLE "BLADE_USER" (
"UPDATE_USER" NUMBER(20) ,
"UPDATE_TIME" DATE ,
"STATUS" NUMBER(11) ,
"IS_DELETED" NUMBER(11)
"IS_DELETED" NUMBER(11)
)
TABLESPACE "BLADEX"
LOGGING
@ -1622,8 +1697,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -1665,11 +1740,11 @@ 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) ,
"DEPT_ID" NUMBER(20)
"DEPT_ID" NUMBER(20)
)
TABLESPACE "BLADEX"
LOGGING
@ -1677,8 +1752,8 @@ NOCOMPRESS
PCTFREE 10
INITRANS 1
STORAGE (
INITIAL 65536
NEXT 1048576
INITIAL 65536
NEXT 1048576
MINEXTENTS 1
MAXEXTENTS 2147483645
BUFFER_POOL DEFAULT
@ -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