diff --git a/base-server/Dockerfile b/base-server/Dockerfile
new file mode 100644
index 00000000..b8d33a5c
--- /dev/null
+++ b/base-server/Dockerfile
@@ -0,0 +1,13 @@
+FROM openjdk:17-jre-slim
+
+# 设置应用目录
+WORKDIR /app
+
+# 复制应用文件
+COPY target/base-server.jar /app/base-server.jar
+
+# 暴露端口
+EXPOSE 48200
+
+# 运行应用
+ENTRYPOINT ["java", "-jar", "/app/base-server.jar"]
diff --git a/base-server/pom.xml b/base-server/pom.xml
new file mode 100644
index 00000000..57b02722
--- /dev/null
+++ b/base-server/pom.xml
@@ -0,0 +1,104 @@
+
+
+
+ cn.iocoder.cloud
+ yudao
+ ${revision}
+
+ 4.0.0
+ base-server
+ jar
+
+ base-server
+ Base 服务器
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-base-server
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-contract-order-server
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ true
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-protection
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/base-server/src/main/java/cn/iocoder/yudao/base/BaseServerApplication.java b/base-server/src/main/java/cn/iocoder/yudao/base/BaseServerApplication.java
new file mode 100644
index 00000000..8bdc4403
--- /dev/null
+++ b/base-server/src/main/java/cn/iocoder/yudao/base/BaseServerApplication.java
@@ -0,0 +1,20 @@
+package cn.iocoder.yudao.base;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Base 服务器的启动类
+ *
+ * @author ZT
+ */
+@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${yudao.info.base-package}
+@SpringBootApplication(scanBasePackages = {"${yudao.info.base-package}.base", "${yudao.info.base-package}.module"},
+ excludeName = {})
+public class BaseServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(BaseServerApplication.class, args);
+ }
+
+}
diff --git a/base-server/src/main/java/cn/iocoder/yudao/base/controller/base/BaseController.java b/base-server/src/main/java/cn/iocoder/yudao/base/controller/base/BaseController.java
new file mode 100644
index 00000000..44b12a8a
--- /dev/null
+++ b/base-server/src/main/java/cn/iocoder/yudao/base/controller/base/BaseController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.base.controller.base;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * base 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "base")
+@RestController
+@RequestMapping("/base")
+public class BaseController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello base")
+ public CommonResult hello() {
+ return success("Hello, base!");
+ }
+
+}
diff --git a/base-server/src/main/resources/application-dev.yml b/base-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/base-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/base-server/src/main/resources/application-local.yml b/base-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..99a2921c
--- /dev/null
+++ b/base-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.base.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/base-server/src/main/resources/application.yml b/base-server/src/main/resources/application.yml
new file mode 100644
index 00000000..a0b16978
--- /dev/null
+++ b/base-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: base-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48100
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/logistics-server/Dockerfile b/logistics-server/Dockerfile
new file mode 100644
index 00000000..7fc67d10
--- /dev/null
+++ b/logistics-server/Dockerfile
@@ -0,0 +1,13 @@
+FROM openjdk:17-jre-slim
+
+# 设置应用目录
+WORKDIR /app
+
+# 复制应用文件
+COPY target/logistics-server.jar /app/logistics-server.jar
+
+# 暴露端口
+EXPOSE 48204
+
+# 运行应用
+ENTRYPOINT ["java", "-jar", "/app/logistics-server.jar"]
diff --git a/logistics-server/pom.xml b/logistics-server/pom.xml
new file mode 100644
index 00000000..f5cfafae
--- /dev/null
+++ b/logistics-server/pom.xml
@@ -0,0 +1,92 @@
+
+
+
+ cn.iocoder.cloud
+ yudao
+ ${revision}
+
+ 4.0.0
+ logistics-server
+ jar
+
+ logistics-server
+ Logistics 服务器
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-backend-logistics-server
+ ${revision}
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ true
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-protection
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/logistics-server/src/main/java/cn/iocoder/yudao/logistics/LogisticsServerApplication.java b/logistics-server/src/main/java/cn/iocoder/yudao/logistics/LogisticsServerApplication.java
new file mode 100644
index 00000000..b3063a52
--- /dev/null
+++ b/logistics-server/src/main/java/cn/iocoder/yudao/logistics/LogisticsServerApplication.java
@@ -0,0 +1,20 @@
+package cn.iocoder.yudao.logistics;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Logistics 服务器的启动类
+ *
+ * @author ZT
+ */
+@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${yudao.info.base-package}
+@SpringBootApplication(scanBasePackages = {"${yudao.info.base-package}.logistics", "${yudao.info.base-package}.module"},
+ excludeName = {})
+public class LogisticsServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(LogisticsServerApplication.class, args);
+ }
+
+}
diff --git a/logistics-server/src/main/java/cn/iocoder/yudao/logistics/controller/logistics/LogisticsController.java b/logistics-server/src/main/java/cn/iocoder/yudao/logistics/controller/logistics/LogisticsController.java
new file mode 100644
index 00000000..2f98b801
--- /dev/null
+++ b/logistics-server/src/main/java/cn/iocoder/yudao/logistics/controller/logistics/LogisticsController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.logistics.controller.logistics;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * logistics 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "logistics")
+@RestController
+@RequestMapping("/logistics")
+public class LogisticsController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello logistics")
+ public CommonResult hello() {
+ return success("Hello, logistics!");
+ }
+
+}
diff --git a/logistics-server/src/main/resources/application-dev.yml b/logistics-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/logistics-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/logistics-server/src/main/resources/application-local.yml b/logistics-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..99a2921c
--- /dev/null
+++ b/logistics-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.base.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/logistics-server/src/main/resources/application.yml b/logistics-server/src/main/resources/application.yml
new file mode 100644
index 00000000..91fce0a1
--- /dev/null
+++ b/logistics-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: logistics-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48101
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/manage-server/Dockerfile b/manage-server/Dockerfile
new file mode 100644
index 00000000..e8699401
--- /dev/null
+++ b/manage-server/Dockerfile
@@ -0,0 +1,13 @@
+FROM openjdk:17-jre-slim
+
+# 设置应用目录
+WORKDIR /app
+
+# 复制应用文件
+COPY target/manage-server.jar /app/manage-server.jar
+
+# 暴露端口
+EXPOSE 48201
+
+# 运行应用
+ENTRYPOINT ["java", "-jar", "/app/manage-server.jar"]
diff --git a/manage-server/pom.xml b/manage-server/pom.xml
new file mode 100644
index 00000000..6fe9792b
--- /dev/null
+++ b/manage-server/pom.xml
@@ -0,0 +1,92 @@
+
+
+
+ cn.iocoder.cloud
+ yudao
+ ${revision}
+
+ 4.0.0
+ manage-server
+ jar
+
+ manage-server
+ Manage 服务器
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-manage-server
+ ${revision}
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ true
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-protection
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/manage-server/src/main/java/cn/iocoder/yudao/manage/ManageServerApplication.java b/manage-server/src/main/java/cn/iocoder/yudao/manage/ManageServerApplication.java
new file mode 100644
index 00000000..94f7c733
--- /dev/null
+++ b/manage-server/src/main/java/cn/iocoder/yudao/manage/ManageServerApplication.java
@@ -0,0 +1,20 @@
+package cn.iocoder.yudao.manage;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Manage 服务器的启动类
+ *
+ * @author ZT
+ */
+@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${yudao.info.base-package}
+@SpringBootApplication(scanBasePackages = {"${yudao.info.base-package}.manage", "${yudao.info.base-package}.module"},
+ excludeName = {})
+public class ManageServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(ManageServerApplication.class, args);
+ }
+
+}
diff --git a/manage-server/src/main/java/cn/iocoder/yudao/manage/controller/manage/ManageController.java b/manage-server/src/main/java/cn/iocoder/yudao/manage/controller/manage/ManageController.java
new file mode 100644
index 00000000..c5b4c0d7
--- /dev/null
+++ b/manage-server/src/main/java/cn/iocoder/yudao/manage/controller/manage/ManageController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.manage.controller.manage;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * manage 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "manage")
+@RestController
+@RequestMapping("/manage")
+public class ManageController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello manage")
+ public CommonResult hello() {
+ return success("Hello, manage!");
+ }
+
+}
diff --git a/manage-server/src/main/resources/application-dev.yml b/manage-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/manage-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/manage-server/src/main/resources/application-local.yml b/manage-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..99a2921c
--- /dev/null
+++ b/manage-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.base.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/manage-server/src/main/resources/application.yml b/manage-server/src/main/resources/application.yml
new file mode 100644
index 00000000..3595891b
--- /dev/null
+++ b/manage-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: manage-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48102
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/mes-server/Dockerfile b/mes-server/Dockerfile
new file mode 100644
index 00000000..afe9449e
--- /dev/null
+++ b/mes-server/Dockerfile
@@ -0,0 +1,13 @@
+FROM openjdk:17-jre-slim
+
+# 设置应用目录
+WORKDIR /app
+
+# 复制应用文件
+COPY target/mes-server.jar /app/mes-server.jar
+
+# 暴露端口
+EXPOSE 48203
+
+# 运行应用
+ENTRYPOINT ["java", "-jar", "/app/mes-server.jar"]
diff --git a/mes-server/pom.xml b/mes-server/pom.xml
new file mode 100644
index 00000000..512fd155
--- /dev/null
+++ b/mes-server/pom.xml
@@ -0,0 +1,112 @@
+
+
+
+ cn.iocoder.cloud
+ yudao
+ ${revision}
+
+ 4.0.0
+ mes-server
+ jar
+
+ mes-server
+ Mes 服务器
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-indicator
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-product-server
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-energy-server
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-quality-server
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-warehouse-server
+ ${revision}
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ true
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-protection
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/mes-server/src/main/java/cn/iocoder/yudao/mes/MesServerApplication.java b/mes-server/src/main/java/cn/iocoder/yudao/mes/MesServerApplication.java
new file mode 100644
index 00000000..4c317d91
--- /dev/null
+++ b/mes-server/src/main/java/cn/iocoder/yudao/mes/MesServerApplication.java
@@ -0,0 +1,20 @@
+package cn.iocoder.yudao.mes;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Mes 服务器的启动类
+ *
+ * @author ZT
+ */
+@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${yudao.info.base-package}
+@SpringBootApplication(scanBasePackages = {"${yudao.info.base-package}.mes", "${yudao.info.base-package}.module"},
+ excludeName = {})
+public class MesServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(MesServerApplication.class, args);
+ }
+
+}
diff --git a/mes-server/src/main/java/cn/iocoder/yudao/mes/controller/mes/MesController.java b/mes-server/src/main/java/cn/iocoder/yudao/mes/controller/mes/MesController.java
new file mode 100644
index 00000000..f0ed9d7b
--- /dev/null
+++ b/mes-server/src/main/java/cn/iocoder/yudao/mes/controller/mes/MesController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.mes.controller.mes;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * mes 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "mes")
+@RestController
+@RequestMapping("/mes")
+public class MesController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello mes")
+ public CommonResult hello() {
+ return success("Hello, mes!");
+ }
+
+}
diff --git a/mes-server/src/main/resources/application-dev.yml b/mes-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/mes-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/mes-server/src/main/resources/application-local.yml b/mes-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..99a2921c
--- /dev/null
+++ b/mes-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.base.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/mes-server/src/main/resources/application.yml b/mes-server/src/main/resources/application.yml
new file mode 100644
index 00000000..e41a1639
--- /dev/null
+++ b/mes-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: mes-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48103
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/pom.xml b/pom.xml
index c9088a51..e5f65f41 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,6 +30,40 @@
yudao-module-databus
yudao-module-rule
yudao-module-html2pdf
+
+ yudao-module-base
+ yudao-module-contract-order
+ yudao-module-manage
+ yudao-module-capital
+ yudao-module-metering-test
+ yudao-module-receive-deliver
+ yudao-module-customs
+ yudao-module-exchange
+ yudao-module-price
+ yudao-module-settle
+ yudao-module-bill
+ yudao-module-purchase
+ yudao-module-sell
+ yudao-module-indicator
+ yudao-module-product
+ yudao-module-energy
+ yudao-module-quality
+ yudao-module-warehouse
+ yudao-module-backend-logistics
+ yudao-module-jy-business
+ yudao-module-jy-manage
+ yudao-module-jy-resource
+ yudao-module-jy-office
+ yudao-module-jy-report
+ yudao-module-jy-iot
+
+
+ base-server
+ manage-server
+ supply-server
+ mes-server
+ logistics-server
+ qms-server
${project.artifactId}
diff --git a/qms-server/Dockerfile b/qms-server/Dockerfile
new file mode 100644
index 00000000..d2fdbb70
--- /dev/null
+++ b/qms-server/Dockerfile
@@ -0,0 +1,13 @@
+FROM openjdk:17-jre-slim
+
+# 设置应用目录
+WORKDIR /app
+
+# 复制应用文件
+COPY target/qms-server.jar /app/qms-server.jar
+
+# 暴露端口
+EXPOSE 48205
+
+# 运行应用
+ENTRYPOINT ["java", "-jar", "/app/qms-server.jar"]
diff --git a/qms-server/pom.xml b/qms-server/pom.xml
new file mode 100644
index 00000000..71a48b06
--- /dev/null
+++ b/qms-server/pom.xml
@@ -0,0 +1,117 @@
+
+
+
+ cn.iocoder.cloud
+ yudao
+ ${revision}
+
+ 4.0.0
+ qms-server
+ jar
+
+ qms-server
+ Qms 服务器
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-jy-business-server
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-jy-manage-server
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-jy-resource-server
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-jy-office-server
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-jy-report-server
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-jy-iot-server
+ ${revision}
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ true
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-protection
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/qms-server/src/main/java/cn/iocoder/yudao/qms/QmsServerApplication.java b/qms-server/src/main/java/cn/iocoder/yudao/qms/QmsServerApplication.java
new file mode 100644
index 00000000..7687044a
--- /dev/null
+++ b/qms-server/src/main/java/cn/iocoder/yudao/qms/QmsServerApplication.java
@@ -0,0 +1,20 @@
+package cn.iocoder.yudao.qms;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Qms 服务器的启动类
+ *
+ * @author ZT
+ */
+@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${yudao.info.base-package}
+@SpringBootApplication(scanBasePackages = {"${yudao.info.base-package}.qms", "${yudao.info.base-package}.module"},
+ excludeName = {})
+public class QmsServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(QmsServerApplication.class, args);
+ }
+
+}
diff --git a/qms-server/src/main/java/cn/iocoder/yudao/qms/controller/qms/QmsController.java b/qms-server/src/main/java/cn/iocoder/yudao/qms/controller/qms/QmsController.java
new file mode 100644
index 00000000..52334163
--- /dev/null
+++ b/qms-server/src/main/java/cn/iocoder/yudao/qms/controller/qms/QmsController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.qms.controller.qms;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * qms 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "qms")
+@RestController
+@RequestMapping("/qms")
+public class QmsController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello qms")
+ public CommonResult hello() {
+ return success("Hello, qms!");
+ }
+
+}
diff --git a/qms-server/src/main/resources/application-dev.yml b/qms-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/qms-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/qms-server/src/main/resources/application-local.yml b/qms-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..99a2921c
--- /dev/null
+++ b/qms-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.base.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/qms-server/src/main/resources/application.yml b/qms-server/src/main/resources/application.yml
new file mode 100644
index 00000000..1e00bcc4
--- /dev/null
+++ b/qms-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: qms-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48104
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/supply-server/Dockerfile b/supply-server/Dockerfile
new file mode 100644
index 00000000..9ae44025
--- /dev/null
+++ b/supply-server/Dockerfile
@@ -0,0 +1,13 @@
+FROM openjdk:17-jre-slim
+
+# 设置应用目录
+WORKDIR /app
+
+# 复制应用文件
+COPY target/supply-server.jar /app/supply-server.jar
+
+# 暴露端口
+EXPOSE 48202
+
+# 运行应用
+ENTRYPOINT ["java", "-jar", "/app/supply-server.jar"]
diff --git a/supply-server/pom.xml b/supply-server/pom.xml
new file mode 100644
index 00000000..dbc51ab6
--- /dev/null
+++ b/supply-server/pom.xml
@@ -0,0 +1,137 @@
+
+
+
+ cn.iocoder.cloud
+ yudao
+ ${revision}
+
+ 4.0.0
+ supply-server
+ jar
+
+ supply-server
+ Supply 服务器
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-capital-server
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-metering-test-server
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-receive-deliver-server
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-customs-server
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-exchange-server
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-price-server
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-settle-server
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-bill-server
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-purchase-server
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-sell-server
+ ${revision}
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ true
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-protection
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/supply-server/src/main/java/cn/iocoder/yudao/supply/SupplyServerApplication.java b/supply-server/src/main/java/cn/iocoder/yudao/supply/SupplyServerApplication.java
new file mode 100644
index 00000000..650306d3
--- /dev/null
+++ b/supply-server/src/main/java/cn/iocoder/yudao/supply/SupplyServerApplication.java
@@ -0,0 +1,20 @@
+package cn.iocoder.yudao.supply;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Supply 服务器的启动类
+ *
+ * @author ZT
+ */
+@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${yudao.info.base-package}
+@SpringBootApplication(scanBasePackages = {"${yudao.info.base-package}.supply", "${yudao.info.base-package}.module"},
+ excludeName = {})
+public class SupplyServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(SupplyServerApplication.class, args);
+ }
+
+}
diff --git a/supply-server/src/main/java/cn/iocoder/yudao/supply/controller/supply/SupplyController.java b/supply-server/src/main/java/cn/iocoder/yudao/supply/controller/supply/SupplyController.java
new file mode 100644
index 00000000..df889d19
--- /dev/null
+++ b/supply-server/src/main/java/cn/iocoder/yudao/supply/controller/supply/SupplyController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.supply.controller.supply;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * supply 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "supply")
+@RestController
+@RequestMapping("/supply")
+public class SupplyController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello supply")
+ public CommonResult hello() {
+ return success("Hello, supply!");
+ }
+
+}
diff --git a/supply-server/src/main/resources/application-dev.yml b/supply-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/supply-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/supply-server/src/main/resources/application-local.yml b/supply-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..99a2921c
--- /dev/null
+++ b/supply-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.base.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/supply-server/src/main/resources/application.yml b/supply-server/src/main/resources/application.yml
new file mode 100644
index 00000000..2f26d2fb
--- /dev/null
+++ b/supply-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: supply-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48105
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/template-server/Dockerfile b/template-server/Dockerfile
new file mode 100644
index 00000000..0ee753b1
--- /dev/null
+++ b/template-server/Dockerfile
@@ -0,0 +1,13 @@
+FROM openjdk:17-jre-slim
+
+# 设置应用目录
+WORKDIR /app
+
+# 复制应用文件
+COPY target/template-server.jar /app/template-server.jar
+
+# 暴露端口
+EXPOSE 48300
+
+# 运行应用
+ENTRYPOINT ["java", "-jar", "/app/template-server.jar"]
diff --git a/template-server/pom.xml b/template-server/pom.xml
new file mode 100644
index 00000000..8a698939
--- /dev/null
+++ b/template-server/pom.xml
@@ -0,0 +1,99 @@
+
+
+
+ cn.iocoder.cloud
+ yudao
+ ${revision}
+
+ 4.0.0
+ template-server
+ jar
+
+ template-server
+ Template 服务器
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-server
+ ${revision}
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-server
+ ${revision}
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ true
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-protection
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/template-server/src/main/java/cn/iocoder/yudao/template/TemplateServerApplication.java b/template-server/src/main/java/cn/iocoder/yudao/template/TemplateServerApplication.java
new file mode 100644
index 00000000..f12dc59e
--- /dev/null
+++ b/template-server/src/main/java/cn/iocoder/yudao/template/TemplateServerApplication.java
@@ -0,0 +1,20 @@
+package cn.iocoder.yudao.template;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Template 服务器的启动类
+ *
+ * @author ZT
+ */
+@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${yudao.info.base-package}
+@SpringBootApplication(scanBasePackages = {"${yudao.info.base-package}.template", "${yudao.info.base-package}.module"},
+ excludeName = {})
+public class TemplateServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(TemplateServerApplication.class, args);
+ }
+
+}
diff --git a/template-server/src/main/java/cn/iocoder/yudao/template/controller/template/TemplateController.java b/template-server/src/main/java/cn/iocoder/yudao/template/controller/template/TemplateController.java
new file mode 100644
index 00000000..9b8df5cb
--- /dev/null
+++ b/template-server/src/main/java/cn/iocoder/yudao/template/controller/template/TemplateController.java
@@ -0,0 +1,29 @@
+package cn.iocoder.yudao.template.controller.template;
+
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * template 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "template")
+@RestController
+@RequestMapping("/template")
+public class TemplateController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello template")
+ public CommonResult hello() {
+ return success("Hello, template!");
+ }
+
+}
diff --git a/template-server/src/main/resources/application-dev.yml b/template-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..b2a882a8
--- /dev/null
+++ b/template-server/src/main/resources/application-dev.yml
@@ -0,0 +1,118 @@
+server:
+ servlet:
+ encoding:
+ enabled: true
+ charset: UTF-8 # 必须设置 UTF-8,避免 WebFlux 流式返回(AI 场景)会乱码问题
+ force: true
+
+---
+spring:
+ # 数据源配置项
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ # 设置默认的数据源或者数据源组,默认 master
+ primary: master
+ datasource:
+ # 主库
+ master:
+ url: jdbc:mysql://127.0.0.1:3306/${dbName}?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
+ username: root
+ password:
+ # 从库
+ slave:
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:mysql://127.0.0.1:3306/${dbName}?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
+ username: root
+ password:
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 127.0.0.1 # 地址
+ port: 6379 # 端口
+ database: 1 # 数据库索引
+# password: # 密码,建议生产环境开启
+
+---
+xxl:
+ job:
+ enabled: false # 是否开启调度中心,默认为 true 开启
+ admin:
+ addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
+
+---
+# rocketmq 配置项,对应 RocketMQProperties 配置类
+rocketmq:
+ name-server: 127.0.0.1:9876 # RocketMQ Namesrv
+
+spring:
+ # RabbitMQ 配置项,对应 RabbitProperties 配置类
+ rabbitmq:
+ host: 127.0.0.1 # RabbitMQ 服务的地址
+ port: 5672 # RabbitMQ 服务的端口
+ username: guest # RabbitMQ 服务的账号
+ password: guest # RabbitMQ 服务的密码
+ # Kafka 配置项,对应 KafkaProperties 配置类
+ kafka:
+ bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔
+
+---
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+---
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.template.dal.mysql: debug
+
+---
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ demo: false # 开启演示模式
+ # 附件加密相关配置
+ AES:
+ key: "0123456789abcdef0123456789abcdef"
diff --git a/template-server/src/main/resources/application-local.yml b/template-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..3868e448
--- /dev/null
+++ b/template-server/src/main/resources/application-local.yml
@@ -0,0 +1,119 @@
+server:
+ servlet:
+ encoding:
+ enabled: true
+ charset: UTF-8 # 必须设置 UTF-8,避免 WebFlux 流式返回(AI 场景)会乱码问题
+ force: true
+
+---
+spring:
+ # 数据源配置项
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ # 设置默认的数据源或者数据源组,默认 master
+ primary: master
+ datasource:
+ # 主库
+ master:
+ url: jdbc:mysql://127.0.0.1:3306/${dbName}?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
+ username: root
+ password:
+ # 从库
+ slave:
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:mysql://127.0.0.1:3306/${dbName}?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
+ username: root
+ password:
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: localhost # 地址
+ port: 6379 # 端口
+ database: 1 # 数据库索引
+# password: # 密码,建议生产环境开启
+
+---
+xxl:
+ job:
+ enabled: false # 是否开启调度中心,默认为 true 开启
+ admin:
+ addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
+
+---
+# rocketmq 配置项,对应 RocketMQProperties 配置类
+rocketmq:
+ name-server: localhost:9876 # RocketMQ Namesrv
+
+spring:
+ # RabbitMQ 配置项,对应 RabbitProperties 配置类
+ rabbitmq:
+ host: 127.0.0.1 # RabbitMQ 服务的地址
+ port: 5672 # RabbitMQ 服务的端口
+ username: rabbit # RabbitMQ 服务的账号
+ password: rabbit # RabbitMQ 服务的密码
+ # Kafka 配置项,对应 KafkaProperties 配置类
+ kafka:
+ bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔
+
+---
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+---
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.template.dal.mysql: debug
+ root: info
+
+---
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ demo: false # 开启演示模式
+ # 附件加密相关配置
+ AES:
+ key: "0123456789abcdef0123456789abcdef"
diff --git a/template-server/src/main/resources/application.yml b/template-server/src/main/resources/application.yml
new file mode 100644
index 00000000..20da429d
--- /dev/null
+++ b/template-server/src/main/resources/application.yml
@@ -0,0 +1,109 @@
+server:
+ port: 48300
+
+spring:
+ application:
+ name: template-server
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ profiles:
+ active: local
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 Date 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+---
+springdoc:
+ api-docs:
+ enabled: true
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true
+ path: /swagger-ui
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # "智能"模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.template.dal.dataobject
+
+# Spring Data Redis 配置
+spring:
+ data:
+ redis:
+ repositories:
+ enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度
+
+---
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao
+ author: ZT
+ description: Template 服务器
+ web:
+ admin-ui:
+ url: http://localhost:3000 # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ security:
+ permit-all_urls: []
+ websocket:
+ enable: true # websocket的开关
+ path: /infra/ws # 路径
+ sender-type: local # 消息发送的类型,可选值为 local、redis、rocketmq、kafka、rabbitmq
+ sender-rocketmq:
+ topic: ${spring.application.name}-websocket # 消息发送的 RocketMQ Topic
+ consumer-group: ${spring.application.name}-websocket-consumer # 消息发送的 RocketMQ Consumer Group
+ sender-rabbitmq:
+ exchange: ${spring.application.name}-websocket-exchange # 消息发送的 RabbitMQ Exchange
+ queue: ${spring.application.name}-websocket-queue # 消息发送的 RabbitMQ Queue
+ sender-kafka:
+ topic: ${spring.application.name}-websocket # 消息发送的 Kafka Topic
+ consumer-group: ${spring.application.name}-websocket-consumer # 消息发送的 Kafka Consumer Group
+ swagger:
+ title: template-server
+ description: Template 服务器
+ version: ${yudao.info.version}
+ email: xingyu4j@vip.qq.com
+ license: MIT
+ license-url: https://gitee.com/zhijiantianya/ruoyi-vue-pro/blob/master/LICENSE
+ codegen:
+ base-package: cn.iocoder.yudao.template
+ db-schemas: ${spring.datasource.dynamic.datasource.master.name}
+ front-type: 20 # 前端模版的类型,参见 CodegenFrontTypeEnum 枚举类
+ vo-type: 10 # VO 的类型,参见 CodegenVOTypeEnum 枚举类
+ delete-batch-enable: true # 是否生成批量删除接口
+ unit-test-enable: false # 是否生成单元测试
+
+debug: false
diff --git a/yudao-module-backend-logistics/pom.xml b/yudao-module-backend-logistics/pom.xml
new file mode 100644
index 00000000..bdbf63d1
--- /dev/null
+++ b/yudao-module-backend-logistics/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-backend-logistics-api
+ yudao-module-backend-logistics-server
+
+ 4.0.0
+
+ yudao-module-backend-logistics
+ pom
+
+ ${project.artifactId}
+
+ BackendLogistics 模块。
+
+
+
diff --git a/yudao-module-backend-logistics/yudao-module-backend-logistics-api/pom.xml b/yudao-module-backend-logistics/yudao-module-backend-logistics-api/pom.xml
new file mode 100644
index 00000000..532c6048
--- /dev/null
+++ b/yudao-module-backend-logistics/yudao-module-backend-logistics-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-backend-logistics
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-backend-logistics-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-backend-logistics/yudao-module-backend-logistics-api/src/main/java/cn/iocoder/yudao/module/backendlogistics/enums/ErrorCodeConstants.java b/yudao-module-backend-logistics/yudao-module-backend-logistics-api/src/main/java/cn/iocoder/yudao/module/backendlogistics/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..fcb0b730
--- /dev/null
+++ b/yudao-module-backend-logistics/yudao-module-backend-logistics-api/src/main/java/cn/iocoder/yudao/module/backendlogistics/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.backendlogistics.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * backend-logistics 错误码枚举类
+ *
+ * backend-logistics 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-backend-logistics/yudao-module-backend-logistics-server/pom.xml b/yudao-module-backend-logistics/yudao-module-backend-logistics-server/pom.xml
new file mode 100644
index 00000000..3fb4d7d7
--- /dev/null
+++ b/yudao-module-backend-logistics/yudao-module-backend-logistics-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-backend-logistics
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-backend-logistics-server
+
+ ${project.artifactId}
+
+ BackendLogistics 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-backend-logistics-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-backend-logistics/yudao-module-backend-logistics-server/src/main/java/cn/iocoder/yudao/module/backendlogistics/BackendLogisticsServerApplication.java b/yudao-module-backend-logistics/yudao-module-backend-logistics-server/src/main/java/cn/iocoder/yudao/module/backendlogistics/BackendLogisticsServerApplication.java
new file mode 100644
index 00000000..6e349af3
--- /dev/null
+++ b/yudao-module-backend-logistics/yudao-module-backend-logistics-server/src/main/java/cn/iocoder/yudao/module/backendlogistics/BackendLogisticsServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.backendlogistics;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * BackendLogistics 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class BackendLogisticsServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(BackendLogisticsServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-backend-logistics/yudao-module-backend-logistics-server/src/main/java/cn/iocoder/yudao/module/backendlogistics/controller/admin/backendlogistics/BackendLogisticsController.java b/yudao-module-backend-logistics/yudao-module-backend-logistics-server/src/main/java/cn/iocoder/yudao/module/backendlogistics/controller/admin/backendlogistics/BackendLogisticsController.java
new file mode 100644
index 00000000..50d93b71
--- /dev/null
+++ b/yudao-module-backend-logistics/yudao-module-backend-logistics-server/src/main/java/cn/iocoder/yudao/module/backendlogistics/controller/admin/backendlogistics/BackendLogisticsController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.backendlogistics.controller.admin.backendlogistics;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * BackendLogistics 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - BackendLogistics")
+@RestController
+@RequestMapping("/admin/backend-logistics/backend-logistics")
+public class BackendLogisticsController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello BackendLogistics")
+ public CommonResult hello() {
+ return success("Hello, BackendLogistics!");
+ }
+
+}
diff --git a/yudao-module-backend-logistics/yudao-module-backend-logistics-server/src/main/java/cn/iocoder/yudao/module/backendlogistics/framework/security/config/SecurityConfiguration.java b/yudao-module-backend-logistics/yudao-module-backend-logistics-server/src/main/java/cn/iocoder/yudao/module/backendlogistics/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..d0cb67cf
--- /dev/null
+++ b/yudao-module-backend-logistics/yudao-module-backend-logistics-server/src/main/java/cn/iocoder/yudao/module/backendlogistics/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.backendlogistics.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * BackendLogistics 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-backend-logistics/yudao-module-backend-logistics-server/src/main/resources/application-dev.yml b/yudao-module-backend-logistics/yudao-module-backend-logistics-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-backend-logistics/yudao-module-backend-logistics-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-backend-logistics/yudao-module-backend-logistics-server/src/main/resources/application-local.yml b/yudao-module-backend-logistics/yudao-module-backend-logistics-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..3b91e68b
--- /dev/null
+++ b/yudao-module-backend-logistics/yudao-module-backend-logistics-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.backendlogistics.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-backend-logistics/yudao-module-backend-logistics-server/src/main/resources/application.yml b/yudao-module-backend-logistics/yudao-module-backend-logistics-server/src/main/resources/application.yml
new file mode 100644
index 00000000..895b260b
--- /dev/null
+++ b/yudao-module-backend-logistics/yudao-module-backend-logistics-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: backend-logistics-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48118
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.backendlogistics
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-base/pom.xml b/yudao-module-base/pom.xml
new file mode 100644
index 00000000..4f19e9c1
--- /dev/null
+++ b/yudao-module-base/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-base-api
+ yudao-module-base-server
+
+ 4.0.0
+
+ yudao-module-base
+ pom
+
+ ${project.artifactId}
+
+ Base 模块。
+
+
+
diff --git a/yudao-module-base/yudao-module-base-api/pom.xml b/yudao-module-base/yudao-module-base-api/pom.xml
new file mode 100644
index 00000000..e2a956b0
--- /dev/null
+++ b/yudao-module-base/yudao-module-base-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-base
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-base-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-base/yudao-module-base-api/src/main/java/cn/iocoder/yudao/module/base/enums/ErrorCodeConstants.java b/yudao-module-base/yudao-module-base-api/src/main/java/cn/iocoder/yudao/module/base/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..8c29c798
--- /dev/null
+++ b/yudao-module-base/yudao-module-base-api/src/main/java/cn/iocoder/yudao/module/base/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.base.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * base 错误码枚举类
+ *
+ * base 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-base/yudao-module-base-server/pom.xml b/yudao-module-base/yudao-module-base-server/pom.xml
new file mode 100644
index 00000000..13a5b747
--- /dev/null
+++ b/yudao-module-base/yudao-module-base-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-base
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-base-server
+
+ ${project.artifactId}
+
+ Base 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-base-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-base/yudao-module-base-server/src/main/java/cn/iocoder/yudao/module/base/BaseServerApplication.java b/yudao-module-base/yudao-module-base-server/src/main/java/cn/iocoder/yudao/module/base/BaseServerApplication.java
new file mode 100644
index 00000000..b8f5f38a
--- /dev/null
+++ b/yudao-module-base/yudao-module-base-server/src/main/java/cn/iocoder/yudao/module/base/BaseServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.base;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Base 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class BaseServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(BaseServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-base/yudao-module-base-server/src/main/java/cn/iocoder/yudao/module/base/controller/admin/base/BaseController.java b/yudao-module-base/yudao-module-base-server/src/main/java/cn/iocoder/yudao/module/base/controller/admin/base/BaseController.java
new file mode 100644
index 00000000..0044542e
--- /dev/null
+++ b/yudao-module-base/yudao-module-base-server/src/main/java/cn/iocoder/yudao/module/base/controller/admin/base/BaseController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.base.controller.admin.base;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * Base 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - Base")
+@RestController
+@RequestMapping("/admin/base/base")
+public class BaseController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello Base")
+ public CommonResult hello() {
+ return success("Hello, Base!");
+ }
+
+}
diff --git a/yudao-module-base/yudao-module-base-server/src/main/java/cn/iocoder/yudao/module/base/framework/security/config/SecurityConfiguration.java b/yudao-module-base/yudao-module-base-server/src/main/java/cn/iocoder/yudao/module/base/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..dcc26e50
--- /dev/null
+++ b/yudao-module-base/yudao-module-base-server/src/main/java/cn/iocoder/yudao/module/base/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.base.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * Base 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-base/yudao-module-base-server/src/main/resources/application-dev.yml b/yudao-module-base/yudao-module-base-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-base/yudao-module-base-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-base/yudao-module-base-server/src/main/resources/application-local.yml b/yudao-module-base/yudao-module-base-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..99a2921c
--- /dev/null
+++ b/yudao-module-base/yudao-module-base-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.base.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-base/yudao-module-base-server/src/main/resources/application.yml b/yudao-module-base/yudao-module-base-server/src/main/resources/application.yml
new file mode 100644
index 00000000..5a7247af
--- /dev/null
+++ b/yudao-module-base/yudao-module-base-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: base-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48100
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.base
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-bill/pom.xml b/yudao-module-bill/pom.xml
new file mode 100644
index 00000000..f88fdc77
--- /dev/null
+++ b/yudao-module-bill/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-bill-api
+ yudao-module-bill-server
+
+ 4.0.0
+
+ yudao-module-bill
+ pom
+
+ ${project.artifactId}
+
+ Bill 模块。
+
+
+
diff --git a/yudao-module-bill/yudao-module-bill-api/pom.xml b/yudao-module-bill/yudao-module-bill-api/pom.xml
new file mode 100644
index 00000000..47f357c9
--- /dev/null
+++ b/yudao-module-bill/yudao-module-bill-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-bill
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-bill-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-bill/yudao-module-bill-api/src/main/java/cn/iocoder/yudao/module/bill/enums/ErrorCodeConstants.java b/yudao-module-bill/yudao-module-bill-api/src/main/java/cn/iocoder/yudao/module/bill/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..7b8e4a5b
--- /dev/null
+++ b/yudao-module-bill/yudao-module-bill-api/src/main/java/cn/iocoder/yudao/module/bill/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.bill.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * bill 错误码枚举类
+ *
+ * bill 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-bill/yudao-module-bill-server/pom.xml b/yudao-module-bill/yudao-module-bill-server/pom.xml
new file mode 100644
index 00000000..79114506
--- /dev/null
+++ b/yudao-module-bill/yudao-module-bill-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-bill
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-bill-server
+
+ ${project.artifactId}
+
+ Bill 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-bill-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/BillServerApplication.java b/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/BillServerApplication.java
new file mode 100644
index 00000000..ecfc296f
--- /dev/null
+++ b/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/BillServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.bill;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Bill 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class BillServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(BillServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/controller/admin/bill/BillController.java b/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/controller/admin/bill/BillController.java
new file mode 100644
index 00000000..9d5c63a4
--- /dev/null
+++ b/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/controller/admin/bill/BillController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.bill.controller.admin.bill;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * Bill 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - Bill")
+@RestController
+@RequestMapping("/admin/bill/bill")
+public class BillController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello Bill")
+ public CommonResult hello() {
+ return success("Hello, Bill!");
+ }
+
+}
diff --git a/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/framework/security/config/SecurityConfiguration.java b/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..7e1b4def
--- /dev/null
+++ b/yudao-module-bill/yudao-module-bill-server/src/main/java/cn/iocoder/yudao/module/bill/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.bill.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * Bill 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-bill/yudao-module-bill-server/src/main/resources/application-dev.yml b/yudao-module-bill/yudao-module-bill-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-bill/yudao-module-bill-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-bill/yudao-module-bill-server/src/main/resources/application-local.yml b/yudao-module-bill/yudao-module-bill-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..c4bed3b4
--- /dev/null
+++ b/yudao-module-bill/yudao-module-bill-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.bill.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-bill/yudao-module-bill-server/src/main/resources/application.yml b/yudao-module-bill/yudao-module-bill-server/src/main/resources/application.yml
new file mode 100644
index 00000000..8015d73c
--- /dev/null
+++ b/yudao-module-bill/yudao-module-bill-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: bill-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48110
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.bill
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-capital/pom.xml b/yudao-module-capital/pom.xml
new file mode 100644
index 00000000..429e5add
--- /dev/null
+++ b/yudao-module-capital/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-capital-api
+ yudao-module-capital-server
+
+ 4.0.0
+
+ yudao-module-capital
+ pom
+
+ ${project.artifactId}
+
+ Capital 模块。
+
+
+
diff --git a/yudao-module-capital/yudao-module-capital-api/pom.xml b/yudao-module-capital/yudao-module-capital-api/pom.xml
new file mode 100644
index 00000000..27965e2d
--- /dev/null
+++ b/yudao-module-capital/yudao-module-capital-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-capital
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-capital-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-capital/yudao-module-capital-api/src/main/java/cn/iocoder/yudao/module/capital/enums/ErrorCodeConstants.java b/yudao-module-capital/yudao-module-capital-api/src/main/java/cn/iocoder/yudao/module/capital/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..a8eb0d30
--- /dev/null
+++ b/yudao-module-capital/yudao-module-capital-api/src/main/java/cn/iocoder/yudao/module/capital/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.capital.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * capital 错误码枚举类
+ *
+ * capital 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-capital/yudao-module-capital-server/pom.xml b/yudao-module-capital/yudao-module-capital-server/pom.xml
new file mode 100644
index 00000000..f318fc60
--- /dev/null
+++ b/yudao-module-capital/yudao-module-capital-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-capital
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-capital-server
+
+ ${project.artifactId}
+
+ Capital 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-capital-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/CapitalServerApplication.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/CapitalServerApplication.java
new file mode 100644
index 00000000..5858498c
--- /dev/null
+++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/CapitalServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.capital;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Capital 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class CapitalServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(CapitalServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/CapitalController.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/CapitalController.java
new file mode 100644
index 00000000..a3eab462
--- /dev/null
+++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/controller/admin/capital/CapitalController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.capital.controller.admin.capital;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * Capital 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - Capital")
+@RestController
+@RequestMapping("/admin/capital/capital")
+public class CapitalController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello Capital")
+ public CommonResult hello() {
+ return success("Hello, Capital!");
+ }
+
+}
diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/framework/security/config/SecurityConfiguration.java b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..e81d8aa2
--- /dev/null
+++ b/yudao-module-capital/yudao-module-capital-server/src/main/java/cn/iocoder/yudao/module/capital/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.capital.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * Capital 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/resources/application-dev.yml b/yudao-module-capital/yudao-module-capital-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-capital/yudao-module-capital-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/resources/application-local.yml b/yudao-module-capital/yudao-module-capital-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..4e052a51
--- /dev/null
+++ b/yudao-module-capital/yudao-module-capital-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.capital.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-capital/yudao-module-capital-server/src/main/resources/application.yml b/yudao-module-capital/yudao-module-capital-server/src/main/resources/application.yml
new file mode 100644
index 00000000..4fcd5721
--- /dev/null
+++ b/yudao-module-capital/yudao-module-capital-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: capital-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48103
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.capital
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-contract-order/pom.xml b/yudao-module-contract-order/pom.xml
new file mode 100644
index 00000000..f2177c10
--- /dev/null
+++ b/yudao-module-contract-order/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-contract-order-api
+ yudao-module-contract-order-server
+
+ 4.0.0
+
+ yudao-module-contract-order
+ pom
+
+ ${project.artifactId}
+
+ ContractOrder 模块。
+
+
+
diff --git a/yudao-module-contract-order/yudao-module-contract-order-api/pom.xml b/yudao-module-contract-order/yudao-module-contract-order-api/pom.xml
new file mode 100644
index 00000000..d4410a2d
--- /dev/null
+++ b/yudao-module-contract-order/yudao-module-contract-order-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-contract-order
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-contract-order-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-contract-order/yudao-module-contract-order-api/src/main/java/cn/iocoder/yudao/module/contractorder/enums/ErrorCodeConstants.java b/yudao-module-contract-order/yudao-module-contract-order-api/src/main/java/cn/iocoder/yudao/module/contractorder/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..a9d76de6
--- /dev/null
+++ b/yudao-module-contract-order/yudao-module-contract-order-api/src/main/java/cn/iocoder/yudao/module/contractorder/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.contractorder.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * contract-order 错误码枚举类
+ *
+ * contract-order 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-contract-order/yudao-module-contract-order-server/pom.xml b/yudao-module-contract-order/yudao-module-contract-order-server/pom.xml
new file mode 100644
index 00000000..1cc56100
--- /dev/null
+++ b/yudao-module-contract-order/yudao-module-contract-order-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-contract-order
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-contract-order-server
+
+ ${project.artifactId}
+
+ ContractOrder 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-contract-order-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-contract-order/yudao-module-contract-order-server/src/main/java/cn/iocoder/yudao/module/contractorder/ContractOrderServerApplication.java b/yudao-module-contract-order/yudao-module-contract-order-server/src/main/java/cn/iocoder/yudao/module/contractorder/ContractOrderServerApplication.java
new file mode 100644
index 00000000..d03ccbac
--- /dev/null
+++ b/yudao-module-contract-order/yudao-module-contract-order-server/src/main/java/cn/iocoder/yudao/module/contractorder/ContractOrderServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.contractorder;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * ContractOrder 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class ContractOrderServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(ContractOrderServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-contract-order/yudao-module-contract-order-server/src/main/java/cn/iocoder/yudao/module/contractorder/controller/admin/contractorder/ContractOrderController.java b/yudao-module-contract-order/yudao-module-contract-order-server/src/main/java/cn/iocoder/yudao/module/contractorder/controller/admin/contractorder/ContractOrderController.java
new file mode 100644
index 00000000..10748eb6
--- /dev/null
+++ b/yudao-module-contract-order/yudao-module-contract-order-server/src/main/java/cn/iocoder/yudao/module/contractorder/controller/admin/contractorder/ContractOrderController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.contractorder.controller.admin.contractorder;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * ContractOrder 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - ContractOrder")
+@RestController
+@RequestMapping("/admin/contract-order/contract-order")
+public class ContractOrderController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello ContractOrder")
+ public CommonResult hello() {
+ return success("Hello, ContractOrder!");
+ }
+
+}
diff --git a/yudao-module-contract-order/yudao-module-contract-order-server/src/main/java/cn/iocoder/yudao/module/contractorder/framework/security/config/SecurityConfiguration.java b/yudao-module-contract-order/yudao-module-contract-order-server/src/main/java/cn/iocoder/yudao/module/contractorder/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..98ded0bf
--- /dev/null
+++ b/yudao-module-contract-order/yudao-module-contract-order-server/src/main/java/cn/iocoder/yudao/module/contractorder/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.contractorder.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * ContractOrder 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-contract-order/yudao-module-contract-order-server/src/main/resources/application-dev.yml b/yudao-module-contract-order/yudao-module-contract-order-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-contract-order/yudao-module-contract-order-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-contract-order/yudao-module-contract-order-server/src/main/resources/application-local.yml b/yudao-module-contract-order/yudao-module-contract-order-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..cf1ffaa1
--- /dev/null
+++ b/yudao-module-contract-order/yudao-module-contract-order-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.contractorder.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-contract-order/yudao-module-contract-order-server/src/main/resources/application.yml b/yudao-module-contract-order/yudao-module-contract-order-server/src/main/resources/application.yml
new file mode 100644
index 00000000..d1cf6e7d
--- /dev/null
+++ b/yudao-module-contract-order/yudao-module-contract-order-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: contract-order-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48101
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.contractorder
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-customs/pom.xml b/yudao-module-customs/pom.xml
new file mode 100644
index 00000000..64497d23
--- /dev/null
+++ b/yudao-module-customs/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-customs-api
+ yudao-module-customs-server
+
+ 4.0.0
+
+ yudao-module-customs
+ pom
+
+ ${project.artifactId}
+
+ Customs 模块。
+
+
+
diff --git a/yudao-module-customs/yudao-module-customs-api/pom.xml b/yudao-module-customs/yudao-module-customs-api/pom.xml
new file mode 100644
index 00000000..242007b1
--- /dev/null
+++ b/yudao-module-customs/yudao-module-customs-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-customs
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-customs-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-customs/yudao-module-customs-api/src/main/java/cn/iocoder/yudao/module/customs/enums/ErrorCodeConstants.java b/yudao-module-customs/yudao-module-customs-api/src/main/java/cn/iocoder/yudao/module/customs/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..90b3877e
--- /dev/null
+++ b/yudao-module-customs/yudao-module-customs-api/src/main/java/cn/iocoder/yudao/module/customs/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.customs.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * customs 错误码枚举类
+ *
+ * customs 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-customs/yudao-module-customs-server/pom.xml b/yudao-module-customs/yudao-module-customs-server/pom.xml
new file mode 100644
index 00000000..416f6d3c
--- /dev/null
+++ b/yudao-module-customs/yudao-module-customs-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-customs
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-customs-server
+
+ ${project.artifactId}
+
+ Customs 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-customs-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/CustomsServerApplication.java b/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/CustomsServerApplication.java
new file mode 100644
index 00000000..003cd279
--- /dev/null
+++ b/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/CustomsServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.customs;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Customs 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class CustomsServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(CustomsServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/controller/admin/customs/CustomsController.java b/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/controller/admin/customs/CustomsController.java
new file mode 100644
index 00000000..8a12bb8a
--- /dev/null
+++ b/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/controller/admin/customs/CustomsController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.customs.controller.admin.customs;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * Customs 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - Customs")
+@RestController
+@RequestMapping("/admin/customs/customs")
+public class CustomsController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello Customs")
+ public CommonResult hello() {
+ return success("Hello, Customs!");
+ }
+
+}
diff --git a/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/framework/security/config/SecurityConfiguration.java b/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..bab51bf8
--- /dev/null
+++ b/yudao-module-customs/yudao-module-customs-server/src/main/java/cn/iocoder/yudao/module/customs/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.customs.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * Customs 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-customs/yudao-module-customs-server/src/main/resources/application-dev.yml b/yudao-module-customs/yudao-module-customs-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-customs/yudao-module-customs-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-customs/yudao-module-customs-server/src/main/resources/application-local.yml b/yudao-module-customs/yudao-module-customs-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..b23af764
--- /dev/null
+++ b/yudao-module-customs/yudao-module-customs-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.customs.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-customs/yudao-module-customs-server/src/main/resources/application.yml b/yudao-module-customs/yudao-module-customs-server/src/main/resources/application.yml
new file mode 100644
index 00000000..685c7bca
--- /dev/null
+++ b/yudao-module-customs/yudao-module-customs-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: customs-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48106
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.customs
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-energy/pom.xml b/yudao-module-energy/pom.xml
new file mode 100644
index 00000000..85e04e28
--- /dev/null
+++ b/yudao-module-energy/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-energy-api
+ yudao-module-energy-server
+
+ 4.0.0
+
+ yudao-module-energy
+ pom
+
+ ${project.artifactId}
+
+ Energy 模块。
+
+
+
diff --git a/yudao-module-energy/yudao-module-energy-api/pom.xml b/yudao-module-energy/yudao-module-energy-api/pom.xml
new file mode 100644
index 00000000..3ffe7d07
--- /dev/null
+++ b/yudao-module-energy/yudao-module-energy-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-energy
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-energy-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-energy/yudao-module-energy-api/src/main/java/cn/iocoder/yudao/module/energy/enums/ErrorCodeConstants.java b/yudao-module-energy/yudao-module-energy-api/src/main/java/cn/iocoder/yudao/module/energy/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..98f38c07
--- /dev/null
+++ b/yudao-module-energy/yudao-module-energy-api/src/main/java/cn/iocoder/yudao/module/energy/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.energy.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * energy 错误码枚举类
+ *
+ * energy 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-energy/yudao-module-energy-server/pom.xml b/yudao-module-energy/yudao-module-energy-server/pom.xml
new file mode 100644
index 00000000..9762cba7
--- /dev/null
+++ b/yudao-module-energy/yudao-module-energy-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-energy
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-energy-server
+
+ ${project.artifactId}
+
+ Energy 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-energy-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-energy/yudao-module-energy-server/src/main/java/cn/iocoder/yudao/module/energy/EnergyServerApplication.java b/yudao-module-energy/yudao-module-energy-server/src/main/java/cn/iocoder/yudao/module/energy/EnergyServerApplication.java
new file mode 100644
index 00000000..e2f64041
--- /dev/null
+++ b/yudao-module-energy/yudao-module-energy-server/src/main/java/cn/iocoder/yudao/module/energy/EnergyServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.energy;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Energy 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class EnergyServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(EnergyServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-energy/yudao-module-energy-server/src/main/java/cn/iocoder/yudao/module/energy/controller/admin/energy/EnergyController.java b/yudao-module-energy/yudao-module-energy-server/src/main/java/cn/iocoder/yudao/module/energy/controller/admin/energy/EnergyController.java
new file mode 100644
index 00000000..725d81df
--- /dev/null
+++ b/yudao-module-energy/yudao-module-energy-server/src/main/java/cn/iocoder/yudao/module/energy/controller/admin/energy/EnergyController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.energy.controller.admin.energy;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * Energy 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - Energy")
+@RestController
+@RequestMapping("/admin/energy/energy")
+public class EnergyController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello Energy")
+ public CommonResult hello() {
+ return success("Hello, Energy!");
+ }
+
+}
diff --git a/yudao-module-energy/yudao-module-energy-server/src/main/java/cn/iocoder/yudao/module/energy/framework/security/config/SecurityConfiguration.java b/yudao-module-energy/yudao-module-energy-server/src/main/java/cn/iocoder/yudao/module/energy/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..fd1fe5df
--- /dev/null
+++ b/yudao-module-energy/yudao-module-energy-server/src/main/java/cn/iocoder/yudao/module/energy/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.energy.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * Energy 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-energy/yudao-module-energy-server/src/main/resources/application-dev.yml b/yudao-module-energy/yudao-module-energy-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-energy/yudao-module-energy-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-energy/yudao-module-energy-server/src/main/resources/application-local.yml b/yudao-module-energy/yudao-module-energy-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..a3ad1446
--- /dev/null
+++ b/yudao-module-energy/yudao-module-energy-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.energy.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-energy/yudao-module-energy-server/src/main/resources/application.yml b/yudao-module-energy/yudao-module-energy-server/src/main/resources/application.yml
new file mode 100644
index 00000000..5e41dcc9
--- /dev/null
+++ b/yudao-module-energy/yudao-module-energy-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: energy-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48115
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.energy
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-exchange/pom.xml b/yudao-module-exchange/pom.xml
new file mode 100644
index 00000000..623b34ba
--- /dev/null
+++ b/yudao-module-exchange/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-exchange-api
+ yudao-module-exchange-server
+
+ 4.0.0
+
+ yudao-module-exchange
+ pom
+
+ ${project.artifactId}
+
+ Exchange 模块。
+
+
+
diff --git a/yudao-module-exchange/yudao-module-exchange-api/pom.xml b/yudao-module-exchange/yudao-module-exchange-api/pom.xml
new file mode 100644
index 00000000..ee251ef4
--- /dev/null
+++ b/yudao-module-exchange/yudao-module-exchange-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-exchange
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-exchange-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-exchange/yudao-module-exchange-api/src/main/java/cn/iocoder/yudao/module/exchange/enums/ErrorCodeConstants.java b/yudao-module-exchange/yudao-module-exchange-api/src/main/java/cn/iocoder/yudao/module/exchange/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..d9311aca
--- /dev/null
+++ b/yudao-module-exchange/yudao-module-exchange-api/src/main/java/cn/iocoder/yudao/module/exchange/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.exchange.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * exchange 错误码枚举类
+ *
+ * exchange 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-exchange/yudao-module-exchange-server/pom.xml b/yudao-module-exchange/yudao-module-exchange-server/pom.xml
new file mode 100644
index 00000000..c3812105
--- /dev/null
+++ b/yudao-module-exchange/yudao-module-exchange-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-exchange
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-exchange-server
+
+ ${project.artifactId}
+
+ Exchange 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-exchange-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/ExchangeServerApplication.java b/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/ExchangeServerApplication.java
new file mode 100644
index 00000000..a46d570d
--- /dev/null
+++ b/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/ExchangeServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.exchange;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Exchange 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class ExchangeServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(ExchangeServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/controller/admin/exchange/ExchangeController.java b/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/controller/admin/exchange/ExchangeController.java
new file mode 100644
index 00000000..d4528e6c
--- /dev/null
+++ b/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/controller/admin/exchange/ExchangeController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.exchange.controller.admin.exchange;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * Exchange 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - Exchange")
+@RestController
+@RequestMapping("/admin/exchange/exchange")
+public class ExchangeController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello Exchange")
+ public CommonResult hello() {
+ return success("Hello, Exchange!");
+ }
+
+}
diff --git a/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/framework/security/config/SecurityConfiguration.java b/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..254fc597
--- /dev/null
+++ b/yudao-module-exchange/yudao-module-exchange-server/src/main/java/cn/iocoder/yudao/module/exchange/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.exchange.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * Exchange 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-exchange/yudao-module-exchange-server/src/main/resources/application-dev.yml b/yudao-module-exchange/yudao-module-exchange-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-exchange/yudao-module-exchange-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-exchange/yudao-module-exchange-server/src/main/resources/application-local.yml b/yudao-module-exchange/yudao-module-exchange-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..72b2b279
--- /dev/null
+++ b/yudao-module-exchange/yudao-module-exchange-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.exchange.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-exchange/yudao-module-exchange-server/src/main/resources/application.yml b/yudao-module-exchange/yudao-module-exchange-server/src/main/resources/application.yml
new file mode 100644
index 00000000..1cad4636
--- /dev/null
+++ b/yudao-module-exchange/yudao-module-exchange-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: exchange-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48107
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.exchange
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-indicator/pom.xml b/yudao-module-indicator/pom.xml
new file mode 100644
index 00000000..5570e807
--- /dev/null
+++ b/yudao-module-indicator/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-indicator-api
+ yudao-module-indicator-server
+
+ 4.0.0
+
+ yudao-module-indicator
+ pom
+
+ ${project.artifactId}
+
+ Indicator 模块。
+
+
+
diff --git a/yudao-module-indicator/yudao-module-indicator-api/pom.xml b/yudao-module-indicator/yudao-module-indicator-api/pom.xml
new file mode 100644
index 00000000..7f40d694
--- /dev/null
+++ b/yudao-module-indicator/yudao-module-indicator-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-indicator
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-indicator-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-indicator/yudao-module-indicator-api/src/main/java/cn/iocoder/yudao/module/indicator/enums/ErrorCodeConstants.java b/yudao-module-indicator/yudao-module-indicator-api/src/main/java/cn/iocoder/yudao/module/indicator/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..e7273203
--- /dev/null
+++ b/yudao-module-indicator/yudao-module-indicator-api/src/main/java/cn/iocoder/yudao/module/indicator/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.indicator.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * indicator 错误码枚举类
+ *
+ * indicator 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-indicator/yudao-module-indicator-server/pom.xml b/yudao-module-indicator/yudao-module-indicator-server/pom.xml
new file mode 100644
index 00000000..eb363f7c
--- /dev/null
+++ b/yudao-module-indicator/yudao-module-indicator-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-indicator
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-indicator-server
+
+ ${project.artifactId}
+
+ Indicator 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-indicator-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-indicator/yudao-module-indicator-server/src/main/java/cn/iocoder/yudao/module/indicator/IndicatorServerApplication.java b/yudao-module-indicator/yudao-module-indicator-server/src/main/java/cn/iocoder/yudao/module/indicator/IndicatorServerApplication.java
new file mode 100644
index 00000000..029b4c7e
--- /dev/null
+++ b/yudao-module-indicator/yudao-module-indicator-server/src/main/java/cn/iocoder/yudao/module/indicator/IndicatorServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.indicator;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Indicator 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class IndicatorServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(IndicatorServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-indicator/yudao-module-indicator-server/src/main/java/cn/iocoder/yudao/module/indicator/controller/admin/indicator/IndicatorController.java b/yudao-module-indicator/yudao-module-indicator-server/src/main/java/cn/iocoder/yudao/module/indicator/controller/admin/indicator/IndicatorController.java
new file mode 100644
index 00000000..365bd4d3
--- /dev/null
+++ b/yudao-module-indicator/yudao-module-indicator-server/src/main/java/cn/iocoder/yudao/module/indicator/controller/admin/indicator/IndicatorController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.indicator.controller.admin.indicator;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * Indicator 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - Indicator")
+@RestController
+@RequestMapping("/admin/indicator/indicator")
+public class IndicatorController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello Indicator")
+ public CommonResult hello() {
+ return success("Hello, Indicator!");
+ }
+
+}
diff --git a/yudao-module-indicator/yudao-module-indicator-server/src/main/java/cn/iocoder/yudao/module/indicator/framework/security/config/SecurityConfiguration.java b/yudao-module-indicator/yudao-module-indicator-server/src/main/java/cn/iocoder/yudao/module/indicator/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..f34c43ef
--- /dev/null
+++ b/yudao-module-indicator/yudao-module-indicator-server/src/main/java/cn/iocoder/yudao/module/indicator/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.indicator.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * Indicator 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-indicator/yudao-module-indicator-server/src/main/resources/application-dev.yml b/yudao-module-indicator/yudao-module-indicator-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-indicator/yudao-module-indicator-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-indicator/yudao-module-indicator-server/src/main/resources/application-local.yml b/yudao-module-indicator/yudao-module-indicator-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..616d00a7
--- /dev/null
+++ b/yudao-module-indicator/yudao-module-indicator-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.indicator.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-indicator/yudao-module-indicator-server/src/main/resources/application.yml b/yudao-module-indicator/yudao-module-indicator-server/src/main/resources/application.yml
new file mode 100644
index 00000000..7bca14df
--- /dev/null
+++ b/yudao-module-indicator/yudao-module-indicator-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: indicator-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48113
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.indicator
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-jy-business/pom.xml b/yudao-module-jy-business/pom.xml
new file mode 100644
index 00000000..f36cddf9
--- /dev/null
+++ b/yudao-module-jy-business/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-jy-business-api
+ yudao-module-jy-business-server
+
+ 4.0.0
+
+ yudao-module-jy-business
+ pom
+
+ ${project.artifactId}
+
+ JyBusiness 模块。
+
+
+
diff --git a/yudao-module-jy-business/yudao-module-jy-business-api/pom.xml b/yudao-module-jy-business/yudao-module-jy-business-api/pom.xml
new file mode 100644
index 00000000..f3e8cef7
--- /dev/null
+++ b/yudao-module-jy-business/yudao-module-jy-business-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-jy-business
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-jy-business-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-jy-business/yudao-module-jy-business-api/src/main/java/cn/iocoder/yudao/module/jybusiness/enums/ErrorCodeConstants.java b/yudao-module-jy-business/yudao-module-jy-business-api/src/main/java/cn/iocoder/yudao/module/jybusiness/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..11c856e7
--- /dev/null
+++ b/yudao-module-jy-business/yudao-module-jy-business-api/src/main/java/cn/iocoder/yudao/module/jybusiness/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.jybusiness.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * jy-business 错误码枚举类
+ *
+ * jy-business 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-jy-business/yudao-module-jy-business-server/pom.xml b/yudao-module-jy-business/yudao-module-jy-business-server/pom.xml
new file mode 100644
index 00000000..cabac2de
--- /dev/null
+++ b/yudao-module-jy-business/yudao-module-jy-business-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-jy-business
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-jy-business-server
+
+ ${project.artifactId}
+
+ JyBusiness 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-jy-business-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/JyBusinessServerApplication.java b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/JyBusinessServerApplication.java
new file mode 100644
index 00000000..e4ff5ee3
--- /dev/null
+++ b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/JyBusinessServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.jybusiness;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * JyBusiness 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class JyBusinessServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(JyBusinessServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/controller/admin/jybusiness/JyBusinessController.java b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/controller/admin/jybusiness/JyBusinessController.java
new file mode 100644
index 00000000..31bf8f50
--- /dev/null
+++ b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/controller/admin/jybusiness/JyBusinessController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.jybusiness.controller.admin.jybusiness;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * JyBusiness 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - JyBusiness")
+@RestController
+@RequestMapping("/admin/jy-business/jy-business")
+public class JyBusinessController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello JyBusiness")
+ public CommonResult hello() {
+ return success("Hello, JyBusiness!");
+ }
+
+}
diff --git a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/framework/security/config/SecurityConfiguration.java b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..c59f8159
--- /dev/null
+++ b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/java/cn/iocoder/yudao/module/jybusiness/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.jybusiness.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * JyBusiness 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application-dev.yml b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application-local.yml b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..e9bd62e3
--- /dev/null
+++ b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.jybusiness.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application.yml b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application.yml
new file mode 100644
index 00000000..542c2748
--- /dev/null
+++ b/yudao-module-jy-business/yudao-module-jy-business-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: jy-business-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48119
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.jybusiness
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-jy-iot/pom.xml b/yudao-module-jy-iot/pom.xml
new file mode 100644
index 00000000..929c173c
--- /dev/null
+++ b/yudao-module-jy-iot/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-jy-iot-api
+ yudao-module-jy-iot-server
+
+ 4.0.0
+
+ yudao-module-jy-iot
+ pom
+
+ ${project.artifactId}
+
+ JyIot 模块。
+
+
+
diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-api/pom.xml b/yudao-module-jy-iot/yudao-module-jy-iot-api/pom.xml
new file mode 100644
index 00000000..c5fd8373
--- /dev/null
+++ b/yudao-module-jy-iot/yudao-module-jy-iot-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-jy-iot
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-jy-iot-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-api/src/main/java/cn/iocoder/yudao/module/jyiot/enums/ErrorCodeConstants.java b/yudao-module-jy-iot/yudao-module-jy-iot-api/src/main/java/cn/iocoder/yudao/module/jyiot/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..33de6210
--- /dev/null
+++ b/yudao-module-jy-iot/yudao-module-jy-iot-api/src/main/java/cn/iocoder/yudao/module/jyiot/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.jyiot.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * jy-iot 错误码枚举类
+ *
+ * jy-iot 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-server/pom.xml b/yudao-module-jy-iot/yudao-module-jy-iot-server/pom.xml
new file mode 100644
index 00000000..f002282d
--- /dev/null
+++ b/yudao-module-jy-iot/yudao-module-jy-iot-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-jy-iot
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-jy-iot-server
+
+ ${project.artifactId}
+
+ JyIot 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-jy-iot-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/JyIotServerApplication.java b/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/JyIotServerApplication.java
new file mode 100644
index 00000000..1be35810
--- /dev/null
+++ b/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/JyIotServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.jyiot;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * JyIot 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class JyIotServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(JyIotServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/controller/admin/jyiot/JyIotController.java b/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/controller/admin/jyiot/JyIotController.java
new file mode 100644
index 00000000..44d96694
--- /dev/null
+++ b/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/controller/admin/jyiot/JyIotController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.jyiot.controller.admin.jyiot;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * JyIot 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - JyIot")
+@RestController
+@RequestMapping("/admin/jy-iot/jy-iot")
+public class JyIotController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello JyIot")
+ public CommonResult hello() {
+ return success("Hello, JyIot!");
+ }
+
+}
diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/framework/security/config/SecurityConfiguration.java b/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..6f3f4929
--- /dev/null
+++ b/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/java/cn/iocoder/yudao/module/jyiot/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.jyiot.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * JyIot 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application-dev.yml b/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application-local.yml b/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..7aab50c1
--- /dev/null
+++ b/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.jyiot.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application.yml b/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application.yml
new file mode 100644
index 00000000..608e36ad
--- /dev/null
+++ b/yudao-module-jy-iot/yudao-module-jy-iot-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: jy-iot-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48124
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.jyiot
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-jy-manage/pom.xml b/yudao-module-jy-manage/pom.xml
new file mode 100644
index 00000000..6af9666c
--- /dev/null
+++ b/yudao-module-jy-manage/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-jy-manage-api
+ yudao-module-jy-manage-server
+
+ 4.0.0
+
+ yudao-module-jy-manage
+ pom
+
+ ${project.artifactId}
+
+ JyManage 模块。
+
+
+
diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-api/pom.xml b/yudao-module-jy-manage/yudao-module-jy-manage-api/pom.xml
new file mode 100644
index 00000000..672a9f49
--- /dev/null
+++ b/yudao-module-jy-manage/yudao-module-jy-manage-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-jy-manage
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-jy-manage-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-api/src/main/java/cn/iocoder/yudao/module/jymanage/enums/ErrorCodeConstants.java b/yudao-module-jy-manage/yudao-module-jy-manage-api/src/main/java/cn/iocoder/yudao/module/jymanage/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..c67e135b
--- /dev/null
+++ b/yudao-module-jy-manage/yudao-module-jy-manage-api/src/main/java/cn/iocoder/yudao/module/jymanage/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.jymanage.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * jy-manage 错误码枚举类
+ *
+ * jy-manage 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-server/pom.xml b/yudao-module-jy-manage/yudao-module-jy-manage-server/pom.xml
new file mode 100644
index 00000000..b9dbd1fd
--- /dev/null
+++ b/yudao-module-jy-manage/yudao-module-jy-manage-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-jy-manage
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-jy-manage-server
+
+ ${project.artifactId}
+
+ JyManage 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-jy-manage-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/JyManageServerApplication.java b/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/JyManageServerApplication.java
new file mode 100644
index 00000000..326c7246
--- /dev/null
+++ b/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/JyManageServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.jymanage;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * JyManage 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class JyManageServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(JyManageServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/controller/admin/jymanage/JyManageController.java b/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/controller/admin/jymanage/JyManageController.java
new file mode 100644
index 00000000..7e3af11f
--- /dev/null
+++ b/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/controller/admin/jymanage/JyManageController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.jymanage.controller.admin.jymanage;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * JyManage 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - JyManage")
+@RestController
+@RequestMapping("/admin/jy-manage/jy-manage")
+public class JyManageController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello JyManage")
+ public CommonResult hello() {
+ return success("Hello, JyManage!");
+ }
+
+}
diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/framework/security/config/SecurityConfiguration.java b/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..8d223502
--- /dev/null
+++ b/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/java/cn/iocoder/yudao/module/jymanage/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.jymanage.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * JyManage 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application-dev.yml b/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application-local.yml b/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..6d1d3b62
--- /dev/null
+++ b/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.jymanage.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application.yml b/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application.yml
new file mode 100644
index 00000000..e7041b65
--- /dev/null
+++ b/yudao-module-jy-manage/yudao-module-jy-manage-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: jy-manage-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48120
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.jymanage
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-jy-office/pom.xml b/yudao-module-jy-office/pom.xml
new file mode 100644
index 00000000..81d6cdaf
--- /dev/null
+++ b/yudao-module-jy-office/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-jy-office-api
+ yudao-module-jy-office-server
+
+ 4.0.0
+
+ yudao-module-jy-office
+ pom
+
+ ${project.artifactId}
+
+ JyOffice 模块。
+
+
+
diff --git a/yudao-module-jy-office/yudao-module-jy-office-api/pom.xml b/yudao-module-jy-office/yudao-module-jy-office-api/pom.xml
new file mode 100644
index 00000000..6387ecd7
--- /dev/null
+++ b/yudao-module-jy-office/yudao-module-jy-office-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-jy-office
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-jy-office-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-jy-office/yudao-module-jy-office-api/src/main/java/cn/iocoder/yudao/module/jyoffice/enums/ErrorCodeConstants.java b/yudao-module-jy-office/yudao-module-jy-office-api/src/main/java/cn/iocoder/yudao/module/jyoffice/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..71ab6ffd
--- /dev/null
+++ b/yudao-module-jy-office/yudao-module-jy-office-api/src/main/java/cn/iocoder/yudao/module/jyoffice/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.jyoffice.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * jy-office 错误码枚举类
+ *
+ * jy-office 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-jy-office/yudao-module-jy-office-server/pom.xml b/yudao-module-jy-office/yudao-module-jy-office-server/pom.xml
new file mode 100644
index 00000000..99b7dd27
--- /dev/null
+++ b/yudao-module-jy-office/yudao-module-jy-office-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-jy-office
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-jy-office-server
+
+ ${project.artifactId}
+
+ JyOffice 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-jy-office-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/JyOfficeServerApplication.java b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/JyOfficeServerApplication.java
new file mode 100644
index 00000000..60e4ad3f
--- /dev/null
+++ b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/JyOfficeServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.jyoffice;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * JyOffice 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class JyOfficeServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(JyOfficeServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/controller/admin/jyoffice/JyOfficeController.java b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/controller/admin/jyoffice/JyOfficeController.java
new file mode 100644
index 00000000..e5cd166c
--- /dev/null
+++ b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/controller/admin/jyoffice/JyOfficeController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.jyoffice.controller.admin.jyoffice;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * JyOffice 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - JyOffice")
+@RestController
+@RequestMapping("/admin/jy-office/jy-office")
+public class JyOfficeController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello JyOffice")
+ public CommonResult hello() {
+ return success("Hello, JyOffice!");
+ }
+
+}
diff --git a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/framework/security/config/SecurityConfiguration.java b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..5ba2aab7
--- /dev/null
+++ b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/java/cn/iocoder/yudao/module/jyoffice/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.jyoffice.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * JyOffice 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application-dev.yml b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application-local.yml b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..c706b0c8
--- /dev/null
+++ b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.jyoffice.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application.yml b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application.yml
new file mode 100644
index 00000000..9223dee6
--- /dev/null
+++ b/yudao-module-jy-office/yudao-module-jy-office-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: jy-office-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48122
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.jyoffice
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-jy-report/pom.xml b/yudao-module-jy-report/pom.xml
new file mode 100644
index 00000000..b110d682
--- /dev/null
+++ b/yudao-module-jy-report/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-jy-report-api
+ yudao-module-jy-report-server
+
+ 4.0.0
+
+ yudao-module-jy-report
+ pom
+
+ ${project.artifactId}
+
+ JyReport 模块。
+
+
+
diff --git a/yudao-module-jy-report/yudao-module-jy-report-api/pom.xml b/yudao-module-jy-report/yudao-module-jy-report-api/pom.xml
new file mode 100644
index 00000000..52e1ffd7
--- /dev/null
+++ b/yudao-module-jy-report/yudao-module-jy-report-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-jy-report
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-jy-report-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-jy-report/yudao-module-jy-report-api/src/main/java/cn/iocoder/yudao/module/jyreport/enums/ErrorCodeConstants.java b/yudao-module-jy-report/yudao-module-jy-report-api/src/main/java/cn/iocoder/yudao/module/jyreport/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..b38f3788
--- /dev/null
+++ b/yudao-module-jy-report/yudao-module-jy-report-api/src/main/java/cn/iocoder/yudao/module/jyreport/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.jyreport.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * jy-report 错误码枚举类
+ *
+ * jy-report 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-jy-report/yudao-module-jy-report-server/pom.xml b/yudao-module-jy-report/yudao-module-jy-report-server/pom.xml
new file mode 100644
index 00000000..a69da220
--- /dev/null
+++ b/yudao-module-jy-report/yudao-module-jy-report-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-jy-report
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-jy-report-server
+
+ ${project.artifactId}
+
+ JyReport 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-jy-report-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/JyReportServerApplication.java b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/JyReportServerApplication.java
new file mode 100644
index 00000000..b4f25616
--- /dev/null
+++ b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/JyReportServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.jyreport;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * JyReport 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class JyReportServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(JyReportServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/controller/admin/jyreport/JyReportController.java b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/controller/admin/jyreport/JyReportController.java
new file mode 100644
index 00000000..a3520eff
--- /dev/null
+++ b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/controller/admin/jyreport/JyReportController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.jyreport.controller.admin.jyreport;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * JyReport 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - JyReport")
+@RestController
+@RequestMapping("/admin/jy-report/jy-report")
+public class JyReportController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello JyReport")
+ public CommonResult hello() {
+ return success("Hello, JyReport!");
+ }
+
+}
diff --git a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/framework/security/config/SecurityConfiguration.java b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..a293df71
--- /dev/null
+++ b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/java/cn/iocoder/yudao/module/jyreport/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.jyreport.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * JyReport 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application-dev.yml b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application-local.yml b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..0e77e594
--- /dev/null
+++ b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.jyreport.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application.yml b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application.yml
new file mode 100644
index 00000000..3774471d
--- /dev/null
+++ b/yudao-module-jy-report/yudao-module-jy-report-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: jy-report-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48123
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.jyreport
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-jy-resource/pom.xml b/yudao-module-jy-resource/pom.xml
new file mode 100644
index 00000000..ae0c1186
--- /dev/null
+++ b/yudao-module-jy-resource/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-jy-resource-api
+ yudao-module-jy-resource-server
+
+ 4.0.0
+
+ yudao-module-jy-resource
+ pom
+
+ ${project.artifactId}
+
+ JyResource 模块。
+
+
+
diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-api/pom.xml b/yudao-module-jy-resource/yudao-module-jy-resource-api/pom.xml
new file mode 100644
index 00000000..631b02a2
--- /dev/null
+++ b/yudao-module-jy-resource/yudao-module-jy-resource-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-jy-resource
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-jy-resource-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-api/src/main/java/cn/iocoder/yudao/module/jyresource/enums/ErrorCodeConstants.java b/yudao-module-jy-resource/yudao-module-jy-resource-api/src/main/java/cn/iocoder/yudao/module/jyresource/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..6018684a
--- /dev/null
+++ b/yudao-module-jy-resource/yudao-module-jy-resource-api/src/main/java/cn/iocoder/yudao/module/jyresource/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.jyresource.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * jy-resource 错误码枚举类
+ *
+ * jy-resource 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-server/pom.xml b/yudao-module-jy-resource/yudao-module-jy-resource-server/pom.xml
new file mode 100644
index 00000000..3846cdf1
--- /dev/null
+++ b/yudao-module-jy-resource/yudao-module-jy-resource-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-jy-resource
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-jy-resource-server
+
+ ${project.artifactId}
+
+ JyResource 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-jy-resource-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/JyResourceServerApplication.java b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/JyResourceServerApplication.java
new file mode 100644
index 00000000..1fae6310
--- /dev/null
+++ b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/JyResourceServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.jyresource;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * JyResource 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class JyResourceServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(JyResourceServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/controller/admin/jyresource/JyResourceController.java b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/controller/admin/jyresource/JyResourceController.java
new file mode 100644
index 00000000..4923655f
--- /dev/null
+++ b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/controller/admin/jyresource/JyResourceController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.jyresource.controller.admin.jyresource;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * JyResource 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - JyResource")
+@RestController
+@RequestMapping("/admin/jy-resource/jy-resource")
+public class JyResourceController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello JyResource")
+ public CommonResult hello() {
+ return success("Hello, JyResource!");
+ }
+
+}
diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/framework/security/config/SecurityConfiguration.java b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..a65b054e
--- /dev/null
+++ b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/java/cn/iocoder/yudao/module/jyresource/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.jyresource.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * JyResource 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application-dev.yml b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application-local.yml b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..34bdf4e7
--- /dev/null
+++ b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.jyresource.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application.yml b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application.yml
new file mode 100644
index 00000000..2b86ddd8
--- /dev/null
+++ b/yudao-module-jy-resource/yudao-module-jy-resource-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: jy-resource-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48121
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.jyresource
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-manage/pom.xml b/yudao-module-manage/pom.xml
new file mode 100644
index 00000000..8bde008c
--- /dev/null
+++ b/yudao-module-manage/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-manage-api
+ yudao-module-manage-server
+
+ 4.0.0
+
+ yudao-module-manage
+ pom
+
+ ${project.artifactId}
+
+ Manage 模块。
+
+
+
diff --git a/yudao-module-manage/yudao-module-manage-api/pom.xml b/yudao-module-manage/yudao-module-manage-api/pom.xml
new file mode 100644
index 00000000..54338cbb
--- /dev/null
+++ b/yudao-module-manage/yudao-module-manage-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-manage
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-manage-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-manage/yudao-module-manage-api/src/main/java/cn/iocoder/yudao/module/manage/enums/ErrorCodeConstants.java b/yudao-module-manage/yudao-module-manage-api/src/main/java/cn/iocoder/yudao/module/manage/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..d3001ba2
--- /dev/null
+++ b/yudao-module-manage/yudao-module-manage-api/src/main/java/cn/iocoder/yudao/module/manage/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.manage.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * manage 错误码枚举类
+ *
+ * manage 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-manage/yudao-module-manage-server/pom.xml b/yudao-module-manage/yudao-module-manage-server/pom.xml
new file mode 100644
index 00000000..7d9aa22e
--- /dev/null
+++ b/yudao-module-manage/yudao-module-manage-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-manage
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-manage-server
+
+ ${project.artifactId}
+
+ Manage 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-manage-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-manage/yudao-module-manage-server/src/main/java/cn/iocoder/yudao/module/manage/ManageServerApplication.java b/yudao-module-manage/yudao-module-manage-server/src/main/java/cn/iocoder/yudao/module/manage/ManageServerApplication.java
new file mode 100644
index 00000000..ff5f7a69
--- /dev/null
+++ b/yudao-module-manage/yudao-module-manage-server/src/main/java/cn/iocoder/yudao/module/manage/ManageServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.manage;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Manage 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class ManageServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(ManageServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-manage/yudao-module-manage-server/src/main/java/cn/iocoder/yudao/module/manage/controller/admin/manage/ManageController.java b/yudao-module-manage/yudao-module-manage-server/src/main/java/cn/iocoder/yudao/module/manage/controller/admin/manage/ManageController.java
new file mode 100644
index 00000000..345fa255
--- /dev/null
+++ b/yudao-module-manage/yudao-module-manage-server/src/main/java/cn/iocoder/yudao/module/manage/controller/admin/manage/ManageController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.manage.controller.admin.manage;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * Manage 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - Manage")
+@RestController
+@RequestMapping("/admin/manage/manage")
+public class ManageController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello Manage")
+ public CommonResult hello() {
+ return success("Hello, Manage!");
+ }
+
+}
diff --git a/yudao-module-manage/yudao-module-manage-server/src/main/java/cn/iocoder/yudao/module/manage/framework/security/config/SecurityConfiguration.java b/yudao-module-manage/yudao-module-manage-server/src/main/java/cn/iocoder/yudao/module/manage/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..50ccf4b4
--- /dev/null
+++ b/yudao-module-manage/yudao-module-manage-server/src/main/java/cn/iocoder/yudao/module/manage/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.manage.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * Manage 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-manage/yudao-module-manage-server/src/main/resources/application-dev.yml b/yudao-module-manage/yudao-module-manage-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-manage/yudao-module-manage-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-manage/yudao-module-manage-server/src/main/resources/application-local.yml b/yudao-module-manage/yudao-module-manage-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..31e2fc97
--- /dev/null
+++ b/yudao-module-manage/yudao-module-manage-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.manage.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-manage/yudao-module-manage-server/src/main/resources/application.yml b/yudao-module-manage/yudao-module-manage-server/src/main/resources/application.yml
new file mode 100644
index 00000000..a7a06585
--- /dev/null
+++ b/yudao-module-manage/yudao-module-manage-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: manage-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48102
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.manage
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-metering-test/pom.xml b/yudao-module-metering-test/pom.xml
new file mode 100644
index 00000000..f7ade6f1
--- /dev/null
+++ b/yudao-module-metering-test/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-metering-test-api
+ yudao-module-metering-test-server
+
+ 4.0.0
+
+ yudao-module-metering-test
+ pom
+
+ ${project.artifactId}
+
+ MeteringTest 模块。
+
+
+
diff --git a/yudao-module-metering-test/yudao-module-metering-test-api/pom.xml b/yudao-module-metering-test/yudao-module-metering-test-api/pom.xml
new file mode 100644
index 00000000..84aa79cb
--- /dev/null
+++ b/yudao-module-metering-test/yudao-module-metering-test-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-metering-test
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-metering-test-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-metering-test/yudao-module-metering-test-api/src/main/java/cn/iocoder/yudao/module/meteringtest/enums/ErrorCodeConstants.java b/yudao-module-metering-test/yudao-module-metering-test-api/src/main/java/cn/iocoder/yudao/module/meteringtest/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..254dbf25
--- /dev/null
+++ b/yudao-module-metering-test/yudao-module-metering-test-api/src/main/java/cn/iocoder/yudao/module/meteringtest/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.meteringtest.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * metering-test 错误码枚举类
+ *
+ * metering-test 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-metering-test/yudao-module-metering-test-server/pom.xml b/yudao-module-metering-test/yudao-module-metering-test-server/pom.xml
new file mode 100644
index 00000000..8a85d250
--- /dev/null
+++ b/yudao-module-metering-test/yudao-module-metering-test-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-metering-test
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-metering-test-server
+
+ ${project.artifactId}
+
+ MeteringTest 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-metering-test-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/MeteringTestServerApplication.java b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/MeteringTestServerApplication.java
new file mode 100644
index 00000000..063ee42e
--- /dev/null
+++ b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/MeteringTestServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.meteringtest;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * MeteringTest 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class MeteringTestServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(MeteringTestServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/controller/admin/meteringtest/MeteringTestController.java b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/controller/admin/meteringtest/MeteringTestController.java
new file mode 100644
index 00000000..3e3d8839
--- /dev/null
+++ b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/controller/admin/meteringtest/MeteringTestController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.meteringtest.controller.admin.meteringtest;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * MeteringTest 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - MeteringTest")
+@RestController
+@RequestMapping("/admin/metering-test/metering-test")
+public class MeteringTestController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello MeteringTest")
+ public CommonResult hello() {
+ return success("Hello, MeteringTest!");
+ }
+
+}
diff --git a/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/framework/security/config/SecurityConfiguration.java b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..2724e2fe
--- /dev/null
+++ b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/java/cn/iocoder/yudao/module/meteringtest/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.meteringtest.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * MeteringTest 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-metering-test/yudao-module-metering-test-server/src/main/resources/application-dev.yml b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-metering-test/yudao-module-metering-test-server/src/main/resources/application-local.yml b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..c36ed3bc
--- /dev/null
+++ b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.meteringtest.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-metering-test/yudao-module-metering-test-server/src/main/resources/application.yml b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/resources/application.yml
new file mode 100644
index 00000000..9068aba6
--- /dev/null
+++ b/yudao-module-metering-test/yudao-module-metering-test-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: metering-test-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48104
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.meteringtest
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-price/pom.xml b/yudao-module-price/pom.xml
new file mode 100644
index 00000000..762bd924
--- /dev/null
+++ b/yudao-module-price/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-price-api
+ yudao-module-price-server
+
+ 4.0.0
+
+ yudao-module-price
+ pom
+
+ ${project.artifactId}
+
+ Price 模块。
+
+
+
diff --git a/yudao-module-price/yudao-module-price-api/pom.xml b/yudao-module-price/yudao-module-price-api/pom.xml
new file mode 100644
index 00000000..c45f0c97
--- /dev/null
+++ b/yudao-module-price/yudao-module-price-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-price
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-price-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-price/yudao-module-price-api/src/main/java/cn/iocoder/yudao/module/price/enums/ErrorCodeConstants.java b/yudao-module-price/yudao-module-price-api/src/main/java/cn/iocoder/yudao/module/price/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..c3fc3cc0
--- /dev/null
+++ b/yudao-module-price/yudao-module-price-api/src/main/java/cn/iocoder/yudao/module/price/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.price.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * price 错误码枚举类
+ *
+ * price 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-price/yudao-module-price-server/pom.xml b/yudao-module-price/yudao-module-price-server/pom.xml
new file mode 100644
index 00000000..f9605a0c
--- /dev/null
+++ b/yudao-module-price/yudao-module-price-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-price
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-price-server
+
+ ${project.artifactId}
+
+ Price 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-price-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/PriceServerApplication.java b/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/PriceServerApplication.java
new file mode 100644
index 00000000..2508913b
--- /dev/null
+++ b/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/PriceServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.price;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Price 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class PriceServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(PriceServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/controller/admin/price/PriceController.java b/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/controller/admin/price/PriceController.java
new file mode 100644
index 00000000..90f9e182
--- /dev/null
+++ b/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/controller/admin/price/PriceController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.price.controller.admin.price;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * Price 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - Price")
+@RestController
+@RequestMapping("/admin/price/price")
+public class PriceController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello Price")
+ public CommonResult hello() {
+ return success("Hello, Price!");
+ }
+
+}
diff --git a/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/framework/security/config/SecurityConfiguration.java b/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..e361021f
--- /dev/null
+++ b/yudao-module-price/yudao-module-price-server/src/main/java/cn/iocoder/yudao/module/price/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.price.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * Price 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-price/yudao-module-price-server/src/main/resources/application-dev.yml b/yudao-module-price/yudao-module-price-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-price/yudao-module-price-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-price/yudao-module-price-server/src/main/resources/application-local.yml b/yudao-module-price/yudao-module-price-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..add8d4f2
--- /dev/null
+++ b/yudao-module-price/yudao-module-price-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.price.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-price/yudao-module-price-server/src/main/resources/application.yml b/yudao-module-price/yudao-module-price-server/src/main/resources/application.yml
new file mode 100644
index 00000000..e8463d2f
--- /dev/null
+++ b/yudao-module-price/yudao-module-price-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: price-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48108
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.price
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-product/pom.xml b/yudao-module-product/pom.xml
new file mode 100644
index 00000000..27bd7b5f
--- /dev/null
+++ b/yudao-module-product/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-product-api
+ yudao-module-product-server
+
+ 4.0.0
+
+ yudao-module-product
+ pom
+
+ ${project.artifactId}
+
+ Product 模块。
+
+
+
diff --git a/yudao-module-product/yudao-module-product-api/pom.xml b/yudao-module-product/yudao-module-product-api/pom.xml
new file mode 100644
index 00000000..544cb00f
--- /dev/null
+++ b/yudao-module-product/yudao-module-product-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-product
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-product-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-product/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/ErrorCodeConstants.java b/yudao-module-product/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..b261e2f7
--- /dev/null
+++ b/yudao-module-product/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.product.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * product 错误码枚举类
+ *
+ * product 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-product/yudao-module-product-server/pom.xml b/yudao-module-product/yudao-module-product-server/pom.xml
new file mode 100644
index 00000000..0e5c4bc7
--- /dev/null
+++ b/yudao-module-product/yudao-module-product-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-product
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-product-server
+
+ ${project.artifactId}
+
+ Product 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-product-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-product/yudao-module-product-server/src/main/java/cn/iocoder/yudao/module/product/ProductServerApplication.java b/yudao-module-product/yudao-module-product-server/src/main/java/cn/iocoder/yudao/module/product/ProductServerApplication.java
new file mode 100644
index 00000000..9f01d7f3
--- /dev/null
+++ b/yudao-module-product/yudao-module-product-server/src/main/java/cn/iocoder/yudao/module/product/ProductServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.product;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Product 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class ProductServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(ProductServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-product/yudao-module-product-server/src/main/java/cn/iocoder/yudao/module/product/controller/admin/product/ProductController.java b/yudao-module-product/yudao-module-product-server/src/main/java/cn/iocoder/yudao/module/product/controller/admin/product/ProductController.java
new file mode 100644
index 00000000..1f34e14f
--- /dev/null
+++ b/yudao-module-product/yudao-module-product-server/src/main/java/cn/iocoder/yudao/module/product/controller/admin/product/ProductController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.product.controller.admin.product;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * Product 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - Product")
+@RestController
+@RequestMapping("/admin/product/product")
+public class ProductController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello Product")
+ public CommonResult hello() {
+ return success("Hello, Product!");
+ }
+
+}
diff --git a/yudao-module-product/yudao-module-product-server/src/main/java/cn/iocoder/yudao/module/product/framework/security/config/SecurityConfiguration.java b/yudao-module-product/yudao-module-product-server/src/main/java/cn/iocoder/yudao/module/product/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..fdce2d09
--- /dev/null
+++ b/yudao-module-product/yudao-module-product-server/src/main/java/cn/iocoder/yudao/module/product/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.product.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * Product 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-product/yudao-module-product-server/src/main/resources/application-dev.yml b/yudao-module-product/yudao-module-product-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-product/yudao-module-product-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-product/yudao-module-product-server/src/main/resources/application-local.yml b/yudao-module-product/yudao-module-product-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..58c270ca
--- /dev/null
+++ b/yudao-module-product/yudao-module-product-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.product.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-product/yudao-module-product-server/src/main/resources/application.yml b/yudao-module-product/yudao-module-product-server/src/main/resources/application.yml
new file mode 100644
index 00000000..7c727327
--- /dev/null
+++ b/yudao-module-product/yudao-module-product-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: product-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48114
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.product
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-purchase/pom.xml b/yudao-module-purchase/pom.xml
new file mode 100644
index 00000000..681c1af0
--- /dev/null
+++ b/yudao-module-purchase/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-purchase-api
+ yudao-module-purchase-server
+
+ 4.0.0
+
+ yudao-module-purchase
+ pom
+
+ ${project.artifactId}
+
+ Purchase 模块。
+
+
+
diff --git a/yudao-module-purchase/yudao-module-purchase-api/pom.xml b/yudao-module-purchase/yudao-module-purchase-api/pom.xml
new file mode 100644
index 00000000..914c673b
--- /dev/null
+++ b/yudao-module-purchase/yudao-module-purchase-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-purchase
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-purchase-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-purchase/yudao-module-purchase-api/src/main/java/cn/iocoder/yudao/module/purchase/enums/ErrorCodeConstants.java b/yudao-module-purchase/yudao-module-purchase-api/src/main/java/cn/iocoder/yudao/module/purchase/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..2c5c8374
--- /dev/null
+++ b/yudao-module-purchase/yudao-module-purchase-api/src/main/java/cn/iocoder/yudao/module/purchase/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.purchase.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * purchase 错误码枚举类
+ *
+ * purchase 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-purchase/yudao-module-purchase-server/pom.xml b/yudao-module-purchase/yudao-module-purchase-server/pom.xml
new file mode 100644
index 00000000..04f66920
--- /dev/null
+++ b/yudao-module-purchase/yudao-module-purchase-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-purchase
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-purchase-server
+
+ ${project.artifactId}
+
+ Purchase 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-purchase-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/PurchaseServerApplication.java b/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/PurchaseServerApplication.java
new file mode 100644
index 00000000..53838092
--- /dev/null
+++ b/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/PurchaseServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.purchase;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Purchase 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class PurchaseServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(PurchaseServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/controller/admin/purchase/PurchaseController.java b/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/controller/admin/purchase/PurchaseController.java
new file mode 100644
index 00000000..745bc663
--- /dev/null
+++ b/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/controller/admin/purchase/PurchaseController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.purchase.controller.admin.purchase;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * Purchase 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - Purchase")
+@RestController
+@RequestMapping("/admin/purchase/purchase")
+public class PurchaseController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello Purchase")
+ public CommonResult hello() {
+ return success("Hello, Purchase!");
+ }
+
+}
diff --git a/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/framework/security/config/SecurityConfiguration.java b/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..25e9a300
--- /dev/null
+++ b/yudao-module-purchase/yudao-module-purchase-server/src/main/java/cn/iocoder/yudao/module/purchase/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.purchase.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * Purchase 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-purchase/yudao-module-purchase-server/src/main/resources/application-dev.yml b/yudao-module-purchase/yudao-module-purchase-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-purchase/yudao-module-purchase-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-purchase/yudao-module-purchase-server/src/main/resources/application-local.yml b/yudao-module-purchase/yudao-module-purchase-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..3a6cb6fd
--- /dev/null
+++ b/yudao-module-purchase/yudao-module-purchase-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.purchase.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-purchase/yudao-module-purchase-server/src/main/resources/application.yml b/yudao-module-purchase/yudao-module-purchase-server/src/main/resources/application.yml
new file mode 100644
index 00000000..4cb7f261
--- /dev/null
+++ b/yudao-module-purchase/yudao-module-purchase-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: purchase-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48111
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.purchase
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-quality/pom.xml b/yudao-module-quality/pom.xml
new file mode 100644
index 00000000..c1786bc4
--- /dev/null
+++ b/yudao-module-quality/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-quality-api
+ yudao-module-quality-server
+
+ 4.0.0
+
+ yudao-module-quality
+ pom
+
+ ${project.artifactId}
+
+ Quality 模块。
+
+
+
diff --git a/yudao-module-quality/yudao-module-quality-api/pom.xml b/yudao-module-quality/yudao-module-quality-api/pom.xml
new file mode 100644
index 00000000..6c4f7d33
--- /dev/null
+++ b/yudao-module-quality/yudao-module-quality-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-quality
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-quality-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-quality/yudao-module-quality-api/src/main/java/cn/iocoder/yudao/module/quality/enums/ErrorCodeConstants.java b/yudao-module-quality/yudao-module-quality-api/src/main/java/cn/iocoder/yudao/module/quality/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..78ffe3a1
--- /dev/null
+++ b/yudao-module-quality/yudao-module-quality-api/src/main/java/cn/iocoder/yudao/module/quality/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.quality.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * quality 错误码枚举类
+ *
+ * quality 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-quality/yudao-module-quality-server/pom.xml b/yudao-module-quality/yudao-module-quality-server/pom.xml
new file mode 100644
index 00000000..9466f373
--- /dev/null
+++ b/yudao-module-quality/yudao-module-quality-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-quality
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-quality-server
+
+ ${project.artifactId}
+
+ Quality 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-quality-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-quality/yudao-module-quality-server/src/main/java/cn/iocoder/yudao/module/quality/QualityServerApplication.java b/yudao-module-quality/yudao-module-quality-server/src/main/java/cn/iocoder/yudao/module/quality/QualityServerApplication.java
new file mode 100644
index 00000000..e975d2c4
--- /dev/null
+++ b/yudao-module-quality/yudao-module-quality-server/src/main/java/cn/iocoder/yudao/module/quality/QualityServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.quality;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Quality 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class QualityServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(QualityServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-quality/yudao-module-quality-server/src/main/java/cn/iocoder/yudao/module/quality/controller/admin/quality/QualityController.java b/yudao-module-quality/yudao-module-quality-server/src/main/java/cn/iocoder/yudao/module/quality/controller/admin/quality/QualityController.java
new file mode 100644
index 00000000..ab232b8a
--- /dev/null
+++ b/yudao-module-quality/yudao-module-quality-server/src/main/java/cn/iocoder/yudao/module/quality/controller/admin/quality/QualityController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.quality.controller.admin.quality;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * Quality 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - Quality")
+@RestController
+@RequestMapping("/admin/quality/quality")
+public class QualityController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello Quality")
+ public CommonResult hello() {
+ return success("Hello, Quality!");
+ }
+
+}
diff --git a/yudao-module-quality/yudao-module-quality-server/src/main/java/cn/iocoder/yudao/module/quality/framework/security/config/SecurityConfiguration.java b/yudao-module-quality/yudao-module-quality-server/src/main/java/cn/iocoder/yudao/module/quality/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..f59faa7c
--- /dev/null
+++ b/yudao-module-quality/yudao-module-quality-server/src/main/java/cn/iocoder/yudao/module/quality/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.quality.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * Quality 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-quality/yudao-module-quality-server/src/main/resources/application-dev.yml b/yudao-module-quality/yudao-module-quality-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-quality/yudao-module-quality-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-quality/yudao-module-quality-server/src/main/resources/application-local.yml b/yudao-module-quality/yudao-module-quality-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..7530b168
--- /dev/null
+++ b/yudao-module-quality/yudao-module-quality-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.quality.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-quality/yudao-module-quality-server/src/main/resources/application.yml b/yudao-module-quality/yudao-module-quality-server/src/main/resources/application.yml
new file mode 100644
index 00000000..844eea89
--- /dev/null
+++ b/yudao-module-quality/yudao-module-quality-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: quality-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48116
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.quality
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-receive-deliver/pom.xml b/yudao-module-receive-deliver/pom.xml
new file mode 100644
index 00000000..14732fef
--- /dev/null
+++ b/yudao-module-receive-deliver/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-receive-deliver-api
+ yudao-module-receive-deliver-server
+
+ 4.0.0
+
+ yudao-module-receive-deliver
+ pom
+
+ ${project.artifactId}
+
+ ReceiveDeliver 模块。
+
+
+
diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-api/pom.xml b/yudao-module-receive-deliver/yudao-module-receive-deliver-api/pom.xml
new file mode 100644
index 00000000..21de2804
--- /dev/null
+++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-receive-deliver
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-receive-deliver-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ErrorCodeConstants.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..f362f6fa
--- /dev/null
+++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-api/src/main/java/cn/iocoder/yudao/module/receivedeliver/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.receivedeliver.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * receive-deliver 错误码枚举类
+ *
+ * receive-deliver 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/pom.xml b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/pom.xml
new file mode 100644
index 00000000..589b9da8
--- /dev/null
+++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-receive-deliver
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-receive-deliver-server
+
+ ${project.artifactId}
+
+ ReceiveDeliver 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-receive-deliver-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/ReceiveDeliverServerApplication.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/ReceiveDeliverServerApplication.java
new file mode 100644
index 00000000..4f3c4301
--- /dev/null
+++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/ReceiveDeliverServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.receivedeliver;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * ReceiveDeliver 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class ReceiveDeliverServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(ReceiveDeliverServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/receivedeliver/ReceiveDeliverController.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/receivedeliver/ReceiveDeliverController.java
new file mode 100644
index 00000000..911ce724
--- /dev/null
+++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/controller/admin/receivedeliver/ReceiveDeliverController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.receivedeliver.controller.admin.receivedeliver;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * ReceiveDeliver 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - ReceiveDeliver")
+@RestController
+@RequestMapping("/admin/receive-deliver/receive-deliver")
+public class ReceiveDeliverController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello ReceiveDeliver")
+ public CommonResult hello() {
+ return success("Hello, ReceiveDeliver!");
+ }
+
+}
diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/framework/security/config/SecurityConfiguration.java b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..a6a93b9c
--- /dev/null
+++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/java/cn/iocoder/yudao/module/receivedeliver/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.receivedeliver.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * ReceiveDeliver 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/application-dev.yml b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/application-local.yml b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..2850ec75
--- /dev/null
+++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.receivedeliver.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/application.yml b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/application.yml
new file mode 100644
index 00000000..28359230
--- /dev/null
+++ b/yudao-module-receive-deliver/yudao-module-receive-deliver-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: receive-deliver-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48105
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.receivedeliver
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-sell/pom.xml b/yudao-module-sell/pom.xml
new file mode 100644
index 00000000..b2c3cd23
--- /dev/null
+++ b/yudao-module-sell/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-sell-api
+ yudao-module-sell-server
+
+ 4.0.0
+
+ yudao-module-sell
+ pom
+
+ ${project.artifactId}
+
+ Sell 模块。
+
+
+
diff --git a/yudao-module-sell/yudao-module-sell-api/pom.xml b/yudao-module-sell/yudao-module-sell-api/pom.xml
new file mode 100644
index 00000000..497941dd
--- /dev/null
+++ b/yudao-module-sell/yudao-module-sell-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-sell
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-sell-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-sell/yudao-module-sell-api/src/main/java/cn/iocoder/yudao/module/sell/enums/ErrorCodeConstants.java b/yudao-module-sell/yudao-module-sell-api/src/main/java/cn/iocoder/yudao/module/sell/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..b4a0d006
--- /dev/null
+++ b/yudao-module-sell/yudao-module-sell-api/src/main/java/cn/iocoder/yudao/module/sell/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.sell.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * sell 错误码枚举类
+ *
+ * sell 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-sell/yudao-module-sell-server/pom.xml b/yudao-module-sell/yudao-module-sell-server/pom.xml
new file mode 100644
index 00000000..b53829a2
--- /dev/null
+++ b/yudao-module-sell/yudao-module-sell-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-sell
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-sell-server
+
+ ${project.artifactId}
+
+ Sell 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-sell-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/SellServerApplication.java b/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/SellServerApplication.java
new file mode 100644
index 00000000..e08bdc49
--- /dev/null
+++ b/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/SellServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.sell;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Sell 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class SellServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(SellServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/controller/admin/sell/SellController.java b/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/controller/admin/sell/SellController.java
new file mode 100644
index 00000000..6f2a43f7
--- /dev/null
+++ b/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/controller/admin/sell/SellController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.sell.controller.admin.sell;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * Sell 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - Sell")
+@RestController
+@RequestMapping("/admin/sell/sell")
+public class SellController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello Sell")
+ public CommonResult hello() {
+ return success("Hello, Sell!");
+ }
+
+}
diff --git a/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/framework/security/config/SecurityConfiguration.java b/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..48d682e9
--- /dev/null
+++ b/yudao-module-sell/yudao-module-sell-server/src/main/java/cn/iocoder/yudao/module/sell/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.sell.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * Sell 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-sell/yudao-module-sell-server/src/main/resources/application-dev.yml b/yudao-module-sell/yudao-module-sell-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-sell/yudao-module-sell-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-sell/yudao-module-sell-server/src/main/resources/application-local.yml b/yudao-module-sell/yudao-module-sell-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..0b432104
--- /dev/null
+++ b/yudao-module-sell/yudao-module-sell-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.sell.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-sell/yudao-module-sell-server/src/main/resources/application.yml b/yudao-module-sell/yudao-module-sell-server/src/main/resources/application.yml
new file mode 100644
index 00000000..03f3bfa2
--- /dev/null
+++ b/yudao-module-sell/yudao-module-sell-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: sell-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48112
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.sell
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-settle/pom.xml b/yudao-module-settle/pom.xml
new file mode 100644
index 00000000..04c6682a
--- /dev/null
+++ b/yudao-module-settle/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-settle-api
+ yudao-module-settle-server
+
+ 4.0.0
+
+ yudao-module-settle
+ pom
+
+ ${project.artifactId}
+
+ Settle 模块。
+
+
+
diff --git a/yudao-module-settle/yudao-module-settle-api/pom.xml b/yudao-module-settle/yudao-module-settle-api/pom.xml
new file mode 100644
index 00000000..35ef792f
--- /dev/null
+++ b/yudao-module-settle/yudao-module-settle-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-settle
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-settle-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-settle/yudao-module-settle-api/src/main/java/cn/iocoder/yudao/module/settle/enums/ErrorCodeConstants.java b/yudao-module-settle/yudao-module-settle-api/src/main/java/cn/iocoder/yudao/module/settle/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..455eca43
--- /dev/null
+++ b/yudao-module-settle/yudao-module-settle-api/src/main/java/cn/iocoder/yudao/module/settle/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.settle.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * settle 错误码枚举类
+ *
+ * settle 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-settle/yudao-module-settle-server/pom.xml b/yudao-module-settle/yudao-module-settle-server/pom.xml
new file mode 100644
index 00000000..e1bc2b25
--- /dev/null
+++ b/yudao-module-settle/yudao-module-settle-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-settle
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-settle-server
+
+ ${project.artifactId}
+
+ Settle 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-settle-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/SettleServerApplication.java b/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/SettleServerApplication.java
new file mode 100644
index 00000000..9cf67d9f
--- /dev/null
+++ b/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/SettleServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.settle;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Settle 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class SettleServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(SettleServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/controller/admin/settle/SettleController.java b/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/controller/admin/settle/SettleController.java
new file mode 100644
index 00000000..f84fb403
--- /dev/null
+++ b/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/controller/admin/settle/SettleController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.settle.controller.admin.settle;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * Settle 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - Settle")
+@RestController
+@RequestMapping("/admin/settle/settle")
+public class SettleController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello Settle")
+ public CommonResult hello() {
+ return success("Hello, Settle!");
+ }
+
+}
diff --git a/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/framework/security/config/SecurityConfiguration.java b/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..ad66d653
--- /dev/null
+++ b/yudao-module-settle/yudao-module-settle-server/src/main/java/cn/iocoder/yudao/module/settle/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.settle.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * Settle 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-settle/yudao-module-settle-server/src/main/resources/application-dev.yml b/yudao-module-settle/yudao-module-settle-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-settle/yudao-module-settle-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-settle/yudao-module-settle-server/src/main/resources/application-local.yml b/yudao-module-settle/yudao-module-settle-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..b8a04b50
--- /dev/null
+++ b/yudao-module-settle/yudao-module-settle-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.settle.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-settle/yudao-module-settle-server/src/main/resources/application.yml b/yudao-module-settle/yudao-module-settle-server/src/main/resources/application.yml
new file mode 100644
index 00000000..b563111a
--- /dev/null
+++ b/yudao-module-settle/yudao-module-settle-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: settle-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48109
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.settle
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false
diff --git a/yudao-module-warehouse/pom.xml b/yudao-module-warehouse/pom.xml
new file mode 100644
index 00000000..fda1bf1b
--- /dev/null
+++ b/yudao-module-warehouse/pom.xml
@@ -0,0 +1,24 @@
+
+
+
+ yudao
+ cn.iocoder.cloud
+ ${revision}
+
+
+ yudao-module-warehouse-api
+ yudao-module-warehouse-server
+
+ 4.0.0
+
+ yudao-module-warehouse
+ pom
+
+ ${project.artifactId}
+
+ Warehouse 模块。
+
+
+
diff --git a/yudao-module-warehouse/yudao-module-warehouse-api/pom.xml b/yudao-module-warehouse/yudao-module-warehouse-api/pom.xml
new file mode 100644
index 00000000..3290aea3
--- /dev/null
+++ b/yudao-module-warehouse/yudao-module-warehouse-api/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ yudao-module-warehouse
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ yudao-module-warehouse-api
+ jar
+
+ ${project.artifactId}
+
+ 暴露给其它模块调用
+
+
+
+
+ cn.iocoder.cloud
+ yudao-common
+
+
+
+ org.springdoc
+ springdoc-openapi-starter-webmvc-api
+ provided
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+ true
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+ true
+
+
+
+
diff --git a/yudao-module-warehouse/yudao-module-warehouse-api/src/main/java/cn/iocoder/yudao/module/warehouse/enums/ErrorCodeConstants.java b/yudao-module-warehouse/yudao-module-warehouse-api/src/main/java/cn/iocoder/yudao/module/warehouse/enums/ErrorCodeConstants.java
new file mode 100644
index 00000000..1895d995
--- /dev/null
+++ b/yudao-module-warehouse/yudao-module-warehouse-api/src/main/java/cn/iocoder/yudao/module/warehouse/enums/ErrorCodeConstants.java
@@ -0,0 +1,17 @@
+package cn.iocoder.yudao.module.warehouse.enums;
+
+import cn.iocoder.yudao.framework.common.exception.ErrorCode;
+
+/**
+ * warehouse 错误码枚举类
+ *
+ * warehouse 系统,使用 1-xxx-xxx-xxx 段
+ *
+ * @author ZT
+ */
+public interface ErrorCodeConstants {
+
+ // ========== 示例模块 1-001-000-000 ==========
+ ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
+
+}
diff --git a/yudao-module-warehouse/yudao-module-warehouse-server/pom.xml b/yudao-module-warehouse/yudao-module-warehouse-server/pom.xml
new file mode 100644
index 00000000..fc345412
--- /dev/null
+++ b/yudao-module-warehouse/yudao-module-warehouse-server/pom.xml
@@ -0,0 +1,151 @@
+
+
+
+ yudao-module-warehouse
+ cn.iocoder.cloud
+ ${revision}
+
+ 4.0.0
+ jar
+
+ yudao-module-warehouse-server
+
+ ${project.artifactId}
+
+ Warehouse 模块。
+
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-env
+
+
+
+
+ cn.iocoder.cloud
+ yudao-module-system-api
+ ${revision}
+
+
+ cn.iocoder.cloud
+ yudao-module-infra-api
+ ${revision}
+
+
+
+ cn.iocoder.cloud
+ yudao-module-warehouse-api
+ ${revision}
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-data-permission
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-tenant
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-web
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-security
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mybatis
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-redis
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-rpc
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-job
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-mq
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-test
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-excel
+
+
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-monitor
+
+
+ cn.iocoder.cloud
+ yudao-spring-boot-starter-biz-business
+ ${revision}
+
+
+
+
+
+ ${project.artifactId}
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring.boot.version}
+
+
+
+ repackage
+
+
+
+
+
+
+
+
diff --git a/yudao-module-warehouse/yudao-module-warehouse-server/src/main/java/cn/iocoder/yudao/module/warehouse/WarehouseServerApplication.java b/yudao-module-warehouse/yudao-module-warehouse-server/src/main/java/cn/iocoder/yudao/module/warehouse/WarehouseServerApplication.java
new file mode 100644
index 00000000..14d5185a
--- /dev/null
+++ b/yudao-module-warehouse/yudao-module-warehouse-server/src/main/java/cn/iocoder/yudao/module/warehouse/WarehouseServerApplication.java
@@ -0,0 +1,18 @@
+package cn.iocoder.yudao.module.warehouse;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * Warehouse 模块的启动类
+ *
+ * @author ZT
+ */
+@SpringBootApplication
+public class WarehouseServerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(WarehouseServerApplication.class, args);
+ }
+
+}
diff --git a/yudao-module-warehouse/yudao-module-warehouse-server/src/main/java/cn/iocoder/yudao/module/warehouse/controller/admin/warehouse/WarehouseController.java b/yudao-module-warehouse/yudao-module-warehouse-server/src/main/java/cn/iocoder/yudao/module/warehouse/controller/admin/warehouse/WarehouseController.java
new file mode 100644
index 00000000..625d5941
--- /dev/null
+++ b/yudao-module-warehouse/yudao-module-warehouse-server/src/main/java/cn/iocoder/yudao/module/warehouse/controller/admin/warehouse/WarehouseController.java
@@ -0,0 +1,28 @@
+package cn.iocoder.yudao.module.warehouse.controller.admin.warehouse;
+
+import cn.iocoder.yudao.framework.common.pojo.CommonResult;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
+
+/**
+ * Warehouse 控制器
+ *
+ * @author ZT
+ */
+@Tag(name = "管理后台 - Warehouse")
+@RestController
+@RequestMapping("/admin/warehouse/warehouse")
+public class WarehouseController {
+
+ @GetMapping("/hello")
+ @Operation(summary = "Hello Warehouse")
+ public CommonResult hello() {
+ return success("Hello, Warehouse!");
+ }
+
+}
diff --git a/yudao-module-warehouse/yudao-module-warehouse-server/src/main/java/cn/iocoder/yudao/module/warehouse/framework/security/config/SecurityConfiguration.java b/yudao-module-warehouse/yudao-module-warehouse-server/src/main/java/cn/iocoder/yudao/module/warehouse/framework/security/config/SecurityConfiguration.java
new file mode 100644
index 00000000..74c75d8b
--- /dev/null
+++ b/yudao-module-warehouse/yudao-module-warehouse-server/src/main/java/cn/iocoder/yudao/module/warehouse/framework/security/config/SecurityConfiguration.java
@@ -0,0 +1,42 @@
+package cn.iocoder.yudao.module.warehouse.framework.security.config;
+
+import cn.iocoder.yudao.framework.security.config.AuthorizeRequestsCustomizer;
+import cn.iocoder.yudao.module.infra.enums.ApiConstants;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configurers.AuthorizeHttpRequestsConfigurer;
+
+
+/**
+ * Warehouse 模块的 Security 配置
+ *
+ * @author ZT
+ */
+@Configuration(proxyBeanMethods = false)
+public class SecurityConfiguration {
+
+ @Bean
+ public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
+ return new AuthorizeRequestsCustomizer() {
+
+ @Override
+ public void customize(AuthorizeHttpRequestsConfigurer.AuthorizationManagerRequestMatcherRegistry registry) {
+ // Swagger 接口文档
+ registry.requestMatchers("/v3/api-docs/**").permitAll()
+ .requestMatchers("/webjars/**").permitAll()
+ .requestMatchers("/swagger-ui").permitAll()
+ .requestMatchers("/swagger-ui/**").permitAll();
+ // Druid 监控
+ registry.requestMatchers("/druid/**").permitAll();
+ // Spring Boot Actuator 的安全配置
+ registry.requestMatchers("/actuator").permitAll()
+ .requestMatchers("/actuator/**").permitAll();
+ // RPC 服务的安全配置
+ registry.requestMatchers(ApiConstants.PREFIX + "/**").permitAll();
+ }
+
+ };
+ }
+
+}
diff --git a/yudao-module-warehouse/yudao-module-warehouse-server/src/main/resources/application-dev.yml b/yudao-module-warehouse/yudao-module-warehouse-server/src/main/resources/application-dev.yml
new file mode 100644
index 00000000..30abeecd
--- /dev/null
+++ b/yudao-module-warehouse/yudao-module-warehouse-server/src/main/resources/application-dev.yml
@@ -0,0 +1,107 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ exclude:
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 5 # 初始连接数
+ min-idle: 10 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+
+justauth:
+ enabled: true
+ type:
+ DINGTALK: # 钉钉
+ client-id: dingvrnreaje3yqvzhxg
+ client-secret: i8E6iZyDvZj51JIb0tYsYfVQYOks9Cq1lgryEjFRqC79P3iJcrxEwT6Qk2QvLrLI
+ ignore-check-redirect-uri: true
+ WECHAT_ENTERPRISE: # 企业微信
+ client-id: wwd411c69a39ad2e54
+ client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
+ agent-id: 1000004
+ ignore-check-redirect-uri: true
+ # noinspection SpringBootApplicationYaml
+ WECHAT_MINI_PROGRAM: # 微信小程序
+ client-id: ${dollar}{wx.miniapp.appid}
+ client-secret: ${dollar}{wx.miniapp.secret}
+ ignore-check-redirect-uri: true
+ ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
+ WECHAT_MP: # 微信公众号
+ client-id: ${dollar}{wx.mp.app-id}
+ client-secret: ${dollar}{wx.mp.secret}
+ ignore-check-redirect-uri: true
+ cache:
+ type: REDIS
+ prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
+ timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
+
diff --git a/yudao-module-warehouse/yudao-module-warehouse-server/src/main/resources/application-local.yml b/yudao-module-warehouse/yudao-module-warehouse-server/src/main/resources/application-local.yml
new file mode 100644
index 00000000..40645c4d
--- /dev/null
+++ b/yudao-module-warehouse/yudao-module-warehouse-server/src/main/resources/application-local.yml
@@ -0,0 +1,97 @@
+spring:
+ # 数据源配置项
+ autoconfigure:
+ # noinspection SpringBootApplicationYaml
+ exclude:
+ - com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
+ datasource:
+ druid: # Druid 【监控】相关的全局配置
+ web-stat-filter:
+ enabled: true
+ stat-view-servlet:
+ enabled: true
+ allow: # 设置白名单,不填则允许所有访问
+ url-pattern: /druid/*
+ login-username: # 控制台管理用户名和密码
+ login-password:
+ filter:
+ stat:
+ enabled: true
+ log-slow-sql: true # 慢 SQL 记录
+ slow-sql-millis: 100
+ merge-sql: true
+ wall:
+ config:
+ multi-statement-allow: true
+ dynamic: # 多数据源配置
+ druid: # Druid 【连接池】相关的全局配置
+ initial-size: 1 # 初始连接数
+ min-idle: 1 # 最小连接池数量
+ max-active: 20 # 最大连接池数量
+ max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
+ time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
+ min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
+ max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
+ validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
+ test-while-idle: true
+ test-on-borrow: false
+ test-on-return: false
+ primary: master
+ datasource:
+ master:
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+ slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
+ lazy: true # 开启懒加载,保证启动速度
+ url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
+ username: SYSDBA
+ password: pgbsci6ddJ6Sqj@e
+
+ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
+ data:
+ redis:
+ host: 172.16.46.63 # 地址
+ port: 30379 # 端口
+ database: 0 # 数据库索引
+# password: 123456 # 密码,建议生产环境开启
+
+xxl:
+ job:
+ admin:
+ addresses: http://172.16.46.63:30082/xxl-job-admin # 调度中心部署跟地址
+
+# Lock4j 配置项
+lock4j:
+ acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
+ expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
+
+# Actuator 监控端点的配置项
+management:
+ endpoints:
+ web:
+ base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
+ exposure:
+ include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
+
+# 日志文件配置
+logging:
+ level:
+ # 配置自己写的 MyBatis Mapper 打印日志
+ cn.iocoder.yudao.module.warehouse.dal.mysql: debug
+ org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
+
+mybatis-plus:
+ configuration:
+ log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+
+
+# 芋道配置项,设置当前项目所有自定义的配置
+yudao:
+ env: # 多环境的配置项
+ tag: ${HOSTNAME}
+ security:
+ mock-enable: true
+ access-log: # 访问日志的配置项
+ enable: true
+
diff --git a/yudao-module-warehouse/yudao-module-warehouse-server/src/main/resources/application.yml b/yudao-module-warehouse/yudao-module-warehouse-server/src/main/resources/application.yml
new file mode 100644
index 00000000..9386cf92
--- /dev/null
+++ b/yudao-module-warehouse/yudao-module-warehouse-server/src/main/resources/application.yml
@@ -0,0 +1,123 @@
+spring:
+ application:
+ name: warehouse-server
+
+ profiles:
+ active: ${env.name}
+ #统一nacos配置,使用 profile 管理
+ cloud:
+ nacos:
+ server-addr: ${config.server-addr} # Nacos 服务器地址
+ username: ${config.username} # Nacos 账号
+ password: ${config.password} # Nacos 密码
+ discovery: # 【配置中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ metadata:
+ version: 1.0.0 # 服务实例的版本号,可用于灰度发布
+ config: # 【注册中心】配置项
+ namespace: ${config.namespace} # 命名空间。这里使用 maven Profile 资源过滤进行动态替换
+ group: ${config.group} # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
+ main:
+ allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
+ allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
+
+ config:
+ import:
+ - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
+ - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
+
+ # Servlet 配置
+ servlet:
+ # 文件上传相关配置项
+ multipart:
+ max-file-size: 16MB # 单个文件大小
+ max-request-size: 32MB # 设置总上传的文件大小
+
+ # Jackson 配置项
+ jackson:
+ serialization:
+ write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
+ write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
+ write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
+ fail-on-empty-beans: false # 允许序列化无属性的 Bean
+ time-zone: Asia/Shanghai
+
+ # Cache 配置项
+ cache:
+ type: REDIS
+ redis:
+ time-to-live: 1h # 设置过期时间为 1 小时
+
+server:
+ port: 48117
+
+logging:
+ file:
+ name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
+
+springdoc:
+ api-docs:
+ enabled: true # 1. 是否开启 Swagger 接文档的元数据
+ path: /v3/api-docs
+ swagger-ui:
+ enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
+ path: /swagger-ui.html
+ default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
+
+knife4j:
+ enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
+ setting:
+ language: zh_cn
+
+# MyBatis Plus 的配置项
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
+ # id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
+ # id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
+ # id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
+ logic-delete-value: 1 # 逻辑已删除值(默认为 1)
+ logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
+ banner: false # 关闭控制台的 Banner 打印
+ type-aliases-package: cn.iocoder.yudao.module.*.dal.dataobject
+ encryptor:
+ password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
+
+mybatis-plus-join:
+ banner: false # 关闭控制台的 Banner 打印
+
+# VO 转换(数据翻译)相关
+easy-trans:
+ is-enable-global: false # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
+
+xxl:
+ job:
+ executor:
+ appname: ${spring.application.name} # 执行器 AppName
+ logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
+ accessToken: default_token # 执行器通讯TOKEN
+
+yudao:
+ info:
+ version: 1.0.0
+ base-package: cn.iocoder.yudao.module.warehouse
+ web:
+ admin-ui:
+ url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
+ xss:
+ enable: false
+ exclude-urls: # 如下两个 url,仅仅是为了演示,去掉配置也没关系
+ - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
+ - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
+ swagger:
+ title: 管理后台
+ description: 提供管理员管理的所有功能
+ version: ${yudao.info.version}
+ tenant: # 多租户相关配置项
+ enable: true
+
+debug: false