Quellcode durchsuchen

bladex升级到3.2.0

huitong vor 2 Jahren
Ursprung
Commit
8c4d519a22
100 geänderte Dateien mit 1790 neuen und 2197 gelöschten Zeilen
  1. 0 15
      admin/Dockerfile
  2. 2 1
      admin/README.md
  3. 82 34
      admin/pom.xml
  4. 1 1
      admin/src/main/java/org/springblade/common/config/BladeConfiguration.java
  5. 1 1
      admin/src/main/java/org/springblade/common/constant/CommonConstant.java
  6. 1 1
      admin/src/main/java/org/springblade/modules/auth/endpoint/BladeTokenEndPoint.java
  7. 2 1
      admin/src/main/java/org/springblade/modules/auth/granter/RefreshTokenGranter.java
  8. 3 0
      admin/src/main/java/org/springblade/modules/desk/controller/NoticeController.java
  9. 0 193
      admin/src/main/java/org/springblade/modules/develop/controller/CodeController.java
  10. 0 128
      admin/src/main/java/org/springblade/modules/develop/controller/DatasourceController.java
  11. 0 251
      admin/src/main/java/org/springblade/modules/develop/controller/ModelController.java
  12. 0 137
      admin/src/main/java/org/springblade/modules/develop/controller/ModelPrototypeController.java
  13. 0 180
      admin/src/main/java/org/springblade/modules/develop/entity/Code.java
  14. 0 71
      admin/src/main/java/org/springblade/modules/develop/entity/Datasource.java
  15. 0 74
      admin/src/main/java/org/springblade/modules/develop/entity/Model.java
  16. 0 119
      admin/src/main/java/org/springblade/modules/develop/entity/ModelPrototype.java
  17. 0 29
      admin/src/main/java/org/springblade/modules/develop/mapper/CodeMapper.java
  18. 0 22
      admin/src/main/java/org/springblade/modules/develop/mapper/CodeMapper.xml
  19. 0 29
      admin/src/main/java/org/springblade/modules/develop/mapper/DatasourceMapper.java
  20. 0 22
      admin/src/main/java/org/springblade/modules/develop/mapper/DatasourceMapper.xml
  21. 0 29
      admin/src/main/java/org/springblade/modules/develop/mapper/ModelMapper.java
  22. 0 27
      admin/src/main/java/org/springblade/modules/develop/mapper/ModelMapper.xml
  23. 0 29
      admin/src/main/java/org/springblade/modules/develop/mapper/ModelPrototypeMapper.java
  24. 0 35
      admin/src/main/java/org/springblade/modules/develop/mapper/ModelPrototypeMapper.xml
  25. 0 29
      admin/src/main/java/org/springblade/modules/develop/service/IDatasourceService.java
  26. 0 39
      admin/src/main/java/org/springblade/modules/develop/service/IModelService.java
  27. 0 33
      admin/src/main/java/org/springblade/modules/develop/service/impl/DatasourceServiceImpl.java
  28. 0 55
      admin/src/main/java/org/springblade/modules/develop/service/impl/ModelPrototypeServiceImpl.java
  29. 0 67
      admin/src/main/java/org/springblade/modules/develop/service/impl/ModelServiceImpl.java
  30. 20 37
      admin/src/main/java/org/springblade/modules/resource/builder/oss/OssBuilder.java
  31. 21 30
      admin/src/main/java/org/springblade/modules/resource/builder/sms/SmsBuilder.java
  32. 5 2
      admin/src/main/java/org/springblade/modules/resource/config/BladeOssConfiguration.java
  33. 5 2
      admin/src/main/java/org/springblade/modules/resource/config/BladeSmsConfiguration.java
  34. 1 1
      admin/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
  35. 1 1
      admin/src/main/java/org/springblade/modules/resource/endpoint/SmsEndpoint.java
  36. 35 13
      admin/src/main/java/org/springblade/modules/develop/dto/ModelDTO.java
  37. 64 0
      admin/src/main/java/org/springblade/modules/resource/rule/context/SmsContext.java
  38. 19 9
      admin/src/main/java/org/springblade/modules/resource/builder/oss/AliOssBuilder.java
  39. 78 0
      admin/src/main/java/org/springblade/modules/resource/rule/oss/AmazonS3Rule.java
  40. 58 0
      admin/src/main/java/org/springblade/modules/resource/rule/oss/FinallyOssRule.java
  41. 73 0
      admin/src/main/java/org/springblade/modules/resource/rule/oss/HuaweiObsRule.java
  42. 21 8
      admin/src/main/java/org/springblade/modules/resource/builder/oss/MinioOssBuilder.java
  43. 53 0
      admin/src/main/java/org/springblade/modules/resource/rule/oss/OssBuildRule.java
  44. 15 13
      admin/src/main/java/org/springblade/modules/develop/service/impl/CodeServiceImpl.java
  45. 45 0
      admin/src/main/java/org/springblade/modules/resource/rule/oss/OssDataRule.java
  46. 48 0
      admin/src/main/java/org/springblade/modules/resource/rule/oss/OssReadRule.java
  47. 15 27
      admin/src/main/java/org/springblade/common/enums/ycwh/InformationTypeEnum.java
  48. 52 0
      admin/src/main/java/org/springblade/modules/resource/rule/oss/PreOssRule.java
  49. 21 7
      admin/src/main/java/org/springblade/modules/resource/builder/oss/QiniuOssBuilder.java
  50. 19 8
      admin/src/main/java/org/springblade/modules/resource/builder/oss/TencentOssBuilder.java
  51. 20 8
      admin/src/main/java/org/springblade/modules/resource/builder/sms/AliSmsBuilder.java
  52. 52 0
      admin/src/main/java/org/springblade/modules/resource/rule/sms/CacheSmsRule.java
  53. 58 0
      admin/src/main/java/org/springblade/modules/resource/rule/sms/FinallySmsRule.java
  54. 52 0
      admin/src/main/java/org/springblade/modules/resource/rule/sms/PreSmsRule.java
  55. 19 8
      admin/src/main/java/org/springblade/modules/resource/builder/sms/QiniuSmsBuilder.java
  56. 53 0
      admin/src/main/java/org/springblade/modules/resource/rule/sms/SmsBuildRule.java
  57. 19 8
      admin/src/main/java/org/springblade/modules/resource/builder/sms/TencentSmsBuilder.java
  58. 19 8
      admin/src/main/java/org/springblade/modules/resource/builder/sms/YunpianSmsBuilder.java
  59. 1 1
      admin/src/main/java/org/springblade/modules/resource/utils/SmsUtil.java
  60. 2 3
      admin/src/main/java/org/springblade/modules/system/controller/DeptController.java
  61. 91 0
      admin/src/main/java/org/springblade/modules/system/rule/TenantContext.java
  62. 53 0
      admin/src/main/java/org/springblade/modules/system/rule/TenantDeptRule.java
  63. 81 0
      admin/src/main/java/org/springblade/modules/system/rule/TenantDictBizRule.java
  64. 23 21
      admin/src/main/java/org/springblade/modules/develop/service/IModelPrototypeService.java
  65. 79 0
      admin/src/main/java/org/springblade/modules/system/rule/TenantRoleMenuRule.java
  66. 48 0
      admin/src/main/java/org/springblade/modules/system/rule/TenantRoleRule.java
  67. 71 0
      admin/src/main/java/org/springblade/modules/system/rule/TenantRule.java
  68. 63 0
      admin/src/main/java/org/springblade/modules/system/rule/TenantUserRule.java
  69. 40 127
      admin/src/main/java/org/springblade/modules/system/service/impl/TenantServiceImpl.java
  70. 15 15
      admin/src/main/java/org/springblade/modules/ycwh/controller/pc/AccountController.java
  71. 15 15
      admin/src/main/java/org/springblade/modules/ycwh/controller/pc/CollectInfoController.java
  72. 15 15
      admin/src/main/java/org/springblade/modules/ycwh/controller/pc/DocumentInfoController.java
  73. 15 15
      admin/src/main/java/org/springblade/modules/ycwh/controller/pc/FamousDishController.java
  74. 15 15
      admin/src/main/java/org/springblade/modules/ycwh/controller/pc/FamousLocationController.java
  75. 15 15
      admin/src/main/java/org/springblade/modules/ycwh/controller/pc/FamousStoreController.java
  76. 15 15
      admin/src/main/java/org/springblade/modules/ycwh/controller/pc/FeedbackController.java
  77. 15 15
      admin/src/main/java/org/springblade/modules/ycwh/controller/pc/InformationInfoController.java
  78. 15 15
      admin/src/main/java/org/springblade/modules/ycwh/controller/pc/MemberInfoController.java
  79. 15 15
      admin/src/main/java/org/springblade/modules/ycwh/controller/pc/ProfessionalStyleController.java
  80. 1 1
      admin/src/main/java/org/springblade/modules/ycwh/dto/AccountDTO.java
  81. 1 1
      admin/src/main/java/org/springblade/modules/ycwh/dto/CollectInfoDTO.java
  82. 1 1
      admin/src/main/java/org/springblade/modules/ycwh/dto/DocumentInfoDTO.java
  83. 1 1
      admin/src/main/java/org/springblade/modules/ycwh/dto/FamousDishDTO.java
  84. 1 1
      admin/src/main/java/org/springblade/modules/ycwh/dto/FamousLocationDTO.java
  85. 1 1
      admin/src/main/java/org/springblade/modules/ycwh/dto/FamousStoreDTO.java
  86. 1 1
      admin/src/main/java/org/springblade/modules/ycwh/dto/FeedbackDTO.java
  87. 1 1
      admin/src/main/java/org/springblade/modules/ycwh/dto/InformationInfoDTO.java
  88. 1 1
      admin/src/main/java/org/springblade/modules/ycwh/dto/MemberInfoDTO.java
  89. 1 1
      admin/src/main/java/org/springblade/modules/ycwh/dto/ProfessionalStyleDTO.java
  90. 2 4
      admin/src/main/java/org/springblade/modules/ycwh/excel/AccountExcel.java
  91. 2 4
      admin/src/main/java/org/springblade/modules/ycwh/excel/CollectInfoExcel.java
  92. 3 5
      admin/src/main/java/org/springblade/modules/ycwh/excel/DocumentInfoExcel.java
  93. 3 5
      admin/src/main/java/org/springblade/modules/ycwh/excel/FamousDishExcel.java
  94. 2 3
      admin/src/main/java/org/springblade/modules/ycwh/excel/FamousLocationExcel.java
  95. 3 5
      admin/src/main/java/org/springblade/modules/ycwh/excel/FamousStoreExcel.java
  96. 2 4
      admin/src/main/java/org/springblade/modules/ycwh/excel/FeedbackExcel.java
  97. 2 4
      admin/src/main/java/org/springblade/modules/ycwh/excel/InformationInfoExcel.java
  98. 3 4
      admin/src/main/java/org/springblade/modules/ycwh/excel/MemberInfoExcel.java
  99. 3 5
      admin/src/main/java/org/springblade/modules/ycwh/excel/ProfessionalStyleExcel.java
  100. 0 0
      admin/src/main/java/org/springblade/modules/ycwh/mapper/AccountMapper.java

+ 0 - 15
admin/Dockerfile

@@ -1,15 +0,0 @@
-FROM bladex/alpine-java:openjdk8-openj9_cn_slim
-
-MAINTAINER smallchill@163.com
-
-RUN mkdir -p /blade
-
-WORKDIR /blade
-
-EXPOSE 8800
-
-ADD ./target/blade-api.jar ./app.jar
-
-ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
-
-CMD ["--spring.profiles.active=test"]

+ 2 - 1
admin/README.md

@@ -1 +1,2 @@
-## 综合阅卷平台后台
+## 版权声明
+* 珠海一职粤菜文化推广小程序Java后台

+ 82 - 34
admin/pom.xml

@@ -5,26 +5,25 @@
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>org.springblade</groupId>
-    <artifactId>MingCai</artifactId>
+    <artifactId>BladeX-Boot</artifactId>
     <packaging>jar</packaging>
-    <version>3.1.0.RELEASE</version>
+    <version>3.2.0.RELEASE</version>
 
     <properties>
         <bladex.project.id>blade-api</bladex.project.id>
-        <bladex.project.version>3.1.0.RELEASE</bladex.project.version>
+        <bladex.project.version>3.2.0.RELEASE</bladex.project.version>
 
         <java.version>1.8</java.version>
         <maven.plugin.version>3.8.1</maven.plugin.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 
-        <!-- 推荐使用Harbor -->
-        <docker.registry.url>192.168.0.157</docker.registry.url>
-        <docker.registry.host>http://${docker.registry.url}:2375</docker.registry.host>
+        <!-- Docker仓库服务配置 -->
+        <docker.registry.url>192.168.0.188</docker.registry.url>
         <docker.username>admin</docker.username>
-        <docker.password>Harbor12345</docker.password>
+        <docker.password>admin12345</docker.password>
         <docker.namespace>blade</docker.namespace>
-        <docker.plugin.version>1.4.13</docker.plugin.version>
+        <docker.fabric.version>0.42.0</docker.fabric.version>
     </properties>
 
     <dependencyManagement>
@@ -102,6 +101,7 @@
             <groupId>org.springblade</groupId>
             <artifactId>blade-starter-report</artifactId>
         </dependency>
+
         <!-- 验证码 -->
         <dependency>
             <groupId>com.github.whvcse</groupId>
@@ -143,6 +143,11 @@
             <groupId>com.aliyun</groupId>
             <artifactId>aliyun-java-sdk-core</artifactId>
         </dependency>
+        <!--华为云Obs-->
+        <dependency>
+            <groupId>com.huaweicloud</groupId>
+            <artifactId>esdk-obs-java</artifactId>
+        </dependency>
         <!--腾讯COS-->
         <dependency>
             <groupId>com.qcloud</groupId>
@@ -163,6 +168,36 @@
             <groupId>com.yunpian.sdk</groupId>
             <artifactId>yunpian-java-sdk</artifactId>
         </dependency>
+        <!-- liteflow -->
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-starter-liteflow</artifactId>
+        </dependency>
+        <!-- Oracle -->
+        <!--<dependency>
+            <groupId>com.oracle</groupId>
+            <artifactId>ojdbc7</artifactId>
+        </dependency>-->
+        <!-- PostgreSql -->
+        <!--<dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+        </dependency>-->
+        <!-- SqlServer -->
+        <!--<dependency>
+            <groupId>com.microsoft.sqlserver</groupId>
+            <artifactId>mssql-jdbc</artifactId>
+        </dependency>-->
+        <!-- DaMeng -->
+        <!--<dependency>
+            <groupId>com.dameng</groupId>
+            <artifactId>DmJdbcDriver18</artifactId>
+        </dependency>-->
+        <!--YashanDB-->
+        <!--<dependency>
+            <groupId>com.yashandb.jdbc</groupId>
+            <artifactId>yasdb-jdbc</artifactId>
+        </dependency>-->
         <!-- lombok -->
         <dependency>
             <groupId>org.projectlombok</groupId>
@@ -189,7 +224,7 @@
                 <plugin>
                     <groupId>org.springframework.boot</groupId>
                     <artifactId>spring-boot-maven-plugin</artifactId>
-                    <version>2.7.10</version>
+                    <version>2.7.11</version>
                     <configuration>
                         <finalName>${project.build.finalName}</finalName>
                     </configuration>
@@ -202,29 +237,28 @@
                     </executions>
                 </plugin>
                 <plugin>
-                    <groupId>com.spotify</groupId>
-                    <artifactId>dockerfile-maven-plugin</artifactId>
-                    <version>${docker.plugin.version}</version>
+                    <groupId>io.fabric8</groupId>
+                    <artifactId>docker-maven-plugin</artifactId>
+                    <version>${docker.fabric.version}</version>
                     <configuration>
-                        <username>${docker.username}</username>
-                        <password>${docker.password}</password>
-                        <repository>${docker.registry.url}/${docker.namespace}/${project.build.finalName}</repository>
-                        <tag>${project.version}</tag>
-                        <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+                        <authConfig>
+                            <username>${docker.username}</username>
+                            <password>${docker.password}</password>
+                        </authConfig>
+                        <registry>${docker.registry.url}</registry>
+                        <images>
+                            <image>
+                                <name>${docker.namespace}/${project.build.finalName}:${project.version}</name>
+                                <alias>${project.name}</alias>
+                                <build>
+                                    <dockerFile>${project.basedir}/Dockerfile</dockerFile>
+                                </build>
+                            </image>
+                        </images>
                         <buildArgs>
-                            <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
+                            <JAR_FILE>${basedir}/target/${project.build.finalName}.jar</JAR_FILE>
                         </buildArgs>
                     </configuration>
-                    <!--添加如下配置,运行 mvn deploy 命令便会自动打包镜像-->
-                    <!--<executions>
-                        <execution>
-                            <id>default</id>
-                            <goals>
-                                <goal>build</goal>
-                                <goal>push</goal>
-                            </goals>
-                        </execution>
-                    </executions>-->
                 </plugin>
             </plugins>
         </pluginManagement>
@@ -251,26 +285,40 @@
     <repositories>
         <repository>
             <id>aliyun-repos</id>
-            <url>https://maven.aliyun.com/repository/public/</url>
+            <name>Aliyun Public Repository</name>
+            <url>https://maven.aliyun.com/repository/public</url>
             <snapshots>
                 <enabled>false</enabled>
             </snapshots>
         </repository>
         <repository>
-            <id>blade-release</id>
-            <name>Release Repository</name>
-            <url>http://nexus.javablade.com/repository/maven-releases/</url>
+            <id>bladex</id>
+            <name>BladeX Release Repository</name>
+            <url>https://center.javablade.com/api/packages/blade/maven</url>
         </repository>
     </repositories>
-
     <pluginRepositories>
         <pluginRepository>
             <id>aliyun-plugin</id>
-            <url>https://maven.aliyun.com/repository/public/</url>
+            <name>Aliyun Public Plugin</name>
+            <url>https://maven.aliyun.com/repository/public</url>
             <snapshots>
                 <enabled>false</enabled>
             </snapshots>
         </pluginRepository>
     </pluginRepositories>
 
+    <distributionManagement>
+        <repository>
+            <id>bladex</id>
+            <name>BladeX Release Repository</name>
+            <url>https://center.javablade.com/api/packages/blade/maven</url>
+        </repository>
+        <snapshotRepository>
+            <id>bladex</id>
+            <name>BladeX Snapshot Repository</name>
+            <url>https://center.javablade.com/api/packages/blade/maven</url>
+        </snapshotRepository>
+    </distributionManagement>
+
 </project>

+ 1 - 1
admin/src/main/java/org/springblade/common/config/BladeConfiguration.java

