feat(project): 初始化项目基础配置- 添加Spring Boot启动类Application.java- 配置Nacos相关yaml文件,包括actuator、cache、common、job、log、mq、mybatis、mysql、port、redis、sdk和spring配置
- 设置MySQL主从数据源及Druid连接池参数 - 配置Redis缓存参数及二级缓存L2Cache策略 - 集成XXL-JOB分布式任务调度配置 - 添加RocketMQ消息队列配置 - 配置MyBatis Plus全局设置及SQL日志禁用- 设置应用端口为80并开启debug模式- 集成Swagger API文档配置- 配置Zipkin链路追踪及Sleuth采样率 - 添加Dubbo注册中心及消费者/提供者过滤器配置- 设置日志级别及Logback配置文件路径 - 添加前端静态资源文件版权信息master
commit
5cd5f2bbfe
|
|
@ -0,0 +1,38 @@
|
||||||
|
target/
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**/target/
|
||||||
|
!**/src/test/**/target/
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea/modules.xml
|
||||||
|
.idea/jarRepositories.xml
|
||||||
|
.idea/compiler.xml
|
||||||
|
.idea/libraries/
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### Eclipse ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
!**/src/main/**/build/
|
||||||
|
!**/src/test/**/build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
### Mac OS ###
|
||||||
|
.DS_Store
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
FROM jjb-registry-registry.cn-hangzhou.cr.aliyuncs.com/pub/jdk:1.8.0_202
|
||||||
|
|
||||||
|
ENV TZ=Asia/Shanghai
|
||||||
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
|
||||||
|
COPY ./start/target/start.jar /opt/app.jar
|
||||||
|
|
||||||
|
|
||||||
|
ENTRYPOINT ["java", "-jar", "/opt/app.jar"]
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
<?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/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.jjb.saas</groupId>
|
||||||
|
<artifactId>jjb-saas-parent</artifactId>
|
||||||
|
<version>2.2.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>zcloud-gbs-firefighting</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<name>zcloud-gbs-firefighting</name>
|
||||||
|
<properties>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zcloud.gbscommon</groupId>
|
||||||
|
<artifactId>zcloud_gbscommon</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jjb.saas</groupId>
|
||||||
|
<artifactId>jjb-saas-system-client</artifactId>
|
||||||
|
<version>1.7.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
<!--Project modules-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>web-adapter</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>web-client</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>web-app</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>web-domain</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>web-infrastructure</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<!-- 统一管理插件版本 -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<version>2.6.6</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-archetype-plugin</artifactId>
|
||||||
|
<version>3.4.1</version>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
<modules>
|
||||||
|
<module>web-client</module>
|
||||||
|
<module>web-adapter</module>
|
||||||
|
<module>web-app</module>
|
||||||
|
<module>web-domain</module>
|
||||||
|
<module>web-infrastructure</module>
|
||||||
|
<module>start</module>
|
||||||
|
</modules>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
<?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/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>zcloud-gbs-firefighting</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>start</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>start</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>web-adapter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.flywaydb</groupId>
|
||||||
|
<artifactId>flyway-mysql</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jjb.saas</groupId>
|
||||||
|
<artifactId>jjb-saas-gateway-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jjb.saas</groupId>
|
||||||
|
<artifactId>jjb-saas-framework-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<mainClass>com.zcloud.firefighting.Application</mainClass>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.zcloud.firefighting;
|
||||||
|
|
||||||
|
import com.jjb.saas.base.starter.bootstart.JJBSpringbootApplication;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Spring Boot Starter
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@JJBSpringbootApplication(
|
||||||
|
scanBasePackages = {"com.zcloud","com.jjb"},
|
||||||
|
mapperPackages = {"com.zcloud.firefighting.persistence.mapper"}
|
||||||
|
)
|
||||||
|
public class Application {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(Application.class, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
spring:
|
||||||
|
config:
|
||||||
|
import:
|
||||||
|
- classpath:nacos.yml
|
||||||
|
- classpath:sdk.yml
|
||||||
|
- classpath:swagger.yml
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
nacos:
|
||||||
|
url: 192.168.20.100:30290
|
||||||
|
namespace: jjb-dragon
|
||||||
|
application:
|
||||||
|
name: zcloud-gbs-firefighting
|
||||||
|
version:
|
||||||
|
gateway: firefighting
|
||||||
|
cn-name: 消防中心
|
||||||
|
spring:
|
||||||
|
application:
|
||||||
|
name: ${application.name}${application.version}
|
||||||
|
profiles:
|
||||||
|
# 环境配置
|
||||||
|
active: test
|
||||||
|
cloud:
|
||||||
|
nacos:
|
||||||
|
config:
|
||||||
|
namespace: ${nacos.namespace}
|
||||||
|
server-addr: ${nacos.url}
|
||||||
|
file-extension: yml
|
||||||
|
shared-configs:
|
||||||
|
- config-common.yml
|
||||||
|
- config-port.yml
|
||||||
|
- config-mq.yml
|
||||||
|
- config-log.yml
|
||||||
|
- config-sdk-server.yml
|
||||||
|
- config-actuator.yml
|
||||||
|
- config-job.yml
|
||||||
|
- config-mysql.yml
|
||||||
|
- config-redis.yml
|
||||||
|
- config-cache.yml
|
||||||
|
- config-spring.yml
|
||||||
|
- config-mybatis.yml
|
||||||
|
- config-sdk.yml
|
||||||
|
- config-flyway.yml
|
||||||
|
discovery:
|
||||||
|
server-addr: ${spring.cloud.nacos.config.server-addr}
|
||||||
|
namespace: ${spring.cloud.nacos.config.namespace}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
management:
|
||||||
|
endpoints:
|
||||||
|
web:
|
||||||
|
base-path: /${application.gateway}${application.version}/actuator
|
||||||
|
enabled-by-default: true
|
||||||
|
endpoint:
|
||||||
|
health:
|
||||||
|
enabled: true
|
||||||
|
info:
|
||||||
|
enabled: false
|
||||||
|
auditevents:
|
||||||
|
enabled: false
|
||||||
|
metrics:
|
||||||
|
enabled: false
|
||||||
|
loggers:
|
||||||
|
enabled: false
|
||||||
|
logfile:
|
||||||
|
enabled: false
|
||||||
|
httptrace:
|
||||||
|
enabled: false
|
||||||
|
env:
|
||||||
|
enabled: false
|
||||||
|
flyway:
|
||||||
|
enabled: false
|
||||||
|
liquidbase:
|
||||||
|
enabled: false
|
||||||
|
shutdown:
|
||||||
|
enabled: false
|
||||||
|
mappings:
|
||||||
|
enabled: false
|
||||||
|
scheduledtasks:
|
||||||
|
enabled: false
|
||||||
|
threaddump:
|
||||||
|
enabled: false
|
||||||
|
heapdump:
|
||||||
|
enabled: false
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
spring:
|
||||||
|
cache:
|
||||||
|
redis:
|
||||||
|
time-to-live: 1800s
|
||||||
|
|
||||||
|
|
||||||
|
# 二级缓存配置
|
||||||
|
# 注:caffeine 不适用于数据量大,并且缓存命中率极低的业务场景,如用户维度的缓存。请慎重选择。
|
||||||
|
l2cache:
|
||||||
|
config:
|
||||||
|
# 是否存储空值,默认true,防止缓存穿透
|
||||||
|
allowNullValues: true
|
||||||
|
# 组合缓存配置
|
||||||
|
composite:
|
||||||
|
# 是否全部启用一级缓存,默认false
|
||||||
|
l1AllOpen: false
|
||||||
|
# 一级缓存
|
||||||
|
caffeine:
|
||||||
|
# 是否自动刷新过期缓存 true 是 false 否
|
||||||
|
autoRefreshExpireCache: false
|
||||||
|
# 缓存刷新调度线程池的大小
|
||||||
|
refreshPoolSize: 2
|
||||||
|
# 缓存刷新的频率(秒)
|
||||||
|
refreshPeriod: 10
|
||||||
|
# 写入后过期时间(秒)
|
||||||
|
expireAfterWrite: 180
|
||||||
|
# 访问后过期时间(秒)
|
||||||
|
expireAfterAccess: 180
|
||||||
|
# 初始化大小
|
||||||
|
initialCapacity: 1
|
||||||
|
# 最大缓存对象个数,超过此数量时之前放入的缓存将失效
|
||||||
|
maximumSize: 3
|
||||||
|
|
||||||
|
# 二级缓存
|
||||||
|
redis:
|
||||||
|
# 全局过期时间,单位毫秒,默认不过期
|
||||||
|
defaultExpiration: 1800000
|
||||||
|
# 缓存更新时通知其他节点的topic名称 默认 cache:redis:caffeine:topic
|
||||||
|
topic: cache:redis:caffeine:topic
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
common:
|
||||||
|
mysql:
|
||||||
|
host: 192.168.2.166
|
||||||
|
port: 3306
|
||||||
|
username: root
|
||||||
|
password: root
|
||||||
|
redis:
|
||||||
|
host: 10.43.253.4
|
||||||
|
password: jjb123456
|
||||||
|
port: 6379
|
||||||
|
mq:
|
||||||
|
host: 10.43.163.23:9876
|
||||||
|
xxl-job:
|
||||||
|
address: http://10.43.98.135:8080/xxl-job-admin/
|
||||||
|
username: admin
|
||||||
|
password: jjb123456
|
||||||
|
gateway:
|
||||||
|
network:
|
||||||
|
http:
|
||||||
|
#网关的外网访问地址 必须配置为HTTPS协议
|
||||||
|
external: https://testdragon.cqjjb.cn
|
||||||
|
#网关的内网访问地址 固定配置为http://jjb-saas-gateway
|
||||||
|
intranet: http://10.43.250.65
|
||||||
|
wx:
|
||||||
|
#webSocket外网地址
|
||||||
|
external: wx://testdragon.cqjjb.cn
|
||||||
|
swagger:
|
||||||
|
#是否打开swagger 测试及UAT配置为true,生产环境配置为false
|
||||||
|
enabled: true
|
||||||
|
base:
|
||||||
|
# base应用访问外网访问地址
|
||||||
|
host-url: http://10.43.12.158
|
||||||
|
desk:
|
||||||
|
# desk工程的外网地址
|
||||||
|
host-url: http://10.43.12.158
|
||||||
|
login:
|
||||||
|
# login工程的外网访问地址
|
||||||
|
host-url: http://10.43.12.158
|
||||||
|
|
||||||
|
#所有的前端域名配置 避免iframe跨域
|
||||||
|
x-frame-options: ${common.desk.host-url}/ ${common.login.host-url}/ ${common.base.host-url}/ ${common.gateway.network.http.external}/ http://10.43.250.65/
|
||||||
|
|
||||||
|
k8s:
|
||||||
|
namespace: test-dragon
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
# JOB 配置
|
||||||
|
xxl-job:
|
||||||
|
admin:
|
||||||
|
address: ${common.xxl-job.address}
|
||||||
|
username: ${common.xxl-job.username}
|
||||||
|
password: ${common.xxl-job.password}
|
||||||
|
executor:
|
||||||
|
app-name: ${spring.application.name}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
common:
|
||||||
|
log:
|
||||||
|
jjb-saas-system:
|
||||||
|
- com.jjb:info
|
||||||
|
jjb-saas-auth1:
|
||||||
|
- com.jjb:info
|
||||||
|
jjb-saas-user:
|
||||||
|
- com.jjb:info
|
||||||
|
gray:
|
||||||
|
log:
|
||||||
|
host: 192.168.1.1
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
mq:
|
||||||
|
topic: springcloudStream-jjb-dragon-test
|
||||||
|
server: ${common.mq.host}
|
||||||
|
spring:
|
||||||
|
cloud:
|
||||||
|
stream:
|
||||||
|
bindings:
|
||||||
|
input:
|
||||||
|
destination: springcloudStream-jjb-dragon-test
|
||||||
|
group: ${spring.application.name}-${spring.profiles.active}
|
||||||
|
output:
|
||||||
|
destination: springcloudStream-jjb-dragon-test
|
||||||
|
group: ${spring.application.name}-${spring.profiles.active}
|
||||||
|
rocketmq:
|
||||||
|
binder:
|
||||||
|
name-server: ${common.mq.host}
|
||||||
|
group: ${spring.application.name}-${spring.profiles.active}
|
||||||
|
bindings:
|
||||||
|
input:
|
||||||
|
consumer:
|
||||||
|
tags: a
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
mybatis-plus:
|
||||||
|
mapper-locations: classpath*:mapper/*.xml,classpath*:mapper/**/*Mapper.xml
|
||||||
|
type-handlers-package: com.jjb.saas.framework.datascope.handler
|
||||||
|
global-config:
|
||||||
|
banner: false
|
||||||
|
db-config:
|
||||||
|
id-type: assign_id
|
||||||
|
logic-delete-value: 1
|
||||||
|
logic-not-delete-value: 0
|
||||||
|
configuration:
|
||||||
|
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
mysql:
|
||||||
|
db: ${spring.application.name}
|
||||||
|
spring:
|
||||||
|
shardingsphere:
|
||||||
|
druid:
|
||||||
|
username: admin
|
||||||
|
password: jjb123456
|
||||||
|
allows:
|
||||||
|
denys:
|
||||||
|
props:
|
||||||
|
sql:
|
||||||
|
show: true
|
||||||
|
enabled: true
|
||||||
|
masterslave:
|
||||||
|
name: ms # 名字,任意,需要保证唯一
|
||||||
|
master-data-source-name: master # 主库数据源
|
||||||
|
slave-data-source-names: slave-1 # 从库数据源
|
||||||
|
datasource:
|
||||||
|
names: master,slave-1
|
||||||
|
master:
|
||||||
|
#url: jdbc:mysql://10.43.123.226:3306/${spring.application.name}?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||||
|
url: jdbc:mysql://${common.mysql.host}:${common.mysql.port}/${mysql.db}?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||||
|
username: ${common.mysql.username}
|
||||||
|
password: ${common.mysql.password}
|
||||||
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
initial-size: 6
|
||||||
|
min-idle: 4
|
||||||
|
maxActive: 40
|
||||||
|
# 配置获取连接等待超时的时间
|
||||||
|
maxWait: 60000
|
||||||
|
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||||
|
timeBetweenEvictionRunsMillis: 60000
|
||||||
|
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||||
|
minEvictableIdleTimeMillis: 300000
|
||||||
|
#Oracle需要打开注释
|
||||||
|
#validationQuery: SELECT 1 FROM DUAL
|
||||||
|
testWhileIdle: true
|
||||||
|
testOnBorrow: false
|
||||||
|
testOnReturn: false
|
||||||
|
# 打开PSCache,并且指定每个连接上PSCache的大小
|
||||||
|
poolPreparedStatements: true
|
||||||
|
maxPoolPreparedStatementPerConnectionSize: 20
|
||||||
|
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
|
||||||
|
filters: slf4j
|
||||||
|
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
||||||
|
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
|
||||||
|
wall:
|
||||||
|
multi-statement-allow: true
|
||||||
|
slave-1:
|
||||||
|
# url: jdbc:mysql://10.43.123.226:3306/${spring.application.name}?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||||
|
url: jdbc:mysql://${common.mysql.host}:${common.mysql.port}/${mysql.db}?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||||
|
username: ${common.mysql.username}
|
||||||
|
password: ${common.mysql.password}
|
||||||
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
initial-size: 6
|
||||||
|
min-idle: 4
|
||||||
|
maxActive: 20
|
||||||
|
# 配置获取连接等待超时的时间
|
||||||
|
maxWait: 60000
|
||||||
|
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||||
|
timeBetweenEvictionRunsMillis: 60000
|
||||||
|
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||||
|
minEvictableIdleTimeMillis: 300000
|
||||||
|
#Oracle需要打开注释
|
||||||
|
#validationQuery: SELECT 1 FROM DUAL
|
||||||
|
testWhileIdle: true
|
||||||
|
testOnBorrow: false
|
||||||
|
testOnReturn: false
|
||||||
|
# 打开PSCache,并且指定每个连接上PSCache的大小
|
||||||
|
poolPreparedStatements: true
|
||||||
|
maxPoolPreparedStatementPerConnectionSize: 20
|
||||||
|
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙,stat已去掉
|
||||||
|
filters: slf4j
|
||||||
|
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
||||||
|
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
|
||||||
|
wall:
|
||||||
|
multi-statement-allow: true
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
server:
|
||||||
|
port: 80
|
||||||
|
debug: true
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
spring:
|
||||||
|
redis:
|
||||||
|
host: ${common.redis.host}
|
||||||
|
password: ${common.redis.password}
|
||||||
|
port: ${common.redis.port}
|
||||||
|
timeout: 15000
|
||||||
|
database: 0
|
||||||
|
prefix: dragon
|
||||||
|
jedis:
|
||||||
|
pool:
|
||||||
|
max-active: 600
|
||||||
|
max-idle: 300
|
||||||
|
max-wait: 15000
|
||||||
|
min-idle: 10
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
sdk:
|
||||||
|
server:
|
||||||
|
symmetry-url: jjb-saas-application/application/applications/server/secure/
|
||||||
|
app-key: jjb-saas-dragon
|
||||||
|
client:
|
||||||
|
security:
|
||||||
|
gateway: ${gateway.network.http.external}
|
||||||
|
appKey: ${sdk.client.app-key}
|
||||||
|
desensitization:
|
||||||
|
symmetric-key: 1234567887654321
|
||||||
|
logging:
|
||||||
|
gateway: ${sdk.client.security.gateway}
|
||||||
|
appKey: ${sdk.client.security.app-key}
|
||||||
|
clientLoggingEnable: true
|
||||||
|
level: debug
|
||||||
|
username: user
|
||||||
|
password: 123456
|
||||||
|
showConsoleLog: true
|
||||||
|
formatConsoleLogJson: true
|
||||||
|
|
@ -0,0 +1,89 @@
|
||||||
|
spring:
|
||||||
|
zipkin:
|
||||||
|
#zipkin服务所在地址
|
||||||
|
base-url: http://jjb-saas-zipkin/
|
||||||
|
sender:
|
||||||
|
type: web #使用http的方式传输数据
|
||||||
|
#配置采样百分比
|
||||||
|
sleuth:
|
||||||
|
sampler:
|
||||||
|
probability: 1 # 将采样比例设置为 1.0,也就是全部都需要。默认是0.1也就是10%,一般情况下,10%就够用了
|
||||||
|
web:
|
||||||
|
resources:
|
||||||
|
cache:
|
||||||
|
cachecontrol:
|
||||||
|
no-store: false
|
||||||
|
max-age: 10000
|
||||||
|
no-cache: false
|
||||||
|
autoconfigure:
|
||||||
|
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
||||||
|
main:
|
||||||
|
allow-bean-definition-overriding: true
|
||||||
|
mvc:
|
||||||
|
pathmatch:
|
||||||
|
matching-strategy: ant_path_matcher
|
||||||
|
messages:
|
||||||
|
basename: i18n.message
|
||||||
|
encoding: UTF-8
|
||||||
|
flyway:
|
||||||
|
# 是否启用flyway
|
||||||
|
enabled: true
|
||||||
|
# 编码格式,默认UTF-8
|
||||||
|
encoding: UTF-8
|
||||||
|
# 迁移sql脚本文件存放路径,默认db/migration
|
||||||
|
locations: classpath:db/migration
|
||||||
|
# 迁移sql脚本文件名称的前缀,默认V
|
||||||
|
sql-migration-prefix: V
|
||||||
|
# 迁移sql脚本文件名称的分隔符,默认2个下划线__
|
||||||
|
sql-migration-separator: __
|
||||||
|
# 迁移sql脚本文件名称的后缀
|
||||||
|
sql-migration-suffixes: .sql
|
||||||
|
# 迁移时是否进行校验,默认true
|
||||||
|
validate-on-migrate: true
|
||||||
|
# 当迁移发现数据库非空且存在没有元数据的表时,自动执行基准迁移,新建schema_version表
|
||||||
|
baseline-on-migrate: true
|
||||||
|
server:
|
||||||
|
tomcat:
|
||||||
|
max-http-post-size: 200MB
|
||||||
|
connection-timeout: 180000
|
||||||
|
fastjson:
|
||||||
|
parser:
|
||||||
|
safeMode: true
|
||||||
|
mvc:
|
||||||
|
pathmatch:
|
||||||
|
matching-strategy: ANT_PATH_MATCHER
|
||||||
|
thymeleaf:
|
||||||
|
prefix: classpath:/templates/
|
||||||
|
cache: false
|
||||||
|
dubbo:
|
||||||
|
application:
|
||||||
|
name: ${spring.application.name}
|
||||||
|
registry:
|
||||||
|
timeout: 20000
|
||||||
|
address: nacos://${spring.cloud.nacos.config.server-addr}?namespace=${spring.cloud.nacos.config.namespace}-facade
|
||||||
|
check: false
|
||||||
|
filter: providerContextFilter
|
||||||
|
protocol:
|
||||||
|
port: -1
|
||||||
|
name: dubbo
|
||||||
|
consumer:
|
||||||
|
timeout: 20000
|
||||||
|
check: false
|
||||||
|
filter: consumerContextFilter
|
||||||
|
logging:
|
||||||
|
config: classpath:jjb-saas-logback-spring.xml
|
||||||
|
level:
|
||||||
|
com.alibaba.nacos.client.naming: OFF
|
||||||
|
com.alibaba.nacos.client.config.impl: OFF
|
||||||
|
com.alibaba.nacos.common.remote.client: OFF
|
||||||
|
|
||||||
|
datapermssion:
|
||||||
|
tenantcondition:
|
||||||
|
defaultversion: NEWERSION
|
||||||
|
|
||||||
|
easy-retry:
|
||||||
|
server:
|
||||||
|
host: http://jjb-saas-config
|
||||||
|
port: 1788
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
sdk:
|
||||||
|
client:
|
||||||
|
app-key: e6ab3c9abda747b39d7cc12b6dc0f5a0
|
||||||
|
gateway:
|
||||||
|
url: ${common.gateway.network.http.intranet}
|
||||||
|
swagger:
|
||||||
|
enabled: ${common.swagger.enabled}
|
||||||
|
title: 例子
|
||||||
|
description: 这是例子项目
|
||||||
|
version: ${application.version}
|
||||||
|
group-name: 例子
|
||||||
|
springfox:
|
||||||
|
documentation:
|
||||||
|
swagger-ui:
|
||||||
|
base-url: ${application.gateway}
|
||||||
|
swagger:
|
||||||
|
v2:
|
||||||
|
path: /${application.gateway}/v2/api-docs
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
sdk:
|
||||||
|
server:
|
||||||
|
app-key: 722091ff53dd4abba078c2a00efd4a42
|
||||||
|
client:
|
||||||
|
gateway:
|
||||||
|
url: ${common.gateway.network.http.external}
|
||||||
|
route:
|
||||||
|
- client:
|
||||||
|
system-code: ${application.name}
|
||||||
|
name: ${application.cn-name}-后端
|
||||||
|
group-code: public_api
|
||||||
|
service:
|
||||||
|
system-code: ${application.name}
|
||||||
|
name: ${application.cn-name}-后端
|
||||||
|
group-code: public_api
|
||||||
|
strip-prefix: 0
|
||||||
|
uri: lb://${application.name}
|
||||||
|
path: /${application.gateway}/**
|
||||||
|
- client:
|
||||||
|
system-code: ${application.name}-container
|
||||||
|
name: ${application.cn-name}-前端
|
||||||
|
group-code: public_api
|
||||||
|
service:
|
||||||
|
system-code: ${application.name}-container
|
||||||
|
name: ${application.cn-name}-前端
|
||||||
|
group-code: public_api
|
||||||
|
strip-prefix: 0
|
||||||
|
uri: lb://jjb-saas-base
|
||||||
|
path: /${application.gateway}/container/**
|
||||||
|
order: -2
|
||||||
|
openapi:
|
||||||
|
appId: 1871106785124999168
|
||||||
|
appKey: 7314ecfc11ff4d5fad1ac19284ed2ac3
|
||||||
|
appSecret: 7565ab15-a2ae-4830-9b4d-fb382cd5fb30
|
||||||
|
appPublicKey: 3059301306072a8648ce3d020106082a811ccf5501822d03420004f339671110a06681fcfd968ad9247bd3cd0d2ec6b2159d1d4b775e7ed5566b3297d82cf14b626ef11fdd6bc7ecb6bcfb3ea94ccd1f381f4116f43367be4b360f
|
||||||
|
appPrivateKey: 308193020100301306072a8648ce3d020106082a811ccf5501822d0479307702010104206b6abc8e717b7d042f1e8531190a7c18113e4a701417f2770d2150d33ba97779a00a06082a811ccf5501822da14403420004f339671110a06681fcfd968ad9247bd3cd0d2ec6b2159d1d4b775e7ed5566b3297d82cf14b626ef11fdd6bc7ecb6bcfb3ea94ccd1f381f4116f43367be4b360f
|
||||||
|
encryptType: SM2
|
||||||
|
platform:
|
||||||
|
- name: default
|
||||||
|
openPublicKey: 3059301306072a8648ce3d020106082a811ccf5501822d034200045b5d8fcad91e113910406db4caf0f5c6688048e0f46742d55f872a25855316803ddb177cc9bb5906ff0b2ad4d6b1f1378a49109104613e79b5b5512e3710e88f
|
||||||
|
url: ${common.gateway.network.http.intranet}
|
||||||
|
protocol: HTTP
|
||||||
|
defaultPlatform: true
|
||||||
|
##ciphertext plaintext
|
||||||
|
type: plaintext
|
||||||
|
apiPlatform:
|
||||||
|
- name: default
|
||||||
|
#多个可以逗号隔开
|
||||||
|
apiCode: test:01
|
||||||
|
#多个可以逗号隔开,可以为空
|
||||||
|
tenantIds: 1838408702262321152
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
swagger:
|
||||||
|
enabled: ${common.swagger.enabled}
|
||||||
|
title: ${application.cn-name}
|
||||||
|
description: ${application.cn-name},一切皆有可能
|
||||||
|
version: 1.0.0
|
||||||
|
group-name: ${application.cn-name}
|
||||||
|
springfox:
|
||||||
|
documentation:
|
||||||
|
swagger-ui:
|
||||||
|
base-url: ${application.gateway}
|
||||||
|
swagger:
|
||||||
|
v2:
|
||||||
|
path: /${application.gateway}/v2/api-docs
|
||||||
|
open-doc:
|
||||||
|
brief-introduction-url: https://ipaas-gateway.cqjjb.cn/document-foreground/container/document/detail?siteId=1729854594279215106&docTypeId=1744908406080786434&dirId=1745034145606258688
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
<!doctype html><html lang="zh"><head data-built-info="@cqsjjb/scripts@2.0.0-alpha-1 Env/production (2025/10/17 11:07:53) App/risk"><meta charset="UTF-8"/><meta name="renderer" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/><meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"><title>--</title><script>(function () {
|
||||||
|
const APP_ENV = {
|
||||||
|
antd: {
|
||||||
|
'ant-prefix': 'micro-temp',
|
||||||
|
fontFamily: 'PingFangSC-Regular',
|
||||||
|
colorPrimary: '#1677ff',
|
||||||
|
borderRadius: parseInt('2')
|
||||||
|
},
|
||||||
|
appKey: '',
|
||||||
|
basename: 'risk',
|
||||||
|
API_HOST: ''
|
||||||
|
};
|
||||||
|
APP_ENV.API_HOST = sessionStorage.API_HOST || APP_ENV.API_HOST || window.location.origin;
|
||||||
|
window.process = {
|
||||||
|
env: { app: APP_ENV },
|
||||||
|
NODE_ENV: 'production'
|
||||||
|
};
|
||||||
|
window.__JJB_ENVIRONMENT__ = {
|
||||||
|
API_HOST: APP_ENV.API_HOST,
|
||||||
|
redirect: '',
|
||||||
|
FRAMEWORK: APP_ENV.antd
|
||||||
|
};
|
||||||
|
})();</script><script defer="defer" src="/risk/static/js/295.21df88c875577274cecb.js"></script><script defer="defer" src="/risk/static/js/main.4c0885586ad9a06ab444.js"></script><link href="/risk/static/css/main.40fc518bb0818fe8b8ea.css" rel="stylesheet"></head><body style="overflow: hidden"><noscript>此网页需要开启JavaScript功能。</noscript><div id="root" style="width: 100%; height: 100%; position: relative"></div><script type="text/javascript">/* @cqsjjb/script 输出当前应用基本信息、构建时间 */console.log("%c@cqsjjb/scripts@2.0.0-alpha-1 Env/production (2025/10/17 11:07:53) App/risk Version/master Java/<branch-name>", "color: #1890ff; border-radius: 2px; padding: 0 4px; border: 1px solid #1890ff; background: #f9fcff")</script></body></html>
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
body,html{height:100%;width:100%}input::-ms-clear,input::-ms-reveal{display:none}*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}@-ms-viewport{width:device-width}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{font-weight:500;margin-bottom:.5em;margin-top:0}p{margin-bottom:1em;margin-top:0}abbr[data-original-title],abbr[title]{border-bottom:0;cursor:help;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}address{font-style:normal;line-height:inherit;margin-bottom:1em}input[type=number],input[type=password],input[type=text],textarea{-webkit-appearance:none}dl,ol,ul{margin-bottom:1em;margin-top:0}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}code,kbd,pre,samp{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:1em}pre{margin-bottom:1em;margin-top:0;overflow:auto}figure{margin:0 0 1em}img{border-style:none;vertical-align:middle}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{caption-side:bottom;padding-bottom:.3em;padding-top:.75em;text-align:left}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{border:0;margin:0;min-width:0;padding:0}legend{color:inherit;display:block;font-size:1.5em;line-height:inherit;margin-bottom:.5em;max-width:100%;padding:0;white-space:normal;width:100%}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:none;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{background-color:#feffe6;padding:.2em}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
module.exports={compact:!1,plugins:[["@babel/plugin-proposal-decorators",{legacy:!0}]],presets:[["@babel/preset-env",{targets:{browsers:["ie >= 10"]}}],["@babel/preset-react",{runtime:"automatic"}]]};
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
module.exports={javaGit:"<git-url>",javaGitName:"<git-name>",environment:{development:{javaGitBranch:"<branch-name>",API_HOST:"http://192.168.20.100:30140/demo2"},production:{javaGitBranch:"<branch-name>",API_HOST:""}},appIdentifier:"risk",contextInject:{appKey:""},windowInject:{title:"微应用模板",links:[],element:{root:{id:"root"}},scripts:[]},server:{port:"8080",host:"127.0.0.1",open:!0},framework:{antd:{"ant-prefix":"micro-temp",fontFamily:"PingFangSC-Regular",colorPrimary:"#1677ff",borderRadius:2}},webpackConfig:{htmlWebpackPluginOption:{inject:!0}}};
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,135 @@
|
||||||
|
/*!
|
||||||
|
Copyright (c) 2018 Jed Watson.
|
||||||
|
Licensed under the MIT License (MIT), see
|
||||||
|
http://jedwatson.github.io/classnames
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||||||
|
*
|
||||||
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* isobject <https://github.com/jonschlinkert/isobject>
|
||||||
|
*
|
||||||
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @license React
|
||||||
|
* react-dom.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @license React
|
||||||
|
* react-is.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @license React
|
||||||
|
* react-jsx-runtime.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @license React
|
||||||
|
* react.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @license React
|
||||||
|
* scheduler.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @license React v16.13.1
|
||||||
|
* react-is.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @license React v17.0.2
|
||||||
|
* react-is.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @preserve
|
||||||
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
||||||
|
* derived from CryptoJS.mode.CTR
|
||||||
|
* Jan Hruby jhruby.web@gmail.com
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @preserve
|
||||||
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
||||||
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||||
|
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||||
|
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** */
|
||||||
|
|
||||||
|
/** */
|
||||||
|
|
||||||
|
/** */
|
||||||
|
|
||||||
|
/** */
|
||||||
|
|
||||||
|
/** */
|
||||||
|
|
||||||
|
/** */
|
||||||
|
|
||||||
|
/** */
|
||||||
|
|
||||||
|
/** */
|
||||||
|
|
||||||
|
/** */
|
||||||
|
|
||||||
|
/** */
|
||||||
|
|
||||||
|
/** */
|
||||||
|
|
||||||
|
/** */
|
||||||
|
|
||||||
|
/** */
|
||||||
|
|
||||||
|
/** */
|
||||||
|
|
||||||
|
/** */
|
||||||
|
|
||||||
|
/** */
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
||||||
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
{
|
||||||
|
"name": "micro-app",
|
||||||
|
"version": "2.0.0",
|
||||||
|
"description": "建教帮微应用模板",
|
||||||
|
"author": "JJB",
|
||||||
|
"license": "MIT",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"serve": "node node_modules/@cqsjjb/scripts/webpack.dev.server.js",
|
||||||
|
"build": "node node_modules/@cqsjjb/scripts/webpack.build.js",
|
||||||
|
"push": "jjb-cmd push java production",
|
||||||
|
"clean-cache": "rimraf node_modules/.cache/webpack",
|
||||||
|
"serve:development": "cross-env NODE_ENV=development npm run serve",
|
||||||
|
"serve:production": "cross-env NODE_ENV=production npm run serve",
|
||||||
|
"build:development": "cross-env NODE_ENV=development npm run build",
|
||||||
|
"build:production": "cross-env NODE_ENV=production npm run build",
|
||||||
|
"code-optimization": "node node_modules/@cqsjjb/scripts/code-optimization.js",
|
||||||
|
"lint": "eslint --ext .js,.jsx,.tsx --fix src"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@ant-design/icons": "latest",
|
||||||
|
"@cqsjjb/jjb-common-decorator": "latest",
|
||||||
|
"@cqsjjb/jjb-common-lib": "latest",
|
||||||
|
"@cqsjjb/jjb-dva-runtime": "latest",
|
||||||
|
"@cqsjjb/jjb-react-admin-component": "latest",
|
||||||
|
"ahooks": "^3.9.5",
|
||||||
|
"antd": "latest",
|
||||||
|
"dayjs": "^1.11.7",
|
||||||
|
"react": "^18.2.0",
|
||||||
|
"react-dom": "^18.2.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@antfu/eslint-config": "^5.4.1",
|
||||||
|
"@babel/plugin-proposal-decorators": "^7.19.3",
|
||||||
|
"@cqsjjb/scripts": "latest",
|
||||||
|
"@eslint-react/eslint-plugin": "^2.2.2",
|
||||||
|
"cross-env": "^7.0.3",
|
||||||
|
"eslint": "^9.37.0",
|
||||||
|
"eslint-plugin-format": "^1.0.2",
|
||||||
|
"eslint-plugin-react-hooks": "^7.0.0",
|
||||||
|
"eslint-plugin-react-refresh": "^0.4.23",
|
||||||
|
"typescript": "^5.9.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?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/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>zcloud-gbs-firefighting</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>web-adapter</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>web-adapter</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jjb.saas</groupId>
|
||||||
|
<artifactId>jjb-saas-framework-adapter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>web-app</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>web-client</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
package com.zcloud.firefighting.web;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import com.zcloud.firefighting.api.FireresourcesServiceI;
|
||||||
|
import com.zcloud.firefighting.dto.FireresourcesAddCmd;
|
||||||
|
import com.zcloud.firefighting.dto.FireresourcesCountQry;
|
||||||
|
import com.zcloud.firefighting.dto.FireresourcesPageQry;
|
||||||
|
import com.zcloud.firefighting.dto.FireresourcesUpdateCmd;
|
||||||
|
import com.zcloud.firefighting.dto.clientobject.FireresourcesCO;
|
||||||
|
import com.alibaba.cola.dto.MultiResponse;
|
||||||
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
|
import com.alibaba.cola.dto.Response;
|
||||||
|
import com.alibaba.cola.dto.SingleResponse;
|
||||||
|
import com.jjb.saas.framework.auth.model.SSOUser;
|
||||||
|
import com.jjb.saas.framework.auth.utils.AuthContext;
|
||||||
|
import com.zcloud.firefighting.dto.clientobject.FireresourcesCountStatCO;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-adapter
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:28:59
|
||||||
|
*/
|
||||||
|
@Api(tags = "消防资源")
|
||||||
|
@RequestMapping("/${application.gateway}/fireresources")
|
||||||
|
@RestController
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class FireresourcesController {
|
||||||
|
private final FireresourcesServiceI fireresourcesService;
|
||||||
|
|
||||||
|
@ApiOperation("新增")
|
||||||
|
@PostMapping("/save")
|
||||||
|
public SingleResponse<FireresourcesCO> add(@Validated @RequestBody FireresourcesAddCmd cmd) {
|
||||||
|
if(ObjectUtil.isEmpty(cmd.getCorpinfoId())){
|
||||||
|
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||||
|
cmd.setCorpinfoId(ssoUser.getTenantId());
|
||||||
|
cmd.setCorpinfoName(ssoUser.getTenantName());
|
||||||
|
}
|
||||||
|
return fireresourcesService.add(cmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("分页")
|
||||||
|
@PostMapping("/list")
|
||||||
|
public PageResponse<FireresourcesCO> page(@RequestBody FireresourcesPageQry qry) {
|
||||||
|
if(ObjectUtil.isEmpty(qry.getEqCorpinfoId())){
|
||||||
|
SSOUser ssoUser = AuthContext.getCurrentUser();
|
||||||
|
qry.setEqCorpinfoId(ssoUser.getTenantId());
|
||||||
|
}
|
||||||
|
return fireresourcesService.listPage(qry);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("所有数据")
|
||||||
|
@GetMapping("/listAll")
|
||||||
|
public MultiResponse<FireresourcesCO> listAll() {
|
||||||
|
return MultiResponse.of(new ArrayList<FireresourcesCO>());
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("详情")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public SingleResponse<FireresourcesCO> getInfoById(@PathVariable("id") Long id) {
|
||||||
|
return SingleResponse.of(fireresourcesService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除")
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public Response remove(@PathVariable("id") Long id) {
|
||||||
|
fireresourcesService.remove(id);
|
||||||
|
return SingleResponse.buildSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除多个")
|
||||||
|
@DeleteMapping("/ids")
|
||||||
|
public Response removeBatch(@RequestParam Long[] ids) {
|
||||||
|
fireresourcesService.removeBatch(ids);
|
||||||
|
return SingleResponse.buildSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改")
|
||||||
|
@PutMapping("/edit")
|
||||||
|
public SingleResponse edit(@Validated @RequestBody FireresourcesUpdateCmd fireresourcesUpdateCmd) {
|
||||||
|
fireresourcesService.edit(fireresourcesUpdateCmd);
|
||||||
|
return SingleResponse.buildSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("按照公司和类型统计个数")
|
||||||
|
@PostMapping("/countByCorpinfoAndType")
|
||||||
|
public MultiResponse<FireresourcesCountStatCO> countByCorpinfoIdAndType(@RequestBody FireresourcesCountQry fireresourcesCountQry) {
|
||||||
|
return fireresourcesService.countByCorpinfoIdAndType(fireresourcesCountQry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?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/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>zcloud-gbs-firefighting</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>web-app</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>web-app</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>web-client</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>web-infrastructure</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.zcloud.firefighting.command;
|
||||||
|
|
||||||
|
import com.zcloud.firefighting.domain.gateway.FireresourcesGateway;
|
||||||
|
import com.zcloud.firefighting.domain.model.FireresourcesE;
|
||||||
|
import com.zcloud.firefighting.dto.FireresourcesAddCmd;
|
||||||
|
import com.alibaba.cola.exception.BizException;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-app
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:28:59
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class FireresourcesAddExe {
|
||||||
|
private final FireresourcesGateway fireresourcesGateway;
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean execute(FireresourcesAddCmd cmd) {
|
||||||
|
FireresourcesE fireresourcesE = new FireresourcesE();
|
||||||
|
BeanUtils.copyProperties(cmd, fireresourcesE);
|
||||||
|
boolean res = false;
|
||||||
|
try {
|
||||||
|
res = fireresourcesGateway.add(fireresourcesE);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
if (!res) {
|
||||||
|
throw new BizException("保存失败");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.zcloud.firefighting.command;
|
||||||
|
|
||||||
|
import com.zcloud.firefighting.domain.gateway.FireresourcesGateway;
|
||||||
|
import com.alibaba.cola.exception.BizException;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-app
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:28:59
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class FireresourcesRemoveExe {
|
||||||
|
private final FireresourcesGateway fireresourcesGateway;
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean execute(Long id) {
|
||||||
|
boolean res = fireresourcesGateway.deletedFireresourcesById(id);
|
||||||
|
if (!res) {
|
||||||
|
throw new BizException("删除失败");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public boolean execute(Long[] ids) {
|
||||||
|
boolean res = fireresourcesGateway.deletedFireresourcesByIds(ids);
|
||||||
|
if (!res) {
|
||||||
|
throw new BizException("删除失败");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.zcloud.firefighting.command;
|
||||||
|
|
||||||
|
import com.alibaba.cola.exception.BizException;
|
||||||
|
import com.zcloud.firefighting.domain.gateway.FireresourcesGateway;
|
||||||
|
import com.zcloud.firefighting.domain.model.FireresourcesE;
|
||||||
|
import com.zcloud.firefighting.dto.FireresourcesUpdateCmd;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-app
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:29:00
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class FireresourcesUpdateExe {
|
||||||
|
private final FireresourcesGateway fireresourcesGateway;
|
||||||
|
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void execute(FireresourcesUpdateCmd fireresourcesUpdateCmd) {
|
||||||
|
FireresourcesE fireresourcesE = new FireresourcesE();
|
||||||
|
BeanUtils.copyProperties(fireresourcesUpdateCmd, fireresourcesE);
|
||||||
|
boolean res = fireresourcesGateway.update(fireresourcesE);
|
||||||
|
if (!res) {
|
||||||
|
throw new BizException("修改失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.zcloud.firefighting.command.convertor;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.zcloud.firefighting.dto.clientobject.FireresourcesCO;
|
||||||
|
import com.zcloud.firefighting.persistence.dataobject.FireresourcesDO;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.Mapping;
|
||||||
|
import org.mapstruct.Named;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-app
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:28:59
|
||||||
|
*/
|
||||||
|
@Mapper(componentModel = "spring")
|
||||||
|
public interface FireresourcesCoConvertor {
|
||||||
|
/**
|
||||||
|
* @param fireresourcesDOs
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping(source = "details", target = "details", qualifiedByName = "stringToJsonObject")
|
||||||
|
List<FireresourcesCO> converDOsToCOs(List<FireresourcesDO> fireresourcesDOs);
|
||||||
|
|
||||||
|
@Mapping(source = "details", target = "details", qualifiedByName = "stringToJsonObject")
|
||||||
|
FireresourcesCO converDOToCO(FireresourcesDO fireresourcesDO);
|
||||||
|
|
||||||
|
@Named("stringToJsonObject")
|
||||||
|
default JSONObject stringToJsonObject(String value) {
|
||||||
|
if (value == null || value.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return JSON.parseObject(value);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* JSONObject 到 String 的转换方法
|
||||||
|
* @param value
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Named("jsonObjectToString")
|
||||||
|
default String jsonObjectToString(JSONObject value) {
|
||||||
|
if (value == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return value.toJSONString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.zcloud.firefighting.command.convertor;
|
||||||
|
|
||||||
|
import com.zcloud.firefighting.domain.model.FireresourcesCountStat;
|
||||||
|
import com.zcloud.firefighting.dto.clientobject.FireresourcesCountStatCO;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事故统计结果转换器
|
||||||
|
* 用于在领域模型和DTO之间进行转换
|
||||||
|
*
|
||||||
|
* @Author
|
||||||
|
* @Date
|
||||||
|
*/
|
||||||
|
@Mapper(componentModel = "spring")
|
||||||
|
public interface FireresourcesCountStatConvertor {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将领域模型转换为DTO
|
||||||
|
* @param fireresourcesCountStat 领域模型
|
||||||
|
* @return DTO对象
|
||||||
|
*/
|
||||||
|
FireresourcesCountStatCO convertToCO(FireresourcesCountStat fireresourcesCountStat);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将领域模型列表转换为DTO列表
|
||||||
|
* @param fireresourcesCountStats 领域模型列表
|
||||||
|
* @return DTO对象列表
|
||||||
|
*/
|
||||||
|
List<FireresourcesCountStatCO> convertToCOList(List<FireresourcesCountStat> fireresourcesCountStats);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
package com.zcloud.firefighting.command.query;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.MultiResponse;
|
||||||
|
import com.zcloud.firefighting.command.convertor.FireresourcesCoConvertor;
|
||||||
|
import com.zcloud.firefighting.command.convertor.FireresourcesCountStatConvertor;
|
||||||
|
import com.zcloud.firefighting.domain.gateway.FireresourcesGateway;
|
||||||
|
import com.zcloud.firefighting.dto.FireresourcesCountQry;
|
||||||
|
import com.zcloud.firefighting.dto.FireresourcesPageQry;
|
||||||
|
import com.zcloud.firefighting.dto.clientobject.FireresourcesCO;
|
||||||
|
import com.zcloud.firefighting.dto.clientobject.FireresourcesCountStatCO;
|
||||||
|
import com.zcloud.firefighting.persistence.dataobject.FireresourcesDO;
|
||||||
|
import com.zcloud.firefighting.persistence.repository.FireresourcesRepository;
|
||||||
|
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||||
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-app
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:28:59
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class FireresourcesQueryExe {
|
||||||
|
private final FireresourcesRepository fireresourcesRepository;
|
||||||
|
private final FireresourcesCoConvertor fireresourcesCoConvertor;
|
||||||
|
private final FireresourcesGateway fireresourcesGateway;
|
||||||
|
private final FireresourcesCountStatConvertor fireresourcesCountStatConvertor;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public FireresourcesCO queryById(Long id) {
|
||||||
|
return fireresourcesCoConvertor.converDOToCO(fireresourcesRepository.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页
|
||||||
|
*
|
||||||
|
* @param fireresourcesPageQry
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public PageResponse<FireresourcesCO> execute(FireresourcesPageQry fireresourcesPageQry) {
|
||||||
|
Map<String, Object> params = PageQueryHelper.toHashMap(fireresourcesPageQry);
|
||||||
|
PageResponse<FireresourcesDO> pageResponse = fireresourcesRepository.listPage(params);
|
||||||
|
List<FireresourcesCO> examCenterCOS = fireresourcesCoConvertor.converDOsToCOs(pageResponse.getData());
|
||||||
|
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
|
||||||
|
}
|
||||||
|
|
||||||
|
public MultiResponse<FireresourcesCountStatCO> countByCorpinfoIdAndIncidentType(FireresourcesCountQry fireresourcesCountQry) {
|
||||||
|
List<com.zcloud.firefighting.domain.model.FireresourcesCountStat> resultList = fireresourcesGateway.countByCorpinfoIdAndType(fireresourcesCountQry.getCorpinfoIds());
|
||||||
|
List<FireresourcesCountStatCO> coList = fireresourcesCountStatConvertor.convertToCOList(resultList);
|
||||||
|
return MultiResponse.of(coList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
package com.zcloud.firefighting.service;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.MultiResponse;
|
||||||
|
import com.zcloud.firefighting.api.FireresourcesServiceI;
|
||||||
|
import com.zcloud.firefighting.command.FireresourcesAddExe;
|
||||||
|
import com.zcloud.firefighting.command.FireresourcesRemoveExe;
|
||||||
|
import com.zcloud.firefighting.command.FireresourcesUpdateExe;
|
||||||
|
import com.zcloud.firefighting.command.query.FireresourcesQueryExe;
|
||||||
|
import com.zcloud.firefighting.dto.FireresourcesAddCmd;
|
||||||
|
import com.zcloud.firefighting.dto.FireresourcesCountQry;
|
||||||
|
import com.zcloud.firefighting.dto.FireresourcesPageQry;
|
||||||
|
import com.zcloud.firefighting.dto.FireresourcesUpdateCmd;
|
||||||
|
import com.zcloud.firefighting.dto.clientobject.FireresourcesCO;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
|
import com.alibaba.cola.dto.SingleResponse;
|
||||||
|
import com.zcloud.firefighting.dto.clientobject.FireresourcesCountStatCO;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-app
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:29:00
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class FireresourcesServiceImpl implements FireresourcesServiceI {
|
||||||
|
private final FireresourcesAddExe fireresourcesAddExe;
|
||||||
|
private final FireresourcesUpdateExe fireresourcesUpdateExe;
|
||||||
|
private final FireresourcesRemoveExe fireresourcesRemoveExe;
|
||||||
|
private final FireresourcesQueryExe fireresourcesQueryExe;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FireresourcesCO queryById(Long id) {
|
||||||
|
return fireresourcesQueryExe.queryById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResponse<FireresourcesCO> listPage(FireresourcesPageQry qry) {
|
||||||
|
|
||||||
|
return fireresourcesQueryExe.execute(qry);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SingleResponse add(FireresourcesAddCmd cmd) {
|
||||||
|
|
||||||
|
fireresourcesAddExe.execute(cmd);
|
||||||
|
return SingleResponse.buildSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void edit(FireresourcesUpdateCmd fireresourcesUpdateCmd) {
|
||||||
|
fireresourcesUpdateExe.execute(fireresourcesUpdateCmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void remove(Long id) {
|
||||||
|
fireresourcesRemoveExe.execute(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeBatch(Long[] ids) {
|
||||||
|
fireresourcesRemoveExe.execute(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MultiResponse<FireresourcesCountStatCO> countByCorpinfoIdAndType(FireresourcesCountQry fireresourcesCountQry){
|
||||||
|
return fireresourcesQueryExe.countByCorpinfoIdAndIncidentType(fireresourcesCountQry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
<?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/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>zcloud-gbs-firefighting</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>web-client</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>web-client</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>web-domain</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jjb.saas</groupId>
|
||||||
|
<artifactId>jjb-saas-application-client</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jjb.saas</groupId>
|
||||||
|
<artifactId>jjb-saas-system-client</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jjb.saas</groupId>
|
||||||
|
<artifactId>jjb-saas-framework-enums</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jjb.saas</groupId>
|
||||||
|
<artifactId>jjb-saas-open-platform-sdk</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jjb.saas</groupId>
|
||||||
|
<artifactId>jjb-saas-framework-client</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.swagger</groupId>
|
||||||
|
<artifactId>swagger-annotations</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.validation</groupId>
|
||||||
|
<artifactId>validation-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.zcloud.firefighting.api;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.MultiResponse;
|
||||||
|
import com.zcloud.firefighting.dto.FireresourcesAddCmd;
|
||||||
|
import com.zcloud.firefighting.dto.FireresourcesCountQry;
|
||||||
|
import com.zcloud.firefighting.dto.FireresourcesPageQry;
|
||||||
|
import com.zcloud.firefighting.dto.FireresourcesUpdateCmd;
|
||||||
|
import com.zcloud.firefighting.dto.clientobject.FireresourcesCO;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
|
import com.alibaba.cola.dto.SingleResponse;
|
||||||
|
import com.zcloud.firefighting.dto.clientobject.FireresourcesCountStatCO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:29:00
|
||||||
|
*/
|
||||||
|
public interface FireresourcesServiceI {
|
||||||
|
FireresourcesCO queryById(Long id);
|
||||||
|
|
||||||
|
PageResponse<FireresourcesCO> listPage(FireresourcesPageQry qry);
|
||||||
|
|
||||||
|
SingleResponse<FireresourcesCO> add(FireresourcesAddCmd cmd);
|
||||||
|
|
||||||
|
void edit(FireresourcesUpdateCmd cmd);
|
||||||
|
|
||||||
|
void remove(Long id);
|
||||||
|
|
||||||
|
void removeBatch(Long[] ids);
|
||||||
|
|
||||||
|
MultiResponse<FireresourcesCountStatCO> countByCorpinfoIdAndType(FireresourcesCountQry fireresourcesCountQry);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.zcloud.firefighting.dto;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.Command;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:28:59
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class FireresourcesAddCmd extends Command {
|
||||||
|
@ApiModelProperty(value = "业务主键id", name = "fireresourcesId", required = true)
|
||||||
|
private String fireresourcesId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "企业", name = "corpinfoId", required = true)
|
||||||
|
private Long corpinfoId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "企业", name = "corpinfoName", required = true)
|
||||||
|
private String corpinfoName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "名称", name = "fireresourcesName", required = true)
|
||||||
|
@NotEmpty(message = "名称不能为空")
|
||||||
|
private String fireresourcesName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "类型", name = "fireresourcesType", required = true)
|
||||||
|
@NotEmpty(message = "类型不能为空")
|
||||||
|
private String fireresourcesType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "状态0正常1异常", name = "state", required = true)
|
||||||
|
@NotNull(message = "状态0正常1异常不能为空")
|
||||||
|
private Integer state;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "经度", name = "longitude", required = true)
|
||||||
|
@NotEmpty(message = "经度不能为空")
|
||||||
|
private String longitude;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "纬度", name = "latitude", required = true)
|
||||||
|
@NotEmpty(message = "纬度不能为空")
|
||||||
|
private String latitude;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "其他信息", name = "details", required = true)
|
||||||
|
@NotEmpty(message = "其他信息不能为空")
|
||||||
|
private JSONObject details;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.zcloud.firefighting.dto;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.Query;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author fangjiakai
|
||||||
|
* @date 2025/11/19 13:40
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FireresourcesCountQry extends Query {
|
||||||
|
@ApiModelProperty(value = "公司ID列表")
|
||||||
|
private List<String> corpinfoIds;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.zcloud.firefighting.dto;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.PageQuery;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:28:59
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FireresourcesPageQry extends PageQuery {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询条件操作前缀,支持以下几种数据库查询操作:
|
||||||
|
* - `like`: 模糊匹配查询,对应SQL的LIKE操作符
|
||||||
|
* - `eq`: 等值查询,对应SQL的=操作符
|
||||||
|
* - `gt`: 大于比较查询
|
||||||
|
* - `lt`: 小于比较查询
|
||||||
|
* - `ge`: 大于等于比较查询
|
||||||
|
* - `le`: 小于等于比较查询
|
||||||
|
* - `ne`: 不等比较查询,对应SQL的!=操作符
|
||||||
|
*/
|
||||||
|
private Long eqCorpinfoId;
|
||||||
|
private String likeFireresourcesName;
|
||||||
|
private String eqFireresourcesType;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.zcloud.firefighting.dto;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.Command;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:29:00
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class FireresourcesUpdateCmd extends Command {
|
||||||
|
@ApiModelProperty(value = "主键", name = "id", required = true)
|
||||||
|
@NotNull(message = "主键不能为空")
|
||||||
|
private Long id;
|
||||||
|
@ApiModelProperty(value = "业务主键id", name = "fireresourcesId", required = true)
|
||||||
|
@NotEmpty(message = "业务主键id不能为空")
|
||||||
|
private String fireresourcesId;
|
||||||
|
@ApiModelProperty(value = "企业", name = "corpinfoId", required = true)
|
||||||
|
@NotNull(message = "企业不能为空")
|
||||||
|
private Long corpinfoId;
|
||||||
|
@ApiModelProperty(value = "企业", name = "corpinfoName", required = true)
|
||||||
|
@NotEmpty(message = "企业不能为空")
|
||||||
|
private String corpinfoName;
|
||||||
|
@ApiModelProperty(value = "名称", name = "fireresourcesName", required = true)
|
||||||
|
@NotEmpty(message = "名称不能为空")
|
||||||
|
private String fireresourcesName;
|
||||||
|
@ApiModelProperty(value = "类型", name = "fireresourcesType", required = true)
|
||||||
|
@NotEmpty(message = "类型不能为空")
|
||||||
|
private String fireresourcesType;
|
||||||
|
@ApiModelProperty(value = "状态0正常1异常", name = "state", required = true)
|
||||||
|
@NotNull(message = "状态0正常1异常不能为空")
|
||||||
|
private Integer state;
|
||||||
|
@ApiModelProperty(value = "经度", name = "longitude", required = true)
|
||||||
|
@NotEmpty(message = "经度不能为空")
|
||||||
|
private String longitude;
|
||||||
|
@ApiModelProperty(value = "纬度", name = "latitude", required = true)
|
||||||
|
@NotEmpty(message = "纬度不能为空")
|
||||||
|
private String latitude;
|
||||||
|
@ApiModelProperty(value = "其他信息", name = "details", required = true)
|
||||||
|
@NotEmpty(message = "其他信息不能为空")
|
||||||
|
private JSONObject details;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
package com.zcloud.firefighting.dto.clientobject;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.ClientObject;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-client
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:28:59
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FireresourcesCO extends ClientObject {
|
||||||
|
//主键
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private Long id;
|
||||||
|
//业务主键id
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "业务主键id")
|
||||||
|
private String fireresourcesId;
|
||||||
|
//企业
|
||||||
|
@ApiModelProperty(value = "企业")
|
||||||
|
private Long corpinfoId;
|
||||||
|
//企业
|
||||||
|
@ApiModelProperty(value = "企业")
|
||||||
|
private String corpinfoName;
|
||||||
|
//名称
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
private String fireresourcesName;
|
||||||
|
//类型
|
||||||
|
@ApiModelProperty(value = "类型")
|
||||||
|
private String fireresourcesType;
|
||||||
|
//状态0正常1异常
|
||||||
|
@ApiModelProperty(value = "状态0正常1异常")
|
||||||
|
private Integer state;
|
||||||
|
//经度
|
||||||
|
@ApiModelProperty(value = "经度")
|
||||||
|
private String longitude;
|
||||||
|
//纬度
|
||||||
|
@ApiModelProperty(value = "纬度")
|
||||||
|
private String latitude;
|
||||||
|
//其他信息
|
||||||
|
@ApiModelProperty(value = "其他信息")
|
||||||
|
private JSONObject details;
|
||||||
|
//删除标识true false
|
||||||
|
@ApiModelProperty(value = "删除标识true false")
|
||||||
|
private String deleteEnum;
|
||||||
|
//备注
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String remarks;
|
||||||
|
//创建人姓名
|
||||||
|
@ApiModelProperty(value = "创建人姓名")
|
||||||
|
private String createName;
|
||||||
|
//更新人姓名
|
||||||
|
@ApiModelProperty(value = "更新人姓名")
|
||||||
|
private String updateName;
|
||||||
|
//租户id
|
||||||
|
@ApiModelProperty(value = "租户id")
|
||||||
|
private Long tenantId;
|
||||||
|
//单位id
|
||||||
|
@ApiModelProperty(value = "单位id")
|
||||||
|
private Long orgId;
|
||||||
|
//版本
|
||||||
|
@ApiModelProperty(value = "版本")
|
||||||
|
private String version;
|
||||||
|
//创建时间
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private String createTime;
|
||||||
|
//修改时间
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private String updateTime;
|
||||||
|
//创建人id
|
||||||
|
@ApiModelProperty(value = "创建人id")
|
||||||
|
private Long createId;
|
||||||
|
//修改人id
|
||||||
|
@ApiModelProperty(value = "修改人id")
|
||||||
|
private Long updateId;
|
||||||
|
private String env;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.zcloud.firefighting.dto.clientobject;
|
||||||
|
|
||||||
|
import com.alibaba.cola.dto.ClientObject;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author fangjiakai
|
||||||
|
* @date 2025/11/19 13:41
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class FireresourcesCountStatCO extends ClientObject {
|
||||||
|
@ApiModelProperty(value = "公司ID")
|
||||||
|
private Long corpinfoId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "类型")
|
||||||
|
private String fireresourcesType;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "统计数量")
|
||||||
|
private Long count;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?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/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>zcloud-gbs-firefighting</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>web-domain</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>web-domain</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!-- COLA Framework -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jjb.saas</groupId>
|
||||||
|
<artifactId>jjb-saas-framework-domain</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jjb.saas</groupId>
|
||||||
|
<artifactId>jjb-saas-base-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
package com.zcloud.firefighting.domain.gateway;
|
||||||
|
|
||||||
|
import com.zcloud.firefighting.domain.model.FireresourcesCountStat;
|
||||||
|
import com.zcloud.firefighting.domain.model.FireresourcesE;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-domain
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:28:59
|
||||||
|
*/
|
||||||
|
public interface FireresourcesGateway {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
Boolean add(FireresourcesE fireresourcesE);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
Boolean update(FireresourcesE fireresourcesE);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
Boolean deletedFireresourcesById(Long id);
|
||||||
|
|
||||||
|
Boolean deletedFireresourcesByIds(Long[] id);
|
||||||
|
|
||||||
|
List<FireresourcesCountStat> countByCorpinfoIdAndType(List<String> corpinfoIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.zcloud.firefighting.domain.model;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author fangjiakai
|
||||||
|
* @date 2025/11/19 13:51
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FireresourcesCountStat implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
/**
|
||||||
|
* 公司ID
|
||||||
|
*/
|
||||||
|
private Long corpinfoId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
private String fireresourcesType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
|
private Long count;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.zcloud.firefighting.domain.model;
|
||||||
|
|
||||||
|
import com.alibaba.cola.domain.Entity;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.jjb.saas.framework.domain.model.BaseE;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-domain
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:28:59
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class FireresourcesE extends BaseE {
|
||||||
|
//业务主键id
|
||||||
|
|
||||||
|
private String fireresourcesId;
|
||||||
|
//企业
|
||||||
|
private Long corpinfoId;
|
||||||
|
//企业
|
||||||
|
private String corpinfoName;
|
||||||
|
//名称
|
||||||
|
private String fireresourcesName;
|
||||||
|
//类型
|
||||||
|
private String fireresourcesType;
|
||||||
|
//状态0正常1异常
|
||||||
|
private Integer state;
|
||||||
|
//经度
|
||||||
|
private String longitude;
|
||||||
|
//纬度
|
||||||
|
private String latitude;
|
||||||
|
//其他信息
|
||||||
|
private JSONObject details;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
<?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/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>zcloud-gbs-firefighting</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<zcloudGbs.service.version>1.0.0-SNAPSHOT</zcloudGbs.service.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<artifactId>web-infrastructure</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>web-infrastructure</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!--DIP here, Infrastructure depends on Domain-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zcloud.firefighting</groupId>
|
||||||
|
<artifactId>web-domain</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jjb.saas</groupId>
|
||||||
|
<artifactId>jjb-saas-application-client</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jjb.saas</groupId>
|
||||||
|
<artifactId>jjb-saas-system-client</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jjb.saas</groupId>
|
||||||
|
<artifactId>jjb-saas-auth-client</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jjb.saas</groupId>
|
||||||
|
<artifactId>jjb-saas-framework-facade</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.zcloud.firefighting.gatewayimpl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.zcloud.firefighting.domain.gateway.FireresourcesGateway;
|
||||||
|
import com.zcloud.firefighting.domain.model.FireresourcesCountStat;
|
||||||
|
import com.zcloud.firefighting.domain.model.FireresourcesE;
|
||||||
|
import com.zcloud.firefighting.persistence.dataobject.FireresourcesDO;
|
||||||
|
import com.zcloud.firefighting.persistence.repository.FireresourcesRepository;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import com.zcloud.gbscommon.utils.Tools;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-infrastructure
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:28:59
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class FireresourcesGatewayImpl implements FireresourcesGateway {
|
||||||
|
private final FireresourcesRepository fireresourcesRepository;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean add(FireresourcesE fireresourcesE) {
|
||||||
|
FireresourcesDO d = new FireresourcesDO(Tools.get32UUID());
|
||||||
|
BeanUtils.copyProperties(fireresourcesE, d, "fireresourcesId","details");
|
||||||
|
d.setDetails(JSON.toJSONString(fireresourcesE.getDetails()));
|
||||||
|
fireresourcesRepository.save(d);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean update(FireresourcesE fireresourcesE) {
|
||||||
|
FireresourcesDO d = new FireresourcesDO();
|
||||||
|
BeanUtils.copyProperties(fireresourcesE, d,"details");
|
||||||
|
d.setDetails(JSON.toJSONString(fireresourcesE.getDetails()));
|
||||||
|
fireresourcesRepository.updateById(d);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean deletedFireresourcesById(Long id) {
|
||||||
|
return fireresourcesRepository.removeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean deletedFireresourcesByIds(Long[] ids) {
|
||||||
|
return fireresourcesRepository.removeByIds(Collections.singletonList(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FireresourcesCountStat> countByCorpinfoIdAndType(List<String> corpinfoIds){
|
||||||
|
return fireresourcesRepository.countByCorpinfoIdAndType(corpinfoIds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
package com.zcloud.firefighting.persistence.dataobject;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-infrastructure
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:28:59
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("fireresources")
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class FireresourcesDO extends BaseDO {
|
||||||
|
//业务主键id
|
||||||
|
@ApiModelProperty(value = "业务主键id")
|
||||||
|
private String fireresourcesId;
|
||||||
|
//企业
|
||||||
|
@ApiModelProperty(value = "企业")
|
||||||
|
private Long corpinfoId;
|
||||||
|
//企业
|
||||||
|
@ApiModelProperty(value = "企业")
|
||||||
|
private String corpinfoName;
|
||||||
|
//名称
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
private String fireresourcesName;
|
||||||
|
//类型
|
||||||
|
@ApiModelProperty(value = "类型")
|
||||||
|
private String fireresourcesType;
|
||||||
|
//状态0正常1异常
|
||||||
|
@ApiModelProperty(value = "状态0正常1异常")
|
||||||
|
private Integer state;
|
||||||
|
//经度
|
||||||
|
@ApiModelProperty(value = "经度")
|
||||||
|
private String longitude;
|
||||||
|
//纬度
|
||||||
|
@ApiModelProperty(value = "纬度")
|
||||||
|
private String latitude;
|
||||||
|
//其他信息
|
||||||
|
@ApiModelProperty(value = "其他信息")
|
||||||
|
private String details;
|
||||||
|
|
||||||
|
public FireresourcesDO(String uuid) {
|
||||||
|
this.fireresourcesId = uuid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.zcloud.firefighting.persistence.mapper;
|
||||||
|
|
||||||
|
import com.zcloud.firefighting.domain.model.FireresourcesCountStat;
|
||||||
|
import com.zcloud.firefighting.persistence.dataobject.FireresourcesDO;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-infrastructure
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:28:59
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface FireresourcesMapper extends BaseMapper<FireresourcesDO> {
|
||||||
|
|
||||||
|
List<FireresourcesCountStat> countByCorpinfoIdAndType(@Param("corpinfoIds") List<String> corpinfoIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.zcloud.firefighting.persistence.repository;
|
||||||
|
|
||||||
|
import com.zcloud.firefighting.domain.model.FireresourcesCountStat;
|
||||||
|
import com.zcloud.firefighting.persistence.dataobject.FireresourcesDO;
|
||||||
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
|
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-infrastructure
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:28:59
|
||||||
|
*/
|
||||||
|
public interface FireresourcesRepository extends BaseRepository<FireresourcesDO> {
|
||||||
|
PageResponse<FireresourcesDO> listPage(Map<String, Object> params);
|
||||||
|
|
||||||
|
List<FireresourcesCountStat> countByCorpinfoIdAndType(@Param("corpinfoIds") List<String> corpinfoIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.zcloud.firefighting.persistence.repository.impl;
|
||||||
|
|
||||||
|
import com.zcloud.firefighting.domain.model.FireresourcesCountStat;
|
||||||
|
import com.zcloud.firefighting.persistence.dataobject.FireresourcesDO;
|
||||||
|
import com.zcloud.firefighting.persistence.mapper.FireresourcesMapper;
|
||||||
|
import com.zcloud.firefighting.persistence.repository.FireresourcesRepository;
|
||||||
|
import com.alibaba.cola.dto.PageResponse;
|
||||||
|
import com.jjb.saas.framework.repository.common.PageHelper;
|
||||||
|
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||||
|
import com.zcloud.gbscommon.utils.Query;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web-infrastructure
|
||||||
|
*
|
||||||
|
* @Author fangjiakai
|
||||||
|
* @Date 2025-11-18 10:29:00
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class FireresourcesRepositoryImpl extends BaseRepositoryImpl<FireresourcesMapper, FireresourcesDO> implements FireresourcesRepository {
|
||||||
|
private final FireresourcesMapper fireresourcesMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResponse<FireresourcesDO> listPage(Map<String, Object> params) {
|
||||||
|
IPage<FireresourcesDO> iPage = new Query<FireresourcesDO>().getPage(params);
|
||||||
|
QueryWrapper<FireresourcesDO> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params);
|
||||||
|
queryWrapper.orderByDesc("create_time");
|
||||||
|
IPage<FireresourcesDO> result = fireresourcesMapper.selectPage(iPage, queryWrapper);
|
||||||
|
return PageHelper.pageToResponse(result, result.getRecords());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FireresourcesCountStat> countByCorpinfoIdAndType(@Param("corpinfoIds") List<String> corpinfoIds){
|
||||||
|
return fireresourcesMapper.countByCorpinfoIdAndType(corpinfoIds);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
CREATE TABLE `metric` (
|
||||||
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
|
`user_id` varchar(64) NOT NULL COMMENT '域账号',
|
||||||
|
`main_metric` varchar(64) NOT NULL COMMENT '主度量',
|
||||||
|
`sub_metric` varchar(64) NOT NULL COMMENT '度量项',
|
||||||
|
`metric_item` json DEFAULT NULL COMMENT '度量项内容',
|
||||||
|
`creator` varchar(64) NOT NULL COMMENT '创建人',
|
||||||
|
`modifier` varchar(64) NOT NULL COMMENT '修改人',
|
||||||
|
`gmt_create` datetime NOT NULL COMMENT '创建时间',
|
||||||
|
`gmt_modified` datetime NOT NULL COMMENT '修改时间',
|
||||||
|
`is_deleted` char(1) NOT NULL DEFAULT 'n' COMMENT '逻辑删除',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `idx_username` (`user_id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8mb4 COMMENT='度量表';
|
||||||
|
|
||||||
|
CREATE TABLE `user_profile` (
|
||||||
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||||
|
`user_id` varchar(64) NOT NULL COMMENT '工号',
|
||||||
|
`user_name` varchar(64) NOT NULL COMMENT '名字',
|
||||||
|
`dep` varchar(128) NOT NULL COMMENT '部门',
|
||||||
|
`role` varchar(6) NOT NULL COMMENT '角色',
|
||||||
|
`total_score` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '综合得分',
|
||||||
|
`app_quality_score` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '代码质量分',
|
||||||
|
`tech_influence_score` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '技术影响力分',
|
||||||
|
`tech_contribution_score` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '技术贡献分',
|
||||||
|
`dev_quality_score` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '开发质量分',
|
||||||
|
`checkin_code_quantity` decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT 'checkin代码量',
|
||||||
|
`is_manager` char(1) DEFAULT NULL COMMENT '是否主管',
|
||||||
|
`creator` varchar(64) NOT NULL COMMENT '创建人',
|
||||||
|
`modifier` varchar(64) NOT NULL COMMENT '修改人',
|
||||||
|
`gmt_create` datetime NOT NULL COMMENT '创建时间',
|
||||||
|
`gmt_modified` datetime NOT NULL COMMENT '修改时间',
|
||||||
|
`is_deleted` char(1) NOT NULL DEFAULT 'n' COMMENT '逻辑删除',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `idx_user_id` (`user_id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8mb4 COMMENT='用户Profile表';
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
|
<mapper namespace="com.zcloud.firefighting.persistence.mapper.FireresourcesMapper">
|
||||||
|
<select id="countByCorpinfoIdAndType" resultType="com.zcloud.firefighting.domain.model.FireresourcesCountStat">
|
||||||
|
SELECT
|
||||||
|
corpinfo_id,
|
||||||
|
fireresources_type,
|
||||||
|
COUNT(*) as count
|
||||||
|
from fireresources
|
||||||
|
<where>
|
||||||
|
<if test="corpinfoIds != null and !corpinfoIds.isEmpty() and corpinfoIds.size()>0">
|
||||||
|
AND corpinfo_id IN
|
||||||
|
<foreach collection="corpinfoIds" item="item" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY corpinfo_id, fireresources_type
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
|
<mapper namespace="com.zcloud.firefighting.persistence.mapper.RiskPointMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!-- mybatis的配置文件 -->
|
||||||
|
<!DOCTYPE configuration
|
||||||
|
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||||
|
<configuration>
|
||||||
|
<mappers>
|
||||||
|
<mapper resource="mybatis/customer-mapper.xml"/>
|
||||||
|
</mappers>
|
||||||
|
</configuration>
|
||||||
Loading…
Reference in New Issue