1. dsc 不再整合业务代码,只包括系统组件级别的服务
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
|
||||
|
||||
# 设置应用目录
|
||||
WORKDIR /app
|
||||
|
||||
# 复制应用文件
|
||||
COPY target/base-server.jar /app/base-server.jar
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE 48200
|
||||
|
||||
# 运行应用
|
||||
ENTRYPOINT ["java", "-jar", "/app/base-server.jar"]
|
||||
@@ -1,109 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>dsc-base</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>base-server</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>base-server</name>
|
||||
<description>Base 服务器</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-system-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-infra-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-base-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-contract-order-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-erp-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- 服务保障相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-protection</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Registry 注册中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Config 配置中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RPC 远程调用相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-rpc</artifactId>
|
||||
<!-- 目的:zt-server 单体启动,禁用 openfeign -->
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- 设置构建的 jar 包名 -->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<!-- 打包 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.zt.plat.base;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* Base 服务器的启动类
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${zt.info.base-package}
|
||||
@SpringBootApplication(scanBasePackages = {"${zt.info.base-package}.base", "${zt.info.base-package}.module"},
|
||||
excludeName = {})
|
||||
public class BaseServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(BaseServerApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.zt.plat.base.controller.base;
|
||||
|
||||
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 com.zt.plat.framework.common.pojo.CommonResult;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* base 控制器
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@Tag(name = "base")
|
||||
@RestController
|
||||
@RequestMapping("/base")
|
||||
public class BaseDemoController {
|
||||
|
||||
@GetMapping("/hello")
|
||||
@Operation(summary = "Hello base")
|
||||
public CommonResult<String> hello() {
|
||||
return success("Hello, base!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
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 分钟
|
||||
|
||||
erp:
|
||||
address: hana-dev.yncic.com
|
||||
sapsys: ZTDEV203
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
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 打印日志
|
||||
com.zt.plat.module.base.dal.mysql: debug
|
||||
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
|
||||
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
zt:
|
||||
env: # 多环境的配置项
|
||||
tag: ${HOSTNAME}
|
||||
security:
|
||||
mock-enable: true
|
||||
access-log: # 访问日志的配置项
|
||||
enable: true
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
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: com.zt.plat.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
|
||||
|
||||
zt:
|
||||
info:
|
||||
version: 1.0.0
|
||||
base-package: com.zt.plat
|
||||
web:
|
||||
admin-ui:
|
||||
url: http://dashboard.zt.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: ${zt.info.version}
|
||||
tenant: # 多租户相关配置项
|
||||
enable: true
|
||||
|
||||
debug: false
|
||||
@@ -1,13 +0,0 @@
|
||||
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
|
||||
|
||||
# 设置应用目录
|
||||
WORKDIR /app
|
||||
|
||||
# 复制应用文件
|
||||
COPY target/logistics-server.jar /app/logistics-server.jar
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE 48101
|
||||
|
||||
# 运行应用
|
||||
ENTRYPOINT ["java", "-jar", "/app/logistics-server.jar"]
|
||||
@@ -1,92 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>dsc-logistics</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>logistics-server</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>logistics-server</name>
|
||||
<description>Logistics 服务器</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-system-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-infra-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-backend-logistics-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- 服务保障相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-protection</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Registry 注册中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Config 配置中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RPC 远程调用相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-rpc</artifactId>
|
||||
<!-- 目的:zt-server 单体启动,禁用 openfeign -->
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- 设置构建的 jar 包名 -->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<!-- 打包 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.zt.plat.logistics;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* Logistics 服务器的启动类
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${zt.info.base-package}
|
||||
@SpringBootApplication(scanBasePackages = {"${zt.info.base-package}.logistics", "${zt.info.base-package}.module"},
|
||||
excludeName = {})
|
||||
public class LogisticsServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(LogisticsServerApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.zt.plat.logistics.controller.logistics;
|
||||
|
||||
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 com.zt.plat.framework.common.pojo.CommonResult;
|
||||
|
||||
import static com.zt.plat.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<String> hello() {
|
||||
return success("Hello, logistics!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
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 分钟
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
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 打印日志
|
||||
com.zt.plat.module.base.dal.mysql: debug
|
||||
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
|
||||
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
zt:
|
||||
env: # 多环境的配置项
|
||||
tag: ${HOSTNAME}
|
||||
security:
|
||||
mock-enable: true
|
||||
access-log: # 访问日志的配置项
|
||||
enable: true
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
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: com.zt.plat.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
|
||||
|
||||
zt:
|
||||
info:
|
||||
version: 1.0.0
|
||||
base-package: com.zt.plat
|
||||
web:
|
||||
admin-ui:
|
||||
url: http://dashboard.zt.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: ${zt.info.version}
|
||||
tenant: # 多租户相关配置项
|
||||
enable: true
|
||||
|
||||
debug: false
|
||||
@@ -1,13 +0,0 @@
|
||||
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
|
||||
|
||||
# 设置应用目录
|
||||
WORKDIR /app
|
||||
|
||||
# 复制应用文件
|
||||
COPY target/manage-server.jar /app/manage-server.jar
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE 48201
|
||||
|
||||
# 运行应用
|
||||
ENTRYPOINT ["java", "-jar", "/app/manage-server.jar"]
|
||||
@@ -1,92 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>dsc-manage</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>manage-server</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>manage-server</name>
|
||||
<description>Manage 服务器</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-system-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-infra-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-manage-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- 服务保障相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-protection</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Registry 注册中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Config 配置中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RPC 远程调用相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-rpc</artifactId>
|
||||
<!-- 目的:zt-server 单体启动,禁用 openfeign -->
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- 设置构建的 jar 包名 -->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<!-- 打包 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.zt.plat.manage;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* Manage 服务器的启动类
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${zt.info.base-package}
|
||||
@SpringBootApplication(scanBasePackages = {"${zt.info.base-package}.manage", "${zt.info.base-package}.module"},
|
||||
excludeName = {})
|
||||
public class ManageServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ManageServerApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.zt.plat.manage.controller.manage;
|
||||
|
||||
import com.zt.plat.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 com.zt.plat.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<String> hello() {
|
||||
return success("Hello, manage!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
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 分钟
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
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 打印日志
|
||||
com.zt.plat.module.base.dal.mysql: debug
|
||||
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
|
||||
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
zt:
|
||||
env: # 多环境的配置项
|
||||
tag: ${HOSTNAME}
|
||||
security:
|
||||
mock-enable: true
|
||||
access-log: # 访问日志的配置项
|
||||
enable: true
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
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: com.zt.plat.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
|
||||
|
||||
zt:
|
||||
info:
|
||||
version: 1.0.0
|
||||
base-package: com.zt.plat
|
||||
web:
|
||||
admin-ui:
|
||||
url: http://dashboard.zt.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: ${zt.info.version}
|
||||
tenant: # 多租户相关配置项
|
||||
enable: true
|
||||
|
||||
debug: false
|
||||
@@ -1,13 +0,0 @@
|
||||
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
|
||||
|
||||
# 设置应用目录
|
||||
WORKDIR /app
|
||||
|
||||
# 复制应用文件
|
||||
COPY target/mes-server.jar /app/mes-server.jar
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE 48203
|
||||
|
||||
# 运行应用
|
||||
ENTRYPOINT ["java", "-jar", "/app/mes-server.jar"]
|
||||
@@ -1,112 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>dsc-mes</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>mes-server</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>mes-server</name>
|
||||
<description>Mes 服务器</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-system-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-infra-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-indicator-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-product-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-energy-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-quality-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-warehouse-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- 服务保障相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-protection</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Registry 注册中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Config 配置中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RPC 远程调用相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-rpc</artifactId>
|
||||
<!-- 目的:zt-server 单体启动,禁用 openfeign -->
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- 设置构建的 jar 包名 -->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<!-- 打包 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.zt.plat.mes;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
/**
|
||||
* Mes 服务器的启动类
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${zt.info.base-package}
|
||||
@EnableFeignClients(basePackages = {"${zt.info.base-package}.mes", "${zt.info.base-package}.module"})
|
||||
@SpringBootApplication(scanBasePackages = {"${zt.info.base-package}.mes", "${zt.info.base-package}.module"},
|
||||
excludeName = {})
|
||||
public class MesServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(MesServerApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.zt.plat.mes.controller.mes;
|
||||
|
||||
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 com.zt.plat.framework.common.pojo.CommonResult;
|
||||
|
||||
import static com.zt.plat.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<String> hello() {
|
||||
return success("Hello, mes!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
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 分钟
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
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 打印日志
|
||||
com.zt.plat.module.base.dal.mysql: debug
|
||||
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
|
||||
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
zt:
|
||||
env: # 多环境的配置项
|
||||
tag: ${HOSTNAME}
|
||||
security:
|
||||
mock-enable: true
|
||||
access-log: # 访问日志的配置项
|
||||
enable: true
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
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: com.zt.plat.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
|
||||
|
||||
zt:
|
||||
info:
|
||||
version: 1.0.0
|
||||
base-package: com.zt.plat
|
||||
web:
|
||||
admin-ui:
|
||||
url: http://dashboard.zt.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: ${zt.info.version}
|
||||
tenant: # 多租户相关配置项
|
||||
enable: true
|
||||
|
||||
debug: false
|
||||
4
pom.xml
4
pom.xml
@@ -19,12 +19,8 @@
|
||||
<module>zt-module-bpm</module>
|
||||
<module>zt-module-report</module>
|
||||
<module>zt-module-mp</module>
|
||||
<!-- <module>zt-module-mall</module>-->
|
||||
<!-- <module>zt-module-crm</module>-->
|
||||
<!-- <module>zt-module-erp</module>-->
|
||||
<!-- <module>zt-module-ai</module>-->
|
||||
<module>zt-module-template</module>
|
||||
<!-- <module>zt-module-iot</module>-->
|
||||
<module>zt-module-databus</module>
|
||||
<module>zt-module-rule</module>
|
||||
<module>zt-module-html2pdf</module>
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
FROM 172.16.46.66:10043/base-service/report-base:x86_64-ubuntu_22-jre21-2.0.0
|
||||
RUN mkdir -p /appdata/server
|
||||
WORKDIR /appdata/server
|
||||
## 将后端项目的 Jar 文件,复制到镜像中
|
||||
COPY ./target/qms-server.jar app.jar
|
||||
|
||||
## 设置 TZ 时区
|
||||
ENV TZ=Asia/Shanghai
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE 48205
|
||||
|
||||
## 启动后端项目
|
||||
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
|
||||
@@ -1,92 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>dsc-qms</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>qms-server</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>qms-server</name>
|
||||
<description>Qms 服务器</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-system-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-infra-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-qms-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- 服务保障相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-protection</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Registry 注册中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Config 配置中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RPC 远程调用相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-rpc</artifactId>
|
||||
<!-- 目的:zt-server 单体启动,禁用 openfeign -->
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- 设置构建的 jar 包名 -->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<!-- 打包 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.zt.plat.qms;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* Qms 服务器的启动类
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${zt.info.base-package}
|
||||
@SpringBootApplication(scanBasePackages = {"${zt.info.base-package}.qms", "${zt.info.base-package}.module"},
|
||||
excludeName = {})
|
||||
public class QmsServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(QmsServerApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.zt.plat.qms.controller.qms;
|
||||
|
||||
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 com.zt.plat.framework.common.pojo.CommonResult;
|
||||
|
||||
import static com.zt.plat.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<String> hello() {
|
||||
return success("Hello, qms!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
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=ZGTY-QMS-DEV
|
||||
username: SYSDBA
|
||||
password: pgbsci6ddJ6Sqj@e
|
||||
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||
lazy: true # 开启懒加载,保证启动速度
|
||||
url: jdbc:dm://172.16.46.247:1050?schema=ZGTY-QMS-DEV
|
||||
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 分钟
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
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=ZGTY-QMS-DEV
|
||||
username: SYSDBA
|
||||
password: pgbsci6ddJ6Sqj@e
|
||||
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||
lazy: true # 开启懒加载,保证启动速度
|
||||
url: jdbc:dm://172.16.46.247:1050?schema=ZGTY-QMS-DEV
|
||||
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 打印日志
|
||||
com.zt.plat.module.base.dal.mysql: debug
|
||||
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
|
||||
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
zt:
|
||||
env: # 多环境的配置项
|
||||
tag: ${HOSTNAME}
|
||||
security:
|
||||
mock-enable: true
|
||||
access-log: # 访问日志的配置项
|
||||
enable: true
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
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: com.zt.plat.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
|
||||
|
||||
zt:
|
||||
info:
|
||||
version: 1.0.0
|
||||
base-package: com.zt.plat
|
||||
web:
|
||||
admin-ui:
|
||||
url: http://dashboard.zt.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: ${zt.info.version}
|
||||
tenant: # 多租户相关配置项
|
||||
enable: true
|
||||
|
||||
debug: false
|
||||
@@ -1,13 +0,0 @@
|
||||
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
|
||||
|
||||
# 设置应用目录
|
||||
WORKDIR /app
|
||||
|
||||
# 复制应用文件
|
||||
COPY target/supply-server.jar /app/supply-server.jar
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE 48202
|
||||
|
||||
# 运行应用
|
||||
ENTRYPOINT ["java", "-jar", "/app/supply-server.jar"]
|
||||
@@ -1,167 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>dsc-supply</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>supply-server</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>supply-server</name>
|
||||
<description>Supply 服务器</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-system-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-infra-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-framework</artifactId>
|
||||
<version>${revision}</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-capital-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-metering-test-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-receive-deliver-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-customs-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-exchange-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-price-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-settle-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-bill-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-purchase-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-sell-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 业务组件 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-biz-data-permission</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-biz-tenant</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- DB 相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-mybatis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-redis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 服务保障相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-protection</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Registry 注册中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Config 配置中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RPC 远程调用相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-rpc</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- 设置构建的 jar 包名 -->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<!-- 打包 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.zt.plat.supply;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* Supply 服务器的启动类
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${zt.info.base-package}
|
||||
@SpringBootApplication(scanBasePackages = {"${zt.info.base-package}.supply", "${zt.info.base-package}.module"},
|
||||
excludeName = {})
|
||||
public class SupplyServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(SupplyServerApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.zt.plat.supply.controller.supply;
|
||||
|
||||
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 com.zt.plat.framework.common.pojo.CommonResult;
|
||||
|
||||
import static com.zt.plat.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<String> hello() {
|
||||
return success("Hello, supply!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
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 分钟
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
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 打印日志
|
||||
com.zt.plat.module.base.dal.mysql: debug
|
||||
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
|
||||
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
zt:
|
||||
env: # 多环境的配置项
|
||||
tag: ${HOSTNAME}
|
||||
security:
|
||||
mock-enable: true
|
||||
access-log: # 访问日志的配置项
|
||||
enable: true
|
||||
|
||||
@@ -1,123 +0,0 @@
|
||||
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: com.zt.plat.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
|
||||
|
||||
zt:
|
||||
info:
|
||||
version: 1.0.0
|
||||
base-package: com.zt.plat
|
||||
web:
|
||||
admin-ui:
|
||||
url: http://dashboard.zt.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: ${zt.info.version}
|
||||
tenant: # 多租户相关配置项
|
||||
enable: true
|
||||
|
||||
debug: false
|
||||
@@ -1,13 +0,0 @@
|
||||
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"]
|
||||
@@ -1,99 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>template-server</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>template-server</name>
|
||||
<description>Template 服务器</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-system-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-infra-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- 服务保障相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-protection</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Registry 注册中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Config 配置中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RPC 远程调用相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-rpc</artifactId>
|
||||
<!-- 目的:zt-server 单体启动,禁用 openfeign -->
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- 设置构建的 jar 包名 -->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<!-- 打包 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.zt.plat.template;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* Template 服务器的启动类
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${zt.info.base-package}
|
||||
@SpringBootApplication(scanBasePackages = {"${zt.info.base-package}.template", "${zt.info.base-package}.module"},
|
||||
excludeName = {})
|
||||
public class TemplateServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(TemplateServerApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.zt.plat.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 com.zt.plat.framework.common.pojo.CommonResult;
|
||||
|
||||
import static com.zt.plat.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<String> hello() {
|
||||
return success("Hello, template!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
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 打印日志
|
||||
com.zt.plat.template.dal.mysql: debug
|
||||
|
||||
---
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
zt:
|
||||
demo: false # 开启演示模式
|
||||
# 附件加密相关配置
|
||||
AES:
|
||||
key: "0123456789abcdef0123456789abcdef"
|
||||
@@ -1,119 +0,0 @@
|
||||
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 打印日志
|
||||
com.zt.plat.template.dal.mysql: debug
|
||||
root: info
|
||||
|
||||
---
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
zt:
|
||||
demo: false # 开启演示模式
|
||||
# 附件加密相关配置
|
||||
AES:
|
||||
key: "0123456789abcdef0123456789abcdef"
|
||||
@@ -1,109 +0,0 @@
|
||||
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: com.zt.plat.template.dal.dataobject
|
||||
|
||||
# Spring Data Redis 配置
|
||||
spring:
|
||||
data:
|
||||
redis:
|
||||
repositories:
|
||||
enabled: false # 项目未使用到 Spring Data Redis 的 Repository,所以直接禁用,保证启动速度
|
||||
|
||||
---
|
||||
zt:
|
||||
info:
|
||||
version: 1.0.0
|
||||
base-package: com.zt.plat
|
||||
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: ${zt.info.version}
|
||||
email: xingyu4j@vip.qq.com
|
||||
license: MIT
|
||||
license-url: https://gitee.com/zhijiantianya/ruoyi-vue-pro/blob/master/LICENSE
|
||||
codegen:
|
||||
base-package: com.zt.plat.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
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>dsc-logistics</artifactId>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modules>
|
||||
<module>zt-module-backend-logistics-api</module>
|
||||
<module>zt-module-backend-logistics-server</module>
|
||||
</modules>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>zt-module-backend-logistics</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>
|
||||
BackendLogistics 模块。
|
||||
</description>
|
||||
|
||||
</project>
|
||||
@@ -1,46 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>zt-module-backend-logistics</artifactId>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>zt-module-backend-logistics-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>
|
||||
暴露给其它模块调用
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-common</artifactId>
|
||||
</dependency>
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId> <!-- 接口文档:使用最新版本的 Swagger 模型 -->
|
||||
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- 参数校验 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!-- RPC 远程调用相关 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -1,121 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.enums;
|
||||
|
||||
import com.zt.plat.framework.common.exception.ErrorCode;
|
||||
|
||||
/**
|
||||
* backend-logistics 错误码枚举类
|
||||
*
|
||||
* backend-logistics 系统,使用 1-xxx-xxx-xxx 段
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
public interface ErrorCodeConstants {
|
||||
/**
|
||||
* 业务异常的错误码区间,解决:解决各模块错误码定义,避免重复,在此只声明不做实际使用
|
||||
* <p>
|
||||
* 一共 10 位,分成四段
|
||||
* <p>
|
||||
* 第一段,1 位,类型
|
||||
* 1 - 业务级别异常
|
||||
* x - 预留
|
||||
* 第二段,3 位,系统类型
|
||||
* 001 - 用户系统
|
||||
* 002 - 商品系统
|
||||
* 003 - 订单系统
|
||||
* 004 - 支付系统
|
||||
* 005 - 优惠劵系统
|
||||
* ... - ...
|
||||
* 第三段,3 位,模块
|
||||
* 不限制规则。
|
||||
* 一般建议,每个系统里面,可能有多个模块,可以再去做分段。以用户系统为例子:
|
||||
* 001 - OAuth2 模块
|
||||
* 002 - User 模块
|
||||
* 003 - MobileCode 模块
|
||||
* 第四段,3 位,错误码
|
||||
* 不限制规则。
|
||||
* 一般建议,每个模块自增。
|
||||
*
|
||||
* @author Rayson
|
||||
*/
|
||||
// ========== 示例模块 1-001-000-000 ==========
|
||||
ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
|
||||
ErrorCode VISIT_COMPANY_ID_NOT_EXISTS = new ErrorCode(1_100_000_002, "headers缺少visit-company-id参数");
|
||||
ErrorCode VISIT_COMPANY_ID_NOT_TOP_COMPANY = new ErrorCode(1_100_000_002, "visit-company-id传入的不是顶级账套id");
|
||||
|
||||
// 模块 infra 错误码区间 [1-001-000-000 ~ 1-002-000-000)
|
||||
// 模块 system 错误码区间 [1-002-000-000 ~ 1-003-000-000)
|
||||
// 模块 report 错误码区间 [1-003-000-000 ~ 1-004-000-000)
|
||||
// 模块 member 错误码区间 [1-004-000-000 ~ 1-005-000-000)
|
||||
// 模块 mp 错误码区间 [1-006-000-000 ~ 1-007-000-000)
|
||||
// 模块 pay 错误码区间 [1-007-000-000 ~ 1-008-000-000)
|
||||
// 模块 bpm 错误码区间 [1-009-000-000 ~ 1-010-000-000)
|
||||
// 模块 product 错误码区间 [1-008-000-000 ~ 1-009-000-000)
|
||||
// 模块 trade 错误码区间 [1-011-000-000 ~ 1-012-000-000)
|
||||
// 模块 promotion 错误码区间 [1-013-000-000 ~ 1-014-000-000)
|
||||
// 模块 crm 错误码区间 [1-020-000-000 ~ 1-021-000-000)
|
||||
|
||||
// 模块 bseMngt.plceAchi [1_100_001_000 ~ 1_100_001_999]
|
||||
ErrorCode WAREHOUSE_NOT_EXISTS = new ErrorCode(1_100_001_001, "仓库信息不存在");
|
||||
ErrorCode FACTORY_NOT_EXISTS = new ErrorCode(1_100_001_002, "生产厂区信息不存在");
|
||||
ErrorCode RAILWAY_STATION_NOT_EXISTS = new ErrorCode(1_100_001_003, "铁路站点维护不存在");
|
||||
ErrorCode PORT_NOT_EXISTS = new ErrorCode(1_100_001_004, "港口信息不存在");
|
||||
ErrorCode AUNCEL_CONFIG_NOT_EXISTS = new ErrorCode(1_100_001_005, "计量点配置不存在");
|
||||
ErrorCode GATE_CONFIG_NOT_EXISTS = new ErrorCode(1_100_001_006, "门岗信息不存在");
|
||||
ErrorCode CONSIGNEE_ADDRESS_NOT_EXISTS = new ErrorCode(1_100_001_007, "客户收货地址不存在");
|
||||
ErrorCode PLACE_ARCHIVE_MATERIAL_NOT_EXISTS = new ErrorCode(1_100_001_008, "地点档案物料信息不存在");
|
||||
ErrorCode CORR_FACT_NOT_EXISTS = new ErrorCode(1_100_001_009, "关联工厂信息不存在");
|
||||
ErrorCode NAME_OR_CODE_EXISTS = new ErrorCode(1_100_001_010, "名称或编码已被使用");
|
||||
ErrorCode GEOFENCE_NOT_EXISTS = new ErrorCode(1_100_001_011, "电子围栏不存在");
|
||||
ErrorCode GEOFENCE_EXISTS_NEEDDEL = new ErrorCode(1_100_001_012, "电子围栏已存在,需删除后才能新增");
|
||||
ErrorCode FOREIGN_AREA_NOT_EXISTS = new ErrorCode(1_100_001_013, "境外区域不存在");
|
||||
ErrorCode MY_WRH_NOT_EXISTS = new ErrorCode(1_100_001_014, "协同我的仓库不存在");
|
||||
ErrorCode MY_WRH_EXISTS = new ErrorCode(1_100_001_015, "已有关联关系");
|
||||
ErrorCode MY_DRIVER_NOT_EXISTS = new ErrorCode(1_100_001_016, "协同我的司机不存在");
|
||||
ErrorCode MY_DRIVER_EXISTS = new ErrorCode(1_100_001_017, "已有关联关系");
|
||||
|
||||
|
||||
// 模块 bseMngt.plceAchi [1_100_002_000 ~ 1_100_002_999]
|
||||
ErrorCode CUSTOMER_NOT_EXISTS = new ErrorCode(1_100_002_001, "客商协同账号不存在");
|
||||
|
||||
ErrorCode CARRIER_ACCOUNT_NOT_EXISTS = new ErrorCode(1_100_002_002, "物流服务商协同账号不存在");
|
||||
ErrorCode DRIVING_ACCOUNT_NOT_EXISTS = new ErrorCode(1_100_002_003, "司机协同账号不存在");
|
||||
|
||||
ErrorCode ACCOUNT_ENABLE_STATUS = new ErrorCode(1_100_002_004, "只有禁用状态下才能启用");
|
||||
|
||||
ErrorCode ACCOUNT_NOT_ENABLE_STATUS = new ErrorCode(1_100_002_005, "只有启用状态下才能禁用");
|
||||
ErrorCode USER_ERROR = new ErrorCode(1_100_002_007, "只有启用状态下才能禁用");
|
||||
ErrorCode FILE_NOT_EXISTS = new ErrorCode(1_100_002_006, "附件保存失败");
|
||||
// 模块 bseMngt.mtrl [1_100_003_000 ~ 1_100_003_999]
|
||||
ErrorCode MTRL_XPD_NOT_EXISTS = new ErrorCode(1_100_003_001, "物资信息扩展不存在");
|
||||
ErrorCode RLWY_MTRL_MAIN_NOT_EXISTS = new ErrorCode(1_100_003_002, "铁路物资对照主不存在");
|
||||
ErrorCode RLWY_MTRL_MAIN_NAME_CODE_EXISTS = new ErrorCode(1_100_003_003, "铁路物资对照品名代码已存在");
|
||||
ErrorCode RLWY_MTRL_SUBITEM_NOT_EXISTS = new ErrorCode(1_100_003_004, "铁路物资对照子不存在");
|
||||
ErrorCode RLWY_MTRL_SUBITEM_MATERIAL_EXISTS = new ErrorCode(1_100_003_005, "铁路物资对照已经存在");
|
||||
ErrorCode RLWY_MTRL_MAIN_DRAFT_STATUS = new ErrorCode(1_100_003_006, "铁路品名对照草稿状态才能操作");
|
||||
ErrorCode RLWY_MTRL_MAIN_ENABLED_STATUS = new ErrorCode(1_100_003_007, "铁路品名对照启用状态才能操作");
|
||||
|
||||
// 模块 bseMngt.env [1_100_004_000 ~ 1_100_004_999]
|
||||
ErrorCode ENVIRONMENTAL_INTO_MAIN_NOT_EXISTS = new ErrorCode(1_100_004_001, "环保进场管理主不存在");
|
||||
ErrorCode ENVIRONMENTAL_INTO_SUBITEM_NOT_EXISTS = new ErrorCode(1_100_004_002, "环保进场管理子不存在");
|
||||
ErrorCode ENVIRONMENTAL_INTO_MAIN_EXISTS = new ErrorCode(1_100_004_003, "环保进场主项已经存在");
|
||||
ErrorCode ENVIRONMENTAL_INTO_SUBITEM_MATERIAL_EXISTS = new ErrorCode(1_100_004_004, "环保进场物资已经存在");
|
||||
ErrorCode ENVIRONMENTAL_INTO_MAIN_DRAFT_STATUS = new ErrorCode(1_100_004_005, "环保进场草稿状态才能操作");
|
||||
ErrorCode ENVIRONMENTAL_INTO_MAIN_ENABLED_STATUS = new ErrorCode(1_100_003_006, "环保进场启用状态才能操作");
|
||||
|
||||
|
||||
// 模块 bseMngt.vhc [1_100_005_000 ~ 1_100_005_999]
|
||||
ErrorCode SHIP_ARCHIVE_NOT_EXISTS = new ErrorCode(1_100_005_001, "船舶档案不存在");
|
||||
ErrorCode SHIP_ARCHIVE_IMO_EXISTS = new ErrorCode(1_100_005_002, "船舶IMO码已经存在");
|
||||
ErrorCode SHIP_ARCHIVE_DATA_CONVERSION_ERROR = new ErrorCode(1_100_005_003, "船舶数据转换错误");
|
||||
|
||||
|
||||
// 模块 bseMngt.car [1_100_006_000 ~ 1_100_006_999]
|
||||
ErrorCode CAR_ARCHIVE_NOT_EXISTS = new ErrorCode(1_100_006_001, "车辆档案不存在");
|
||||
ErrorCode CAR_ARCHIVE_EXISTS = new ErrorCode(1_100_006_002, "车辆档案已经存在");
|
||||
ErrorCode CAR_ARCHIVE_DATA_CONVERSION_ERROR = new ErrorCode(1_100_005_003, "车辆数据转换错误");
|
||||
|
||||
ErrorCode CAR_BLACKLIST_NOT_EXISTS = new ErrorCode(1_100_006_004, "车辆黑名单不存在");
|
||||
|
||||
|
||||
ErrorCode SEQUENCE_ERROR = new ErrorCode(1_100_007_001, "流水号异常");
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.enums;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "是否,数据字典infra_boolean_string")
|
||||
public enum YesOrNoEnum {
|
||||
|
||||
TRUE("true", "是"),
|
||||
FALSE("false", "否");
|
||||
|
||||
private String code;
|
||||
|
||||
private String msg;
|
||||
|
||||
YesOrNoEnum() {
|
||||
|
||||
}
|
||||
|
||||
YesOrNoEnum(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public static String getMsgByCode(String code) {
|
||||
YesOrNoEnum[] values = values();
|
||||
for (YesOrNoEnum dto : values) {
|
||||
if (dto.getCode().equals(code)) {
|
||||
return dto.getMsg();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getCodeByMsg(String msg) {
|
||||
YesOrNoEnum[] values = values();
|
||||
for (YesOrNoEnum dto : values) {
|
||||
if (dto.getMsg().equals(msg)) {
|
||||
return dto.getCode();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.enums.bseMngt.plceAchi;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "仓库类型,数据字典warehouse_type")
|
||||
public enum PlceTpEnum {
|
||||
|
||||
WAREHOUSE("warehouse", "仓库"),
|
||||
FACTORY("factory", "生产厂区"),
|
||||
RAILWAY_STATION("railway-station", "铁路站点"),
|
||||
PORT("port", "港口"),
|
||||
AUNCEL("auncel", "计量点"),
|
||||
GATE("gate", "门岗"),
|
||||
CONSIGNEE_ADDRESS("consignee-address", "客户收货地址");
|
||||
|
||||
private String code;
|
||||
|
||||
private String msg;
|
||||
|
||||
PlceTpEnum() {
|
||||
|
||||
}
|
||||
|
||||
PlceTpEnum(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public static String getMsgByCode(String code) {
|
||||
PlceTpEnum[] values = values();
|
||||
for (PlceTpEnum dto : values) {
|
||||
if (dto.getCode().equals(code)) {
|
||||
return dto.getMsg();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getCodeByMsg(String msg) {
|
||||
PlceTpEnum[] values = values();
|
||||
for (PlceTpEnum dto : values) {
|
||||
if (dto.getMsg().equals(msg)) {
|
||||
return dto.getCode();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Boolean isNoCompany(String code) {
|
||||
List<String> noCompanys = Arrays.asList(PlceTpEnum.WAREHOUSE.getCode(), PlceTpEnum.RAILWAY_STATION.getCode(), PlceTpEnum.CONSIGNEE_ADDRESS.getCode());
|
||||
if (noCompanys.contains(code)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.enums.bseMngt.plceAchi;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "排队方式,数据字典queue_way")
|
||||
public enum QueWyEnum {
|
||||
|
||||
RQ("rq", "远程排队"),
|
||||
AQ("aq", "到厂排队");
|
||||
|
||||
private String code;
|
||||
|
||||
private String msg;
|
||||
|
||||
QueWyEnum() {
|
||||
|
||||
}
|
||||
|
||||
QueWyEnum(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public static String getMsgByCode(String code) {
|
||||
QueWyEnum[] values = values();
|
||||
for (QueWyEnum dto : values) {
|
||||
if (dto.getCode().equals(code)) {
|
||||
return dto.getMsg();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getCodeByMsg(String msg) {
|
||||
QueWyEnum[] values = values();
|
||||
for (QueWyEnum dto : values) {
|
||||
if (dto.getMsg().equals(msg)) {
|
||||
return dto.getCode();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.enums.bseMngt.plceAchi;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "仓库性质,数据字典warehouse_nature")
|
||||
public enum WrhNtrEnum {
|
||||
|
||||
SW("sw", "现货仓"),
|
||||
FW("fw", "期货仓"),
|
||||
TDW("tdw", "报税仓");
|
||||
|
||||
private String code;
|
||||
|
||||
private String msg;
|
||||
|
||||
WrhNtrEnum() {
|
||||
|
||||
}
|
||||
|
||||
WrhNtrEnum(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public static String getMsgByCode(String code) {
|
||||
WrhNtrEnum[] values = values();
|
||||
for (WrhNtrEnum dto : values) {
|
||||
if (dto.getCode().equals(code)) {
|
||||
return dto.getMsg();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getCodeByMsg(String msg) {
|
||||
WrhNtrEnum[] values = values();
|
||||
for (WrhNtrEnum dto : values) {
|
||||
if (dto.getMsg().equals(msg)) {
|
||||
return dto.getCode();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.enums.bseMngt.plceAchi;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "仓库类型,数据字典warehouse_type")
|
||||
public enum WrhTpEnum {
|
||||
|
||||
FAW("faw", "厂区库"),
|
||||
TPL("tpl", "三方库");
|
||||
|
||||
private String code;
|
||||
|
||||
private String msg;
|
||||
|
||||
WrhTpEnum() {
|
||||
|
||||
}
|
||||
|
||||
WrhTpEnum(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public static String getMsgByCode(String code) {
|
||||
WrhTpEnum[] values = values();
|
||||
for (WrhTpEnum dto : values) {
|
||||
if (dto.getCode().equals(code)) {
|
||||
return dto.getMsg();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getCodeByMsg(String msg) {
|
||||
WrhTpEnum[] values = values();
|
||||
for (WrhTpEnum dto : values) {
|
||||
if (dto.getMsg().equals(msg)) {
|
||||
return dto.getCode();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.enums.bseMngt.xtAcct;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "协同账号状态,数据字典account_status")
|
||||
public enum AcctStatisEnum {
|
||||
EDIT("0", "编辑"),
|
||||
AWAIT_AUTH("1", "待审核"),
|
||||
REVIEWED("2","已审核"),
|
||||
CONFIRM("3","确认"),
|
||||
CAENCEL("-1","注销");
|
||||
|
||||
private String code;
|
||||
|
||||
private String msg;
|
||||
|
||||
AcctStatisEnum() {
|
||||
|
||||
}
|
||||
|
||||
AcctStatisEnum(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public static String getMsgByCode(String code) {
|
||||
AcctStatisEnum[] values = values();
|
||||
for (AcctStatisEnum dto : values) {
|
||||
if (dto.getCode().equals(code)) {
|
||||
return dto.getMsg();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getCodeByMsg(String msg) {
|
||||
AcctStatisEnum[] values = values();
|
||||
for (AcctStatisEnum dto : values) {
|
||||
if (dto.getMsg().equals(msg)) {
|
||||
return dto.getCode();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.enums.bseMngt.xtAcct;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "协同账号来源,数据字典driver_source")
|
||||
public enum DriverSourceEnum {
|
||||
DRIVER("DRIVER", "司机"),
|
||||
COLLABORATION("COLLABORATION", "协同平台"),
|
||||
SYSTEM("SYSTEM","管理系统");
|
||||
|
||||
private String code;
|
||||
|
||||
private String msg;
|
||||
|
||||
DriverSourceEnum() {
|
||||
|
||||
}
|
||||
|
||||
DriverSourceEnum(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public static String getMsgByCode(String code) {
|
||||
DriverSourceEnum[] values = values();
|
||||
for (DriverSourceEnum dto : values) {
|
||||
if (dto.getCode().equals(code)) {
|
||||
return dto.getMsg();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getCodeByMsg(String msg) {
|
||||
DriverSourceEnum[] values = values();
|
||||
for (DriverSourceEnum dto : values) {
|
||||
if (dto.getMsg().equals(msg)) {
|
||||
return dto.getCode();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.enums.bseMngt.xtAcct;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "司机协同账号认证状态,数据字典driver_status")
|
||||
public enum DriverStatusEnum {
|
||||
AWAIT_AUTH("1", "未认证"),
|
||||
REVIEWED("2","已认证");
|
||||
|
||||
private String code;
|
||||
|
||||
private String msg;
|
||||
|
||||
DriverStatusEnum() {
|
||||
|
||||
}
|
||||
|
||||
DriverStatusEnum(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public static String getMsgByCode(String code) {
|
||||
DriverStatusEnum[] values = values();
|
||||
for (DriverStatusEnum dto : values) {
|
||||
if (dto.getCode().equals(code)) {
|
||||
return dto.getMsg();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getCodeByMsg(String msg) {
|
||||
DriverStatusEnum[] values = values();
|
||||
for (DriverStatusEnum dto : values) {
|
||||
if (dto.getMsg().equals(msg)) {
|
||||
return dto.getCode();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.enums.bseMngt.xtAcct;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "客商类型,数据字典user_tp")
|
||||
public enum UserTypeEnum {
|
||||
LGST_CSTM("LGST_CSTM", "客户"),
|
||||
LGST_CRR_ACCT("LGST_CRR_ACCT", "承运商"),
|
||||
LGST_DRVG_ACCT("LGST_DRVG_ACCT","司机");
|
||||
|
||||
private String code;
|
||||
|
||||
private String msg;
|
||||
|
||||
UserTypeEnum() {
|
||||
|
||||
}
|
||||
|
||||
UserTypeEnum(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public static String getMsgByCode(String code) {
|
||||
UserTypeEnum[] values = values();
|
||||
for (UserTypeEnum dto : values) {
|
||||
if (dto.getCode().equals(code)) {
|
||||
return dto.getMsg();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getCodeByMsg(String msg) {
|
||||
UserTypeEnum[] values = values();
|
||||
for (UserTypeEnum dto : values) {
|
||||
if (dto.getMsg().equals(msg)) {
|
||||
return dto.getCode();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.enums.common;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "附件业务类型")
|
||||
public enum FileBuinessCodeEnum {
|
||||
|
||||
DRIVING_FRONT("drivingFrontImage","驾驶证正面"),
|
||||
DRIVING_BACK("drivingBackImage","驾驶证反面"),
|
||||
IDENTITY_FRONT("identityFrontImage","身份证正面"),
|
||||
IDENTITY_BACK("identityBackImage","身份证反面"),
|
||||
BUSINESS_LICENSE("businessLicenseImage","营业执照"),
|
||||
EDIT("editImage","修改说明"),
|
||||
OTHER("otherImage","其他附件"),
|
||||
CAR_LICENSE_FRONT("carLicenseFrontImage","行驶证正页"),
|
||||
CAR_LICENSE_BACK("carLicenseBackImage","行驶证副页"),
|
||||
CAR_CHECKLIST("carChecklistImage","随车清单"),
|
||||
CAR_PHOTOS("carPhotosImage","车辆照片"),
|
||||
CAR_INSURANCE("carInsuranceImage","车辆保险信息"),
|
||||
SHIP_NATIONALITY("nationalityImage","国籍证书"),
|
||||
SHIP_OWNERSHIP("shipOwnershipImage","船舶所有权登记证书/租赁证书"),
|
||||
SHIP_OTHER("shipOtherImage","船舶营运证等其他证书"),
|
||||
SHIP_PHOTOS("shipPhotosImage","船舶照片");
|
||||
|
||||
private String code;
|
||||
|
||||
private String msg;
|
||||
|
||||
FileBuinessCodeEnum() {
|
||||
|
||||
}
|
||||
|
||||
FileBuinessCodeEnum(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public static String getMsgByCode(String code) {
|
||||
FileBuinessCodeEnum[] values = values();
|
||||
for (FileBuinessCodeEnum dto : values) {
|
||||
if (dto.getCode().equals(code)) {
|
||||
return dto.getMsg();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getCodeByMsg(String msg) {
|
||||
FileBuinessCodeEnum[] values = values();
|
||||
for (FileBuinessCodeEnum dto : values) {
|
||||
if (dto.getMsg().equals(msg)) {
|
||||
return dto.getCode();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.enums.common;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description="公共管理附件来源")
|
||||
public enum FileSourceEnum {
|
||||
DRIVING_ACCOUNT("lgst.drivingaccount","司机协同账号"),
|
||||
CARRIER_ACCOUNT("lgst.carrieraccount","物流服务商协同账号"),
|
||||
CUSTOMER_ACCOUNT("lgst.customer","客商协同账号"),
|
||||
CAR_ARCHIVE("lgst.bseMngt.crAchi","车辆档案"),
|
||||
SHIP_ARCHIVE("lgst.bseMngt.shp","船舶档案");
|
||||
private String code;
|
||||
|
||||
private String msg;
|
||||
|
||||
FileSourceEnum() {
|
||||
|
||||
}
|
||||
|
||||
FileSourceEnum(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public static String getMsgByCode(String code) {
|
||||
FileSourceEnum[] values = values();
|
||||
for (FileSourceEnum dto : values) {
|
||||
if (dto.getCode().equals(code)) {
|
||||
return dto.getMsg();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getCodeByMsg(String msg) {
|
||||
FileSourceEnum[] values = values();
|
||||
for (FileSourceEnum dto : values) {
|
||||
if (dto.getMsg().equals(msg)) {
|
||||
return dto.getCode();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.enums.common;
|
||||
|
||||
public enum SequenceEnum {
|
||||
XT_ACCOUNT_NO("CHILD_ACCOUNT_NO", "协同登录账号");
|
||||
private String code;
|
||||
|
||||
private String msg;
|
||||
|
||||
SequenceEnum() {
|
||||
|
||||
}
|
||||
|
||||
SequenceEnum(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public static String getMsgByCode(String code) {
|
||||
SequenceEnum[] values = values();
|
||||
for (SequenceEnum dto : values) {
|
||||
if (dto.getCode().equals(code)) {
|
||||
return dto.getMsg();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getCodeByMsg(String msg) {
|
||||
SequenceEnum[] values = values();
|
||||
for (SequenceEnum dto : values) {
|
||||
if (dto.getMsg().equals(msg)) {
|
||||
return dto.getCode();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.utils;
|
||||
|
||||
import java.security.SecureRandom;
|
||||
|
||||
public class PasswordGeneratorUtils {
|
||||
private static final String LOWER_CASE = "abcdefghijklmnopqrstuvwxyz";
|
||||
private static final String UPPER_CASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
private static final String DIGITS = "0123456789";
|
||||
private static final String SPECIAL_CHARS = "@#$%&*";
|
||||
private static final String ALL_CHARS = LOWER_CASE + UPPER_CASE + DIGITS + SPECIAL_CHARS;
|
||||
|
||||
private static final SecureRandom random = new SecureRandom();
|
||||
|
||||
/**
|
||||
* 生成随机密码
|
||||
* 规则:长度为8,包含数字、大小写字母、特殊符号
|
||||
*
|
||||
* @return 生成的随机密码
|
||||
*/
|
||||
public static String generateRandomPassword() {
|
||||
StringBuilder password = new StringBuilder();
|
||||
|
||||
// 确保至少包含每种类型的字符各一个
|
||||
password.append(LOWER_CASE.charAt(random.nextInt(LOWER_CASE.length())));
|
||||
password.append(UPPER_CASE.charAt(random.nextInt(UPPER_CASE.length())));
|
||||
password.append(DIGITS.charAt(random.nextInt(DIGITS.length())));
|
||||
password.append(SPECIAL_CHARS.charAt(random.nextInt(SPECIAL_CHARS.length())));
|
||||
|
||||
// 填充剩余的4个字符
|
||||
for (int i = 0; i < 4; i++) {
|
||||
password.append(ALL_CHARS.charAt(random.nextInt(ALL_CHARS.length())));
|
||||
}
|
||||
|
||||
// 打乱字符顺序
|
||||
return shuffleString(password.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 打乱字符串中字符的顺序
|
||||
*
|
||||
* @param input 输入字符串
|
||||
* @return 打乱后的字符串
|
||||
*/
|
||||
private static String shuffleString(String input) {
|
||||
char[] chars = input.toCharArray();
|
||||
for (int i = chars.length - 1; i > 0; i--) {
|
||||
int j = random.nextInt(i + 1);
|
||||
char temp = chars[i];
|
||||
chars[i] = chars[j];
|
||||
chars[j] = temp;
|
||||
}
|
||||
return new String(chars);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
// 测试生成密码
|
||||
for (int i = 0; i < 10; i++) {
|
||||
System.out.println("Generated password: " + generateRandomPassword());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,155 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>zt-module-backend-logistics</artifactId>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<artifactId>zt-module-backend-logistics-server</artifactId>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
<description>
|
||||
BackendLogistics 模块。
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<!-- Spring Cloud 基础 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-env</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 依赖服务 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-system-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-infra-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-module-backend-logistics-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 业务组件 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-biz-data-permission</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-biz-tenant</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Web 相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- DB 相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-mybatis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-redis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RPC 远程调用相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-rpc</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Registry 注册中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Config 配置中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Job 定时任务相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-job</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 消息队列相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-mq</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Test 测试相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-test</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 工具类相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-excel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 监控相关 -->
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-monitor</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-biz-business</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zt.plat</groupId>
|
||||
<artifactId>zt-spring-boot-starter-biz-ip</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- 设置构建的 jar 包名 -->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<!-- <plugins>-->
|
||||
<!-- <!– 打包 –>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
||||
<!-- <version>${spring.boot.version}</version>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>repackage</goal> <!– 将引入的 jar 打入其中 –>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- </plugins>-->
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.zt.plat.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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics;
|
||||
|
||||
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 com.zt.plat.framework.common.pojo.CommonResult;
|
||||
|
||||
import static com.zt.plat.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<String> hello() {
|
||||
return success("Hello, BackendLogistics!");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import com.zt.plat.framework.business.annotation.FileUploadController;
|
||||
import com.zt.plat.framework.business.controller.AbstractFileUploadController;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo.*;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.common.vo.IdsVo;
|
||||
import com.zt.plat.module.backendlogistics.dal.dataobject.bseMngt.acct.CarrierAccountDO;
|
||||
import com.zt.plat.module.backendlogistics.service.bseMngt.acct.CarrierAccountService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 物流服务商协同账号")
|
||||
@RestController
|
||||
@RequestMapping("/lgst/carrier-account")
|
||||
@Validated
|
||||
@FileUploadController(source = "lgst.carrieraccount")
|
||||
public class CarrierAccountController extends AbstractFileUploadController implements BusinessControllerMarker{
|
||||
|
||||
static {
|
||||
FileUploadController annotation = CarrierAccountController.class.getAnnotation(FileUploadController.class);
|
||||
if (annotation != null) {
|
||||
setFileUploadInfo(annotation);
|
||||
}
|
||||
}
|
||||
|
||||
@Resource
|
||||
private CarrierAccountService carrierAccountService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建物流服务商协同账号")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:carrier-account:create')")
|
||||
public CommonResult<CarrierAccountRespVO> createCarrierAccount(@Valid @RequestBody CarrierAccountSaveReqVO createReqVO) {
|
||||
return success(carrierAccountService.createCarrierAccount(createReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@Operation(summary = "更新物流服务商协同账号")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:carrier-account:update')")
|
||||
public CommonResult<Boolean> updateCarrierAccount(@Valid @RequestBody CarrierAccountSaveReqVO updateReqVO) {
|
||||
carrierAccountService.updateCarrierAccount(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@Operation(summary = "删除物流服务商协同账号")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('lgst:carrier-account:delete')")
|
||||
public CommonResult<Boolean> deleteCarrierAccount(@RequestParam("id") Long id) {
|
||||
carrierAccountService.deleteCarrierAccount(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除物流服务商协同账号")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:carrier-account:delete')")
|
||||
public CommonResult<Boolean> deleteCarrierAccountList(@RequestBody BatchDeleteReqVO req) {
|
||||
carrierAccountService.deleteCarrierAccountListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得物流服务商协同账号")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:carrier-account:query')")
|
||||
public CommonResult<CarrierAccountRespVO> getCarrierAccount(@RequestParam("id") Long id) {
|
||||
CarrierAccountRespVO carrierAccount = carrierAccountService.getCarrierAccount(id);
|
||||
return success(carrierAccount);
|
||||
}
|
||||
|
||||
@PostMapping("/page")
|
||||
@Operation(summary = "获得物流服务商协同账号分页")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:carrier-account:query')")
|
||||
public CommonResult<PageResult<CarrierAccountRespVO>> getCarrierAccountPage(@Valid @RequestBody CarrierAccountPageReqVO pageReqVO) {
|
||||
PageResult<CarrierAccountDO> pageResult = carrierAccountService.getCarrierAccountPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, CarrierAccountRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出物流服务商协同账号 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:carrier-account:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportCarrierAccountExcel(@Valid CarrierAccountPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<CarrierAccountDO> list = carrierAccountService.getCarrierAccountPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "物流服务商协同账号.xls", "数据", CarrierAccountRespVO.class,
|
||||
BeanUtils.toBean(list, CarrierAccountRespVO.class));
|
||||
}
|
||||
/**
|
||||
* 设置禁用/启用
|
||||
* @param vo
|
||||
*/
|
||||
@PostMapping("/setEnable")
|
||||
@Operation(summary = "启用/禁用")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:carrier-account:setEnable')")
|
||||
public CommonResult<Boolean> setEnable(@RequestBody DriverAccountEditEnbVo vo){
|
||||
carrierAccountService.setEnable(vo);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 注销账号
|
||||
* @param vo
|
||||
*/
|
||||
@PostMapping("/closeCarrierAccount")
|
||||
@Operation(summary = "注销账号")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:carrier-account:closeCarrierAccount')")
|
||||
public CommonResult<Boolean> closeDrivingAccount(@RequestBody IdsVo vo){
|
||||
carrierAccountService.closeCarrierAccount(vo.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
* @param vo
|
||||
*/
|
||||
@PostMapping("/setPwd")
|
||||
@Operation(summary = "重置密码")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:carrier-account:setPwd')")
|
||||
public CommonResult<Boolean> setPwd(@RequestBody IdsVo vo){
|
||||
carrierAccountService.regPwd(vo.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询日志
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping ("/getOperationLogList")
|
||||
@Operation(summary = "查询日志")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:carrier-account:getOperationLogList')")
|
||||
public CommonResult<List<OperationLogListVO>> getOperationLogList(@RequestParam("id") Long id){
|
||||
return success(carrierAccountService.getOperationLogList(id));
|
||||
}
|
||||
/**
|
||||
* 审核
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@PostMapping ("/confirm")
|
||||
@Operation(summary = "审核")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:carrier-account:confirm')")
|
||||
public CommonResult<Boolean> confirm(@RequestBody CarrierAccountSaveReqVO vo){
|
||||
carrierAccountService.confirm(vo);
|
||||
return success(true);
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct;
|
||||
|
||||
import com.zt.plat.framework.business.annotation.FileUploadController;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo.ChildAccountPageReqVo;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo.ChildAccountRespVo;
|
||||
import com.zt.plat.module.backendlogistics.service.bseMngt.acct.ChildAccountService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 子账号")
|
||||
@RestController
|
||||
@RequestMapping("/lgst/child-account")
|
||||
@Validated
|
||||
@FileUploadController(source = "lgst.childaccount")
|
||||
public class ChildAccountController implements BusinessControllerMarker {
|
||||
@Resource
|
||||
private ChildAccountService childAccountService;
|
||||
@PostMapping("/page")
|
||||
@Operation(summary = "获取子账号分页数据")
|
||||
// @PreAuthorize("@ss.hasPermission('lgst:carrier-account:query')")
|
||||
public CommonResult<PageResult<ChildAccountRespVo>> getCarrierAccountPage(@RequestBody ChildAccountPageReqVo pageReqVO) {
|
||||
PageResult<ChildAccountRespVo> pageResult =childAccountService.getChildAccountPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ChildAccountRespVo.class));
|
||||
}
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct;
|
||||
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo.ChildAccountPageReqVo;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo.ChildAccountRespVo;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo.ChildAccountSaveReqVo;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.common.vo.IdVo;
|
||||
import com.zt.plat.module.backendlogistics.service.bseMngt.acct.ChildAccountService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "物流协同 - 子账号")
|
||||
@RestController
|
||||
@RequestMapping("/lgst/collaboration/child-account")
|
||||
@Validated
|
||||
public class CollaborationChildAccountController implements BusinessControllerMarker {
|
||||
@Resource
|
||||
private ChildAccountService childAccountService;
|
||||
/**
|
||||
* 协同查询子账号分页数据
|
||||
* @param reqVo
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/page")
|
||||
@Operation(summary = "获取子账号分页数据")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:collaboration:child-account:query')")
|
||||
public CommonResult<PageResult<ChildAccountRespVo>> getCollChildAccountPage(@RequestBody ChildAccountPageReqVo reqVo){
|
||||
PageResult<ChildAccountRespVo> collChildAccountPage = childAccountService.getCollChildAccountPage(reqVo);
|
||||
return success(collChildAccountPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除子账号
|
||||
* @param vo
|
||||
*/
|
||||
@PostMapping("/delete")
|
||||
@Operation(summary = "删除子账号")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:collaboration:child-account:delete')")
|
||||
public CommonResult<Boolean> deleteChildAccount(@RequestBody IdVo vo){
|
||||
childAccountService.deleteChildAccount(vo.getId());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改子账号数据
|
||||
* @param saveReqVo
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@Operation(summary = "修改子账号")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:collaboration:child-account:update')")
|
||||
public CommonResult<Boolean> updateChildAccount(@RequestBody ChildAccountSaveReqVo saveReqVo){
|
||||
childAccountService.updateChildAccount(saveReqVo);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改子账号密码
|
||||
* @param saveReqVo
|
||||
*/
|
||||
@PostMapping("/updatePassword")
|
||||
@Operation(summary = "修改子账号密码")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:collaboration:child-account:updatePassword')")
|
||||
public CommonResult<Boolean> updateChildPassword(@RequestBody ChildAccountSaveReqVo saveReqVo){
|
||||
childAccountService.updateChildPassword(saveReqVo);
|
||||
return success(true);
|
||||
}
|
||||
/**
|
||||
* 创建子账号
|
||||
* @param saveReqVo
|
||||
*/
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建子账号")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:collaboration:child-account:create')")
|
||||
public CommonResult<Boolean> create(@RequestBody ChildAccountSaveReqVo saveReqVo){
|
||||
childAccountService.craete(saveReqVo);
|
||||
return success(true);
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct;
|
||||
|
||||
import com.zt.plat.framework.business.annotation.FileUploadController;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo.CollaborationCompanyRespVo;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo.CollaborationCompanySaveReqVo;
|
||||
import com.zt.plat.module.backendlogistics.service.bseMngt.acct.CollaborationCompanyService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "物流协同 -企业信息")
|
||||
@RestController
|
||||
@RequestMapping("/lgst/collaboration/company")
|
||||
@Validated
|
||||
@FileUploadController(source = "lgst.coll.company")
|
||||
public class CollaborationCompanyController implements BusinessControllerMarker {
|
||||
@Resource
|
||||
private CollaborationCompanyService collaborationCompanyService;
|
||||
|
||||
@GetMapping("/getCompanyDetail")
|
||||
@Operation(summary = "获取企业信息")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:coll:company:getCompanyDetail')")
|
||||
public CommonResult<CollaborationCompanyRespVo> getCompanyDetail() {
|
||||
CollaborationCompanyRespVo collaborationCompany = collaborationCompanyService.getCollaborationCompany();
|
||||
return success(collaborationCompany);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改登录手机号
|
||||
*
|
||||
* @param saveReqVo
|
||||
*/
|
||||
@PostMapping("/updateTel")
|
||||
@Operation(summary = "修改手机号")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:coll:company:updateTel')")
|
||||
public CommonResult<Boolean> updateTel(@RequestBody CollaborationCompanySaveReqVo saveReqVo) {
|
||||
collaborationCompanyService.updateTel(saveReqVo);
|
||||
return success(true);
|
||||
}
|
||||
}
|
||||
@@ -1,172 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import com.zt.plat.framework.business.annotation.FileUploadController;
|
||||
import com.zt.plat.framework.business.controller.AbstractFileUploadController;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo.*;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.common.vo.IdsVo;
|
||||
import com.zt.plat.module.backendlogistics.dal.dataobject.bseMngt.acct.CustomerDO;
|
||||
import com.zt.plat.module.backendlogistics.service.bseMngt.acct.CustomerService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 客商协同账号")
|
||||
@RestController
|
||||
@RequestMapping("/lgst/customer")
|
||||
@Validated
|
||||
@FileUploadController(source = "lgst.customer")
|
||||
public class CustomerController extends AbstractFileUploadController implements BusinessControllerMarker{
|
||||
|
||||
static {
|
||||
FileUploadController annotation = CustomerController.class.getAnnotation(FileUploadController.class);
|
||||
if (annotation != null) {
|
||||
setFileUploadInfo(annotation);
|
||||
}
|
||||
}
|
||||
|
||||
@Resource
|
||||
private CustomerService customerService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建客商协同账号")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:customer:create')")
|
||||
public CommonResult<CustomerRespVO> createCustomer(@Valid @RequestBody CustomerSaveReqVO createReqVO) {
|
||||
return success(customerService.createCustomer(createReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@Operation(summary = "更新客商协同账号")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:customer:update')")
|
||||
public CommonResult<Boolean> updateCustomer(@Valid @RequestBody CustomerSaveReqVO updateReqVO) {
|
||||
customerService.updateCustomer(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@Operation(summary = "删除客商协同账号")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('lgst:customer:delete')")
|
||||
public CommonResult<Boolean> deleteCustomer(@RequestParam("id") Long id) {
|
||||
customerService.deleteCustomer(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除客商协同账号")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:customer:delete')")
|
||||
public CommonResult<Boolean> deleteCustomerList(@RequestBody BatchDeleteReqVO req) {
|
||||
customerService.deleteCustomerListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得客商协同账号")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:customer:query')")
|
||||
public CommonResult<CustomerRespVO> getCustomer(@RequestParam("id") Long id) {
|
||||
CustomerRespVO customer = customerService.getCustomer(id);
|
||||
return success(customer);
|
||||
}
|
||||
|
||||
@PostMapping("/page")
|
||||
@Operation(summary = "获得客商协同账号分页")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:customer:query')")
|
||||
public CommonResult<PageResult<CustomerRespVO>> getCustomerPage(@Valid @RequestBody CustomerPageReqVO pageReqVO) {
|
||||
PageResult<CustomerDO> pageResult = customerService.getCustomerPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, CustomerRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出客商协同账号 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:customer:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportCustomerExcel(@Valid CustomerPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<CustomerDO> list = customerService.getCustomerPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "客商协同账号.xls", "数据", CustomerRespVO.class,
|
||||
BeanUtils.toBean(list, CustomerRespVO.class));
|
||||
}
|
||||
/**
|
||||
* 设置禁用/启用
|
||||
* @param vo
|
||||
*/
|
||||
@PostMapping("/setEnable")
|
||||
@Operation(summary = "启用/禁用")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:customer:setEnable')")
|
||||
public CommonResult<Boolean> setEnable(@RequestBody DriverAccountEditEnbVo vo){
|
||||
customerService.setEnable(vo);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 注销账号
|
||||
* @param vo
|
||||
*/
|
||||
@PostMapping("/closeCstmAccount")
|
||||
@Operation(summary = "注销账号")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:customer:closeCstmAccount')")
|
||||
public CommonResult<Boolean> closeCstmAccount(@RequestBody IdsVo vo){
|
||||
customerService.closeCstmAccount(vo.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
* @param vo
|
||||
*/
|
||||
@PostMapping("/setPwd")
|
||||
@Operation(summary = "重置密码")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:customer:setPwd')")
|
||||
public CommonResult<Boolean> setPwd(@RequestBody IdsVo vo){
|
||||
customerService.regPwd(vo.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询日志
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping ("/getOperationLogList")
|
||||
@Operation(summary = "查询日志")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:customer:getOperationLogList')")
|
||||
public CommonResult<List<OperationLogListVO>> getOperationLogList(@RequestParam("id") Long id){
|
||||
return success(customerService.getOperationLogList(id));
|
||||
}
|
||||
/**
|
||||
* 审核
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
@PostMapping ("/confirm")
|
||||
@Operation(summary = "审核")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:customer:confirm')")
|
||||
public CommonResult<Boolean> confirm(@RequestBody CustomerSaveReqVO vo){
|
||||
customerService.confirm(vo);
|
||||
return success(true);
|
||||
}
|
||||
}
|
||||
@@ -1,161 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import com.zt.plat.framework.business.annotation.FileUploadController;
|
||||
import com.zt.plat.framework.business.controller.AbstractFileUploadController;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo.*;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.common.vo.IdsVo;
|
||||
import com.zt.plat.module.backendlogistics.dal.dataobject.bseMngt.acct.DrivingAccountDO;
|
||||
import com.zt.plat.module.backendlogistics.service.bseMngt.acct.DrivingAccountService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 司机协同账号")
|
||||
@RestController
|
||||
@RequestMapping("/lgst/driving-account")
|
||||
@Validated
|
||||
@FileUploadController(source = "lgst.drivingaccount")
|
||||
public class DrivingAccountController extends AbstractFileUploadController implements BusinessControllerMarker{
|
||||
|
||||
static {
|
||||
FileUploadController annotation = DrivingAccountController.class.getAnnotation(FileUploadController.class);
|
||||
if (annotation != null) {
|
||||
setFileUploadInfo(annotation);
|
||||
}
|
||||
}
|
||||
|
||||
@Resource
|
||||
private DrivingAccountService drivingAccountService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建司机协同账号")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:driving-account:create')")
|
||||
public CommonResult<DrivingAccountRespVO> createDrivingAccount(@Valid @RequestBody DrivingAccountSaveReqVO createReqVO) {
|
||||
return success(drivingAccountService.createDrivingAccount(createReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@Operation(summary = "更新司机协同账号")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:driving-account:update')")
|
||||
public CommonResult<Boolean> updateDrivingAccount(@Valid @RequestBody DrivingAccountSaveReqVO updateReqVO) {
|
||||
drivingAccountService.updateDrivingAccount(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@Operation(summary = "删除司机协同账号")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('lgst:driving-account:delete')")
|
||||
public CommonResult<Boolean> deleteDrivingAccount(@RequestParam("id") Long id) {
|
||||
drivingAccountService.deleteDrivingAccount(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除司机协同账号")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:driving-account:delete')")
|
||||
public CommonResult<Boolean> deleteDrivingAccountList(@RequestBody BatchDeleteReqVO req) {
|
||||
drivingAccountService.deleteDrivingAccountListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得司机协同账号")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:driving-account:query')")
|
||||
public CommonResult<DrivingAccountRespVO> getDrivingAccount(@RequestParam("id") Long id) {
|
||||
DrivingAccountRespVO drivingAccount = drivingAccountService.getDrivingAccount(id);
|
||||
return success(drivingAccount);
|
||||
}
|
||||
|
||||
@PostMapping("/page")
|
||||
@Operation(summary = "获得司机协同账号分页")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:driving-account:query')")
|
||||
public CommonResult<PageResult<DrivingAccountRespVO>> getDrivingAccountPage(@Valid @RequestBody DrivingAccountPageReqVO pageReqVO) {
|
||||
PageResult<DrivingAccountDO> pageResult = drivingAccountService.getDrivingAccountPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, DrivingAccountRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出司机协同账号 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:driving-account:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportDrivingAccountExcel(@Valid DrivingAccountPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<DrivingAccountDO> list = drivingAccountService.getDrivingAccountPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "司机协同账号.xls", "数据", DrivingAccountRespVO.class,
|
||||
BeanUtils.toBean(list, DrivingAccountRespVO.class));
|
||||
}
|
||||
/**
|
||||
* 设置禁用/启用
|
||||
* @param vo
|
||||
*/
|
||||
@PostMapping("/setEnable")
|
||||
@Operation(summary = "启用/禁用")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:driving-account:setEnable')")
|
||||
public CommonResult<Boolean> setEnable(@RequestBody DriverAccountEditEnbVo vo){
|
||||
drivingAccountService.setEnable(vo);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 注销账号
|
||||
* @param vo
|
||||
*/
|
||||
@PostMapping("/closeDrivingAccount")
|
||||
@Operation(summary = "注销账号")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:driving-account:closeDrivingAccount')")
|
||||
public CommonResult<Boolean> closeDrivingAccount(@RequestBody IdsVo vo){
|
||||
drivingAccountService.closeDrivingAccount(vo.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
* @param vo
|
||||
*/
|
||||
@PostMapping("/setPwd")
|
||||
@Operation(summary = "重置密码")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:driving-account:setPwd')")
|
||||
public CommonResult<Boolean> setPwd(@RequestBody IdsVo vo){
|
||||
drivingAccountService.regPwd(vo.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询日志
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getOperationLogList")
|
||||
@Operation(summary = "查询日志")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:driving-account:getOperationLogList')")
|
||||
public CommonResult<List<OperationLogListVO>> getOperationLogList(@RequestParam("id") Long id){
|
||||
return success(drivingAccountService.getOperationLogList(id));
|
||||
}
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 物流服务商协同账号分页 Request VO")
|
||||
@Data
|
||||
public class CarrierAccountPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "状态", example = "2")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private String isEnable;
|
||||
|
||||
@Schema(description = "登录账号", example = "27315")
|
||||
private String loginAccount;
|
||||
|
||||
@Schema(description = "登录手机号")
|
||||
private String loginTel;
|
||||
|
||||
@Schema(description = "公司名称", example = "李四")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "社会统一信用代码")
|
||||
private String creditCode;
|
||||
|
||||
@Schema(description = "法人姓名", example = "王五")
|
||||
private String agentName;
|
||||
|
||||
@Schema(description = "法人身份证")
|
||||
private String identityNumber;
|
||||
|
||||
@Schema(description = "经营范围")
|
||||
private String operateScope;
|
||||
|
||||
@Schema(description = "地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "成立日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] establishDate;
|
||||
|
||||
@Schema(description = "注册资本")
|
||||
private BigDecimal registrationAmount;
|
||||
|
||||
@Schema(description = "营业期限开始")
|
||||
private LocalDateTime businessCycleStart;
|
||||
|
||||
@Schema(description = "营业期限结束")
|
||||
private LocalDateTime businessCycleEnd;
|
||||
|
||||
@Schema(description = "是否长期")
|
||||
private Integer isPermanently;
|
||||
|
||||
@Schema(description = "开户行", example = "15940")
|
||||
private String bankAccount;
|
||||
|
||||
@Schema(description = "登记机关")
|
||||
private String registrationAgency;
|
||||
|
||||
}
|
||||
@@ -1,157 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo;
|
||||
|
||||
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileWithUrlRespDTO;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 物流服务商协同账号 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class CarrierAccountRespVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9531")
|
||||
@ExcelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "修改时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
@ExcelProperty("创建人")
|
||||
private String creatorName;
|
||||
|
||||
@Schema(description = "修改人")
|
||||
@ExcelProperty("修改人")
|
||||
private String updaterName;
|
||||
|
||||
@Schema(description = "状态", example = "2")
|
||||
@ExcelProperty("状态")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
@ExcelProperty("是否启用")
|
||||
private String isEnable;
|
||||
|
||||
@Schema(description = "登录账号", example = "27315")
|
||||
@ExcelProperty("登录账号")
|
||||
private String loginAccount;
|
||||
|
||||
@Schema(description = "登录手机号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("登录手机号")
|
||||
private String loginTel;
|
||||
|
||||
@Schema(description = "公司名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@ExcelProperty("公司名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "社会统一信用代码")
|
||||
@ExcelProperty("社会统一信用代码")
|
||||
private String creditCode;
|
||||
|
||||
@Schema(description = "法人姓名", example = "王五")
|
||||
@ExcelProperty("法人姓名")
|
||||
private String agentName;
|
||||
|
||||
@Schema(description = "法人身份证")
|
||||
@ExcelProperty("法人身份证")
|
||||
private String identityNumber;
|
||||
|
||||
@Schema(description = "经营范围")
|
||||
@ExcelProperty("经营范围")
|
||||
private String operateScope;
|
||||
|
||||
@Schema(description = "地址")
|
||||
@ExcelProperty("地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "成立日期")
|
||||
@ExcelProperty("成立日期")
|
||||
private LocalDateTime establishDate;
|
||||
|
||||
@Schema(description = "注册资本")
|
||||
@ExcelProperty("注册资本")
|
||||
private BigDecimal registrationAmount;
|
||||
|
||||
@Schema(description = "营业期限开始")
|
||||
@ExcelProperty("营业期限开始")
|
||||
private LocalDateTime businessCycleStart;
|
||||
|
||||
@Schema(description = "营业期限结束")
|
||||
@ExcelProperty("营业期限结束")
|
||||
private LocalDateTime businessCycleEnd;
|
||||
|
||||
@Schema(description = "是否长期")
|
||||
@ExcelProperty("是否长期")
|
||||
private Integer isPermanently;
|
||||
|
||||
@Schema(description = "银行账号", example = "15940")
|
||||
@ExcelProperty("银行账号")
|
||||
private String bankAccount;
|
||||
|
||||
@Schema(description = "登记机关")
|
||||
@ExcelProperty("登记机关")
|
||||
private String registrationAgency;
|
||||
|
||||
/**
|
||||
* 主数据编码
|
||||
*/
|
||||
@Schema(description = "主数据编码")
|
||||
@ExcelProperty("主数据编码")
|
||||
private String mdmCode;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
@Schema(description = "用户类型")
|
||||
@ExcelProperty("用户类型")
|
||||
private String userType;
|
||||
|
||||
/**
|
||||
* 开户行名称
|
||||
*/
|
||||
@Schema(description = "开户行名称")
|
||||
@ExcelProperty("开户行名称")
|
||||
private String bankName;
|
||||
/**
|
||||
* 绑定部门id
|
||||
*/
|
||||
@Schema(description = "绑定部门id")
|
||||
private Long bidDeptId;
|
||||
|
||||
/**
|
||||
* sap编码
|
||||
*/
|
||||
@Schema(description = "sap编码")
|
||||
@ExcelProperty("sap编码")
|
||||
private Long sapCode;
|
||||
|
||||
@Schema(description = "营业执照附件")
|
||||
private BusinessFileWithUrlRespDTO businessLicenseFile;
|
||||
|
||||
@Schema(description = "法人身份证-正面")
|
||||
private BusinessFileWithUrlRespDTO identityFrontFile;
|
||||
|
||||
@Schema(description = "法人身份证-反面")
|
||||
private BusinessFileWithUrlRespDTO identityBackFile;
|
||||
|
||||
@Schema(description = "修改说明附件")
|
||||
private BusinessFileWithUrlRespDTO editFile;
|
||||
|
||||
@Schema(description = "其他附件")
|
||||
private List<BusinessFileWithUrlRespDTO> otherFile;
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo;
|
||||
|
||||
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileSaveReqDTO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 物流服务商协同账号新增/修改 Request VO")
|
||||
@Data
|
||||
public class CarrierAccountSaveReqVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "登录账号")
|
||||
private String loginAccount;
|
||||
|
||||
@Schema(description = "登录手机号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "登录手机号不能为空")
|
||||
private String loginTel;
|
||||
|
||||
@Schema(description = "公司名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "公司名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "社会统一信用代码")
|
||||
private String creditCode;
|
||||
|
||||
@Schema(description = "法人姓名")
|
||||
private String agentName;
|
||||
|
||||
@Schema(description = "法人身份证")
|
||||
private String identityNumber;
|
||||
|
||||
@Schema(description = "经营范围")
|
||||
private String operateScope;
|
||||
|
||||
@Schema(description = "地址")
|
||||
private String address;
|
||||
|
||||
@Schema(description = "成立日期")
|
||||
private LocalDateTime establishDate;
|
||||
|
||||
@Schema(description = "注册资本")
|
||||
private BigDecimal registrationAmount;
|
||||
|
||||
@Schema(description = "营业期限开始")
|
||||
private LocalDateTime businessCycleStart;
|
||||
|
||||
@Schema(description = "营业期限结束")
|
||||
private LocalDateTime businessCycleEnd;
|
||||
|
||||
@Schema(description = "是否长期")
|
||||
private Integer isPermanently;
|
||||
|
||||
@Schema(description = "银行账号")
|
||||
private String bankAccount;
|
||||
|
||||
@Schema(description = "登记机关")
|
||||
private String registrationAgency;
|
||||
|
||||
@Schema(description = "营业执照附件")
|
||||
private BusinessFileSaveReqDTO businessLicenseFile;
|
||||
|
||||
@Schema(description = "法人身份证-正面")
|
||||
private BusinessFileSaveReqDTO identityFrontFile;
|
||||
|
||||
@Schema(description = "法人身份证-反面")
|
||||
private BusinessFileSaveReqDTO identityBackFile;
|
||||
|
||||
@Schema(description = "修改说明附件")
|
||||
private BusinessFileSaveReqDTO editFile;
|
||||
|
||||
@Schema(description = "其他附件")
|
||||
private List<BusinessFileSaveReqDTO> otherFile;
|
||||
/**
|
||||
* 主数据编码
|
||||
*/
|
||||
@Schema(description = "主数据编码")
|
||||
private String mdmCode;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
@Schema(description = "用户类型")
|
||||
|
||||
private String userType;
|
||||
/**
|
||||
* 开户行名称
|
||||
*/
|
||||
@Schema(description = "开户行名称")
|
||||
private String bankName;
|
||||
|
||||
/**
|
||||
* 绑定部门id
|
||||
*/
|
||||
@Schema(description = "绑定部门id")
|
||||
private Long bidDeptId;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "协同账号管理-子账号")
|
||||
@Data
|
||||
public class ChildAccountPageReqVo extends PageParam {
|
||||
|
||||
@Schema(description = "绑定部门id")
|
||||
private Long bidDeptId;
|
||||
@Schema(description = "姓名")
|
||||
private String nickname;
|
||||
@Schema(description = "登录账号")
|
||||
private String username;
|
||||
@Schema(description = "登录手机号")
|
||||
private String mobile;
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "子账号返回值")
|
||||
@Data
|
||||
public class ChildAccountRespVo {
|
||||
@Schema(description = "子账号id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "子账号")
|
||||
private String username;
|
||||
|
||||
@Schema(description = "姓名")
|
||||
private String nickname;
|
||||
|
||||
@Schema(description = "登录手机号")
|
||||
private String mobile;
|
||||
|
||||
@Schema(description = "状态")
|
||||
private String status;
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
@Schema(description = "创建人")
|
||||
private String creatorName;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "协同账号管理-子账号保存")
|
||||
@Data
|
||||
public class ChildAccountSaveReqVo {
|
||||
@Schema(description = "子账号id")
|
||||
private Long id;
|
||||
@Schema(description = "子账号")
|
||||
private String username;
|
||||
@Schema(description = "姓名")
|
||||
private String nickname;
|
||||
@Schema(description = "登录手机号")
|
||||
private String mobile;
|
||||
@Schema(description = "密码")
|
||||
private String password;
|
||||
@Schema(description = "短信验证码")
|
||||
private String msgCode;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo;
|
||||
|
||||
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileWithUrlRespDTO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企业详情信息
|
||||
*/
|
||||
@Schema(description = "物流协同 - 企业详情信息")
|
||||
@Data
|
||||
public class CollaborationCompanyRespVo {
|
||||
|
||||
@Schema(description = "物流服务商企业信息")
|
||||
private CarrierAccountRespVO carrierAccount;
|
||||
|
||||
@Schema(description = "客商协同企业信息")
|
||||
private CustomerRespVO customer;
|
||||
|
||||
@Schema(description = "附件列表")
|
||||
private List<BusinessFileWithUrlRespDTO> fileList;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
@Schema(description = "协同平台 -企业信息保存 Request VO")
|
||||
@Data
|
||||
public class CollaborationCompanySaveReqVo {
|
||||
|
||||
@Schema(description = "登录手机号")
|
||||
private String loginTel;
|
||||
|
||||
@Schema(description = "短信验证码")
|
||||
private String msgCode;
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 客商协同账号分页 Request VO")
|
||||
@Data
|
||||
public class CustomerPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "登录账号", example = "6036")
|
||||
private String loginAccount;
|
||||
|
||||
@Schema(description = "登录手机号")
|
||||
private String loginTel;
|
||||
|
||||
@Schema(description = "公司名称", example = "赵六")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "社会统一信用代码")
|
||||
private String creditCode;
|
||||
|
||||
@Schema(description = "法人姓名", example = "王五")
|
||||
private String agentName;
|
||||
|
||||
@Schema(description = "法人身份证")
|
||||
private String identityNumber;
|
||||
|
||||
@Schema(description = "联系人")
|
||||
private String contact;
|
||||
|
||||
@Schema(description = "联系人电话")
|
||||
private String contactTel;
|
||||
|
||||
@Schema(description = "SPA编码")
|
||||
private String sapCode;
|
||||
|
||||
@Schema(description = "MDM编码")
|
||||
private String mDMCode;
|
||||
|
||||
@Schema(description = "是否有附件")
|
||||
private String isFile;
|
||||
|
||||
@Schema(description = "状态", example = "2")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private String isEnable;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
@Schema(description = "用户类型")
|
||||
@ExcelProperty("用户类型")
|
||||
private String userType;
|
||||
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo;
|
||||
|
||||
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileWithUrlRespDTO;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 客商协同账号 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class CustomerRespVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8593")
|
||||
@ExcelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "修改时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
@ExcelProperty("创建人")
|
||||
private String creatorName;
|
||||
|
||||
@Schema(description = "修改人")
|
||||
@ExcelProperty("修改人")
|
||||
private String updaterName;
|
||||
|
||||
@Schema(description = "登录账号", example = "6036")
|
||||
@ExcelProperty("登录账号")
|
||||
private String loginAccount;
|
||||
|
||||
@Schema(description = "登录手机号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("登录手机号")
|
||||
private String loginTel;
|
||||
|
||||
@Schema(description = "公司名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@ExcelProperty("公司名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "社会统一信用代码")
|
||||
@ExcelProperty("社会统一信用代码")
|
||||
private String creditCode;
|
||||
|
||||
@Schema(description = "法人姓名", example = "王五")
|
||||
@ExcelProperty("法人姓名")
|
||||
private String agentName;
|
||||
|
||||
@Schema(description = "法人身份证")
|
||||
@ExcelProperty("法人身份证")
|
||||
private String identityNumber;
|
||||
|
||||
@Schema(description = "联系人")
|
||||
@ExcelProperty("联系人")
|
||||
private String contact;
|
||||
|
||||
@Schema(description = "联系人电话")
|
||||
@ExcelProperty("联系人电话")
|
||||
private String contactTel;
|
||||
|
||||
@Schema(description = "SPA编码")
|
||||
@ExcelProperty("SPA编码")
|
||||
private String sapCode;
|
||||
|
||||
@Schema(description = "MDM编码")
|
||||
@ExcelProperty("MDM编码")
|
||||
private String mDMCode;
|
||||
|
||||
@Schema(description = "是否有附件")
|
||||
@ExcelProperty("是否有附件")
|
||||
private String isFile;
|
||||
|
||||
@Schema(description = "状态", example = "2")
|
||||
@ExcelProperty("状态")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
@ExcelProperty("是否启用")
|
||||
private String isEnable;
|
||||
|
||||
/**
|
||||
* 绑定部门id
|
||||
*/
|
||||
@Schema(description = "绑定部门id")
|
||||
private Long bidDeptId;
|
||||
@Schema(description = "营业执照附件")
|
||||
private BusinessFileWithUrlRespDTO businessLicenseFile;
|
||||
|
||||
@Schema(description = "法人身份证-正面")
|
||||
private BusinessFileWithUrlRespDTO identityFrontFile;
|
||||
|
||||
@Schema(description = "法人身份证-反面")
|
||||
private BusinessFileWithUrlRespDTO identityBackFile;
|
||||
|
||||
@Schema(description = "其他附件")
|
||||
private List<BusinessFileWithUrlRespDTO> otherFile;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
@Schema(description = "用户类型")
|
||||
@ExcelProperty("用户类型")
|
||||
private String userType;
|
||||
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo;
|
||||
|
||||
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileSaveReqDTO;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 客商协同账号新增/修改 Request VO")
|
||||
@Data
|
||||
public class CustomerSaveReqVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "登录账号")
|
||||
private String loginAccount;
|
||||
|
||||
@Schema(description = "登录手机号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "登录手机号不能为空")
|
||||
private String loginTel;
|
||||
|
||||
@Schema(description = "公司名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "公司名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "社会统一信用代码")
|
||||
private String creditCode;
|
||||
|
||||
@Schema(description = "法人姓名")
|
||||
private String agentName;
|
||||
|
||||
@Schema(description = "法人身份证")
|
||||
private String identityNumber;
|
||||
|
||||
@Schema(description = "联系人")
|
||||
private String contact;
|
||||
|
||||
@Schema(description = "联系人电话")
|
||||
private String contactTel;
|
||||
|
||||
@Schema(description = "SPA编码")
|
||||
private String sapCode;
|
||||
|
||||
@Schema(description = "MDM编码")
|
||||
private String mDMCode;
|
||||
|
||||
@Schema(description = "营业执照附件")
|
||||
private BusinessFileSaveReqDTO businessLicenseFile;
|
||||
|
||||
@Schema(description = "法人身份证-正面")
|
||||
private BusinessFileSaveReqDTO identityFrontFile;
|
||||
|
||||
@Schema(description = "法人身份证-反面")
|
||||
private BusinessFileSaveReqDTO identityBackFile;
|
||||
|
||||
@Schema(description = "其他附件")
|
||||
private List<BusinessFileSaveReqDTO> otherFile;
|
||||
|
||||
/**
|
||||
* 绑定部门id
|
||||
*/
|
||||
@Schema(description = "绑定部门id")
|
||||
private Long bidDeptId;
|
||||
|
||||
/**
|
||||
* 用户类型
|
||||
*/
|
||||
@Schema(description = "用户类型")
|
||||
@ExcelProperty("用户类型")
|
||||
private String userType;
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 司机协同账号禁用/启用 Request VO")
|
||||
@Data
|
||||
public class DriverAccountEditEnbVo {
|
||||
@Schema(description = "id")
|
||||
private List<Long> ids;
|
||||
@Schema(description = "是否启用 0=启用 1=禁用")
|
||||
private String isEnable;
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 司机协同账号分页 Request VO")
|
||||
@Data
|
||||
public class DrivingAccountPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "状态", example = "1")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
private String isEnable;
|
||||
|
||||
@Schema(description = "登录账号", example = "27536")
|
||||
private String loginAccount;
|
||||
|
||||
@Schema(description = "登录手机号")
|
||||
private String loginTel;
|
||||
|
||||
@Schema(description = "姓名", example = "芋艿")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "身份证号")
|
||||
private String identityNumber;
|
||||
|
||||
@Schema(description = "身份证有效期-开始")
|
||||
private LocalDateTime identityExpiryStart;
|
||||
|
||||
@Schema(description = "身份证有效期-结束")
|
||||
private LocalDateTime identityExpiryEnd;
|
||||
|
||||
@Schema(description = "身份证是否长期")
|
||||
private Integer isPermanentlyIdentity;
|
||||
|
||||
@Schema(description = "驾驶证有效期-开始")
|
||||
private LocalDateTime drivingExpiryStart;
|
||||
|
||||
@Schema(description = "驾驶证有效期-结束")
|
||||
private LocalDateTime drivingExpiryEnd;
|
||||
|
||||
@Schema(description = "驾驶证是否长期")
|
||||
private Integer isPermanentlyDriving;
|
||||
|
||||
@Schema(description = "准驾车型", example = "2")
|
||||
private String drivingType;
|
||||
|
||||
@Schema(description = "发证机关")
|
||||
private String registrationAgency;
|
||||
|
||||
@Schema(description = "档案编码")
|
||||
private String documentNo;
|
||||
|
||||
@Schema(description = "从业资格证号")
|
||||
private String majorQualificationNo;
|
||||
|
||||
@Schema(description = "来源")
|
||||
private String origin;
|
||||
|
||||
}
|
||||
@@ -1,146 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo;
|
||||
|
||||
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileWithUrlRespDTO;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 司机协同账号 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class DrivingAccountRespVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8522")
|
||||
@ExcelProperty("主键ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "修改时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(description = "创建人")
|
||||
@ExcelProperty("创建人")
|
||||
private String creatorName;
|
||||
|
||||
@Schema(description = "修改人")
|
||||
@ExcelProperty("修改人")
|
||||
private String updaterName;
|
||||
|
||||
@Schema(description = "状态", example = "1")
|
||||
@ExcelProperty("状态")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "是否启用")
|
||||
@ExcelProperty("是否启用")
|
||||
private String isEnable;
|
||||
|
||||
@Schema(description = "登录账号", example = "27536")
|
||||
@ExcelProperty("登录账号")
|
||||
private String loginAccount;
|
||||
|
||||
@Schema(description = "登录手机号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("登录手机号")
|
||||
private String loginTel;
|
||||
|
||||
@Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@ExcelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "身份证号")
|
||||
@ExcelProperty("身份证号")
|
||||
private String identityNumber;
|
||||
|
||||
@Schema(description = "身份证有效期-开始")
|
||||
@ExcelProperty("身份证有效期-开始")
|
||||
private LocalDateTime identityExpiryStart;
|
||||
|
||||
@Schema(description = "身份证有效期-结束")
|
||||
@ExcelProperty("身份证有效期-结束")
|
||||
private LocalDateTime identityExpiryEnd;
|
||||
|
||||
@Schema(description = "身份证是否长期")
|
||||
@ExcelProperty("身份证是否长期")
|
||||
private Integer isPermanentlyIdentity;
|
||||
|
||||
@Schema(description = "驾驶证有效期-开始")
|
||||
@ExcelProperty("驾驶证有效期-开始")
|
||||
private LocalDateTime drivingExpiryStart;
|
||||
|
||||
@Schema(description = "驾驶证有效期-结束")
|
||||
@ExcelProperty("驾驶证有效期-结束")
|
||||
private LocalDateTime drivingExpiryEnd;
|
||||
|
||||
@Schema(description = "驾驶证是否长期")
|
||||
@ExcelProperty("驾驶证是否长期")
|
||||
private Integer isPermanentlyDriving;
|
||||
|
||||
@Schema(description = "准驾车型", example = "2")
|
||||
@ExcelProperty("准驾车型")
|
||||
private String drivingType;
|
||||
|
||||
/**
|
||||
* 身份证发证机关
|
||||
*/
|
||||
@Schema(description = "IDTY_REG_AGC")
|
||||
@ExcelProperty("身份证发证机关")
|
||||
private String idtyRegistrationAgency;
|
||||
|
||||
/**
|
||||
* 行驶证发证机关
|
||||
*/
|
||||
@Schema(description = "DRVG_REG_AGC")
|
||||
@ExcelProperty("行驶证发证机关")
|
||||
private String drvgRegistrationAgency;
|
||||
|
||||
@Schema(description = "档案编码")
|
||||
@ExcelProperty("档案编码")
|
||||
private String documentNo;
|
||||
|
||||
@Schema(description = "从业资格证号")
|
||||
@ExcelProperty("从业资格证号")
|
||||
private String majorQualificationNo;
|
||||
|
||||
@Schema(description = "来源")
|
||||
@ExcelProperty("来源")
|
||||
private String origin;
|
||||
|
||||
/**
|
||||
* 绑定部门id
|
||||
*/
|
||||
@Schema(description = "绑定部门id")
|
||||
private Long bidDeptId;
|
||||
|
||||
@Schema(description = "驾驶证图片-正面")
|
||||
private BusinessFileWithUrlRespDTO drivingFrontFile;
|
||||
|
||||
@Schema(description = "驾驶证图片-反面")
|
||||
private BusinessFileWithUrlRespDTO drivingBackFile;
|
||||
|
||||
@Schema(description = "身份证-正面")
|
||||
private BusinessFileWithUrlRespDTO identityFrontFile;
|
||||
|
||||
@Schema(description = "身份证-反面")
|
||||
private BusinessFileWithUrlRespDTO identityBackFile;
|
||||
|
||||
@Schema(description = "其他资格证附件")
|
||||
private List<BusinessFileWithUrlRespDTO> otherFile;
|
||||
|
||||
/**
|
||||
* 认证状态
|
||||
*/
|
||||
@Schema(description = "认证状态")
|
||||
private String validationStatus;
|
||||
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo;
|
||||
|
||||
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileSaveReqDTO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 司机协同账号新增/修改 Request VO")
|
||||
@Data
|
||||
public class DrivingAccountSaveReqVO {
|
||||
|
||||
@Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "登录账号")
|
||||
private String loginAccount;
|
||||
|
||||
@Schema(description = "登录手机号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "登录手机号不能为空")
|
||||
private String loginTel;
|
||||
|
||||
@Schema(description = "姓名", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "姓名不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "身份证号")
|
||||
private String identityNumber;
|
||||
|
||||
@Schema(description = "身份证有效期-开始")
|
||||
private LocalDateTime identityExpiryStart;
|
||||
|
||||
@Schema(description = "身份证有效期-结束")
|
||||
private LocalDateTime identityExpiryEnd;
|
||||
|
||||
@Schema(description = "身份证是否长期")
|
||||
private Integer isPermanentlyIdentity;
|
||||
|
||||
@Schema(description = "驾驶证有效期-开始")
|
||||
private LocalDateTime drivingExpiryStart;
|
||||
|
||||
@Schema(description = "驾驶证有效期-结束")
|
||||
private LocalDateTime drivingExpiryEnd;
|
||||
|
||||
@Schema(description = "驾驶证是否长期")
|
||||
private Integer isPermanentlyDriving;
|
||||
|
||||
@Schema(description = "准驾车型")
|
||||
private String drivingType;
|
||||
|
||||
/**
|
||||
* 身份证发证机关
|
||||
*/
|
||||
@Schema(description = "IDTY_REG_AGC")
|
||||
private String idtyRegistrationAgency;
|
||||
|
||||
/**
|
||||
* 行驶证发证机关
|
||||
*/
|
||||
@Schema(description = "DRVG_REG_AGC")
|
||||
private String drvgRegistrationAgency;
|
||||
|
||||
|
||||
@Schema(description = "档案编码")
|
||||
private String documentNo;
|
||||
|
||||
@Schema(description = "从业资格证号")
|
||||
private String majorQualificationNo;
|
||||
|
||||
@Schema(description = "驾驶证图片-正面")
|
||||
private BusinessFileSaveReqDTO drivingFrontFile;
|
||||
|
||||
@Schema(description = "驾驶证图片-反面")
|
||||
private BusinessFileSaveReqDTO drivingBackFile;
|
||||
|
||||
@Schema(description = "身份证-正面")
|
||||
private BusinessFileSaveReqDTO identityFrontFile;
|
||||
|
||||
@Schema(description = "身份证-反面")
|
||||
private BusinessFileSaveReqDTO identityBackFile;
|
||||
|
||||
@Schema(description = "其他资格证附件")
|
||||
private List<BusinessFileSaveReqDTO> otherFile;
|
||||
/**
|
||||
* 绑定部门id
|
||||
*/
|
||||
@Schema(description = "绑定部门id")
|
||||
private Long bidDeptId;
|
||||
/**
|
||||
* 来源
|
||||
*/
|
||||
@Schema(description = "来源")
|
||||
private String origin;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.acct.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 操作日志分页 Request VO")
|
||||
@Data
|
||||
public class OperationLogListVO {
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "日志内容")
|
||||
private String content;
|
||||
|
||||
}
|
||||
@@ -1,145 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.crAchi;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import com.zt.plat.framework.business.annotation.FileUploadController;
|
||||
import com.zt.plat.framework.business.controller.AbstractFileUploadController;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.crAchi.vo.CarArchiveImportExcelVO;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.crAchi.vo.CarArchivePageReqVO;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.crAchi.vo.CarArchiveRespVO;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.crAchi.vo.CarArchiveSaveReqVO;
|
||||
import com.zt.plat.module.backendlogistics.dal.dataobject.bseMngt.crAchi.CarArchiveDO;
|
||||
import com.zt.plat.module.backendlogistics.service.bseMngt.crAchi.CarArchiveService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.IMPORT;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 车辆档案")
|
||||
@RestController
|
||||
@RequestMapping("/lgst/car-archive")
|
||||
@Validated
|
||||
@FileUploadController(source = "lgst.bseMngt.crAchi")
|
||||
public class CarArchiveController extends AbstractFileUploadController implements BusinessControllerMarker{
|
||||
|
||||
static {
|
||||
FileUploadController annotation = CarArchiveController.class.getAnnotation(FileUploadController.class);
|
||||
if (annotation != null) {
|
||||
setFileUploadInfo(annotation);
|
||||
}
|
||||
}
|
||||
|
||||
@Resource
|
||||
private CarArchiveService carArchiveService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建车辆档案")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:car-archive:create')")
|
||||
public CommonResult<CarArchiveRespVO> createCarArchive(@Valid @RequestBody CarArchiveSaveReqVO createReqVO) {
|
||||
return success(carArchiveService.createCarArchive(createReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@Operation(summary = "更新车辆档案")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:car-archive:update')")
|
||||
public CommonResult<Boolean> updateCarArchive(@Valid @RequestBody CarArchiveSaveReqVO updateReqVO) {
|
||||
carArchiveService.updateCarArchive(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@Operation(summary = "删除车辆档案")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('lgst:car-archive:delete')")
|
||||
public CommonResult<Boolean> deleteCarArchive(@RequestParam("id") Long id) {
|
||||
carArchiveService.deleteCarArchive(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除车辆档案")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:car-archive:delete')")
|
||||
public CommonResult<Boolean> deleteCarArchiveList(@RequestBody BatchDeleteReqVO req) {
|
||||
carArchiveService.deleteCarArchiveListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得车辆档案")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:car-archive:query')")
|
||||
public CommonResult<CarArchiveRespVO> getCarArchive(@RequestParam("id") Long id) {
|
||||
CarArchiveRespVO vo = carArchiveService.getCarArchive(id);
|
||||
return success(vo);
|
||||
}
|
||||
|
||||
@GetMapping("/getByCarNumber")
|
||||
@Operation(summary = "获得车辆档案")
|
||||
@Parameters({
|
||||
@Parameter(name = "carNumber", description = "车牌号", required = true, example = "1024"),
|
||||
@Parameter(name = "carNumberColor", description = "车牌颜色", required = true, example = "2048")
|
||||
})
|
||||
@PreAuthorize("@ss.hasPermission('lgst:car-archive:query')")
|
||||
public CommonResult<CarArchiveRespVO> getByCarNumber(@RequestParam("carNumber") String carNumber,@RequestParam("carNumberColor") String carNumberColor) {
|
||||
CarArchiveRespVO vo = carArchiveService.getByCarNumber(carNumber,carNumberColor);
|
||||
return success(vo);
|
||||
}
|
||||
|
||||
@PostMapping("/page")
|
||||
@Operation(summary = "获得车辆档案分页")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:car-archive:query')")
|
||||
public CommonResult<PageResult<CarArchiveRespVO>> getCarArchivePage(@Valid @RequestBody CarArchivePageReqVO pageReqVO) {
|
||||
PageResult<CarArchiveDO> pageResult = carArchiveService.getCarArchivePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, CarArchiveRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出车辆档案 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:car-archive:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportCarArchiveExcel(@Valid CarArchivePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<CarArchiveDO> list = carArchiveService.getCarArchivePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "车辆档案.xls", "数据", CarArchiveRespVO.class,
|
||||
BeanUtils.toBean(list, CarArchiveRespVO.class));
|
||||
}
|
||||
|
||||
@PostMapping("/import-excel")
|
||||
@Operation(summary = "导入车辆档案 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:car-archive:import')")
|
||||
@ApiAccessLog(operateType = IMPORT)
|
||||
public CommonResult<Boolean> exportCarArchiveExcel(@RequestParam("file") MultipartFile file,
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<CarArchiveImportExcelVO> read = ExcelUtils.read(file, CarArchiveImportExcelVO.class);
|
||||
|
||||
for (CarArchiveImportExcelVO reqVO : read) {
|
||||
CarArchiveSaveReqVO saveVo = BeanUtils.toBean(reqVO, CarArchiveSaveReqVO.class);
|
||||
this.createCarArchive(saveVo);
|
||||
}
|
||||
return success(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.crAchi;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.crAchi.vo.CarBlacklistPageReqVO;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.crAchi.vo.CarBlacklistRespVO;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.crAchi.vo.CarBlacklistSaveReqVO;
|
||||
import com.zt.plat.module.backendlogistics.dal.dataobject.bseMngt.crAchi.CarBlacklistDO;
|
||||
import com.zt.plat.module.backendlogistics.service.bseMngt.crAchi.CarBlacklistService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 车辆黑名单")
|
||||
@RestController
|
||||
@RequestMapping("/lgst/car-blacklist")
|
||||
@Validated
|
||||
public class CarBlacklistController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private CarBlacklistService carBlacklistService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建车辆黑名单")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:car-blacklist:create')")
|
||||
public CommonResult<CarBlacklistRespVO> createCarBlacklist(@Valid @RequestBody CarBlacklistSaveReqVO createReqVO) {
|
||||
return success(carBlacklistService.createCarBlacklist(createReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@Operation(summary = "更新车辆黑名单")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:car-blacklist:update')")
|
||||
public CommonResult<Boolean> updateCarBlacklist(@Valid @RequestBody CarBlacklistSaveReqVO updateReqVO) {
|
||||
carBlacklistService.updateCarBlacklist(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/lifted")
|
||||
@Operation(summary = "解除车辆黑名单")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:car-blacklist:lifted')")
|
||||
public CommonResult<Boolean> liftedCarBlacklist(@Valid @RequestBody CarBlacklistSaveReqVO updateReqVO) {
|
||||
carBlacklistService.liftedCarBlacklist(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/delete")
|
||||
@Operation(summary = "删除车辆黑名单")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('lgst:car-blacklist:delete')")
|
||||
public CommonResult<Boolean> deleteCarBlacklist(@RequestParam("id") Long id) {
|
||||
carBlacklistService.deleteCarBlacklist(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除车辆黑名单")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:car-blacklist:delete')")
|
||||
public CommonResult<Boolean> deleteCarBlacklistList(@RequestBody BatchDeleteReqVO req) {
|
||||
carBlacklistService.deleteCarBlacklistListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得车辆黑名单")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:car-blacklist:query')")
|
||||
public CommonResult<CarBlacklistRespVO> getCarBlacklist(@RequestParam("id") Long id) {
|
||||
CarBlacklistDO carBlacklist = carBlacklistService.getCarBlacklist(id);
|
||||
return success(BeanUtils.toBean(carBlacklist, CarBlacklistRespVO.class));
|
||||
}
|
||||
|
||||
@PostMapping("/page")
|
||||
@Operation(summary = "获得车辆黑名单分页")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:car-blacklist:query')")
|
||||
public CommonResult<PageResult<CarBlacklistRespVO>> getCarBlacklistPage(@Valid @RequestBody CarBlacklistPageReqVO pageReqVO) {
|
||||
PageResult<CarBlacklistDO> pageResult = carBlacklistService.getCarBlacklistPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, CarBlacklistRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出车辆黑名单 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:car-blacklist:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportCarBlacklistExcel(@Valid CarBlacklistPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<CarBlacklistDO> list = carBlacklistService.getCarBlacklistPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "车辆黑名单.xls", "数据", CarBlacklistRespVO.class,
|
||||
BeanUtils.toBean(list, CarBlacklistRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,132 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.crAchi;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import com.zt.plat.framework.business.annotation.FileUploadController;
|
||||
import com.zt.plat.framework.business.controller.AbstractFileUploadController;
|
||||
import com.zt.plat.framework.business.interceptor.BusinessControllerMarker;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.excel.core.util.ExcelUtils;
|
||||
import com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.crAchi.vo.*;
|
||||
import com.zt.plat.module.backendlogistics.service.bseMngt.crAchi.CollaborationCarArchiveService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.IMPORT;
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "物流协同 - 车辆档案")
|
||||
@RestController
|
||||
@RequestMapping("/lgst/collaboration-car-archive")
|
||||
@Validated
|
||||
@FileUploadController(source = "lgst.bseMngt.crAchi")
|
||||
public class CollaborationCarArchiveController extends AbstractFileUploadController implements BusinessControllerMarker {
|
||||
|
||||
static {
|
||||
FileUploadController annotation = CollaborationCarArchiveController.class.getAnnotation(FileUploadController.class);
|
||||
if (annotation != null) {
|
||||
setFileUploadInfo(annotation);
|
||||
}
|
||||
}
|
||||
|
||||
@Resource
|
||||
private CollaborationCarArchiveService collaborationCarArchiveService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建车辆档案")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:collaboration-car-archive:create')")
|
||||
public CommonResult<Boolean> createCarArchive(@Valid @RequestBody CarArchiveSaveReqVO createReqVO) {
|
||||
collaborationCarArchiveService.createCarArchive(createReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@Operation(summary = "更新车辆档案")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:collaboration-car-archive:update')")
|
||||
public CommonResult<Boolean> updateCarArchive(@Valid @RequestBody CarArchiveSaveReqVO updateReqVO) {
|
||||
collaborationCarArchiveService.updateCarArchive(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除车辆档案")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:collaboration-car-archive:delete')")
|
||||
public CommonResult<Boolean> deleteCarArchiveList(@RequestBody BatchDeleteReqVO req) {
|
||||
collaborationCarArchiveService.deleteCarArchiveListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得车辆档案")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:collaboration-car-archive:query')")
|
||||
public CommonResult<CarArchiveRespVO> getCarArchive(@RequestParam("id") Long id) {
|
||||
CarArchiveRespVO vo = collaborationCarArchiveService.getCarArchive(id);
|
||||
return success(vo);
|
||||
}
|
||||
|
||||
@GetMapping("/getByCarNumber")
|
||||
@Operation(summary = "获得车辆档案")
|
||||
@Parameters({
|
||||
@Parameter(name = "carNumber", description = "车牌号", required = true, example = "1024"),
|
||||
@Parameter(name = "carNumberColor", description = "车牌颜色", required = true, example = "2048")
|
||||
})
|
||||
@PreAuthorize("@ss.hasPermission('lgst:collaboration-car-archive:query')")
|
||||
public CommonResult<CarArchiveRespVO> getByCarNumber(@RequestParam("carNumber") String carNumber,@RequestParam("carNumberColor") String carNumberColor) {
|
||||
CarArchiveRespVO vo = collaborationCarArchiveService.getByCarNumber(carNumber,carNumberColor);
|
||||
return success(vo);
|
||||
}
|
||||
|
||||
@PostMapping("/page")
|
||||
@Operation(summary = "获得车辆档案分页")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:ollaboration-car-archive:query')")
|
||||
public CommonResult<PageResult<CollaborationCarArchiveRespVO>> getCarArchivePage(@Valid @RequestBody CollaborationCarArchivePageReqVO pageReqVO) {
|
||||
PageResult<CollaborationCarArchiveRespVO> pageResult = collaborationCarArchiveService.getCarArchivePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, CollaborationCarArchiveRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出车辆档案 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:collaboration-car-archive:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportCarArchiveExcel(@Valid CollaborationCarArchivePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<CollaborationCarArchiveRespVO> list = collaborationCarArchiveService.getCarArchivePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "车辆档案.xls", "数据", CollaborationCarArchiveRespVO.class,
|
||||
BeanUtils.toBean(list, CollaborationCarArchiveRespVO.class));
|
||||
}
|
||||
|
||||
@PostMapping("/import-excel")
|
||||
@Operation(summary = "导入车辆档案 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('lgst:collaboration-car-archive:import')")
|
||||
@ApiAccessLog(operateType = IMPORT)
|
||||
public CommonResult<Boolean> exportCarArchiveExcel(@RequestParam("file") MultipartFile file,
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<CarArchiveImportExcelVO> read = ExcelUtils.read(file, CarArchiveImportExcelVO.class);
|
||||
|
||||
for (CarArchiveImportExcelVO reqVO : read) {
|
||||
CarArchiveSaveReqVO saveVo = BeanUtils.toBean(reqVO, CarArchiveSaveReqVO.class);
|
||||
this.createCarArchive(saveVo);
|
||||
}
|
||||
return success(true);
|
||||
}
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.crAchi.vo;
|
||||
|
||||
import com.zt.plat.framework.excel.core.annotations.DictFormat;
|
||||
import com.zt.plat.framework.excel.core.convert.DictConvert;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 车辆档案导入 Request VO")
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = false)
|
||||
@Data
|
||||
public class CarArchiveImportExcelVO {
|
||||
|
||||
|
||||
|
||||
@ExcelProperty("车牌号")
|
||||
private String carNumber;
|
||||
|
||||
@ExcelProperty("关联挂车")
|
||||
private String correlationTrailer;
|
||||
|
||||
@ExcelProperty("车辆颜色")
|
||||
private String carColor;
|
||||
|
||||
@ExcelProperty(value = "车牌颜色",converter = DictConvert.class)
|
||||
@DictFormat("license_plate_color")
|
||||
private String carNumberColor;
|
||||
|
||||
@ExcelProperty(value = "排放阶段",converter = DictConvert.class)
|
||||
@DictFormat("emission_stage")
|
||||
private String emissionPhase;
|
||||
|
||||
@ExcelProperty(value = "燃油类型",converter = DictConvert.class)
|
||||
@DictFormat("fuel_type")
|
||||
private String fuelType;
|
||||
|
||||
@ExcelProperty("车辆轴数")
|
||||
private Long carAxisCount;
|
||||
|
||||
@ExcelProperty("车辆所有人")
|
||||
private String carOwner;
|
||||
|
||||
@ExcelProperty("车辆识别代码vin")
|
||||
private String vin;
|
||||
|
||||
@ExcelProperty("发动机号")
|
||||
private String engineNumber;
|
||||
|
||||
@ExcelProperty("使用性质")
|
||||
private String useNature;
|
||||
|
||||
@ExcelProperty("车辆类型")
|
||||
private String carType;
|
||||
|
||||
@ExcelProperty("品牌型号")
|
||||
private String brandModel;
|
||||
|
||||
@ExcelProperty("总质量(kg)")
|
||||
private BigDecimal totalQuality;
|
||||
|
||||
@ExcelProperty("核定载质量(kg)")
|
||||
private BigDecimal assessmentLoadingQuality;
|
||||
|
||||
@ExcelProperty("整备质量(kg)")
|
||||
private BigDecimal preparationQuality;
|
||||
|
||||
@ExcelProperty("长(mm)")
|
||||
private BigDecimal length;
|
||||
|
||||
@ExcelProperty("宽(mm)")
|
||||
private BigDecimal width;
|
||||
|
||||
@ExcelProperty("高(mm)")
|
||||
private BigDecimal height;
|
||||
|
||||
@ExcelProperty("注册时间")
|
||||
private LocalDateTime registryTime;
|
||||
|
||||
@ExcelProperty("发证时间")
|
||||
private LocalDateTime certificateIssuingTime;
|
||||
|
||||
@ExcelProperty("发证机关")
|
||||
private String certificateIssuingAgency;
|
||||
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.crAchi.vo;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 车辆档案分页 Request VO")
|
||||
@Data
|
||||
public class CarArchivePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "档案编号")
|
||||
private String archiveNumber;
|
||||
|
||||
@Schema(description = "车牌号")
|
||||
private String carNumber;
|
||||
|
||||
@Schema(description = "车辆标识")
|
||||
private String carLabel;
|
||||
|
||||
@Schema(description = "关联挂车")
|
||||
private String correlationTrailer;
|
||||
|
||||
@Schema(description = "是否黑名单")
|
||||
private String isBlacklist;
|
||||
|
||||
@Schema(description = "车辆颜色")
|
||||
private String carColor;
|
||||
|
||||
@Schema(description = "车牌颜色")
|
||||
private String carNumberColor;
|
||||
|
||||
@Schema(description = "排放阶段")
|
||||
private String emissionPhase;
|
||||
|
||||
@Schema(description = "燃油类型")
|
||||
private String fuelType;
|
||||
|
||||
@Schema(description = "车辆轴数", example = "25361")
|
||||
private Long carAxisCount;
|
||||
|
||||
@Schema(description = "车辆所有人")
|
||||
private String carOwner;
|
||||
|
||||
@Schema(description = "车辆识别代码vin")
|
||||
private String vin;
|
||||
|
||||
@Schema(description = "发动机号")
|
||||
private String engineNumber;
|
||||
|
||||
@Schema(description = "使用性质")
|
||||
private String useNature;
|
||||
|
||||
@Schema(description = "车辆类型", example = "2")
|
||||
private String carType;
|
||||
|
||||
@Schema(description = "品牌型号")
|
||||
private String brandModel;
|
||||
|
||||
@Schema(description = "总质量(kg)")
|
||||
private BigDecimal totalQuality;
|
||||
|
||||
@Schema(description = "核定载质量(kg)")
|
||||
private BigDecimal assessmentLoadingQuality;
|
||||
|
||||
@Schema(description = "整备质量(kg)")
|
||||
private BigDecimal preparationQuality;
|
||||
|
||||
@Schema(description = "长(mm)")
|
||||
private BigDecimal length;
|
||||
|
||||
@Schema(description = "宽(mm)")
|
||||
private BigDecimal width;
|
||||
|
||||
@Schema(description = "高(mm)")
|
||||
private BigDecimal height;
|
||||
|
||||
@Schema(description = "注册时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] registryTime;
|
||||
|
||||
@Schema(description = "发证时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] certificateIssuingTime;
|
||||
|
||||
@Schema(description = "发证机关")
|
||||
private String certificateIssuingAgency;
|
||||
|
||||
}
|
||||
@@ -1,160 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.crAchi.vo;
|
||||
|
||||
import com.zt.plat.framework.excel.core.annotations.DictFormat;
|
||||
import com.zt.plat.framework.excel.core.convert.DictConvert;
|
||||
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileWithUrlRespDTO;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 车辆档案 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class CarArchiveRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26123")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "档案编号")
|
||||
@ExcelProperty("档案编号")
|
||||
private String archiveNumber;
|
||||
|
||||
@Schema(description = "车牌号")
|
||||
@ExcelProperty("车牌号")
|
||||
private String carNumber;
|
||||
|
||||
@Schema(description = "车辆标识")
|
||||
@ExcelProperty(value = "车辆标识",converter = DictConvert.class)
|
||||
@DictFormat("car_type")
|
||||
private String carLabel;
|
||||
|
||||
@Schema(description = "关联挂车")
|
||||
@ExcelProperty("关联挂车")
|
||||
private String correlationTrailer;
|
||||
|
||||
@Schema(description = "是否黑名单")
|
||||
@ExcelProperty(value = "是否黑名单",converter = DictConvert.class)
|
||||
@DictFormat("infra_boolean_string")
|
||||
private String isBlacklist;
|
||||
|
||||
@Schema(description = "车辆颜色")
|
||||
@ExcelProperty("车辆颜色")
|
||||
private String carColor;
|
||||
|
||||
@Schema(description = "车牌颜色")
|
||||
@ExcelProperty(value = "车牌颜色",converter = DictConvert.class)
|
||||
@DictFormat("license_plate_color")
|
||||
private String carNumberColor;
|
||||
|
||||
@Schema(description = "排放阶段")
|
||||
@ExcelProperty(value = "排放阶段",converter = DictConvert.class)
|
||||
@DictFormat("emission_stage")
|
||||
private String emissionPhase;
|
||||
|
||||
@Schema(description = "燃油类型")
|
||||
@ExcelProperty(value = "燃油类型",converter = DictConvert.class)
|
||||
@DictFormat("fuel_type")
|
||||
private String fuelType;
|
||||
|
||||
@Schema(description = "车辆轴数", example = "25361")
|
||||
@ExcelProperty("车辆轴数")
|
||||
private Long carAxisCount;
|
||||
|
||||
@Schema(description = "车辆所有人")
|
||||
@ExcelProperty("车辆所有人")
|
||||
private String carOwner;
|
||||
|
||||
@Schema(description = "车辆识别代码vin")
|
||||
@ExcelProperty("车辆识别代码vin")
|
||||
private String vin;
|
||||
|
||||
@Schema(description = "发动机号")
|
||||
@ExcelProperty("发动机号")
|
||||
private String engineNumber;
|
||||
|
||||
@Schema(description = "使用性质")
|
||||
@ExcelProperty("使用性质")
|
||||
private String useNature;
|
||||
|
||||
@Schema(description = "车辆类型", example = "2")
|
||||
@ExcelProperty("车辆类型")
|
||||
private String carType;
|
||||
|
||||
@Schema(description = "品牌型号")
|
||||
@ExcelProperty("品牌型号")
|
||||
private String brandModel;
|
||||
|
||||
@Schema(description = "总质量(kg)")
|
||||
@ExcelProperty("总质量(kg)")
|
||||
private BigDecimal totalQuality;
|
||||
|
||||
@Schema(description = "核定载质量(kg)")
|
||||
@ExcelProperty("核定载质量(kg)")
|
||||
private BigDecimal assessmentLoadingQuality;
|
||||
|
||||
@Schema(description = "整备质量(kg)")
|
||||
@ExcelProperty("整备质量(kg)")
|
||||
private BigDecimal preparationQuality;
|
||||
|
||||
@Schema(description = "长(mm)")
|
||||
@ExcelProperty("长(mm)")
|
||||
private BigDecimal length;
|
||||
|
||||
@Schema(description = "宽(mm)")
|
||||
@ExcelProperty("宽(mm)")
|
||||
private BigDecimal width;
|
||||
|
||||
@Schema(description = "高(mm)")
|
||||
@ExcelProperty("高(mm)")
|
||||
private BigDecimal height;
|
||||
|
||||
@Schema(description = "注册时间")
|
||||
@ExcelProperty("注册时间")
|
||||
private LocalDateTime registryTime;
|
||||
|
||||
@Schema(description = "发证时间")
|
||||
@ExcelProperty("发证时间")
|
||||
private LocalDateTime certificateIssuingTime;
|
||||
|
||||
@Schema(description = "发证机关")
|
||||
@ExcelProperty("发证机关")
|
||||
private String certificateIssuingAgency;
|
||||
|
||||
@Schema(description = "行驶证-正页")
|
||||
private List<BusinessFileWithUrlRespDTO> carLicenseFrontFile;
|
||||
|
||||
@Schema(description = "行驶证-副页")
|
||||
private List<BusinessFileWithUrlRespDTO> carLicenseBackFile;
|
||||
|
||||
@Schema(description = "随车清单附件")
|
||||
private List<BusinessFileWithUrlRespDTO> carChecklistFile;
|
||||
|
||||
@Schema(description = "车辆照片附件")
|
||||
private List<BusinessFileWithUrlRespDTO> carPhotosFile;
|
||||
|
||||
@Schema(description = "车辆保险信息附件")
|
||||
private List<BusinessFileWithUrlRespDTO> carInsuranceFile;
|
||||
|
||||
@Schema(description = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建人")
|
||||
private String creatorName;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "修改人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("修改人")
|
||||
private String updaterName;
|
||||
|
||||
@Schema(description = "修改时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -1,108 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.crAchi.vo;
|
||||
|
||||
import com.zt.plat.module.infra.api.businessfile.dto.BusinessFileSaveReqDTO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 车辆档案新增/修改 Request VO")
|
||||
@Data
|
||||
public class CarArchiveSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26123")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "档案编号")
|
||||
private String archiveNumber;
|
||||
|
||||
@Schema(description = "车牌号")
|
||||
private String carNumber;
|
||||
|
||||
@Schema(description = "车辆标识")
|
||||
private String carLabel;
|
||||
|
||||
@Schema(description = "关联挂车")
|
||||
private String correlationTrailer;
|
||||
|
||||
@Schema(description = "是否黑名单")
|
||||
private String isBlacklist;
|
||||
|
||||
@Schema(description = "车辆颜色")
|
||||
private String carColor;
|
||||
|
||||
@Schema(description = "车牌颜色")
|
||||
private String carNumberColor;
|
||||
|
||||
@Schema(description = "排放阶段")
|
||||
private String emissionPhase;
|
||||
|
||||
@Schema(description = "燃油类型")
|
||||
private String fuelType;
|
||||
|
||||
@Schema(description = "车辆轴数", example = "25361")
|
||||
private Long carAxisCount;
|
||||
|
||||
@Schema(description = "车辆所有人")
|
||||
private String carOwner;
|
||||
|
||||
@Schema(description = "车辆识别代码vin")
|
||||
private String vin;
|
||||
|
||||
@Schema(description = "发动机号")
|
||||
private String engineNumber;
|
||||
|
||||
@Schema(description = "使用性质")
|
||||
private String useNature;
|
||||
|
||||
@Schema(description = "车辆类型", example = "2")
|
||||
private String carType;
|
||||
|
||||
@Schema(description = "品牌型号")
|
||||
private String brandModel;
|
||||
|
||||
@Schema(description = "总质量(kg)")
|
||||
private BigDecimal totalQuality;
|
||||
|
||||
@Schema(description = "核定载质量(kg)")
|
||||
private BigDecimal assessmentLoadingQuality;
|
||||
|
||||
@Schema(description = "整备质量(kg)")
|
||||
private BigDecimal preparationQuality;
|
||||
|
||||
@Schema(description = "长(mm)")
|
||||
private BigDecimal length;
|
||||
|
||||
@Schema(description = "宽(mm)")
|
||||
private BigDecimal width;
|
||||
|
||||
@Schema(description = "高(mm)")
|
||||
private BigDecimal height;
|
||||
|
||||
@Schema(description = "注册时间")
|
||||
private LocalDateTime registryTime;
|
||||
|
||||
@Schema(description = "发证时间")
|
||||
private LocalDateTime certificateIssuingTime;
|
||||
|
||||
@Schema(description = "发证机关")
|
||||
private String certificateIssuingAgency;
|
||||
|
||||
@Schema(description = "行驶证-正页")
|
||||
private List<BusinessFileSaveReqDTO> carLicenseFrontFile;
|
||||
|
||||
@Schema(description = "行驶证-副页")
|
||||
private List<BusinessFileSaveReqDTO> carLicenseBackFile;
|
||||
|
||||
@Schema(description = "随车清单附件")
|
||||
private List<BusinessFileSaveReqDTO> carChecklistFile;
|
||||
|
||||
@Schema(description = "车辆照片附件")
|
||||
private List<BusinessFileSaveReqDTO> carPhotosFile;
|
||||
|
||||
@Schema(description = "车辆保险信息附件")
|
||||
private List<BusinessFileSaveReqDTO> carInsuranceFile;
|
||||
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.crAchi.vo;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 车辆黑名单分页 Request VO")
|
||||
@Data
|
||||
public class CarBlacklistPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "车辆档案ID", example = "16157")
|
||||
private Long carId;
|
||||
|
||||
@Schema(description = "操作原因")
|
||||
private String operationCause;
|
||||
|
||||
@Schema(description = "解除原因")
|
||||
private String processingCause;
|
||||
|
||||
@Schema(description = "处理状态", example = "1")
|
||||
private String status;
|
||||
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package com.zt.plat.module.backendlogistics.controller.admin.backendlogistics.bseMngt.crAchi.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 车辆黑名单 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class CarBlacklistRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "14539")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建人")
|
||||
private String creatorName;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "修改人", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("修改人")
|
||||
private String updaterName;
|
||||
|
||||
@Schema(description = "修改时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Schema(description = "车辆档案ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16157")
|
||||
@ExcelProperty("车辆档案ID")
|
||||
private Long carId;
|
||||
|
||||
@Schema(description = "操作原因")
|
||||
@ExcelProperty("操作原因")
|
||||
private String operationCause;
|
||||
|
||||
@Schema(description = "解除原因")
|
||||
@ExcelProperty("解除原因")
|
||||
private String processingCause;
|
||||
|
||||
@Schema(description = "处理状态", example = "1")
|
||||
@ExcelProperty("处理状态")
|
||||
private String status;
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user