@@ -60,7 +60,7 @@ public class BladeConfiguration implements WebMvcConfigurer {
 	@Override
 	public void addCorsMappings(CorsRegistry registry) {
 		registry.addMapping("/cors/**")
-			.allowedOrigins("*")
+			.allowedOriginPatterns("*")
 			.allowedHeaders("*")
 			.allowedMethods("*")
 			.maxAge(3600)

+ 1 - 1
admin/src/main/java/org/springblade/common/constant/CommonConstant.java

@@ -28,7 +28,7 @@ public interface CommonConstant {
 	/**
 	 * app name
 	 */
-	String APPLICATION_NAME = "yuecai";
+	String APPLICATION_NAME = AppConstant.APPLICATION_NAME_PREFIX + "api";
 
 	/**
 	 * sword 系统名

+ 1 - 1
admin/src/main/java/org/springblade/modules/auth/endpoint/BladeTokenEndPoint.java

@@ -112,7 +112,7 @@ public class BladeTokenEndPoint {
 		BladeUser user = AuthUtil.getUser();
 		if (user != null && jwtProperties.getState()) {
 			String token = JwtUtil.getToken(WebUtil.getRequest().getHeader(TokenConstant.HEADER));
-			JwtUtil.removeAccessToken(user.getTenantId(), String.valueOf(user.getUserId()), token);
+			JwtUtil.removeAccessToken(user.getTenantId(), user.getClientId(), String.valueOf(user.getUserId()), token);
 		}
 		return Kv.create().set("success", "true").set("msg", "success");
 	}

+ 2 - 1
admin/src/main/java/org/springblade/modules/auth/granter/RefreshTokenGranter.java

@@ -103,8 +103,9 @@ public class RefreshTokenGranter implements ITokenGranter {
 		if (jwtProperties.getState() && jwtProperties.getSingle()) {
 			Claims claims = JwtUtil.parseJWT(refreshToken);
 			String tenantId = String.valueOf(claims.get("tenant_id"));
+			String clientId = String.valueOf(claims.get("client_id"));
 			String userId = String.valueOf(claims.get("user_id"));
-			String token = JwtUtil.getRefreshToken(tenantId, userId, refreshToken);
+			String token = JwtUtil.getRefreshToken(tenantId, clientId, userId, refreshToken);
 			return StringUtil.equalsIgnoreCase(token, refreshToken);
 		}
 		return true;

+ 3 - 0
admin/src/main/java/org/springblade/modules/desk/controller/NoticeController.java

@@ -25,6 +25,8 @@ import org.springblade.core.boot.ctrl.BladeController;
 import org.springblade.core.launch.constant.AppConstant;
 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.secure.constant.AuthConstant;
 import org.springblade.core.tenant.annotation.TenantDS;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
@@ -42,6 +44,7 @@ import java.util.Map;
  *
  * @author Chill
  */
+@PreAuth(AuthConstant.HAS_CRYPTO)
 @TenantDS
 @RestController
 @RequestMapping(AppConstant.APPLICATION_DESK_NAME + "/notice")

+ 0 - 193
admin/src/main/java/org/springblade/modules/develop/controller/CodeController.java

@@ -1,193 +0,0 @@
-/*
- *      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.modules.develop.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import io.swagger.annotations.*;
-import lombok.AllArgsConstructor;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.launch.constant.AppConstant;
-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.tenant.annotation.NonDS;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.constant.RoleConstant;
-import org.springblade.core.tool.jackson.JsonUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.StringUtil;
-import org.springblade.develop.constant.DevelopConstant;
-import org.springblade.develop.support.BladeCodeGenerator;
-import org.springblade.modules.develop.entity.Code;
-import org.springblade.modules.develop.entity.Datasource;
-import org.springblade.modules.develop.entity.Model;
-import org.springblade.modules.develop.entity.ModelPrototype;
-import org.springblade.modules.develop.service.ICodeService;
-import org.springblade.modules.develop.service.IDatasourceService;
-import org.springblade.modules.develop.service.IModelPrototypeService;
-import org.springblade.modules.develop.service.IModelService;
-import org.springframework.web.bind.annotation.*;
-import springfox.documentation.annotations.ApiIgnore;
-
-import javax.validation.Valid;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 控制器
- *
- * @author Chill
- */
-@NonDS
-@ApiIgnore
-@RestController
-@AllArgsConstructor
-@RequestMapping(AppConstant.APPLICATION_DEVELOP_NAME + "/code")
-@Api(value = "代码生成", tags = "代码生成")
-@PreAuth(RoleConstant.HAS_ROLE_ADMINISTRATOR)
-public class CodeController extends BladeController {
-
-	private final ICodeService codeService;
-	private final IDatasourceService datasourceService;
-	private final IModelService modelService;
-	private final IModelPrototypeService modelPrototypeService;
-
-	/**
-	 * 详情
-	 */
-	@GetMapping("/detail")
-	@ApiOperationSupport(order = 1)
-	@ApiOperation(value = "详情", notes = "传入code")
-	public R<Code> detail(Code code) {
-		Code detail = codeService.getOne(Condition.getQueryWrapper(code));
-		return R.data(detail);
-	}
-
-	/**
-	 * 分页
-	 */
-	@GetMapping("/list")
-	@ApiImplicitParams({
-		@ApiImplicitParam(name = "codeName", value = "模块名", paramType = "query", dataType = "string"),
-		@ApiImplicitParam(name = "tableName", value = "表名", paramType = "query", dataType = "string"),
-		@ApiImplicitParam(name = "modelName", value = "实体名", paramType = "query", dataType = "string")
-	})
-	@ApiOperationSupport(order = 2)
-	@ApiOperation(value = "分页", notes = "传入code")
-	public R<IPage<Code>> list(@ApiIgnore @RequestParam Map<String, Object> code, Query query) {
-		IPage<Code> pages = codeService.page(Condition.getPage(query), Condition.getQueryWrapper(code, Code.class));
-		return R.data(pages);
-	}
-
-	/**
-	 * 新增或修改
-	 */
-	@PostMapping("/submit")
-	@ApiOperationSupport(order = 3)
-	@ApiOperation(value = "新增或修改", notes = "传入code")
-	public R submit(@Valid @RequestBody Code code) {
-		return R.status(codeService.submit(code));
-	}
-
-
-	/**
-	 * 删除
-	 */
-	@PostMapping("/remove")
-	@ApiOperationSupport(order = 4)
-	@ApiOperation(value = "删除", notes = "传入ids")
-	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
-		return R.status(codeService.removeByIds(Func.toLongList(ids)));
-	}
-
-	/**
-	 * 复制
-	 */
-	@PostMapping("/copy")
-	@ApiOperationSupport(order = 5)
-	@ApiOperation(value = "复制", notes = "传入id")
-	public R copy(@ApiParam(value = "主键", required = true) @RequestParam Long id) {
-		Code code = codeService.getById(id);
-		code.setId(null);
-		code.setCodeName(code.getCodeName() + "-copy");
-		return R.status(codeService.save(code));
-	}
-
-	/**
-	 * 代码生成
-	 */
-	@PostMapping("/gen-code")
-	@ApiOperationSupport(order = 6)
-	@ApiOperation(value = "代码生成", notes = "传入ids")
-	public R genCode(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
-		Collection<Code> codes = codeService.listByIds(Func.toLongList(ids));
-		codes.forEach(code -> {
-			BladeCodeGenerator generator = new BladeCodeGenerator();
-			// 设置基础模型
-			Model model = modelService.getById(code.getModelId());
-			generator.setModelCode(model.getModelCode());
-			generator.setModelClass(model.getModelClass());
-			// 设置模型集合
-			List<ModelPrototype> prototypes = modelPrototypeService.prototypeList(model.getId());
-			generator.setModel(JsonUtil.readMap(JsonUtil.toJson(model)));
-			generator.setPrototypes(JsonUtil.readListMap(JsonUtil.toJson(prototypes)));
-			if (StringUtil.isNotBlank(code.getSubModelId()) && StringUtil.equals(code.getTemplateType(), DevelopConstant.TEMPLATE_SUB)) {
-				Model subModel = modelService.getById(Func.toLong(code.getSubModelId()));
-				List<ModelPrototype> subPrototypes = modelPrototypeService.prototypeList(subModel.getId());
-				generator.setSubModel(JsonUtil.readMap(JsonUtil.toJson(subModel)));
-				generator.setSubPrototypes(JsonUtil.readListMap(JsonUtil.toJson(subPrototypes)));
-			}
-			// 设置数据源
-			Datasource datasource = datasourceService.getById(model.getDatasourceId());
-			generator.setDriverName(datasource.getDriverClass());
-			generator.setUrl(datasource.getUrl());
-			generator.setUsername(datasource.getUsername());
-			generator.setPassword(datasource.getPassword());
-			// 设置基础配置
-			generator.setCodeStyle(code.getCodeStyle());
-			generator.setCodeName(code.getCodeName());
-			generator.setServiceName(code.getServiceName());
-			generator.setPackageName(code.getPackageName());
-			generator.setPackageDir(code.getApiPath());
-			generator.setPackageWebDir(code.getWebPath());
-			generator.setTablePrefix(Func.toStrArray(code.getTablePrefix()));
-			generator.setIncludeTables(Func.toStrArray(code.getTableName()));
-			// 设置模版信息
-			generator.setTemplateType(code.getTemplateType());
-			generator.setAuthor(code.getAuthor());
-			generator.setSubModelId(code.getSubModelId());
-			generator.setSubFkId(code.getSubFkId());
-			generator.setTreeId(code.getTreeId());
-			generator.setTreePid(code.getTreePid());
-			generator.setTreeName(code.getTreeName());
-			// 设置是否继承基础业务字段
-			generator.setHasSuperEntity(code.getBaseMode() == 2);
-			// 设置是否开启包装器模式
-			generator.setHasWrapper(code.getWrapMode() == 2);
-			// 设置是否开启远程调用模式
-			generator.setHasFeign(code.getFeignMode() == 2);
-			// 设置控制器服务名前缀
-			generator.setHasServiceName(Boolean.TRUE);
-			// 启动代码生成
-			generator.run();
-		});
-		return R.success("代码生成成功");
-	}
-
-}

+ 0 - 128
admin/src/main/java/org/springblade/modules/develop/controller/DatasourceController.java

@@ -1,128 +0,0 @@
-/*
- *      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.modules.develop.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.launch.constant.AppConstant;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tenant.annotation.NonDS;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.develop.entity.Datasource;
-import org.springblade.modules.develop.service.IDatasourceService;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-import java.util.List;
-
-/**
- * 数据源配置表 控制器
- *
- * @author Chill
- */
-@NonDS
-@RestController
-@AllArgsConstructor
-@RequestMapping(AppConstant.APPLICATION_DEVELOP_NAME + "/datasource")
-@Api(value = "数据源配置表", tags = "数据源配置表接口")
-public class DatasourceController extends BladeController {
-
-	private final IDatasourceService datasourceService;
-
-	/**
-	 * 详情
-	 */
-	@GetMapping("/detail")
-	@ApiOperationSupport(order = 1)
-	@ApiOperation(value = "详情", notes = "传入datasource")
-	public R<Datasource> detail(Datasource datasource) {
-		Datasource detail = datasourceService.getOne(Condition.getQueryWrapper(datasource));
-		return R.data(detail);
-	}
-
-	/**
-	 * 分页 数据源配置表
-	 */
-	@GetMapping("/list")
-	@ApiOperationSupport(order = 2)
-	@ApiOperation(value = "分页", notes = "传入datasource")
-	public R<IPage<Datasource>> list(Datasource datasource, Query query) {
-		IPage<Datasource> pages = datasourceService.page(Condition.getPage(query), Condition.getQueryWrapper(datasource));
-		return R.data(pages);
-	}
-
-	/**
-	 * 新增 数据源配置表
-	 */
-	@PostMapping("/save")
-	@ApiOperationSupport(order = 4)
-	@ApiOperation(value = "新增", notes = "传入datasource")
-	public R save(@Valid @RequestBody Datasource datasource) {
-		return R.status(datasourceService.save(datasource));
-	}
-
-	/**
-	 * 修改 数据源配置表
-	 */
-	@PostMapping("/update")
-	@ApiOperationSupport(order = 5)
-	@ApiOperation(value = "修改", notes = "传入datasource")
-	public R update(@Valid @RequestBody Datasource datasource) {
-		return R.status(datasourceService.updateById(datasource));
-	}
-
-	/**
-	 * 新增或修改 数据源配置表
-	 */
-	@PostMapping("/submit")
-	@ApiOperationSupport(order = 6)
-	@ApiOperation(value = "新增或修改", notes = "传入datasource")
-	public R submit(@Valid @RequestBody Datasource datasource) {
-		datasource.setUrl(datasource.getUrl().replace("&amp;", "&"));
-		return R.status(datasourceService.saveOrUpdate(datasource));
-	}
-
-
-	/**
-	 * 删除 数据源配置表
-	 */
-	@PostMapping("/remove")
-	@ApiOperationSupport(order = 7)
-	@ApiOperation(value = "逻辑删除", notes = "传入ids")
-	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
-		return R.status(datasourceService.deleteLogic(Func.toLongList(ids)));
-	}
-
-	/**
-	 * 数据源列表
-	 */
-	@GetMapping("/select")
-	@ApiOperationSupport(order = 8)
-	@ApiOperation(value = "下拉数据源", notes = "查询列表")
-	public R<List<Datasource>> select() {
-		List<Datasource> list = datasourceService.list();
-		return R.data(list);
-	}
-
-}

+ 0 - 251
admin/src/main/java/org/springblade/modules/develop/controller/ModelController.java

@@ -1,251 +0,0 @@
-/*
- *      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.modules.develop.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
-import com.baomidou.mybatisplus.generator.config.StrategyConfig;
-import com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder;
-import com.baomidou.mybatisplus.generator.config.po.TableInfo;
-import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
-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.launch.constant.AppConstant;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.StringPool;
-import org.springblade.core.tool.utils.StringUtil;
-import org.springblade.modules.develop.entity.Datasource;
-import org.springblade.modules.develop.entity.Model;
-import org.springblade.modules.develop.entity.ModelPrototype;
-import org.springblade.modules.develop.service.IDatasourceService;
-import org.springblade.modules.develop.service.IModelPrototypeService;
-import org.springblade.modules.develop.service.IModelService;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-import java.util.Iterator;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 数据模型表 控制器
- *
- * @author Chill
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping(AppConstant.APPLICATION_DEVELOP_NAME + "/model")
-@Api(value = "数据模型表", tags = "数据模型表接口")
-public class ModelController extends BladeController {
-
-	private final IModelService modelService;
-	private final IModelPrototypeService modelPrototypeService;
-	private final IDatasourceService datasourceService;
-
-	/**
-	 * 详情
-	 */
-	@GetMapping("/detail")
-	@ApiOperationSupport(order = 1)
-	@ApiOperation(value = "详情", notes = "传入model")
-	public R<Model> detail(Model model) {
-		Model detail = modelService.getOne(Condition.getQueryWrapper(model));
-		return R.data(detail);
-	}
-
-	/**
-	 * 分页 数据模型表
-	 */
-	@GetMapping("/list")
-	@ApiOperationSupport(order = 2)
-	@ApiOperation(value = "分页", notes = "传入model")
-	public R<IPage<Model>> list(Model model, Query query) {
-		IPage<Model> pages = modelService.page(Condition.getPage(query), Condition.getQueryWrapper(model));
-		return R.data(pages);
-	}
-
-	/**
-	 * 新增 数据模型表
-	 */
-	@PostMapping("/save")
-	@ApiOperationSupport(order = 3)
-	@ApiOperation(value = "新增", notes = "传入model")
-	public R save(@Valid @RequestBody Model model) {
-		return R.status(modelService.save(model));
-	}
-
-	/**
-	 * 修改 数据模型表
-	 */
-	@PostMapping("/update")
-	@ApiOperationSupport(order = 4)
-	@ApiOperation(value = "修改", notes = "传入model")
-	public R update(@Valid @RequestBody Model model) {
-		return R.status(modelService.updateById(model));
-	}
-
-	/**
-	 * 新增或修改 数据模型表
-	 */
-	@PostMapping("/submit")
-	@ApiOperationSupport(order = 5)
-	@ApiOperation(value = "新增或修改", notes = "传入model")
-	public R submit(@Valid @RequestBody Model model) {
-		boolean temp = modelService.saveOrUpdate(model);
-		if (temp) {
-			return R.data(model);
-		} else {
-			return R.status(Boolean.FALSE);
-		}
-	}
-
-	/**
-	 * 删除 数据模型表
-	 */
-	@PostMapping("/remove")
-	@ApiOperationSupport(order = 6)
-	@ApiOperation(value = "逻辑删除", notes = "传入ids")
-	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
-		return R.status(modelService.delete(Func.toLongList(ids)));
-	}
-
-	/**
-	 * 模型列表
-	 */
-	@GetMapping("/select")
-	@ApiOperationSupport(order = 7)
-	@ApiOperation(value = "模型列表", notes = "模型列表")
-	public R<List<Model>> select() {
-		List<Model> list = modelService.list();
-		list.forEach(model -> model.setModelName(model.getModelTable() + StringPool.COLON + StringPool.SPACE + model.getModelName()));
-		return R.data(list);
-	}
-
-	/**
-	 * 获取物理表列表
-	 */
-	@GetMapping("/table-list")
-	@ApiOperationSupport(order = 8)
-	@ApiOperation(value = "物理表列表", notes = "传入datasourceId")
-	public R<List<TableInfo>> tableList(Long datasourceId) {
-		Datasource datasource = datasourceService.getById(datasourceId);
-		ConfigBuilder config = getConfigBuilder(datasource);
-		List<TableInfo> tableInfoList = config.getTableInfoList().stream()
-			.filter(tableInfo -> !StringUtil.startsWithIgnoreCase(tableInfo.getName(), "ACT_"))
-			.map(tableInfo -> tableInfo.setComment(tableInfo.getName() + StringPool.COLON + tableInfo.getComment()))
-			.collect(Collectors.toList());
-		return R.data(tableInfoList);
-	}
-
-	/**
-	 * 获取物理表信息
-	 */
-	@GetMapping("/table-info")
-	@ApiOperationSupport(order = 9)
-	@ApiOperation(value = "物理表信息", notes = "传入model信息")
-	public R<TableInfo> tableInfo(Long modelId, String tableName, Long datasourceId) {
-		if (StringUtil.isBlank(tableName)) {
-			Model model = modelService.getById(modelId);
-			tableName = model.getModelTable();
-		}
-		TableInfo tableInfo = getTableInfo(tableName, datasourceId);
-		return R.data(tableInfo);
-	}
-
-	/**
-	 * 获取字段信息
-	 */
-	@GetMapping("/model-prototype")
-	@ApiOperationSupport(order = 10)
-	@ApiOperation(value = "物理表字段信息", notes = "传入modelId与datasourceId")
-	public R modelPrototype(Long modelId, Long datasourceId) {
-		List<ModelPrototype> modelPrototypeList = modelPrototypeService.list(Wrappers.<ModelPrototype>query().lambda().eq(ModelPrototype::getModelId, modelId));
-		if (modelPrototypeList.size() > 0) {
-			return R.data(modelPrototypeList);
-		}
-		Model model = modelService.getById(modelId);
-		String tableName = model.getModelTable();
-		TableInfo tableInfo = getTableInfo(tableName, datasourceId);
-		if (tableInfo != null) {
-			return R.data(tableInfo.getFields());
-		} else {
-			return R.fail("未获得相关表信息");
-		}
-	}
-
-	/**
-	 * 获取表信息
-	 *
-	 * @param tableName    表名
-	 * @param datasourceId 数据源主键
-	 */
-	private TableInfo getTableInfo(String tableName, Long datasourceId) {
-		Datasource datasource = datasourceService.getById(datasourceId);
-		ConfigBuilder config = getConfigBuilder(datasource, tableName);
-		List<TableInfo> tableInfoList = config.getTableInfoList();
-		TableInfo tableInfo = null;
-		Iterator<TableInfo> iterator = tableInfoList.stream().filter(table -> table.getName().equals(tableName)).collect(Collectors.toList()).iterator();
-		if (iterator.hasNext()) {
-			tableInfo = iterator.next();
-			if (tableName.contains(StringPool.UNDERSCORE)) {
-				tableInfo.setEntityName(tableInfo.getEntityName().replace(StringUtil.firstCharToUpper(tableName.split(StringPool.UNDERSCORE)[0]), StringPool.EMPTY));
-			} else {
-				tableInfo.setEntityName(StringUtil.firstCharToUpper(tableName));
-			}
-		}
-		return tableInfo;
-	}
-
-	/**
-	 * 获取表配置信息
-	 *
-	 * @param datasource 数据源信息
-	 */
-	private ConfigBuilder getConfigBuilder(Datasource datasource) {
-		return getConfigBuilder(datasource, null);
-	}
-
-	/**
-	 * 获取表配置信息
-	 *
-	 * @param datasource 数据源信息
-	 * @param tableName  表名
-	 */
-	private ConfigBuilder getConfigBuilder(Datasource datasource, String tableName) {
-		StrategyConfig.Builder builder = new StrategyConfig.Builder();
-		if (StringUtil.isNotBlank(tableName)) {
-			builder.addInclude(tableName);
-		}
-		StrategyConfig strategyConfig = builder.entityBuilder()
-			.naming(NamingStrategy.underline_to_camel)
-			.columnNaming(NamingStrategy.underline_to_camel).build();
-		DataSourceConfig datasourceConfig = new DataSourceConfig.Builder(
-			datasource.getUrl(), datasource.getUsername(), datasource.getPassword()
-		).build();
-		return new ConfigBuilder(null, datasourceConfig, strategyConfig, null, null, null);
-	}
-
-
-}

+ 0 - 137
admin/src/main/java/org/springblade/modules/develop/controller/ModelPrototypeController.java

@@ -1,137 +0,0 @@
-/*
- *      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.modules.develop.controller;
-
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-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.launch.constant.AppConstant;
-import org.springblade.core.mp.support.Condition;
-import org.springblade.core.mp.support.Query;
-import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.StringPool;
-import org.springblade.modules.develop.entity.ModelPrototype;
-import org.springblade.modules.develop.service.IModelPrototypeService;
-import org.springframework.web.bind.annotation.*;
-
-import javax.validation.Valid;
-import java.util.List;
-
-/**
- * 数据原型表 控制器
- *
- * @author Chill
- */
-@RestController
-@AllArgsConstructor
-@RequestMapping(AppConstant.APPLICATION_DEVELOP_NAME + "/model-prototype")
-@Api(value = "数据原型表", tags = "数据原型表接口")
-public class ModelPrototypeController extends BladeController {
-
-	private final IModelPrototypeService modelPrototypeService;
-
-	/**
-	 * 详情
-	 */
-	@GetMapping("/detail")
-	@ApiOperationSupport(order = 1)
-	@ApiOperation(value = "详情", notes = "传入modelPrototype")
-	public R<ModelPrototype> detail(ModelPrototype modelPrototype) {
-		ModelPrototype detail = modelPrototypeService.getOne(Condition.getQueryWrapper(modelPrototype));
-		return R.data(detail);
-	}
-
-	/**
-	 * 分页 数据原型表
-	 */
-	@GetMapping("/list")
-	@ApiOperationSupport(order = 2)
-	@ApiOperation(value = "分页", notes = "传入modelPrototype")
-	public R<IPage<ModelPrototype>> list(ModelPrototype modelPrototype, Query query) {
-		IPage<ModelPrototype> pages = modelPrototypeService.page(Condition.getPage(query), Condition.getQueryWrapper(modelPrototype));
-		return R.data(pages);
-	}
-
-	/**
-	 * 新增 数据原型表
-	 */
-	@PostMapping("/save")
-	@ApiOperationSupport(order = 4)
-	@ApiOperation(value = "新增", notes = "传入modelPrototype")
-	public R save(@Valid @RequestBody ModelPrototype modelPrototype) {
-		return R.status(modelPrototypeService.save(modelPrototype));
-	}
-
-	/**
-	 * 修改 数据原型表
-	 */
-	@PostMapping("/update")
-	@ApiOperationSupport(order = 5)
-	@ApiOperation(value = "修改", notes = "传入modelPrototype")
-	public R update(@Valid @RequestBody ModelPrototype modelPrototype) {
-		return R.status(modelPrototypeService.updateById(modelPrototype));
-	}
-
-	/**
-	 * 新增或修改 数据原型表
-	 */
-	@PostMapping("/submit")
-	@ApiOperationSupport(order = 6)
-	@ApiOperation(value = "新增或修改", notes = "传入modelPrototype")
-	public R submit(@Valid @RequestBody ModelPrototype modelPrototype) {
-		return R.status(modelPrototypeService.saveOrUpdate(modelPrototype));
-	}
-
-	/**
-	 * 批量新增或修改 数据原型表
-	 */
-	@PostMapping("/submit-list")
-	@ApiOperationSupport(order = 7)
-	@ApiOperation(value = "批量新增或修改", notes = "传入modelPrototype集合")
-	public R submitList(@Valid @RequestBody List<ModelPrototype> modelPrototypes) {
-		return R.status(modelPrototypeService.submitList(modelPrototypes));
-	}
-
-	/**
-	 * 删除 数据原型表
-	 */
-	@PostMapping("/remove")
-	@ApiOperationSupport(order = 8)
-	@ApiOperation(value = "逻辑删除", notes = "传入ids")
-	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
-		return R.status(modelPrototypeService.deleteLogic(Func.toLongList(ids)));
-	}
-
-	/**
-	 * 数据原型列表
-	 */
-	@GetMapping("/select")
-	@ApiOperationSupport(order = 9)
-	@ApiOperation(value = "数据原型列表", notes = "数据原型列表")
-	public R<List<ModelPrototype>> select(@ApiParam(value = "数据模型Id", required = true) @RequestParam Long modelId) {
-		List<ModelPrototype> list = modelPrototypeService.list(Wrappers.<ModelPrototype>query().lambda().eq(ModelPrototype::getModelId, modelId));
-		list.forEach(prototype -> prototype.setComment(prototype.getJdbcName() + StringPool.COLON + StringPool.SPACE + prototype.getComment()));
-		return R.data(list);
-	}
-
-}

+ 0 - 180
admin/src/main/java/org/springblade/modules/develop/entity/Code.java

@@ -1,180 +0,0 @@
-/*
- *      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.modules.develop.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableLogic;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-/**
- * 实体类
- *
- * @author Chill
- */
-@Data
-@TableName("blade_code")
-@ApiModel(value = "Code对象", description = "Code对象")
-public class Code implements Serializable {
-
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * 主键
-	 */
-	@JsonSerialize(using = ToStringSerializer.class)
-	@ApiModelProperty(value = "主键")
-	@TableId(value = "id", type = IdType.ASSIGN_ID)
-	private Long id;
-
-	/**
-	 * 数据模型主键
-	 */
-	@JsonSerialize(using = ToStringSerializer.class)
-	@ApiModelProperty(value = "数据模型主键")
-	private Long modelId;
-
-	/**
-	 * 模块名称
-	 */
-	@ApiModelProperty(value = "服务名称")
-	private String serviceName;
-
-	/**
-	 * 模块名称
-	 */
-	@ApiModelProperty(value = "模块名称")
-	private String codeName;
-
-	/**
-	 * 表名
-	 */
-	@ApiModelProperty(value = "表名")
-	private String tableName;
-
-	/**
-	 * 实体名
-	 */
-	@ApiModelProperty(value = "表前缀")
-	private String tablePrefix;
-
-	/**
-	 * 主键名
-	 */
-	@ApiModelProperty(value = "主键名")
-	private String pkName;
-
-	/**
-	 * 后端包名
-	 */
-	@ApiModelProperty(value = "后端包名")
-	private String packageName;
-
-	/**
-	 * 模版类型
-	 */
-	@ApiModelProperty(value = "模版类型")
-	private String templateType;
-
-	/**
-	 * 作者信息
-	 */
-	@ApiModelProperty(value = "作者信息")
-	private String author;
-
-	/**
-	 * 子表模型主键
-	 */
-	@ApiModelProperty(value = "子表模型主键")
-	private String subModelId;
-
-	/**
-	 * 子表绑定外键
-	 */
-	@ApiModelProperty(value = "子表绑定外键")
-	private String subFkId;
-
-	/**
-	 * 树主键字段
-	 */
-	@ApiModelProperty(value = "树主键字段")
-	private String treeId;
-
-	/**
-	 * 树父主键字段
-	 */
-	@ApiModelProperty(value = "树父主键字段")
-	private String treePid;
-
-	/**
-	 * 树名称字段
-	 */
-	@ApiModelProperty(value = "树名称字段")
-	private String treeName;
-
-	/**
-	 * 基础业务模式
-	 */
-	@ApiModelProperty(value = "基础业务模式")
-	private Integer baseMode;
-
-	/**
-	 * 包装器模式
-	 */
-	@ApiModelProperty(value = "包装器模式")
-	private Integer wrapMode;
-
-	/**
-	 * 远程调用模式
-	 */
-	@ApiModelProperty(value = "远程调用模式")
-	private Integer feignMode;
-
-	/**
-	 * 代码风格
-	 */
-	@ApiModelProperty(value = "代码风格")
-	private String codeStyle;
-
-	/**
-	 * 后端路径
-	 */
-	@ApiModelProperty(value = "后端路径")
-	private String apiPath;
-
-	/**
-	 * 前端路径
-	 */
-	@ApiModelProperty(value = "前端路径")
-	private String webPath;
-
-	/**
-	 * 是否已删除
-	 */
-	@TableLogic
-	@ApiModelProperty(value = "是否已删除")
-	private Integer isDeleted;
-
-
-}

+ 0 - 71
admin/src/main/java/org/springblade/modules/develop/entity/Datasource.java

@@ -1,71 +0,0 @@
-/*
- *      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.modules.develop.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.mp.base.BaseEntity;
-
-/**
- * 数据源配置表实体类
- *
- * @author Chill
- */
-@Data
-@TableName("blade_datasource")
-@EqualsAndHashCode(callSuper = true)
-@ApiModel(value = "Datasource对象", description = "数据源配置表")
-public class Datasource extends BaseEntity {
-
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * 名称
-	 */
-	@ApiModelProperty(value = "名称")
-	private String name;
-	/**
-	 * 驱动类
-	 */
-	@ApiModelProperty(value = "驱动类")
-	private String driverClass;
-	/**
-	 * 连接地址
-	 */
-	@ApiModelProperty(value = "连接地址")
-	private String url;
-	/**
-	 * 用户名
-	 */
-	@ApiModelProperty(value = "用户名")
-	private String username;
-	/**
-	 * 密码
-	 */
-	@ApiModelProperty(value = "密码")
-	private String password;
-	/**
-	 * 备注
-	 */
-	@ApiModelProperty(value = "备注")
-	private String remark;
-
-
-}

+ 0 - 74
admin/src/main/java/org/springblade/modules/develop/entity/Model.java

@@ -1,74 +0,0 @@
-/*
- *      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.modules.develop.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.mp.base.BaseEntity;
-
-/**
- * 数据模型表实体类
- *
- * @author Chill
- */
-@Data
-@TableName("blade_model")
-@EqualsAndHashCode(callSuper = true)
-@ApiModel(value = "Model对象", description = "数据模型表")
-public class Model extends BaseEntity {
-
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * 数据源主键
-	 */
-	@ApiModelProperty(value = "数据源主键")
-	@JsonSerialize(using = ToStringSerializer.class)
-	private Long datasourceId;
-	/**
-	 * 模型名称
-	 */
-	@ApiModelProperty(value = "模型名称")
-	private String modelName;
-	/**
-	 * 模型编号
-	 */
-	@ApiModelProperty(value = "模型编号")
-	private String modelCode;
-	/**
-	 * 物理表名
-	 */
-	@ApiModelProperty(value = "物理表名")
-	private String modelTable;
-	/**
-	 * 模型类名
-	 */
-	@ApiModelProperty(value = "模型类名")
-	private String modelClass;
-	/**
-	 * 模型备注
-	 */
-	@ApiModelProperty(value = "模型备注")
-	private String modelRemark;
-
-
-}

+ 0 - 119
admin/src/main/java/org/springblade/modules/develop/entity/ModelPrototype.java

@@ -1,119 +0,0 @@
-/*
- *      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.modules.develop.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.core.mp.base.BaseEntity;
-
-/**
- * 数据原型表实体类
- *
- * @author Chill
- */
-@Data
-@TableName("blade_model_prototype")
-@EqualsAndHashCode(callSuper = true)
-@ApiModel(value = "ModelPrototype对象", description = "数据原型表")
-public class ModelPrototype extends BaseEntity {
-
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * 模型主键
-	 */
-	@ApiModelProperty(value = "模型主键")
-	@JsonSerialize(using = ToStringSerializer.class)
-	private Long modelId;
-	/**
-	 * 物理列名
-	 */
-	@ApiModelProperty(value = "物理列名")
-	private String jdbcName;
-	/**
-	 * 物理类型
-	 */
-	@ApiModelProperty(value = "物理类型")
-	private String jdbcType;
-	/**
-	 * 实体列名
-	 */
-	@ApiModelProperty(value = "实体列名")
-	private String propertyName;
-	/**
-	 * 实体类型
-	 */
-	@ApiModelProperty(value = "实体类型")
-	private String propertyType;
-	/**
-	 * 实体类型引用
-	 */
-	@ApiModelProperty(value = "实体类型引用")
-	private String propertyEntity;
-	/**
-	 * 注释说明
-	 */
-	@ApiModelProperty(value = "注释说明")
-	private String comment;
-	/**
-	 * 列表显示
-	 */
-	@ApiModelProperty(value = "列表显示")
-	private Integer isList;
-	/**
-	 * 表单显示
-	 */
-	@ApiModelProperty(value = "表单显示")
-	private Integer isForm;
-	/**
-	 * 独占一行
-	 */
-	@ApiModelProperty(value = "独占一行")
-	private Integer isRow;
-	/**
-	 * 组件类型
-	 */
-	@ApiModelProperty(value = "组件类型")
-	private String componentType;
-	/**
-	 * 字典编码
-	 */
-	@ApiModelProperty(value = "字典编码")
-	private String dictCode;
-	/**
-	 * 是否必填
-	 */
-	@ApiModelProperty(value = "是否必填")
-	private Integer isRequired;
-	/**
-	 * 查询配置
-	 */
-	@ApiModelProperty(value = "查询配置")
-	private Integer isQuery;
-	/**
-	 * 查询类型
-	 */
-	@ApiModelProperty(value = "查询类型")
-	private String queryType;
-
-
-}

+ 0 - 29
admin/src/main/java/org/springblade/modules/develop/mapper/CodeMapper.java

@@ -1,29 +0,0 @@
-/*
- *      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.modules.develop.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springblade.modules.develop.entity.Code;
-
-/**
- * Mapper 接口
- *
- * @author Chill
- */
-public interface CodeMapper extends BaseMapper<Code> {
-
-}

+ 0 - 22
admin/src/main/java/org/springblade/modules/develop/mapper/CodeMapper.xml

@@ -1,22 +0,0 @@
-<?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.modules.develop.mapper.CodeMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="codeResultMap" type="org.springblade.modules.develop.entity.Code">
-        <id column="id" property="id"/>
-        <result column="datasource_id" property="datasourceId"/>
-        <result column="service_name" property="serviceName"/>
-        <result column="code_name" property="codeName"/>
-        <result column="table_name" property="tableName"/>
-        <result column="pk_name" property="pkName"/>
-        <result column="base_mode" property="baseMode"/>
-        <result column="wrap_mode" property="wrapMode"/>
-        <result column="table_prefix" property="tablePrefix"/>
-        <result column="package_name" property="packageName"/>
-        <result column="api_path" property="apiPath"/>
-        <result column="web_path" property="webPath"/>
-        <result column="is_deleted" property="isDeleted"/>
-    </resultMap>
-
-</mapper>

+ 0 - 29
admin/src/main/java/org/springblade/modules/develop/mapper/DatasourceMapper.java

@@ -1,29 +0,0 @@
-/*
- *      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.modules.develop.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springblade.modules.develop.entity.Datasource;
-
-/**
- * 数据源配置表 Mapper 接口
- *
- * @author Chill
- */
-public interface DatasourceMapper extends BaseMapper<Datasource> {
-
-}

+ 0 - 22
admin/src/main/java/org/springblade/modules/develop/mapper/DatasourceMapper.xml

@@ -1,22 +0,0 @@
-<?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.modules.develop.mapper.DatasourceMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="datasourceResultMap" type="org.springblade.modules.develop.entity.Datasource">
-        <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="driver_class" property="driverClass"/>
-        <result column="url" property="url"/>
-        <result column="username" property="username"/>
-        <result column="password" property="password"/>
-        <result column="remark" property="remark"/>
-    </resultMap>
-
-</mapper>

+ 0 - 29
admin/src/main/java/org/springblade/modules/develop/mapper/ModelMapper.java

@@ -1,29 +0,0 @@
-/*
- *      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.modules.develop.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springblade.modules.develop.entity.Model;
-
-/**
- * 数据模型表 Mapper 接口
- *
- * @author Chill
- */
-public interface ModelMapper extends BaseMapper<Model> {
-
-}

+ 0 - 27
admin/src/main/java/org/springblade/modules/develop/mapper/ModelMapper.xml

@@ -1,27 +0,0 @@
-<?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.modules.develop.mapper.ModelMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="modelResultMap" type="org.springblade.modules.develop.entity.Model">
-        <id column="id" property="id"/>
-        <result column="create_user" property="createUser"/>
-        <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="datasource_id" property="datasourceId"/>
-        <result column="model_name" property="modelName"/>
-        <result column="model_code" property="modelCode"/>
-        <result column="model_table" property="modelTable"/>
-        <result column="model_class" property="modelClass"/>
-        <result column="model_remark" property="modelRemark"/>
-    </resultMap>
-
-
-    <select id="selectModelPage" resultMap="modelResultMap">
-        select * from blade_model where is_deleted = 0
-    </select>
-
-</mapper>

+ 0 - 29
admin/src/main/java/org/springblade/modules/develop/mapper/ModelPrototypeMapper.java

@@ -1,29 +0,0 @@
-/*
- *      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.modules.develop.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.springblade.modules.develop.entity.ModelPrototype;
-
-/**
- * 数据原型表 Mapper 接口
- *
- * @author Chill
- */
-public interface ModelPrototypeMapper extends BaseMapper<ModelPrototype> {
-
-}

+ 0 - 35
admin/src/main/java/org/springblade/modules/develop/mapper/ModelPrototypeMapper.xml

@@ -1,35 +0,0 @@
-<?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.modules.develop.mapper.ModelPrototypeMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="modelPrototypeResultMap" type="org.springblade.modules.develop.entity.ModelPrototype">
-        <id column="id" property="id"/>
-        <result column="create_user" property="createUser"/>
-        <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="jdbc_name" property="jdbcName"/>
-        <result column="jdbc_type" property="jdbcType"/>
-        <result column="comment" property="comment"/>
-        <result column="property_type" property="propertyType"/>
-        <result column="property_entity" property="propertyEntity"/>
-        <result column="property_name" property="propertyName"/>
-        <result column="is_form" property="isForm"/>
-        <result column="is_row" property="isRow"/>
-        <result column="component_type" property="componentType"/>
-        <result column="dict_code" property="dictCode"/>
-        <result column="is_required" property="isRequired"/>
-        <result column="is_list" property="isList"/>
-        <result column="is_query" property="isQuery"/>
-        <result column="query_type" property="queryType"/>
-    </resultMap>
-
-
-    <select id="selectModelPrototypePage" resultMap="modelPrototypeResultMap">
-        select * from blade_model_prototype where is_deleted = 0
-    </select>
-
-</mapper>

+ 0 - 29
admin/src/main/java/org/springblade/modules/develop/service/IDatasourceService.java

@@ -1,29 +0,0 @@
-/*
- *      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.modules.develop.service;
-
-import org.springblade.core.mp.base.BaseService;
-import org.springblade.modules.develop.entity.Datasource;
-
-/**
- * 数据源配置表 服务类
- *
- * @author Chill
- */
-public interface IDatasourceService extends BaseService<Datasource> {
-
-}

+ 0 - 39
admin/src/main/java/org/springblade/modules/develop/service/IModelService.java

@@ -1,39 +0,0 @@
-/*
- *      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.modules.develop.service;
-
-import org.springblade.core.mp.base.BaseService;
-import org.springblade.modules.develop.entity.Model;
-
-import java.util.List;
-
-/**
- * 数据模型表 服务类
- *
- * @author Chill
- */
-public interface IModelService extends BaseService<Model> {
-
-	/**
-	 * 删除模型
-	 *
-	 * @param ids 主键集合
-	 * @return boolean
-	 */
-	boolean delete(List<Long> ids);
-
-}

+ 0 - 33
admin/src/main/java/org/springblade/modules/develop/service/impl/DatasourceServiceImpl.java

@@ -1,33 +0,0 @@
-/*
- *      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.modules.develop.service.impl;
-
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.modules.develop.entity.Datasource;
-import org.springblade.modules.develop.mapper.DatasourceMapper;
-import org.springblade.modules.develop.service.IDatasourceService;
-import org.springframework.stereotype.Service;
-
-/**
- * 数据源配置表 服务实现类
- *
- * @author Chill
- */
-@Service
-public class DatasourceServiceImpl extends BaseServiceImpl<DatasourceMapper, Datasource> implements IDatasourceService {
-
-}

+ 0 - 55
admin/src/main/java/org/springblade/modules/develop/service/impl/ModelPrototypeServiceImpl.java

@@ -1,55 +0,0 @@
-/*
- *      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.modules.develop.service.impl;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.modules.develop.entity.ModelPrototype;
-import org.springblade.modules.develop.mapper.ModelPrototypeMapper;
-import org.springblade.modules.develop.service.IModelPrototypeService;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-
-/**
- * 数据原型表 服务实现类
- *
- * @author Chill
- */
-@Service
-public class ModelPrototypeServiceImpl extends BaseServiceImpl<ModelPrototypeMapper, ModelPrototype> implements IModelPrototypeService {
-
-	@Override
-	@Transactional(rollbackFor = Exception.class)
-	public boolean submitList(List<ModelPrototype> modelPrototypes) {
-		modelPrototypes.forEach(modelPrototype -> {
-			if (modelPrototype.getId() == null) {
-				this.save(modelPrototype);
-			} else {
-				this.updateById(modelPrototype);
-			}
-		});
-		return true;
-	}
-
-	@Override
-	public List<ModelPrototype> prototypeList(Long modelId) {
-		return this.list(Wrappers.<ModelPrototype>lambdaQuery().eq(ModelPrototype::getModelId, modelId));
-	}
-
-}

+ 0 - 67
admin/src/main/java/org/springblade/modules/develop/service/impl/ModelServiceImpl.java

@@ -1,67 +0,0 @@
-/*
- *      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.modules.develop.service.impl;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import lombok.RequiredArgsConstructor;
-import org.springblade.core.log.exception.ServiceException;
-import org.springblade.core.mp.base.BaseServiceImpl;
-import org.springblade.modules.develop.entity.Code;
-import org.springblade.modules.develop.entity.Model;
-import org.springblade.modules.develop.entity.ModelPrototype;
-import org.springblade.modules.develop.mapper.ModelMapper;
-import org.springblade.modules.develop.service.ICodeService;
-import org.springblade.modules.develop.service.IModelPrototypeService;
-import org.springblade.modules.develop.service.IModelService;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-
-/**
- * 数据模型表 服务实现类
- *
- * @author Chill
- */
-@Service
-@RequiredArgsConstructor
-public class ModelServiceImpl extends BaseServiceImpl<ModelMapper, Model> implements IModelService {
-
-	private final IModelPrototypeService modelPrototypeService;
-	private final ICodeService codeService;
-
-	@Override
-	@Transactional(rollbackFor = Exception.class)
-	public boolean delete(List<Long> ids) {
-		boolean modelTemp = this.deleteLogic(ids);
-		if (modelTemp) {
-			if (modelPrototypeService.count(Wrappers.<ModelPrototype>lambdaQuery().in(ModelPrototype::getModelId, ids)) > 0) {
-				boolean prototypeTemp = modelPrototypeService.remove(Wrappers.<ModelPrototype>lambdaQuery().in(ModelPrototype::getModelId, ids));
-				if (!prototypeTemp) {
-					throw new ServiceException("删除数据模型成功,关联数据原型删除失败");
-				}
-			}
-			if (codeService.count(Wrappers.<Code>lambdaQuery().in(Code::getModelId, ids)) > 0) {
-				boolean codeTemp = codeService.remove(Wrappers.<Code>lambdaQuery().in(Code::getModelId, ids));
-				if (!codeTemp) {
-					throw new ServiceException("删除数据模型成功,关联代码生成配置删除失败");
-				}
-			}
-		}
-		return true;
-	}
-}

+ 20 - 37
admin/src/main/java/org/springblade/modules/resource/builder/oss/OssBuilder.java

@@ -14,24 +14,25 @@
  *  this software without specific prior written permission.
  *  Author: Chill 庄骞 (smallchill@163.com)
  */
-package org.springblade.modules.resource.builder.oss;
+package org.springblade.modules.resource.builder;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.yomahub.liteflow.core.FlowExecutor;
+import com.yomahub.liteflow.flow.LiteflowResponse;
+import lombok.AllArgsConstructor;
 import org.springblade.core.cache.utils.CacheUtil;
 import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.oss.OssTemplate;
 import org.springblade.core.oss.enums.OssEnum;
 import org.springblade.core.oss.enums.OssStatusEnum;
 import org.springblade.core.oss.props.OssProperties;
-import org.springblade.core.oss.rule.BladeOssRule;
-import org.springblade.core.oss.rule.OssRule;
 import org.springblade.core.secure.utils.AuthUtil;
-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.modules.resource.entity.Oss;
+import org.springblade.modules.resource.rule.context.OssContext;
 import org.springblade.modules.resource.service.IOssService;
 
 import java.util.Map;
@@ -44,6 +45,7 @@ import static org.springblade.core.cache.constant.CacheConstant.RESOURCE_CACHE;
  *
  * @author Chill
  */
+@AllArgsConstructor
 public class OssBuilder {
 
 	public static final String OSS_CODE = "oss:code:";
@@ -51,11 +53,7 @@ public class OssBuilder {
 
 	private final OssProperties ossProperties;
 	private final IOssService ossService;
-
-	public OssBuilder(OssProperties ossProperties, IOssService ossService) {
-		this.ossProperties = ossProperties;
-		this.ossService = ossService;
-	}
+	private final FlowExecutor flowExecutor;
 
 	/**
 	 * OssTemplate配置缓存池
@@ -85,35 +83,20 @@ public class OssBuilder {
 	public OssTemplate template(String code) {
 		String tenantId = AuthUtil.getTenantId();
 		Oss oss = getOss(tenantId, code);
-		Oss ossCached = ossPool.get(tenantId);
-		OssTemplate template = templatePool.get(tenantId);
-		// 若为空或者不一致,则重新加载
-		if (Func.hasEmpty(template, ossCached) || !oss.getEndpoint().equals(ossCached.getEndpoint()) || !oss.getAccessKey().equals(ossCached.getAccessKey())) {
-			synchronized (OssBuilder.class) {
-				template = templatePool.get(tenantId);
-				if (Func.hasEmpty(template, ossCached) || !oss.getEndpoint().equals(ossCached.getEndpoint()) || !oss.getAccessKey().equals(ossCached.getAccessKey())) {
-					OssRule ossRule;
-					// 若采用默认设置则开启多租户模式, 若是用户自定义oss则不开启
-					if (oss.getEndpoint().equals(ossProperties.getEndpoint()) && oss.getAccessKey().equals(ossProperties.getAccessKey()) && ossProperties.getTenantMode()) {
-						ossRule = new BladeOssRule(Boolean.TRUE);
-					} else {
-						ossRule = new BladeOssRule(Boolean.FALSE);
-					}
-					if (oss.getCategory() == OssEnum.MINIO.getCategory()) {
-						template = MinioOssBuilder.template(oss, ossRule);
-					} else if (oss.getCategory() == OssEnum.QINIU.getCategory()) {
-						template = QiniuOssBuilder.template(oss, ossRule);
-					} else if (oss.getCategory() == OssEnum.ALI.getCategory()) {
-						template = AliOssBuilder.template(oss, ossRule);
-					} else if (oss.getCategory() == OssEnum.TENCENT.getCategory()) {
-						template = TencentOssBuilder.template(oss, ossRule);
-					}
-					templatePool.put(tenantId, template);
-					ossPool.put(tenantId, oss);
-				}
-			}
+
+		OssContext ossContext = new OssContext();
+		ossContext.setOss(oss);
+		ossContext.setOssProperties(ossProperties);
+		ossContext.setOssPool(ossPool);
+		ossContext.setTemplatePool(templatePool);
+
+		LiteflowResponse resp = flowExecutor.execute2Resp("ossChain", tenantId, ossContext);
+		if (resp.isSuccess()) {
+			OssContext contextBean = resp.getFirstContextBean();
+			return contextBean.getOssTemplate();
+		} else {
+			throw new ServiceException("未获取到对应的对象存储配置");
 		}
-		return template;
 	}
 
 	/**

+ 21 - 30
admin/src/main/java/org/springblade/modules/resource/builder/sms/SmsBuilder.java

@@ -14,10 +14,13 @@
  *  this software without specific prior written permission.
  *  Author: Chill 庄骞 (smallchill@163.com)
  */
-package org.springblade.modules.resource.builder.sms;
+package org.springblade.modules.resource.builder;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.yomahub.liteflow.core.FlowExecutor;
+import com.yomahub.liteflow.flow.LiteflowResponse;
+import lombok.AllArgsConstructor;
 import org.springblade.core.cache.utils.CacheUtil;
 import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.redis.cache.BladeRedis;
@@ -26,11 +29,11 @@ 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.modules.resource.entity.Sms;
+import org.springblade.modules.resource.rule.context.SmsContext;
 import org.springblade.modules.resource.service.ISmsService;
 
 import java.util.Map;
@@ -43,6 +46,7 @@ import static org.springblade.core.cache.constant.CacheConstant.RESOURCE_CACHE;
  *
  * @author Chill
  */
+@AllArgsConstructor
 public class SmsBuilder {
 
 	public static final String SMS_CODE = "sms:code:";
@@ -51,13 +55,7 @@ public class SmsBuilder {
 	private final SmsProperties smsProperties;
 	private final ISmsService smsService;
 	private final BladeRedis bladeRedis;
-
-
-	public SmsBuilder(SmsProperties smsProperties, ISmsService smsService, BladeRedis bladeRedis) {
-		this.smsProperties = smsProperties;
-		this.smsService = smsService;
-		this.bladeRedis = bladeRedis;
-	}
+	private final FlowExecutor flowExecutor;
 
 	/**
 	 * SmsTemplate配置缓存池
@@ -88,28 +86,21 @@ public class SmsBuilder {
 	public SmsTemplate template(String code) {
 		String tenantId = AuthUtil.getTenantId();
 		Sms sms = getSms(tenantId, code);
-		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.getTemplateId().equals(smsCached.getTemplateId()) || !sms.getAccessKey().equals(smsCached.getAccessKey())) {
-					if (sms.getCategory() == SmsEnum.YUNPIAN.getCategory()) {
-						template = YunpianSmsBuilder.template(sms, bladeRedis);
-					} else if (sms.getCategory() == SmsEnum.QINIU.getCategory()) {
-						template = QiniuSmsBuilder.template(sms, bladeRedis);
-					} else if (sms.getCategory() == SmsEnum.ALI.getCategory()) {
-						template = AliSmsBuilder.template(sms, bladeRedis);
-					} else if (sms.getCategory() == SmsEnum.TENCENT.getCategory()) {
-						template = TencentSmsBuilder.template(sms, bladeRedis);
-					}
-					templatePool.put(tenantId, template);
-					smsPool.put(tenantId, sms);
-				}
-			}
+
+		SmsContext smsContext = new SmsContext();
+		smsContext.setSms(sms);
+		smsContext.setSmsProperties(smsProperties);
+		smsContext.setSmsPool(smsPool);
+		smsContext.setTemplatePool(templatePool);
+		smsContext.setBladeRedis(bladeRedis);
+
+		LiteflowResponse resp = flowExecutor.execute2Resp("smsChain", tenantId, smsContext);
+		if (resp.isSuccess()) {
+			SmsContext contextBean = resp.getFirstContextBean();
+			return contextBean.getSmsTemplate();
+		} else {
+			throw new ServiceException("未获取到对应的短信配置");
 		}
-		return template;
 	}
 
 

+ 5 - 2
admin/src/main/java/org/springblade/modules/resource/config/BladeOssConfiguration.java

@@ -16,9 +16,10 @@
  */
 package org.springblade.modules.resource.config;
 
+import com.yomahub.liteflow.core.FlowExecutor;
 import lombok.AllArgsConstructor;
 import org.springblade.core.oss.props.OssProperties;
-import org.springblade.modules.resource.builder.oss.OssBuilder;
+import org.springblade.modules.resource.builder.OssBuilder;
 import org.springblade.modules.resource.service.IOssService;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -36,9 +37,11 @@ public class BladeOssConfiguration {
 
 	private final IOssService ossService;
 
+	private final FlowExecutor flowExecutor;
+
 	@Bean
 	public OssBuilder ossBuilder() {
-		return new OssBuilder(ossProperties, ossService);
+		return new OssBuilder(ossProperties, ossService, flowExecutor);
 	}
 
 }

+ 5 - 2
admin/src/main/java/org/springblade/modules/resource/config/BladeSmsConfiguration.java

@@ -16,10 +16,11 @@
  */
 package org.springblade.modules.resource.config;
 
+import com.yomahub.liteflow.core.FlowExecutor;
 import lombok.AllArgsConstructor;
 import org.springblade.core.redis.cache.BladeRedis;
 import org.springblade.core.sms.props.SmsProperties;
-import org.springblade.modules.resource.builder.sms.SmsBuilder;
+import org.springblade.modules.resource.builder.SmsBuilder;
 import org.springblade.modules.resource.service.ISmsService;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -39,9 +40,11 @@ public class BladeSmsConfiguration {
 
 	private final BladeRedis bladeRedis;
 
+	private final FlowExecutor flowExecutor;
+
 	@Bean
 	public SmsBuilder smsBuilder() {
-		return new SmsBuilder(smsProperties, smsService, bladeRedis);
+		return new SmsBuilder(smsProperties, smsService, bladeRedis, flowExecutor);
 	}
 
 }

+ 1 - 1
admin/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java

@@ -28,7 +28,7 @@ import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.constant.RoleConstant;
 import org.springblade.core.tool.utils.FileUtil;
 import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.resource.builder.oss.OssBuilder;
+import org.springblade.modules.resource.builder.OssBuilder;
 import org.springblade.modules.resource.entity.Attach;
 import org.springblade.modules.resource.service.IAttachService;
 import org.springframework.web.bind.annotation.*;

+ 1 - 1
admin/src/main/java/org/springblade/modules/resource/endpoint/SmsEndpoint.java

@@ -27,7 +27,7 @@ import org.springblade.core.tenant.annotation.NonDS;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.jackson.JsonUtil;
 import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.resource.builder.sms.SmsBuilder;
+import org.springblade.modules.resource.builder.SmsBuilder;
 import org.springblade.modules.resource.utils.SmsUtil;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;

+ 35 - 13
admin/src/main/java/org/springblade/modules/develop/dto/ModelDTO.java

@@ -14,29 +14,51 @@
  *  this software without specific prior written permission.
  *  Author: Chill 庄骞 (smallchill@163.com)
  */
-package org.springblade.modules.develop.dto;
+package org.springblade.modules.resource.rule.context;
 
 import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.springblade.modules.develop.entity.Model;
-import org.springblade.modules.develop.entity.ModelPrototype;
+import org.springblade.core.oss.OssTemplate;
+import org.springblade.core.oss.props.OssProperties;
+import org.springblade.core.oss.rule.OssRule;
+import org.springblade.modules.resource.entity.Oss;
 
-import java.util.List;
+import java.util.Map;
 
 /**
- * 代码模型DTO
+ * Oss上下文
  *
  * @author Chill
  */
 @Data
-@EqualsAndHashCode(callSuper = true)
-public class ModelDTO extends Model {
-
-	private static final long serialVersionUID = 1L;
-
+public class OssContext {
+	/**
+	 * 是否有缓存
+	 */
+	private Boolean isCached;
+	/**
+	 * oss数据
+	 */
+	private Oss oss;
+	/**
+	 * oss规则
+	 */
+	private OssRule ossRule;
 	/**
-	 * 代码建模原型
+	 * oss接口
 	 */
-	private List<ModelPrototype> prototypes;
+	private OssTemplate ossTemplate;
+	/**
+	 * oss配置
+	 */
+	private OssProperties ossProperties;
+	/**
+	 * OssTemplate配置缓存池
+	 */
+	private Map<String, OssTemplate> templatePool;
+	/**
+	 * oss配置缓存池
+	 */
+	private Map<String, Oss> ossPool;
+
 
 }

+ 64 - 0
admin/src/main/java/org/springblade/modules/resource/rule/context/SmsContext.java

@@ -0,0 +1,64 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.resource.rule.context;
+
+import lombok.Data;
+import org.springblade.core.redis.cache.BladeRedis;
+import org.springblade.core.sms.SmsTemplate;
+import org.springblade.core.sms.props.SmsProperties;
+import org.springblade.modules.resource.entity.Sms;
+
+import java.util.Map;
+
+/**
+ * Sms上下文
+ *
+ * @author Chill
+ */
+@Data
+public class SmsContext {
+	/**
+	 * 是否有缓存
+	 */
+	private Boolean isCached;
+	/**
+	 * sms数据
+	 */
+	private Sms sms;
+	/**
+	 * sms接口
+	 */
+	private SmsTemplate smsTemplate;
+	/**
+	 * sms配置
+	 */
+	private SmsProperties smsProperties;
+	/**
+	 * redis工具
+	 */
+	private BladeRedis bladeRedis;
+	/**
+	 * SmsTemplate配置缓存池
+	 */
+	private Map<String, SmsTemplate> templatePool;
+	/**
+	 * sms配置缓存池
+	 */
+	private Map<String, Sms> smsPool;
+
+
+}

+ 19 - 9
admin/src/main/java/org/springblade/modules/resource/builder/oss/AliOssBuilder.java

@@ -14,17 +14,19 @@
  *  this software without specific prior written permission.
  *  Author: Chill 庄骞 (smallchill@163.com)
  */
-package org.springblade.modules.resource.builder.oss;
+package org.springblade.modules.resource.rule.oss;
 
 import com.aliyun.oss.ClientConfiguration;
 import com.aliyun.oss.OSSClient;
 import com.aliyun.oss.common.auth.CredentialsProvider;
 import com.aliyun.oss.common.auth.DefaultCredentialProvider;
-import lombok.SneakyThrows;
-import org.springblade.core.oss.OssTemplate;
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
 import org.springblade.core.oss.AliossTemplate;
+import org.springblade.core.oss.OssTemplate;
 import org.springblade.core.oss.props.OssProperties;
 import org.springblade.core.oss.rule.OssRule;
+import org.springblade.modules.resource.rule.context.OssContext;
 import org.springblade.modules.resource.entity.Oss;
 
 /**
@@ -32,17 +34,23 @@ import org.springblade.modules.resource.entity.Oss;
  *
  * @author Chill
  */
-public class AliOssBuilder {
+@LiteflowComponent(id = "aliOssRule", name = "阿里云OSS构建")
+public class AliOssRule extends NodeComponent {
+
+	@Override
+	public void process() throws Exception {
+		// 获取上下文
+		OssContext contextBean = this.getContextBean(OssContext.class);
+		Oss oss = contextBean.getOss();
+		OssRule ossRule = contextBean.getOssRule();
 
-	@SneakyThrows
-	public static OssTemplate template(Oss oss, OssRule ossRule) {
 		// 创建配置类
 		OssProperties ossProperties = new OssProperties();
 		ossProperties.setEndpoint(oss.getEndpoint());
 		ossProperties.setAccessKey(oss.getAccessKey());
 		ossProperties.setSecretKey(oss.getSecretKey());
 		ossProperties.setBucketName(oss.getBucketName());
-		// 创建ClientConfiguration。ClientConfiguration是OSSClient的配置类,可配置代理、连接超时、最大连接数等参数。
+		// 创建ClientConfiguration
 		ClientConfiguration conf = new ClientConfiguration();
 		// 设置OSSClient允许打开的最大HTTP连接数,默认为1024个。
 		conf.setMaxConnections(1024);
@@ -59,7 +67,9 @@ public class AliOssBuilder {
 		CredentialsProvider credentialsProvider = new DefaultCredentialProvider(ossProperties.getAccessKey(), ossProperties.getSecretKey());
 		// 创建客户端
 		OSSClient ossClient = new OSSClient(ossProperties.getEndpoint(), credentialsProvider, conf);
-		return new AliossTemplate(ossClient, ossProperties, ossRule);
-	}
+		OssTemplate ossTemplate = new AliossTemplate(ossClient, ossProperties, ossRule);
 
+		// 设置上下文
+		contextBean.setOssTemplate(ossTemplate);
+	}
 }

+ 78 - 0
admin/src/main/java/org/springblade/modules/resource/rule/oss/AmazonS3Rule.java

@@ -0,0 +1,78 @@
+/*
+ *      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.modules.resource.rule.oss;
+
+import com.amazonaws.ClientConfiguration;
+import com.amazonaws.auth.AWSCredentials;
+import com.amazonaws.auth.AWSStaticCredentialsProvider;
+import com.amazonaws.auth.BasicAWSCredentials;
+import com.amazonaws.client.builder.AwsClientBuilder;
+import com.amazonaws.regions.Regions;
+import com.amazonaws.services.s3.AmazonS3;
+import com.amazonaws.services.s3.AmazonS3ClientBuilder;
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springblade.core.oss.OssTemplate;
+import org.springblade.core.oss.S3Template;
+import org.springblade.core.oss.props.OssProperties;
+import org.springblade.core.oss.rule.OssRule;
+import org.springblade.core.tool.utils.StringUtil;
+import org.springblade.modules.resource.entity.Oss;
+import org.springblade.modules.resource.rule.context.OssContext;
+
+/**
+ * Amazon S3 云存储构建类
+ *
+ * @author Chill
+ */
+@LiteflowComponent(id = "amazonS3Rule", name = "amazonS3OSS构建")
+public class AmazonS3Rule extends NodeComponent {
+
+	@Override
+	public void process() throws Exception {
+		// 获取上下文
+		OssContext contextBean = this.getContextBean(OssContext.class);
+		Oss oss = contextBean.getOss();
+		OssRule ossRule = contextBean.getOssRule();
+
+		// 创建配置类
+		OssProperties ossProperties = new OssProperties();
+		ossProperties.setEndpoint(oss.getEndpoint());
+		ossProperties.setAccessKey(oss.getAccessKey());
+		ossProperties.setSecretKey(oss.getSecretKey());
+		ossProperties.setBucketName(oss.getBucketName());
+		ossProperties.setRegion(oss.getRegion());
+		// 创建客户端
+		AWSCredentials credentials = new BasicAWSCredentials(ossProperties.getAccessKey(), ossProperties.getSecretKey());
+		ClientConfiguration clientConfiguration = new ClientConfiguration();
+		clientConfiguration.setSignerOverride("AWSS3V4SignerType");
+		AmazonS3 amazonS3 = AmazonS3ClientBuilder
+			.standard()
+			.withEndpointConfiguration(new AwsClientBuilder.
+				EndpointConfiguration(ossProperties.getEndpoint(),
+				StringUtil.isBlank(ossProperties.getRegion()) ? Regions.DEFAULT_REGION.name() : Regions.fromName(ossProperties.getRegion()).getName()))
+			.withPathStyleAccessEnabled(true)
+			.withClientConfiguration(clientConfiguration)
+			.withCredentials(new AWSStaticCredentialsProvider(credentials))
+			.build();
+		OssTemplate ossTemplate = new S3Template(amazonS3, ossRule, ossProperties);
+
+		// 设置上下文
+		contextBean.setOssTemplate(ossTemplate);
+
+	}
+}

+ 58 - 0
admin/src/main/java/org/springblade/modules/resource/rule/oss/FinallyOssRule.java

@@ -0,0 +1,58 @@
+/*
+ *      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.modules.resource.rule.oss;
+
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.oss.OssTemplate;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.resource.entity.Oss;
+import org.springblade.modules.resource.rule.context.OssContext;
+
+import java.util.Map;
+
+/**
+ * Oss后置处理
+ *
+ * @author Chill
+ */
+@LiteflowComponent(id = "finallyOssRule", name = "OSS构建后置处理")
+public class FinallyOssRule extends NodeComponent {
+	@Override
+	public void process() throws Exception {
+		String tenantId = this.getRequestData();
+		OssContext contextBean = this.getContextBean(OssContext.class);
+		Map<String, Oss> ossPool = contextBean.getOssPool();
+		Map<String, OssTemplate> templatePool = contextBean.getTemplatePool();
+
+		if (contextBean.getIsCached()) {
+			OssTemplate template = templatePool.get(tenantId);
+			contextBean.setOssTemplate(template);
+		} else {
+			Oss oss = contextBean.getOss();
+			OssTemplate template = contextBean.getOssTemplate();
+			if (Func.hasEmpty(template, oss)) {
+				throw new ServiceException("OSS接口读取失败!");
+			} else {
+				templatePool.put(tenantId, template);
+				ossPool.put(tenantId, oss);
+			}
+		}
+
+	}
+}

+ 73 - 0
admin/src/main/java/org/springblade/modules/resource/rule/oss/HuaweiObsRule.java

@@ -0,0 +1,73 @@
+/*
+ *      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.modules.resource.rule.oss;
+
+import com.obs.services.ObsClient;
+import com.obs.services.ObsConfiguration;
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springblade.core.oss.HuaweiObsTemplate;
+import org.springblade.core.oss.OssTemplate;
+import org.springblade.core.oss.props.OssProperties;
+import org.springblade.core.oss.rule.OssRule;
+import org.springblade.modules.resource.entity.Oss;
+import org.springblade.modules.resource.rule.context.OssContext;
+
+/**
+ * 华为云存储构建类
+ *
+ * @author Chill
+ */
+@LiteflowComponent(id = "huaweiObsRule", name = "华为OSS构建")
+public class HuaweiObsRule extends NodeComponent {
+	@Override
+	public void process() throws Exception {
+		// 获取上下文
+		OssContext contextBean = this.getContextBean(OssContext.class);
+		Oss oss = contextBean.getOss();
+		OssRule ossRule = contextBean.getOssRule();
+
+		// 创建配置类
+		OssProperties ossProperties = new OssProperties();
+		ossProperties.setEndpoint(oss.getEndpoint());
+		ossProperties.setAccessKey(oss.getAccessKey());
+		ossProperties.setSecretKey(oss.getSecretKey());
+		ossProperties.setBucketName(oss.getBucketName());
+		// 使用可定制各参数的配置类(ObsConfiguration)创建OBS客户端(ObsClient),创建完成后不支持再次修改参数
+		ObsConfiguration conf = new ObsConfiguration();
+		conf.setEndPoint(ossProperties.getEndpoint());
+		// 设置OSSClient允许打开的最大HTTP连接数,默认为1024个。
+		conf.setMaxConnections(1024);
+		// 设置Socket层传输数据的超时时间,默认为50000毫秒。
+		conf.setSocketTimeout(50000);
+		// 设置建立连接的超时时间,默认为50000毫秒。
+		conf.setConnectionTimeout(50000);
+		// 设置从连接池中获取连接的超时时间(单位:毫秒),默认不超时。
+		conf.setConnectionRequestTimeout(1000);
+		// 设置连接空闲超时时间。超时则关闭连接,默认为60000毫秒。
+		conf.setIdleConnectionTime(60000);
+		// 设置失败请求重试次数,默认为3次。
+		conf.setMaxErrorRetry(5);
+		// 创建客户端
+		ObsClient obsClient = new ObsClient(ossProperties.getAccessKey(), ossProperties.getSecretKey(), conf);
+		OssTemplate ossTemplate = new HuaweiObsTemplate(obsClient, ossProperties, ossRule);
+
+		// 设置上下文
+		contextBean.setOssTemplate(ossTemplate);
+
+	}
+}

+ 21 - 8
admin/src/main/java/org/springblade/modules/resource/builder/oss/MinioOssBuilder.java

@@ -14,27 +14,37 @@
  *  this software without specific prior written permission.
  *  Author: Chill 庄骞 (smallchill@163.com)
  */
-package org.springblade.modules.resource.builder.oss;
+package org.springblade.modules.resource.rule.oss;
 
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
 import io.minio.MinioClient;
-import lombok.SneakyThrows;
-import org.springblade.core.oss.OssTemplate;
 import org.springblade.core.oss.MinioTemplate;
+import org.springblade.core.oss.OssTemplate;
 import org.springblade.core.oss.props.OssProperties;
 import org.springblade.core.oss.rule.OssRule;
 import org.springblade.modules.resource.entity.Oss;
+import org.springblade.modules.resource.rule.context.OssContext;
 
 /**
  * Minio云存储构建类
  *
  * @author Chill
  */
-public class MinioOssBuilder {
+@LiteflowComponent(id = "minioRule", name = "minioOSS构建")
+public class MinioRule extends NodeComponent {
+
+	@Override
+	public void process() throws Exception {
+		// 获取上下文
+		OssContext contextBean = this.getContextBean(OssContext.class);
+		Oss oss = contextBean.getOss();
+		OssRule ossRule = contextBean.getOssRule();
+		OssProperties properties = contextBean.getOssProperties();
 
-	@SneakyThrows
-	public static OssTemplate template(Oss oss, OssRule ossRule) {
 		// 创建配置类
 		OssProperties ossProperties = new OssProperties();
+		ossProperties.setTransformEndpoint(properties.getTransformEndpoint());
 		ossProperties.setEndpoint(oss.getEndpoint());
 		ossProperties.setAccessKey(oss.getAccessKey());
 		ossProperties.setSecretKey(oss.getSecretKey());
@@ -44,7 +54,10 @@ public class MinioOssBuilder {
 			.endpoint(oss.getEndpoint())
 			.credentials(oss.getAccessKey(), oss.getSecretKey())
 			.build();
-		return new MinioTemplate(minioClient, ossRule, ossProperties);
-	}
+		OssTemplate ossTemplate = new MinioTemplate(minioClient, ossRule, ossProperties);
+
+		// 设置上下文
+		contextBean.setOssTemplate(ossTemplate);
 
+	}
 }

+ 53 - 0
admin/src/main/java/org/springblade/modules/resource/rule/oss/OssBuildRule.java

@@ -0,0 +1,53 @@
+/*
+ *      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.modules.resource.rule.oss;
+
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeSwitchComponent;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.oss.enums.OssEnum;
+import org.springblade.modules.resource.rule.context.OssContext;
+import org.springblade.modules.resource.entity.Oss;
+
+/**
+ * Oss构建判断
+ *
+ * @author Chill
+ */
+@LiteflowComponent(id = "ossBuildRule", name = "OSS构建条件判断")
+public class OssBuildRule extends NodeSwitchComponent {
+
+	@Override
+	public String processSwitch() {
+		OssContext contextBean = this.getContextBean(OssContext.class);
+		Oss oss = contextBean.getOss();
+		if (oss.getCategory() == OssEnum.MINIO.getCategory()) {
+			return "minioRule";
+		} else if (oss.getCategory() == OssEnum.QINIU.getCategory()) {
+			return "qiniuOssRule";
+		} else if (oss.getCategory() == OssEnum.ALI.getCategory()) {
+			return "aliOssRule";
+		} else if (oss.getCategory() == OssEnum.TENCENT.getCategory()) {
+			return "tencentCosRule";
+		} else if (oss.getCategory() == OssEnum.HUAWEI.getCategory()) {
+			return "huaweiObsRule";
+		} else if (oss.getCategory() == OssEnum.AMAZONS3.getCategory()) {
+			return "amazonS3Rule";
+		}
+		throw new ServiceException("未找到OSS配置");
+	}
+}

+ 15 - 13
admin/src/main/java/org/springblade/modules/develop/service/impl/CodeServiceImpl.java

@@ -14,27 +14,29 @@
  *  this software without specific prior written permission.
  *  Author: Chill 庄骞 (smallchill@163.com)
  */
-package org.springblade.modules.develop.service.impl;
+package org.springblade.modules.resource.rule.oss;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springblade.core.tool.constant.BladeConstant;
-import org.springblade.modules.develop.entity.Code;
-import org.springblade.modules.develop.mapper.CodeMapper;
-import org.springblade.modules.develop.service.ICodeService;
-import org.springframework.stereotype.Service;
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeSwitchComponent;
+import org.springblade.modules.resource.rule.context.OssContext;
 
 /**
- * 服务实现类
+ * Oss缓存判断
  *
  * @author Chill
  */
-@Service
-public class CodeServiceImpl extends ServiceImpl<CodeMapper, Code> implements ICodeService {
+@LiteflowComponent(id = "ossCacheRule", name = "OSS缓存判断")
+public class OssCacheRule extends NodeSwitchComponent {
 
 	@Override
-	public boolean submit(Code code) {
-		code.setIsDeleted(BladeConstant.DB_NOT_DELETED);
-		return saveOrUpdate(code);
+	public String processSwitch() {
+		OssContext contextBean = this.getContextBean(OssContext.class);
+		// 若判断配置已缓存则直接读取,否则进入下一步构建新数据
+		if (contextBean.getIsCached()) {
+			return "ossReadRule";
+		} else {
+			return "ossNewRule";
+		}
 	}
 
 }

+ 45 - 0
admin/src/main/java/org/springblade/modules/resource/rule/oss/OssDataRule.java

@@ -0,0 +1,45 @@
+/*
+ *      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.modules.resource.rule.oss;
+
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springblade.core.oss.props.OssProperties;
+import org.springblade.core.oss.rule.BladeOssRule;
+import org.springblade.modules.resource.rule.context.OssContext;
+import org.springblade.modules.resource.entity.Oss;
+
+/**
+ * OSS数据创建
+ *
+ * @author Chill
+ */
+@LiteflowComponent(id = "ossDataRule", name = "OSS数据创建")
+public class OssDataRule extends NodeComponent {
+	@Override
+	public void process() throws Exception {
+		OssContext contextBean = this.getContextBean(OssContext.class);
+		Oss oss = contextBean.getOss();
+		OssProperties ossProperties = contextBean.getOssProperties();
+		// 若采用默认设置则开启多租户模式, 若是用户自定义oss则不开启
+		if (oss.getEndpoint().equals(ossProperties.getEndpoint()) && oss.getAccessKey().equals(ossProperties.getAccessKey()) && ossProperties.getTenantMode()) {
+			contextBean.setOssRule(new BladeOssRule(Boolean.TRUE));
+		} else {
+			contextBean.setOssRule(new BladeOssRule(Boolean.FALSE));
+		}
+	}
+}

+ 48 - 0
admin/src/main/java/org/springblade/modules/resource/rule/oss/OssReadRule.java

@@ -0,0 +1,48 @@
+/*
+ *      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.modules.resource.rule.oss;
+
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.oss.OssTemplate;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.resource.rule.context.OssContext;
+import org.springblade.modules.resource.entity.Oss;
+
+import java.util.Map;
+
+/**
+ * OSS缓存读取校验
+ *
+ * @author Chill
+ */
+@LiteflowComponent(id = "ossReadRule", name = "OSS缓存读取校验")
+public class OssReadRule extends NodeComponent {
+	@Override
+	public void process() throws Exception {
+		String tenantId = this.getRequestData();
+		OssContext contextBean = this.getContextBean(OssContext.class);
+		Map<String, Oss> ossPool = contextBean.getOssPool();
+		Map<String, OssTemplate> templatePool = contextBean.getTemplatePool();
+		Oss ossCached = ossPool.get(tenantId);
+		OssTemplate template = templatePool.get(tenantId);
+		if (Func.hasEmpty(template, ossCached)) {
+			throw new ServiceException("OSS缓存读取失败!");
+		}
+	}
+}

+ 15 - 27
admin/src/main/java/org/springblade/common/enums/ycwh/InformationTypeEnum.java

@@ -14,41 +14,29 @@
  *  this software without specific prior written permission.
  *  Author: Chill 庄骞 (smallchill@163.com)
  */
-package org.springblade.common.enums.ycwh;
+package org.springblade.modules.resource.rule.oss;
 
-import lombok.AllArgsConstructor;
-import lombok.Getter;
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.oss.OssTemplate;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.resource.rule.context.OssContext;
 
 /**
- * 系统字典枚举类
+ * OSS接口读取校验
  *
  * @author Chill
  */
-@Getter
-@AllArgsConstructor
-public enum InformationTypeEnum {
-	// 名菜、名点、名店、专业风采
-	famous_dish("famous_dish", "名菜"),
-	famous_location("famous_location", "名点"),
-	famous_store("famous_store", "名店"),
-	professional_style("professional_style", "专业风采");
+@LiteflowComponent(id = "ossTemplateRule", name = "OSS接口读取校验")
+public class OssTemplateRule extends NodeComponent {
+	@Override
+	public void process() throws Exception {
+		OssContext contextBean = this.getContextBean(OssContext.class);
+		OssTemplate ossTemplate = contextBean.getOssTemplate();
 
-	final String value;
-	final String label;
-
-	private static String getLabelByValue(String v) {
-		if (Func.isBlank(v)) {
-			return null;
-		}
-		String rs = null;
-		for (InformationTypeEnum e : InformationTypeEnum.values()) {
-			if (e.getValue().equals(v)) {
-				rs = e.getLabel();
-				break;
-			}
+		if (Func.isEmpty(ossTemplate)) {
+			throw new ServiceException("OSS接口读取失败!");
 		}
-		return rs;
 	}
-
 }

+ 52 - 0
admin/src/main/java/org/springblade/modules/resource/rule/oss/PreOssRule.java

@@ -0,0 +1,52 @@
+/*
+ *      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.modules.resource.rule.oss;
+
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springblade.core.oss.OssTemplate;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.resource.rule.context.OssContext;
+import org.springblade.modules.resource.entity.Oss;
+
+import java.util.Map;
+
+/**
+ * Oss前置处理
+ *
+ * @author Chill
+ */
+@LiteflowComponent(id = "preOssRule", name = "OSS构建前置处理")
+public class PreOssRule extends NodeComponent {
+	@Override
+	public void process() throws Exception {
+		String tenantId = this.getRequestData();
+		OssContext contextBean = this.getContextBean(OssContext.class);
+		Map<String, Oss> ossPool = contextBean.getOssPool();
+		Map<String, OssTemplate> templatePool = contextBean.getTemplatePool();
+		Oss oss = contextBean.getOss();
+		Oss ossCached = ossPool.get(tenantId);
+		OssTemplate template = templatePool.get(tenantId);
+		// 若为空或者不一致,则重新加载
+		if (Func.hasEmpty(template, ossCached) || !oss.getEndpoint().equals(ossCached.getEndpoint()) || !oss.getAccessKey().equals(ossCached.getAccessKey())) {
+			contextBean.setIsCached(Boolean.FALSE);
+		} else {
+			contextBean.setIsCached(Boolean.TRUE);
+		}
+	}
+
+}

+ 21 - 7
admin/src/main/java/org/springblade/modules/resource/builder/oss/QiniuOssBuilder.java

@@ -14,39 +14,53 @@
  *  this software without specific prior written permission.
  *  Author: Chill 庄骞 (smallchill@163.com)
  */
-package org.springblade.modules.resource.builder.oss;
+package org.springblade.modules.resource.rule.oss;
 
 import com.qiniu.storage.BucketManager;
 import com.qiniu.storage.Configuration;
 import com.qiniu.storage.Region;
 import com.qiniu.storage.UploadManager;
 import com.qiniu.util.Auth;
-import lombok.SneakyThrows;
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
 import org.springblade.core.oss.OssTemplate;
 import org.springblade.core.oss.QiniuTemplate;
 import org.springblade.core.oss.props.OssProperties;
 import org.springblade.core.oss.rule.OssRule;
 import org.springblade.modules.resource.entity.Oss;
+import org.springblade.modules.resource.rule.context.OssContext;
 
 /**
  * 七牛云存储构建类
  *
  * @author Chill
  */
-public class QiniuOssBuilder {
+@LiteflowComponent(id = "qiniuOssRule", name = "七牛OSS构建")
+public class QiniuOssRule extends NodeComponent {
 
-	@SneakyThrows
-	public static OssTemplate template(Oss oss, OssRule ossRule) {
+	@Override
+	public void process() throws Exception {
+		// 获取上下文
+		OssContext contextBean = this.getContextBean(OssContext.class);
+		Oss oss = contextBean.getOss();
+		OssRule ossRule = contextBean.getOssRule();
+
+
+		// 创建配置类
 		OssProperties ossProperties = new OssProperties();
 		ossProperties.setEndpoint(oss.getEndpoint());
 		ossProperties.setAccessKey(oss.getAccessKey());
 		ossProperties.setSecretKey(oss.getSecretKey());
 		ossProperties.setBucketName(oss.getBucketName());
+		// 创建客户端
 		Configuration cfg = new Configuration(Region.autoRegion());
 		Auth auth = Auth.create(oss.getAccessKey(), oss.getSecretKey());
 		UploadManager uploadManager = new UploadManager(cfg);
 		BucketManager bucketManager = new BucketManager(auth, cfg);
-		return new QiniuTemplate(auth, uploadManager, bucketManager, ossProperties, ossRule);
-	}
+		OssTemplate ossTemplate = new QiniuTemplate(auth, uploadManager, bucketManager, ossProperties, ossRule);
 
+		// 设置上下文
+		contextBean.setOssTemplate(ossTemplate);
+
+	}
 }

+ 19 - 8
admin/src/main/java/org/springblade/modules/resource/builder/oss/TencentOssBuilder.java

@@ -14,29 +14,37 @@
  *  this software without specific prior written permission.
  *  Author: Chill 庄骞 (smallchill@163.com)
  */
-package org.springblade.modules.resource.builder.oss;
+package org.springblade.modules.resource.rule.oss;
 
 import com.qcloud.cos.COSClient;
 import com.qcloud.cos.ClientConfig;
 import com.qcloud.cos.auth.BasicCOSCredentials;
 import com.qcloud.cos.auth.COSCredentials;
 import com.qcloud.cos.region.Region;
-import lombok.SneakyThrows;
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
 import org.springblade.core.oss.OssTemplate;
+import org.springblade.core.oss.TencentCosTemplate;
 import org.springblade.core.oss.props.OssProperties;
 import org.springblade.core.oss.rule.OssRule;
-import org.springblade.core.oss.TencentCosTemplate;
 import org.springblade.modules.resource.entity.Oss;
+import org.springblade.modules.resource.rule.context.OssContext;
 
 /**
  * 腾讯云存储构建类
  *
  * @author Chill
  */
-public class TencentOssBuilder {
+@LiteflowComponent(id = "tencentCosRule", name = "腾讯云OSS构建")
+public class TencentCosRule extends NodeComponent {
+
+	@Override
+	public void process() throws Exception {
+		// 获取上下文
+		OssContext contextBean = this.getContextBean(OssContext.class);
+		Oss oss = contextBean.getOss();
+		OssRule ossRule = contextBean.getOssRule();
 
-	@SneakyThrows
-	public static OssTemplate template(Oss oss, OssRule ossRule) {
 		// 创建配置类
 		OssProperties ossProperties = new OssProperties();
 		ossProperties.setEndpoint(oss.getEndpoint());
@@ -60,7 +68,10 @@ public class TencentOssBuilder {
 		// 设置从连接池中获取连接的超时时间(单位:毫秒),默认不超时。
 		clientConfig.setConnectionRequestTimeout(1000);
 		COSClient cosClient = new COSClient(credentials, clientConfig);
-		return new TencentCosTemplate(cosClient, ossProperties, ossRule);
-	}
+		OssTemplate ossTemplate = new TencentCosTemplate(cosClient, ossProperties, ossRule);
+
+		// 设置上下文
+		contextBean.setOssTemplate(ossTemplate);
 
+	}
 }

+ 20 - 8
admin/src/main/java/org/springblade/modules/resource/builder/sms/AliSmsBuilder.java

@@ -14,28 +14,36 @@
  *  this software without specific prior written permission.
  *  Author: Chill 庄骞 (smallchill@163.com)
  */
-package org.springblade.modules.resource.builder.sms;
+package org.springblade.modules.resource.rule.sms;
 
 import com.aliyuncs.DefaultAcsClient;
 import com.aliyuncs.IAcsClient;
 import com.aliyuncs.profile.DefaultProfile;
 import com.aliyuncs.profile.IClientProfile;
-import lombok.SneakyThrows;
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
 import org.springblade.core.redis.cache.BladeRedis;
-import org.springblade.core.sms.SmsTemplate;
 import org.springblade.core.sms.AliSmsTemplate;
+import org.springblade.core.sms.SmsTemplate;
 import org.springblade.core.sms.props.SmsProperties;
 import org.springblade.modules.resource.entity.Sms;
+import org.springblade.modules.resource.rule.context.SmsContext;
 
 /**
  * 阿里云短信构建类
  *
  * @author Chill
  */
-public class AliSmsBuilder {
+@LiteflowComponent(id = "aliSmsRule", name = "阿里SMS构建")
+public class AliSmsRule extends NodeComponent {
+
+	@Override
+	public void process() throws Exception {
+		// 获取上下文
+		SmsContext contextBean = this.getContextBean(SmsContext.class);
+		Sms sms = contextBean.getSms();
+		BladeRedis bladeRedis = contextBean.getBladeRedis();
 
-	@SneakyThrows
-	public static SmsTemplate template(Sms sms, BladeRedis bladeRedis) {
 		SmsProperties smsProperties = new SmsProperties();
 		smsProperties.setTemplateId(sms.getTemplateId());
 		smsProperties.setAccessKey(sms.getAccessKey());
@@ -44,7 +52,11 @@ public class AliSmsBuilder {
 		smsProperties.setSignName(sms.getSignName());
 		IClientProfile profile = DefaultProfile.getProfile(smsProperties.getRegionId(), smsProperties.getAccessKey(), smsProperties.getSecretKey());
 		IAcsClient acsClient = new DefaultAcsClient(profile);
-		return new AliSmsTemplate(smsProperties, acsClient, bladeRedis);
-	}
+		SmsTemplate smsTemplate = new AliSmsTemplate(smsProperties, acsClient, bladeRedis);
 
+
+		// 设置上下文
+		contextBean.setSmsTemplate(smsTemplate);
+
+	}
 }

+ 52 - 0
admin/src/main/java/org/springblade/modules/resource/rule/sms/CacheSmsRule.java

@@ -0,0 +1,52 @@
+/*
+ *      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.modules.resource.rule.sms;
+
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.sms.SmsTemplate;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.resource.entity.Sms;
+import org.springblade.modules.resource.rule.context.SmsContext;
+
+import java.util.Map;
+
+/**
+ * 缓存短信构建类
+ *
+ * @author Chill
+ */
+@LiteflowComponent(id = "cacheSmsRule", name = "缓存SMS构建")
+public class CacheSmsRule extends NodeComponent {
+
+	@Override
+	public void process() throws Exception {
+		// 获取上下文
+		String tenantId = this.getRequestData();
+		SmsContext contextBean = this.getContextBean(SmsContext.class);
+
+		Map<String, Sms> smsPool = contextBean.getSmsPool();
+		Map<String, SmsTemplate> templatePool = contextBean.getTemplatePool();
+		Sms smsCached = smsPool.get(tenantId);
+		SmsTemplate template = templatePool.get(tenantId);
+		if (Func.hasEmpty(template, smsCached)) {
+			throw new ServiceException("SMS缓存读取失败!");
+		}
+
+	}
+}

+ 58 - 0
admin/src/main/java/org/springblade/modules/resource/rule/sms/FinallySmsRule.java

@@ -0,0 +1,58 @@
+/*
+ *      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.modules.resource.rule.sms;
+
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.sms.SmsTemplate;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.resource.entity.Sms;
+import org.springblade.modules.resource.rule.context.SmsContext;
+
+import java.util.Map;
+
+/**
+ * Sms后置处理
+ *
+ * @author Chill
+ */
+@LiteflowComponent(id = "finallySmsRule", name = "SMS构建后置处理")
+public class FinallySmsRule extends NodeComponent {
+	@Override
+	public void process() throws Exception {
+		String tenantId = this.getRequestData();
+		SmsContext contextBean = this.getContextBean(SmsContext.class);
+		Map<String, Sms> smsPool = contextBean.getSmsPool();
+		Map<String, SmsTemplate> templatePool = contextBean.getTemplatePool();
+
+		if (contextBean.getIsCached()) {
+			SmsTemplate template = templatePool.get(tenantId);
+			contextBean.setSmsTemplate(template);
+		} else {
+			Sms sms = contextBean.getSms();
+			SmsTemplate template = contextBean.getSmsTemplate();
+			if (Func.hasEmpty(template, sms)) {
+				throw new ServiceException("SMS接口读取失败!");
+			} else {
+				templatePool.put(tenantId, template);
+				smsPool.put(tenantId, sms);
+			}
+		}
+
+	}
+}

+ 52 - 0
admin/src/main/java/org/springblade/modules/resource/rule/sms/PreSmsRule.java

@@ -0,0 +1,52 @@
+/*
+ *      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.modules.resource.rule.sms;
+
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springblade.core.sms.SmsTemplate;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.resource.entity.Sms;
+import org.springblade.modules.resource.rule.context.SmsContext;
+
+import java.util.Map;
+
+/**
+ * Sms前置处理
+ *
+ * @author Chill
+ */
+@LiteflowComponent(id = "preSmsRule", name = "SMS构建前置处理")
+public class PreSmsRule extends NodeComponent {
+	@Override
+	public void process() throws Exception {
+		String tenantId = this.getRequestData();
+		SmsContext contextBean = this.getContextBean(SmsContext.class);
+		Map<String, Sms> smsPool = contextBean.getSmsPool();
+		Map<String, SmsTemplate> templatePool = contextBean.getTemplatePool();
+		Sms sms = contextBean.getSms();
+		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())) {
+			contextBean.setIsCached(Boolean.FALSE);
+		} else {
+			contextBean.setIsCached(Boolean.TRUE);
+		}
+	}
+
+}

+ 19 - 8
admin/src/main/java/org/springblade/modules/resource/builder/sms/QiniuSmsBuilder.java

@@ -14,26 +14,34 @@
  *  this software without specific prior written permission.
  *  Author: Chill 庄骞 (smallchill@163.com)
  */
-package org.springblade.modules.resource.builder.sms;
+package org.springblade.modules.resource.rule.sms;
 
 import com.qiniu.sms.SmsManager;
 import com.qiniu.util.Auth;
-import lombok.SneakyThrows;
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
 import org.springblade.core.redis.cache.BladeRedis;
+import org.springblade.core.sms.QiniuSmsTemplate;
 import org.springblade.core.sms.SmsTemplate;
 import org.springblade.core.sms.props.SmsProperties;
-import org.springblade.core.sms.QiniuSmsTemplate;
 import org.springblade.modules.resource.entity.Sms;
+import org.springblade.modules.resource.rule.context.SmsContext;
 
 /**
  * 七牛云短信构建类
  *
  * @author Chill
  */
-public class QiniuSmsBuilder {
+@LiteflowComponent(id = "qiniuSmsRule", name = "七牛SMS构建")
+public class QiniuSmsRule extends NodeComponent {
+
+	@Override
+	public void process() throws Exception {
+		// 获取上下文
+		SmsContext contextBean = this.getContextBean(SmsContext.class);
+		Sms sms = contextBean.getSms();
+		BladeRedis bladeRedis = contextBean.getBladeRedis();
 
-	@SneakyThrows
-	public static SmsTemplate template(Sms sms, BladeRedis bladeRedis) {
 		SmsProperties smsProperties = new SmsProperties();
 		smsProperties.setTemplateId(sms.getTemplateId());
 		smsProperties.setAccessKey(sms.getAccessKey());
@@ -41,7 +49,10 @@ public class QiniuSmsBuilder {
 		smsProperties.setSignName(sms.getSignName());
 		Auth auth = Auth.create(smsProperties.getAccessKey(), smsProperties.getSecretKey());
 		SmsManager smsManager = new SmsManager(auth);
-		return new QiniuSmsTemplate(smsProperties, smsManager, bladeRedis);
-	}
+		SmsTemplate smsTemplate = new QiniuSmsTemplate(smsProperties, smsManager, bladeRedis);
+
+		// 设置上下文
+		contextBean.setSmsTemplate(smsTemplate);
 
+	}
 }

+ 53 - 0
admin/src/main/java/org/springblade/modules/resource/rule/sms/SmsBuildRule.java

@@ -0,0 +1,53 @@
+/*
+ *      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.modules.resource.rule.sms;
+
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeSwitchComponent;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.core.sms.enums.SmsEnum;
+import org.springblade.modules.resource.entity.Sms;
+import org.springblade.modules.resource.rule.context.SmsContext;
+
+/**
+ * Sms构建判断
+ *
+ * @author Chill
+ */
+@LiteflowComponent(id = "smsBuildRule", name = "SMS构建条件判断")
+public class SmsBuildRule extends NodeSwitchComponent {
+
+	@Override
+	public String processSwitch() {
+		SmsContext contextBean = this.getContextBean(SmsContext.class);
+		Sms sms = contextBean.getSms();
+
+		if (contextBean.getIsCached()) {
+			return "cacheSmsRule";
+		} else if (sms.getCategory() == SmsEnum.YUNPIAN.getCategory()) {
+			return "yunpianSmsRule";
+		} else if (sms.getCategory() == SmsEnum.QINIU.getCategory()) {
+			return "qiniuSmsRule";
+		} else if (sms.getCategory() == SmsEnum.ALI.getCategory()) {
+			return "aliSmsRule";
+		} else if (sms.getCategory() == SmsEnum.TENCENT.getCategory()) {
+			return "tencentSmsRule";
+		}
+
+		throw new ServiceException("未找到SMS配置");
+	}
+}

+ 19 - 8
admin/src/main/java/org/springblade/modules/resource/builder/sms/TencentSmsBuilder.java

@@ -14,33 +14,44 @@
  *  this software without specific prior written permission.
  *  Author: Chill 庄骞 (smallchill@163.com)
  */
-package org.springblade.modules.resource.builder.sms;
+package org.springblade.modules.resource.rule.sms;
 
 import com.github.qcloudsms.SmsMultiSender;
-import lombok.SneakyThrows;
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
 import org.springblade.core.redis.cache.BladeRedis;
 import org.springblade.core.sms.SmsTemplate;
-import org.springblade.core.sms.props.SmsProperties;
 import org.springblade.core.sms.TencentSmsTemplate;
+import org.springblade.core.sms.props.SmsProperties;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.modules.resource.entity.Sms;
+import org.springblade.modules.resource.rule.context.SmsContext;
 
 /**
  * 腾讯云短信构建类
  *
  * @author Chill
  */
-public class TencentSmsBuilder {
+@LiteflowComponent(id = "tencentSmsRule", name = "腾讯SMS构建")
+public class TencentSmsRule extends NodeComponent {
+
+	@Override
+	public void process() throws Exception {
+		// 获取上下文
+		SmsContext contextBean = this.getContextBean(SmsContext.class);
+		Sms sms = contextBean.getSms();
+		BladeRedis bladeRedis = contextBean.getBladeRedis();
 
-	@SneakyThrows
-	public static SmsTemplate template(Sms sms, BladeRedis bladeRedis) {
 		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, bladeRedis);
-	}
+		SmsTemplate smsTemplate = new TencentSmsTemplate(smsProperties, smsSender, bladeRedis);
+
+		// 设置上下文
+		contextBean.setSmsTemplate(smsTemplate);
 
+	}
 }

+ 19 - 8
admin/src/main/java/org/springblade/modules/resource/builder/sms/YunpianSmsBuilder.java

@@ -14,31 +14,42 @@
  *  this software without specific prior written permission.
  *  Author: Chill 庄骞 (smallchill@163.com)
  */
-package org.springblade.modules.resource.builder.sms;
+package org.springblade.modules.resource.rule.sms;
 
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
 import com.yunpian.sdk.YunpianClient;
-import lombok.SneakyThrows;
 import org.springblade.core.redis.cache.BladeRedis;
 import org.springblade.core.sms.SmsTemplate;
-import org.springblade.core.sms.props.SmsProperties;
 import org.springblade.core.sms.YunpianSmsTemplate;
+import org.springblade.core.sms.props.SmsProperties;
 import org.springblade.modules.resource.entity.Sms;
+import org.springblade.modules.resource.rule.context.SmsContext;
 
 /**
  * 云片短信构建类
  *
  * @author Chill
  */
-public class YunpianSmsBuilder {
+@LiteflowComponent(id = "yunpianSmsRule", name = "云片SMS构建")
+public class YunpianSmsRule extends NodeComponent {
+
+	@Override
+	public void process() throws Exception {
+		// 获取上下文
+		SmsContext contextBean = this.getContextBean(SmsContext.class);
+		Sms sms = contextBean.getSms();
+		BladeRedis bladeRedis = contextBean.getBladeRedis();
 
-	@SneakyThrows
-	public static SmsTemplate template(Sms sms, BladeRedis bladeRedis) {
 		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, bladeRedis);
-	}
+		SmsTemplate smsTemplate = new YunpianSmsTemplate(smsProperties, client, bladeRedis);
+
+		// 设置上下文
+		contextBean.setSmsTemplate(smsTemplate);
 
+	}
 }

+ 1 - 1
admin/src/main/java/org/springblade/modules/resource/utils/SmsUtil.java

@@ -23,7 +23,7 @@ import org.springblade.core.tool.utils.Func;
 import org.springblade.core.tool.utils.RandomType;
 import org.springblade.core.tool.utils.SpringUtil;
 import org.springblade.core.tool.utils.StringUtil;
-import org.springblade.modules.resource.builder.sms.SmsBuilder;
+import org.springblade.modules.resource.builder.SmsBuilder;
 
 import java.util.HashMap;
 import java.util.Map;

+ 2 - 3
admin/src/main/java/org/springblade/modules/system/controller/DeptController.java

@@ -30,7 +30,6 @@ import org.springblade.core.launch.constant.AppConstant;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.secure.BladeUser;
 import org.springblade.core.secure.annotation.PreAuth;
-import org.springblade.core.secure.constant.AuthConstant;
 import org.springblade.core.tenant.annotation.NonDS;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.constant.BladeConstant;
@@ -61,7 +60,6 @@ import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
 @AllArgsConstructor
 @RequestMapping(AppConstant.APPLICATION_SYSTEM_NAME + "/dept")
 @Api(value = "部门", tags = "部门")
-@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
 public class DeptController extends BladeController {
 
 	private final IDeptService deptService;
@@ -133,6 +131,7 @@ public class DeptController extends BladeController {
 	/**
 	 * 新增或修改
 	 */
+	@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
 	@PostMapping("/submit")
 	@ApiOperationSupport(order = 6)
 	@ApiOperation(value = "新增或修改", notes = "传入dept")
@@ -151,6 +150,7 @@ public class DeptController extends BladeController {
 	/**
 	 * 删除
 	 */
+	@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
 	@PostMapping("/remove")
 	@ApiOperationSupport(order = 7)
 	@ApiOperation(value = "删除", notes = "传入ids")
@@ -163,7 +163,6 @@ public class DeptController extends BladeController {
 	/**
 	 * 下拉数据源
 	 */
-	@PreAuth(AuthConstant.PERMIT_ALL)
 	@GetMapping("/select")
 	@ApiOperationSupport(order = 8)
 	@ApiOperation(value = "下拉数据源", notes = "传入id集合")

+ 91 - 0
admin/src/main/java/org/springblade/modules/system/rule/TenantContext.java

@@ -0,0 +1,91 @@
+/*
+ *      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.modules.system.rule;
+
+import lombok.Data;
+import org.springblade.core.tenant.TenantId;
+import org.springblade.modules.system.entity.*;
+import org.springblade.modules.system.service.IDictBizService;
+import org.springblade.modules.system.service.IMenuService;
+import org.springblade.modules.system.service.ITenantService;
+
+import java.util.List;
+
+/**
+ * 租户上下文
+ *
+ * @author Chill
+ */
+@Data
+public class TenantContext {
+
+	/**
+	 * 菜单业务
+	 */
+	private IMenuService menuService;
+
+	/**
+	 * 字典业务
+	 */
+	private IDictBizService dictBizService;
+
+	/**
+	 * 租户业务
+	 */
+	private ITenantService tenantService;
+
+	/**
+	 * 租户ID生成器
+	 */
+	private TenantId tenantIdGenerator;
+
+	/**
+	 * 租户
+	 */
+	private Tenant tenant;
+
+	/**
+	 * 角色
+	 */
+	private Role role;
+
+	/**
+	 * 角色菜单合集
+	 */
+	private List<RoleMenu> roleMenuList;
+
+	/**
+	 * 机构
+	 */
+	private Dept dept;
+
+	/**
+	 * 岗位
+	 */
+	private Post post;
+
+	/**
+	 * 业务字典合集
+	 */
+	private List<DictBiz> dictBizList;
+
+	/**
+	 * 用户
+	 */
+	private User user;
+
+}

+ 53 - 0
admin/src/main/java/org/springblade/modules/system/rule/TenantDeptRule.java

@@ -0,0 +1,53 @@
+/*
+ *      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.modules.system.rule;
+
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.modules.system.entity.Dept;
+import org.springblade.modules.system.entity.Tenant;
+
+/**
+ * 租户机构构建
+ *
+ * @author Chill
+ */
+@LiteflowComponent(id = "tenantDeptRule", name = "租户机构构建")
+public class TenantDeptRule extends NodeComponent {
+	@Override
+	public void process() throws Exception {
+		// 获取上下文
+		TenantContext contextBean = this.getFirstContextBean();
+		Tenant tenant = contextBean.getTenant();
+
+		// 新建租户对应的默认部门
+		Dept dept = new Dept();
+		dept.setTenantId(tenant.getTenantId());
+		dept.setParentId(BladeConstant.TOP_PARENT_ID);
+		dept.setAncestors(String.valueOf(BladeConstant.TOP_PARENT_ID));
+		dept.setDeptName(tenant.getTenantName());
+		dept.setFullName(tenant.getTenantName());
+		dept.setDeptCategory(1);
+		dept.setSort(2);
+		dept.setIsDeleted(BladeConstant.DB_NOT_DELETED);
+
+		// 设置上下文
+		contextBean.setDept(dept);
+
+	}
+}

+ 81 - 0
admin/src/main/java/org/springblade/modules/system/rule/TenantDictBizRule.java

@@ -0,0 +1,81 @@
+/*
+ *      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.modules.system.rule;
+
+import com.baomidou.mybatisplus.core.toolkit.IdWorker;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.modules.system.entity.DictBiz;
+import org.springblade.modules.system.entity.Tenant;
+import org.springblade.modules.system.service.IDictBizService;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * 租户业务字典构建
+ *
+ * @author Chill
+ */
+@LiteflowComponent(id = "tenantDictBizRule", name = "租户业务字典构建")
+public class TenantDictBizRule extends NodeComponent {
+	@Override
+	public void process() throws Exception {
+		// 获取上下文
+		TenantContext contextBean = this.getFirstContextBean();
+		Tenant tenant = contextBean.getTenant();
+		IDictBizService dictBizService = contextBean.getDictBizService();
+
+		// 新建租户对应的默认业务字典
+		LinkedList<DictBiz> dictBizs = new LinkedList<>();
+		List<DictBiz> dictBizList = getDictBizs(dictBizService, tenant.getTenantId(), dictBizs);
+
+		// 设置上下文
+		contextBean.setDictBizList(dictBizList);
+
+	}
+
+
+	private List<DictBiz> getDictBizs(IDictBizService dictBizService, String tenantId, LinkedList<DictBiz> dictBizs) {
+		List<DictBiz> dictBizList = dictBizService.list(Wrappers.<DictBiz>query().lambda().eq(DictBiz::getParentId, BladeConstant.TOP_PARENT_ID).eq(DictBiz::getIsDeleted, BladeConstant.DB_NOT_DELETED));
+		dictBizList.forEach(dictBiz -> {
+			Long oldParentId = dictBiz.getId();
+			Long newParentId = IdWorker.getId();
+			dictBiz.setId(newParentId);
+			dictBiz.setTenantId(tenantId);
+			dictBizs.add(dictBiz);
+			recursionDictBiz(dictBizService, tenantId, oldParentId, newParentId, dictBizs);
+		});
+		return dictBizs;
+	}
+
+	private void recursionDictBiz(IDictBizService dictBizService, String tenantId, Long oldParentId, Long newParentId, LinkedList<DictBiz> dictBizs) {
+		List<DictBiz> dictBizList = dictBizService.list(Wrappers.<DictBiz>query().lambda().eq(DictBiz::getParentId, oldParentId).eq(DictBiz::getIsDeleted, BladeConstant.DB_NOT_DELETED));
+		dictBizList.forEach(dictBiz -> {
+			Long oldSubParentId = dictBiz.getId();
+			Long newSubParentId = IdWorker.getId();
+			dictBiz.setId(newSubParentId);
+			dictBiz.setTenantId(tenantId);
+			dictBiz.setParentId(newParentId);
+			dictBizs.add(dictBiz);
+			recursionDictBiz(dictBizService, tenantId, oldSubParentId, newSubParentId, dictBizs);
+		});
+	}
+
+}

+ 23 - 21
admin/src/main/java/org/springblade/modules/develop/service/IModelPrototypeService.java

@@ -14,34 +14,36 @@
  *  this software without specific prior written permission.
  *  Author: Chill 庄骞 (smallchill@163.com)
  */
-package org.springblade.modules.develop.service;
+package org.springblade.modules.system.rule;
 
-import org.springblade.core.mp.base.BaseService;
-import org.springblade.modules.develop.entity.ModelPrototype;
-
-import java.util.List;
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springblade.modules.system.entity.Post;
+import org.springblade.modules.system.entity.Tenant;
 
 /**
- * 数据原型表 服务类
+ * 租户岗位构建
  *
  * @author Chill
  */
-public interface IModelPrototypeService extends BaseService<ModelPrototype> {
+@LiteflowComponent(id = "tenantPostRule", name = "租户岗位构建")
+public class TenantPostRule extends NodeComponent {
+	@Override
+	public void process() throws Exception {
+		// 获取上下文
+		TenantContext contextBean = this.getFirstContextBean();
+		Tenant tenant = contextBean.getTenant();
 
-	/**
-	 * 批量提交
-	 *
-	 * @param modelPrototypes 原型集合
-	 * @return boolean
-	 */
-	boolean submitList(List<ModelPrototype> modelPrototypes);
+		// 新建租户对应的默认岗位
+		Post post = new Post();
+		post.setTenantId(tenant.getTenantId());
+		post.setCategory(1);
+		post.setPostCode("ceo");
+		post.setPostName("首席执行官");
+		post.setSort(1);
 
-	/**
-	 * 原型列表
-	 *
-	 * @param modelId 模型ID
-	 * @return List<ModelPrototype>
-	 */
-	List<ModelPrototype> prototypeList(Long modelId);
+		// 设置上下文
+		contextBean.setPost(post);
 
+	}
 }

+ 79 - 0
admin/src/main/java/org/springblade/modules/system/rule/TenantRoleMenuRule.java

@@ -0,0 +1,79 @@
+/*
+ *      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.modules.system.rule;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springblade.common.cache.ParamCache;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.system.entity.Menu;
+import org.springblade.modules.system.entity.RoleMenu;
+import org.springblade.modules.system.service.IMenuService;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+
+import static org.springblade.common.constant.TenantConstant.ACCOUNT_MENU_CODE_KEY;
+import static org.springblade.common.constant.TenantConstant.MENU_CODES;
+
+/**
+ * 租户角色菜单构建
+ *
+ * @author Chill
+ */
+@LiteflowComponent(id = "tenantRoleMenuRule", name = "租户角色菜单构建")
+public class TenantRoleMenuRule extends NodeComponent {
+	@Override
+	public void process() throws Exception {
+		// 获取上下文
+		TenantContext contextBean = this.getFirstContextBean();
+		IMenuService menuService = contextBean.getMenuService();
+		// 新建租户对应的角色菜单权限
+		LinkedList<Menu> userMenus = new LinkedList<>();
+		// 获取参数配置的默认菜单集合,逗号隔开
+		List<String> menuCodes = Func.toStrList(ParamCache.getValue(ACCOUNT_MENU_CODE_KEY));
+		List<Menu> menus = getMenus(menuService, (!menuCodes.isEmpty() ? menuCodes : MENU_CODES), userMenus);
+		List<RoleMenu> roleMenuList = new ArrayList<>();
+		menus.forEach(menu -> {
+			RoleMenu roleMenu = new RoleMenu();
+			roleMenu.setMenuId(menu.getId());
+			roleMenuList.add(roleMenu);
+		});
+		// 设置上下文
+		contextBean.setRoleMenuList(roleMenuList);
+	}
+
+	private List<Menu> getMenus(IMenuService menuService, List<String> codes, LinkedList<Menu> menus) {
+		codes.forEach(code -> {
+			Menu menu = menuService.getOne(Wrappers.<Menu>query().lambda().eq(Menu::getCode, code).eq(Menu::getIsDeleted, BladeConstant.DB_NOT_DELETED));
+			if (menu != null) {
+				menus.add(menu);
+				recursionMenu(menuService, menu.getId(), menus);
+			}
+		});
+		return menus;
+	}
+
+	private void recursionMenu(IMenuService menuService, Long parentId, LinkedList<Menu> menus) {
+		List<Menu> menuList = menuService.list(Wrappers.<Menu>query().lambda().eq(Menu::getParentId, parentId).eq(Menu::getIsDeleted, BladeConstant.DB_NOT_DELETED));
+		menus.addAll(menuList);
+		menuList.forEach(menu -> recursionMenu(menuService, menu.getId(), menus));
+	}
+}

+ 48 - 0
admin/src/main/java/org/springblade/modules/system/rule/TenantRoleRule.java

@@ -0,0 +1,48 @@
+/*
+ *      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.modules.system.rule;
+
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.modules.system.entity.Role;
+import org.springblade.modules.system.entity.Tenant;
+
+/**
+ * 租户角色构建
+ *
+ * @author Chill
+ */
+@LiteflowComponent(id = "tenantRoleRule", name = "租户角色构建")
+public class TenantRoleRule extends NodeComponent {
+	@Override
+	public void process() throws Exception {
+		// 获取上下文
+		TenantContext contextBean = this.getFirstContextBean();
+		Tenant tenant = contextBean.getTenant();
+		// 新建租户对应的默认角色
+		Role role = new Role();
+		role.setTenantId(tenant.getTenantId());
+		role.setParentId(BladeConstant.TOP_PARENT_ID);
+		role.setRoleName("管理员");
+		role.setRoleAlias("admin");
+		role.setSort(2);
+		role.setIsDeleted(BladeConstant.DB_NOT_DELETED);
+		// 设置上下文
+		contextBean.setRole(role);
+	}
+}

+ 71 - 0
admin/src/main/java/org/springblade/modules/system/rule/TenantRule.java

@@ -0,0 +1,71 @@
+/*
+ *      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.modules.system.rule;
+
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springblade.common.cache.ParamCache;
+import org.springblade.core.tenant.TenantId;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.system.entity.Tenant;
+import org.springblade.modules.system.service.ITenantService;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.springblade.common.constant.TenantConstant.ACCOUNT_NUMBER_KEY;
+import static org.springblade.common.constant.TenantConstant.DEFAULT_ACCOUNT_NUMBER;
+
+/**
+ * 租户构建
+ *
+ * @author Chill
+ */
+@LiteflowComponent(id = "tenantRule", name = "租户构建")
+public class TenantRule extends NodeComponent {
+	@Override
+	public void process() throws Exception {
+		// 获取上下文
+		TenantContext contextBean = this.getFirstContextBean();
+		Tenant tenant = contextBean.getTenant();
+		TenantId tenantIdGenerator = contextBean.getTenantIdGenerator();
+		ITenantService tenantService = contextBean.getTenantService();
+
+		// 获取租户ID
+		List<Tenant> tenants = tenantService.list(Wrappers.<Tenant>query().lambda().eq(Tenant::getIsDeleted, BladeConstant.DB_NOT_DELETED));
+		List<String> codes = tenants.stream().map(Tenant::getTenantId).collect(Collectors.toList());
+		String tenantId = getTenantId(tenantIdGenerator, codes);
+		tenant.setTenantId(tenantId);
+		// 获取参数配置的账号额度
+		int accountNumber = Func.toInt(ParamCache.getValue(ACCOUNT_NUMBER_KEY), DEFAULT_ACCOUNT_NUMBER);
+		tenant.setAccountNumber(accountNumber);
+
+		// 设置上下文
+		contextBean.setTenant(tenant);
+
+	}
+
+	private String getTenantId(TenantId tenantIdGenerator, List<String> codes) {
+		String code = tenantIdGenerator.generate();
+		if (codes.contains(code)) {
+			return getTenantId(tenantIdGenerator, codes);
+		}
+		return code;
+	}
+}

+ 63 - 0
admin/src/main/java/org/springblade/modules/system/rule/TenantUserRule.java

@@ -0,0 +1,63 @@
+/*
+ *      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.modules.system.rule;
+
+import com.yomahub.liteflow.annotation.LiteflowComponent;
+import com.yomahub.liteflow.core.NodeComponent;
+import org.springblade.common.cache.ParamCache;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.modules.auth.enums.UserEnum;
+import org.springblade.modules.system.entity.Tenant;
+import org.springblade.modules.system.entity.User;
+
+import java.util.Date;
+
+import static org.springblade.common.constant.TenantConstant.DEFAULT_PASSWORD;
+import static org.springblade.common.constant.TenantConstant.PASSWORD_KEY;
+
+/**
+ * 租户用户构建
+ *
+ * @author Chill
+ */
+@LiteflowComponent(id = "tenantUserRule", name = "租户用户构建")
+public class TenantUserRule extends NodeComponent {
+	@Override
+	public void process() throws Exception {
+		// 获取上下文
+		TenantContext contextBean = this.getFirstContextBean();
+		Tenant tenant = contextBean.getTenant();
+
+		// 新建租户对应的默认管理用户
+		User user = new User();
+		user.setTenantId(tenant.getTenantId());
+		user.setName("admin");
+		user.setRealName("admin");
+		user.setAccount("admin");
+		// 获取参数配置的密码
+		String password = Func.toStr(ParamCache.getValue(PASSWORD_KEY), DEFAULT_PASSWORD);
+		user.setPassword(password);
+		user.setBirthday(new Date());
+		user.setSex(1);
+		user.setUserType(UserEnum.WEB.getCategory());
+		user.setIsDeleted(BladeConstant.DB_NOT_DELETED);
+
+		// 设置上下文
+		contextBean.setUser(user);
+	}
+}

+ 40 - 127
admin/src/main/java/org/springblade/modules/system/service/impl/TenantServiceImpl.java

@@ -17,10 +17,10 @@
 package org.springblade.modules.system.service.impl;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.yomahub.liteflow.core.FlowExecutor;
+import com.yomahub.liteflow.flow.LiteflowResponse;
 import lombok.AllArgsConstructor;
-import org.springblade.common.cache.ParamCache;
 import org.springblade.core.cache.utils.CacheUtil;
 import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.mp.base.BaseServiceImpl;
@@ -30,20 +30,18 @@ import org.springblade.core.tool.jackson.JsonUtil;
 import org.springblade.core.tool.support.Kv;
 import org.springblade.core.tool.utils.DesUtil;
 import org.springblade.core.tool.utils.Func;
-import org.springblade.modules.auth.enums.UserEnum;
 import org.springblade.modules.system.entity.*;
 import org.springblade.modules.system.mapper.TenantMapper;
+import org.springblade.modules.system.rule.TenantContext;
 import org.springblade.modules.system.service.*;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.ArrayList;
 import java.util.Date;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.stream.Collectors;
 
-import static org.springblade.common.constant.TenantConstant.*;
+import static org.springblade.common.constant.TenantConstant.DES_KEY;
 import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
 
 /**
@@ -55,7 +53,7 @@ import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
 @AllArgsConstructor
 public class TenantServiceImpl extends BaseServiceImpl<TenantMapper, Tenant> implements ITenantService {
 
-	private final TenantId tenantId;
+	private final TenantId tenantIdGenerator;
 	private final IRoleService roleService;
 	private final IMenuService menuService;
 	private final IDeptService deptService;
@@ -63,6 +61,7 @@ public class TenantServiceImpl extends BaseServiceImpl<TenantMapper, Tenant> imp
 	private final IRoleMenuService roleMenuService;
 	private final IDictBizService dictBizService;
 	private final IUserService userService;
+	private final FlowExecutor flowExecutor;
 
 	@Override
 	public IPage<Tenant> selectTenantPage(IPage<Tenant> page, Tenant tenant) {
@@ -78,75 +77,40 @@ public class TenantServiceImpl extends BaseServiceImpl<TenantMapper, Tenant> imp
 	@Transactional(rollbackFor = Exception.class)
 	public boolean submitTenant(Tenant tenant) {
 		if (Func.isEmpty(tenant.getId())) {
-			List<Tenant> tenants = baseMapper.selectList(Wrappers.<Tenant>query().lambda().eq(Tenant::getIsDeleted, BladeConstant.DB_NOT_DELETED));
-			List<String> codes = tenants.stream().map(Tenant::getTenantId).collect(Collectors.toList());
-			String tenantId = getTenantId(codes);
-			tenant.setTenantId(tenantId);
-			// 获取参数配置的账号额度
-			int accountNumber = Func.toInt(ParamCache.getValue(ACCOUNT_NUMBER_KEY), DEFAULT_ACCOUNT_NUMBER);
-			tenant.setAccountNumber(accountNumber);
-			// 新建租户对应的默认角色
-			Role role = new Role();
-			role.setTenantId(tenantId);
-			role.setParentId(BladeConstant.TOP_PARENT_ID);
-			role.setRoleName("管理员");
-			role.setRoleAlias("admin");
-			role.setSort(2);
-			role.setIsDeleted(BladeConstant.DB_NOT_DELETED);
-			roleService.save(role);
-			// 新建租户对应的角色菜单权限
-			LinkedList<Menu> userMenus = new LinkedList<>();
-			// 获取参数配置的默认菜单集合,逗号隔开
-			List<String> menuCodes = Func.toStrList(ParamCache.getValue(ACCOUNT_MENU_CODE_KEY));
-			List<Menu> menus = getMenus((menuCodes.size() > 0 ? menuCodes : MENU_CODES), userMenus);
-			List<RoleMenu> roleMenus = new ArrayList<>();
-			menus.forEach(menu -> {
-				RoleMenu roleMenu = new RoleMenu();
-				roleMenu.setMenuId(menu.getId());
-				roleMenu.setRoleId(role.getId());
-				roleMenus.add(roleMenu);
-			});
-			roleMenuService.saveBatch(roleMenus);
-			// 新建租户对应的默认部门
-			Dept dept = new Dept();
-			dept.setTenantId(tenantId);
-			dept.setParentId(BladeConstant.TOP_PARENT_ID);
-			dept.setAncestors(String.valueOf(BladeConstant.TOP_PARENT_ID));
-			dept.setDeptName(tenant.getTenantName());
-			dept.setFullName(tenant.getTenantName());
-			dept.setDeptCategory(1);
-			dept.setSort(2);
-			dept.setIsDeleted(BladeConstant.DB_NOT_DELETED);
-			deptService.save(dept);
-			// 新建租户对应的默认岗位
-			Post post = new Post();
-			post.setTenantId(tenantId);
-			post.setCategory(1);
-			post.setPostCode("ceo");
-			post.setPostName("首席执行官");
-			post.setSort(1);
-			postService.save(post);
-			// 新建租户对应的默认业务字典
-			LinkedList<DictBiz> dictBizs = new LinkedList<>();
-			List<DictBiz> dictBizList = getDictBizs(tenantId, dictBizs);
-			dictBizService.saveBatch(dictBizList);
-			// 新建租户对应的默认管理用户
-			User user = new User();
-			user.setTenantId(tenantId);
-			user.setName("admin");
-			user.setRealName("admin");
-			user.setAccount("admin");
-			// 获取参数配置的密码
-			String password = Func.toStr(ParamCache.getValue(PASSWORD_KEY), DEFAULT_PASSWORD);
-			user.setPassword(password);
-			user.setRoleId(String.valueOf(role.getId()));
-			user.setDeptId(String.valueOf(dept.getId()));
-			user.setPostId(String.valueOf(post.getId()));
-			user.setBirthday(new Date());
-			user.setSex(1);
-			user.setUserType(UserEnum.WEB.getCategory());
-			user.setIsDeleted(BladeConstant.DB_NOT_DELETED);
-			userService.submit(user);
+			TenantContext tenantContext = new TenantContext();
+			tenantContext.setTenantIdGenerator(tenantIdGenerator);
+			tenantContext.setTenant(tenant);
+			tenantContext.setMenuService(menuService);
+			tenantContext.setDictBizService(dictBizService);
+			tenantContext.setTenantService(this);
+
+			LiteflowResponse resp = flowExecutor.execute2Resp("tenantChain", null, tenantContext);
+			if (resp.isSuccess()) {
+				Role role = tenantContext.getRole();
+				roleService.save(role);
+
+				Long roleId = role.getId();
+				List<RoleMenu> roleMenuList = tenantContext.getRoleMenuList();
+				roleMenuList.forEach(roleMenu -> roleMenu.setRoleId(roleId));
+				roleMenuService.saveBatch(roleMenuList);
+
+				Dept dept = tenantContext.getDept();
+				deptService.save(dept);
+
+				Post post = tenantContext.getPost();
+				postService.save(post);
+
+				List<DictBiz> dictBizList = tenantContext.getDictBizList();
+				dictBizService.saveBatch(dictBizList);
+
+				User user = tenantContext.getUser();
+				user.setRoleId(String.valueOf(role.getId()));
+				user.setDeptId(String.valueOf(dept.getId()));
+				user.setPostId(String.valueOf(post.getId()));
+				userService.submit(user);
+			} else {
+				throw new ServiceException("租户业务数据构建异常");
+			}
 		}
 		CacheUtil.clear(SYS_CACHE, tenant.getTenantId());
 		return super.saveOrUpdate(tenant);
@@ -185,55 +149,4 @@ public class TenantServiceImpl extends BaseServiceImpl<TenantMapper, Tenant> imp
 		return true;
 	}
 
-	private String getTenantId(List<String> codes) {
-		String code = tenantId.generate();
-		if (codes.contains(code)) {
-			return getTenantId(codes);
-		}
-		return code;
-	}
-
-	private List<Menu> getMenus(List<String> codes, LinkedList<Menu> menus) {
-		codes.forEach(code -> {
-			Menu menu = menuService.getOne(Wrappers.<Menu>query().lambda().eq(Menu::getCode, code).eq(Menu::getIsDeleted, BladeConstant.DB_NOT_DELETED));
-			if (menu != null) {
-				menus.add(menu);
-				recursionMenu(menu.getId(), menus);
-			}
-		});
-		return menus;
-	}
-
-	private void recursionMenu(Long parentId, LinkedList<Menu> menus) {
-		List<Menu> menuList = menuService.list(Wrappers.<Menu>query().lambda().eq(Menu::getParentId, parentId).eq(Menu::getIsDeleted, BladeConstant.DB_NOT_DELETED));
-		menus.addAll(menuList);
-		menuList.forEach(menu -> recursionMenu(menu.getId(), menus));
-	}
-
-	private List<DictBiz> getDictBizs(String tenantId, LinkedList<DictBiz> dictBizs) {
-		List<DictBiz> dictBizList = dictBizService.list(Wrappers.<DictBiz>query().lambda().eq(DictBiz::getParentId, BladeConstant.TOP_PARENT_ID).eq(DictBiz::getIsDeleted, BladeConstant.DB_NOT_DELETED));
-		dictBizList.forEach(dictBiz -> {
-			Long oldParentId = dictBiz.getId();
-			Long newParentId = IdWorker.getId();
-			dictBiz.setId(newParentId);
-			dictBiz.setTenantId(tenantId);
-			dictBizs.add(dictBiz);
-			recursionDictBiz(tenantId, oldParentId, newParentId, dictBizs);
-		});
-		return dictBizs;
-	}
-
-	private void recursionDictBiz(String tenantId, Long oldParentId, Long newParentId, LinkedList<DictBiz> dictBizs) {
-		List<DictBiz> dictBizList = dictBizService.list(Wrappers.<DictBiz>query().lambda().eq(DictBiz::getParentId, oldParentId).eq(DictBiz::getIsDeleted, BladeConstant.DB_NOT_DELETED));
-		dictBizList.forEach(dictBiz -> {
-			Long oldSubParentId = dictBiz.getId();
-			Long newSubParentId = IdWorker.getId();
-			dictBiz.setId(newSubParentId);
-			dictBiz.setTenantId(tenantId);
-			dictBiz.setParentId(newParentId);
-			dictBizs.add(dictBiz);
-			recursionDictBiz(tenantId, oldSubParentId, newSubParentId, dictBizs);
-		});
-	}
-
 }

+ 15 - 15
admin/src/main/java/org/springblade/modules/ycwh/controller/pc/AccountController.java

@@ -16,34 +16,34 @@
  */
 package org.springblade.modules.ycwh.controller.pc;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+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 com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.ycwh.entity.AccountEntity;
-import org.springblade.modules.ycwh.vo.AccountVO;
 import org.springblade.modules.ycwh.excel.AccountExcel;
-import org.springblade.modules.ycwh.wrapper.AccountWrapper;
 import org.springblade.modules.ycwh.service.IAccountService;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.modules.ycwh.vo.AccountVO;
+import org.springblade.modules.ycwh.wrapper.AccountWrapper;
+import org.springframework.web.bind.annotation.*;
 import springfox.documentation.annotations.ApiIgnore;
-import java.util.Map;
-import java.util.List;
+
 import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 账号表 控制器

+ 15 - 15
admin/src/main/java/org/springblade/modules/ycwh/controller/pc/CollectInfoController.java

@@ -16,34 +16,34 @@
  */
 package org.springblade.modules.ycwh.controller.pc;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+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 com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.ycwh.entity.CollectInfoEntity;
-import org.springblade.modules.ycwh.vo.CollectInfoVO;
 import org.springblade.modules.ycwh.excel.CollectInfoExcel;
-import org.springblade.modules.ycwh.wrapper.CollectInfoWrapper;
 import org.springblade.modules.ycwh.service.ICollectInfoService;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.modules.ycwh.vo.CollectInfoVO;
+import org.springblade.modules.ycwh.wrapper.CollectInfoWrapper;
+import org.springframework.web.bind.annotation.*;
 import springfox.documentation.annotations.ApiIgnore;
-import java.util.Map;
-import java.util.List;
+
 import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 名菜名点名店收藏 控制器

+ 15 - 15
admin/src/main/java/org/springblade/modules/ycwh/controller/pc/DocumentInfoController.java

@@ -16,34 +16,34 @@
  */
 package org.springblade.modules.ycwh.controller.pc;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+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 com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.ycwh.entity.DocumentInfoEntity;
-import org.springblade.modules.ycwh.vo.DocumentInfoVO;
 import org.springblade.modules.ycwh.excel.DocumentInfoExcel;
-import org.springblade.modules.ycwh.wrapper.DocumentInfoWrapper;
 import org.springblade.modules.ycwh.service.IDocumentInfoService;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.modules.ycwh.vo.DocumentInfoVO;
+import org.springblade.modules.ycwh.wrapper.DocumentInfoWrapper;
+import org.springframework.web.bind.annotation.*;
 import springfox.documentation.annotations.ApiIgnore;
-import java.util.Map;
-import java.util.List;
+
 import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 文档信息 控制器

+ 15 - 15
admin/src/main/java/org/springblade/modules/ycwh/controller/pc/FamousDishController.java

@@ -16,34 +16,34 @@
  */
 package org.springblade.modules.ycwh.controller.pc;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+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 com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.ycwh.entity.FamousDishEntity;
-import org.springblade.modules.ycwh.vo.FamousDishVO;
 import org.springblade.modules.ycwh.excel.FamousDishExcel;
-import org.springblade.modules.ycwh.wrapper.FamousDishWrapper;
 import org.springblade.modules.ycwh.service.IFamousDishService;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.modules.ycwh.vo.FamousDishVO;
+import org.springblade.modules.ycwh.wrapper.FamousDishWrapper;
+import org.springframework.web.bind.annotation.*;
 import springfox.documentation.annotations.ApiIgnore;
-import java.util.Map;
-import java.util.List;
+
 import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 名菜 控制器

+ 15 - 15
admin/src/main/java/org/springblade/modules/ycwh/controller/pc/FamousLocationController.java

@@ -16,34 +16,34 @@
  */
 package org.springblade.modules.ycwh.controller.pc;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+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 com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.ycwh.entity.FamousLocationEntity;
-import org.springblade.modules.ycwh.vo.FamousLocationVO;
 import org.springblade.modules.ycwh.excel.FamousLocationExcel;
-import org.springblade.modules.ycwh.wrapper.FamousLocationWrapper;
 import org.springblade.modules.ycwh.service.IFamousLocationService;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.modules.ycwh.vo.FamousLocationVO;
+import org.springblade.modules.ycwh.wrapper.FamousLocationWrapper;
+import org.springframework.web.bind.annotation.*;
 import springfox.documentation.annotations.ApiIgnore;
-import java.util.Map;
-import java.util.List;
+
 import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 名点 控制器

+ 15 - 15
admin/src/main/java/org/springblade/modules/ycwh/controller/pc/FamousStoreController.java

@@ -16,34 +16,34 @@
  */
 package org.springblade.modules.ycwh.controller.pc;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+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 com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.ycwh.entity.FamousStoreEntity;
-import org.springblade.modules.ycwh.vo.FamousStoreVO;
 import org.springblade.modules.ycwh.excel.FamousStoreExcel;
-import org.springblade.modules.ycwh.wrapper.FamousStoreWrapper;
 import org.springblade.modules.ycwh.service.IFamousStoreService;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.modules.ycwh.vo.FamousStoreVO;
+import org.springblade.modules.ycwh.wrapper.FamousStoreWrapper;
+import org.springframework.web.bind.annotation.*;
 import springfox.documentation.annotations.ApiIgnore;
-import java.util.Map;
-import java.util.List;
+
 import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 名店 控制器

+ 15 - 15
admin/src/main/java/org/springblade/modules/ycwh/controller/pc/FeedbackController.java

@@ -16,34 +16,34 @@
  */
 package org.springblade.modules.ycwh.controller.pc;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+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 com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.ycwh.entity.FeedbackEntity;
-import org.springblade.modules.ycwh.vo.FeedbackVO;
 import org.springblade.modules.ycwh.excel.FeedbackExcel;
-import org.springblade.modules.ycwh.wrapper.FeedbackWrapper;
 import org.springblade.modules.ycwh.service.IFeedbackService;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.modules.ycwh.vo.FeedbackVO;
+import org.springblade.modules.ycwh.wrapper.FeedbackWrapper;
+import org.springframework.web.bind.annotation.*;
 import springfox.documentation.annotations.ApiIgnore;
-import java.util.Map;
-import java.util.List;
+
 import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 反馈信息 控制器

+ 15 - 15
admin/src/main/java/org/springblade/modules/ycwh/controller/pc/InformationInfoController.java

@@ -16,34 +16,34 @@
  */
 package org.springblade.modules.ycwh.controller.pc;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+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 com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.ycwh.entity.InformationInfoEntity;
-import org.springblade.modules.ycwh.vo.InformationInfoVO;
 import org.springblade.modules.ycwh.excel.InformationInfoExcel;
-import org.springblade.modules.ycwh.wrapper.InformationInfoWrapper;
 import org.springblade.modules.ycwh.service.IInformationInfoService;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.modules.ycwh.vo.InformationInfoVO;
+import org.springblade.modules.ycwh.wrapper.InformationInfoWrapper;
+import org.springframework.web.bind.annotation.*;
 import springfox.documentation.annotations.ApiIgnore;
-import java.util.Map;
-import java.util.List;
+
 import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 资讯信息 控制器

+ 15 - 15
admin/src/main/java/org/springblade/modules/ycwh/controller/pc/MemberInfoController.java

@@ -16,34 +16,34 @@
  */
 package org.springblade.modules.ycwh.controller.pc;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+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 com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.ycwh.entity.MemberInfoEntity;
-import org.springblade.modules.ycwh.vo.MemberInfoVO;
 import org.springblade.modules.ycwh.excel.MemberInfoExcel;
-import org.springblade.modules.ycwh.wrapper.MemberInfoWrapper;
 import org.springblade.modules.ycwh.service.IMemberInfoService;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.modules.ycwh.vo.MemberInfoVO;
+import org.springblade.modules.ycwh.wrapper.MemberInfoWrapper;
+import org.springframework.web.bind.annotation.*;
 import springfox.documentation.annotations.ApiIgnore;
-import java.util.Map;
-import java.util.List;
+
 import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 会员信息 控制器

+ 15 - 15
admin/src/main/java/org/springblade/modules/ycwh/controller/pc/ProfessionalStyleController.java

@@ -16,34 +16,34 @@
  */
 package org.springblade.modules.ycwh.controller.pc;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+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 com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import lombok.AllArgsConstructor;
-import javax.validation.Valid;
-
-import org.springblade.core.secure.BladeUser;
+import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
 import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.core.tool.utils.Func;
-import org.springframework.web.bind.annotation.*;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.springblade.modules.ycwh.entity.ProfessionalStyleEntity;
-import org.springblade.modules.ycwh.vo.ProfessionalStyleVO;
 import org.springblade.modules.ycwh.excel.ProfessionalStyleExcel;
-import org.springblade.modules.ycwh.wrapper.ProfessionalStyleWrapper;
 import org.springblade.modules.ycwh.service.IProfessionalStyleService;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.excel.util.ExcelUtil;
-import org.springblade.core.tool.constant.BladeConstant;
+import org.springblade.modules.ycwh.vo.ProfessionalStyleVO;
+import org.springblade.modules.ycwh.wrapper.ProfessionalStyleWrapper;
+import org.springframework.web.bind.annotation.*;
 import springfox.documentation.annotations.ApiIgnore;
-import java.util.Map;
-import java.util.List;
+
 import javax.servlet.http.HttpServletResponse;
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 烹饪专业风采 控制器

+ 1 - 1
admin/src/main/java/org/springblade/modules/ycwh/dto/AccountDTO.java

@@ -16,9 +16,9 @@
  */
 package org.springblade.modules.ycwh.dto;
 
-import org.springblade.modules.ycwh.entity.AccountEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.springblade.modules.ycwh.entity.AccountEntity;
 
 /**
  * 账号表 数据传输对象实体类

+ 1 - 1
admin/src/main/java/org/springblade/modules/ycwh/dto/CollectInfoDTO.java

@@ -16,9 +16,9 @@
  */
 package org.springblade.modules.ycwh.dto;
 
-import org.springblade.modules.ycwh.entity.CollectInfoEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.springblade.modules.ycwh.entity.CollectInfoEntity;
 
 /**
  * 名菜名点名店收藏 数据传输对象实体类

+ 1 - 1
admin/src/main/java/org/springblade/modules/ycwh/dto/DocumentInfoDTO.java

@@ -16,9 +16,9 @@
  */
 package org.springblade.modules.ycwh.dto;
 
-import org.springblade.modules.ycwh.entity.DocumentInfoEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.springblade.modules.ycwh.entity.DocumentInfoEntity;
 
 /**
  * 文档信息 数据传输对象实体类

+ 1 - 1
admin/src/main/java/org/springblade/modules/ycwh/dto/FamousDishDTO.java

@@ -16,9 +16,9 @@
  */
 package org.springblade.modules.ycwh.dto;
 
-import org.springblade.modules.ycwh.entity.FamousDishEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.springblade.modules.ycwh.entity.FamousDishEntity;
 
 /**
  * 名菜 数据传输对象实体类

+ 1 - 1
admin/src/main/java/org/springblade/modules/ycwh/dto/FamousLocationDTO.java

@@ -16,9 +16,9 @@
  */
 package org.springblade.modules.ycwh.dto;
 
-import org.springblade.modules.ycwh.entity.FamousLocationEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.springblade.modules.ycwh.entity.FamousLocationEntity;
 
 /**
  * 名点 数据传输对象实体类

+ 1 - 1
admin/src/main/java/org/springblade/modules/ycwh/dto/FamousStoreDTO.java

@@ -16,9 +16,9 @@
  */
 package org.springblade.modules.ycwh.dto;
 
-import org.springblade.modules.ycwh.entity.FamousStoreEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.springblade.modules.ycwh.entity.FamousStoreEntity;
 
 /**
  * 名店 数据传输对象实体类

+ 1 - 1
admin/src/main/java/org/springblade/modules/ycwh/dto/FeedbackDTO.java

@@ -16,9 +16,9 @@
  */
 package org.springblade.modules.ycwh.dto;
 
-import org.springblade.modules.ycwh.entity.FeedbackEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.springblade.modules.ycwh.entity.FeedbackEntity;
 
 /**
  * 反馈信息 数据传输对象实体类

+ 1 - 1
admin/src/main/java/org/springblade/modules/ycwh/dto/InformationInfoDTO.java

@@ -16,9 +16,9 @@
  */
 package org.springblade.modules.ycwh.dto;
 
-import org.springblade.modules.ycwh.entity.InformationInfoEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.springblade.modules.ycwh.entity.InformationInfoEntity;
 
 /**
  * 资讯信息 数据传输对象实体类

+ 1 - 1
admin/src/main/java/org/springblade/modules/ycwh/dto/MemberInfoDTO.java

@@ -16,9 +16,9 @@
  */
 package org.springblade.modules.ycwh.dto;
 
-import org.springblade.modules.ycwh.entity.MemberInfoEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.springblade.modules.ycwh.entity.MemberInfoEntity;
 
 /**
  * 会员信息 数据传输对象实体类

+ 1 - 1
admin/src/main/java/org/springblade/modules/ycwh/dto/ProfessionalStyleDTO.java

@@ -16,9 +16,9 @@
  */
 package org.springblade.modules.ycwh.dto;
 
-import org.springblade.modules.ycwh.entity.ProfessionalStyleEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.springblade.modules.ycwh.entity.ProfessionalStyleEntity;
 
 /**
  * 烹饪专业风采 数据传输对象实体类

+ 2 - 4
admin/src/main/java/org/springblade/modules/ycwh/excel/AccountExcel.java

@@ -17,14 +17,12 @@
 package org.springblade.modules.ycwh.excel;
 
 
-import lombok.Data;
-
-import java.util.Date;
-import java.lang.Boolean;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
 import com.alibaba.excel.annotation.write.style.ContentRowHeight;
 import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
 import java.io.Serializable;
 
 

+ 2 - 4
admin/src/main/java/org/springblade/modules/ycwh/excel/CollectInfoExcel.java

@@ -17,14 +17,12 @@
 package org.springblade.modules.ycwh.excel;
 
 
-import lombok.Data;
-
-import java.util.Date;
-import java.lang.Boolean;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
 import com.alibaba.excel.annotation.write.style.ContentRowHeight;
 import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
 import java.io.Serializable;
 
 

+ 3 - 5
admin/src/main/java/org/springblade/modules/ycwh/excel/DocumentInfoExcel.java

@@ -17,16 +17,14 @@
 package org.springblade.modules.ycwh.excel;
 
 
-import lombok.Data;
-
-import java.util.Date;
-import java.lang.Boolean;
-import java.math.BigDecimal;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
 import com.alibaba.excel.annotation.write.style.ContentRowHeight;
 import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
 import java.io.Serializable;
+import java.math.BigDecimal;
 
 
 /**

+ 3 - 5
admin/src/main/java/org/springblade/modules/ycwh/excel/FamousDishExcel.java

@@ -17,16 +17,14 @@
 package org.springblade.modules.ycwh.excel;
 
 
-import lombok.Data;
-
-import java.util.Date;
-import java.lang.Boolean;
-import java.math.BigDecimal;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
 import com.alibaba.excel.annotation.write.style.ContentRowHeight;
 import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
 import java.io.Serializable;
+import java.math.BigDecimal;
 
 
 /**

+ 2 - 3
admin/src/main/java/org/springblade/modules/ycwh/excel/FamousLocationExcel.java

@@ -17,12 +17,11 @@
 package org.springblade.modules.ycwh.excel;
 
 
-import lombok.Data;
-
-import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
 import com.alibaba.excel.annotation.write.style.ContentRowHeight;
 import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
 import java.io.Serializable;
 
 

+ 3 - 5
admin/src/main/java/org/springblade/modules/ycwh/excel/FamousStoreExcel.java

@@ -17,16 +17,14 @@
 package org.springblade.modules.ycwh.excel;
 
 
-import lombok.Data;
-
-import java.util.Date;
-import java.lang.Boolean;
-import java.math.BigDecimal;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
 import com.alibaba.excel.annotation.write.style.ContentRowHeight;
 import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
 import java.io.Serializable;
+import java.math.BigDecimal;
 
 
 /**

+ 2 - 4
admin/src/main/java/org/springblade/modules/ycwh/excel/FeedbackExcel.java

@@ -17,14 +17,12 @@
 package org.springblade.modules.ycwh.excel;
 
 
-import lombok.Data;
-
-import java.util.Date;
-import java.lang.Boolean;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
 import com.alibaba.excel.annotation.write.style.ContentRowHeight;
 import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
 import java.io.Serializable;
 
 

+ 2 - 4
admin/src/main/java/org/springblade/modules/ycwh/excel/InformationInfoExcel.java

@@ -17,14 +17,12 @@
 package org.springblade.modules.ycwh.excel;
 
 
-import lombok.Data;
-
-import java.util.Date;
-import java.lang.Boolean;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
 import com.alibaba.excel.annotation.write.style.ContentRowHeight;
 import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
 import java.io.Serializable;
 
 

+ 3 - 4
admin/src/main/java/org/springblade/modules/ycwh/excel/MemberInfoExcel.java

@@ -17,15 +17,14 @@
 package org.springblade.modules.ycwh.excel;
 
 
-import lombok.Data;
-
-import java.util.Date;
-import java.lang.Boolean;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
 import com.alibaba.excel.annotation.write.style.ContentRowHeight;
 import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
 import java.io.Serializable;
+import java.util.Date;
 
 
 /**

+ 3 - 5
admin/src/main/java/org/springblade/modules/ycwh/excel/ProfessionalStyleExcel.java

@@ -17,16 +17,14 @@
 package org.springblade.modules.ycwh.excel;
 
 
-import lombok.Data;
-
-import java.util.Date;
-import java.lang.Boolean;
-import java.math.BigDecimal;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
 import com.alibaba.excel.annotation.write.style.ContentRowHeight;
 import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.Data;
+
 import java.io.Serializable;
+import java.math.BigDecimal;
 
 
 /**

+ 0 - 0
admin/src/main/java/org/springblade/modules/ycwh/mapper/AccountMapper.java


Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.