Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
a179b2f704
562
pom.xml
562
pom.xml
@ -1,281 +1,281 @@
|
||||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>3.0.0</version>
|
||||
|
||||
<name>ruoyi</name>
|
||||
<url>http://www.ruoyi.vip</url>
|
||||
<description>若依微服务系统</description>
|
||||
|
||||
<properties>
|
||||
<ruoyi.version>3.0.0</ruoyi.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-boot.version>2.5.1</spring-boot.version>
|
||||
<spring-cloud.version>2020.0.3</spring-cloud.version>
|
||||
<spring-cloud-alibaba.version>2021.1</spring-cloud-alibaba.version>
|
||||
<alibaba.nacos.version>2.0.2</alibaba.nacos.version>
|
||||
<spring-boot-admin.version>2.4.1</spring-boot-admin.version>
|
||||
<spring-boot.mybatis>2.1.4</spring-boot.mybatis>
|
||||
<swagger.fox.version>3.0.0</swagger.fox.version>
|
||||
<swagger.core.version>1.6.2</swagger.core.version>
|
||||
<tobato.version>1.26.5</tobato.version>
|
||||
<kaptcha.version>2.3.2</kaptcha.version>
|
||||
<pagehelper.boot.version>1.3.1</pagehelper.boot.version>
|
||||
<druid.version>1.2.6</druid.version>
|
||||
<dynamic-ds.version>3.4.0</dynamic-ds.version>
|
||||
<commons.io.version>2.10.0</commons.io.version>
|
||||
<commons.fileupload.version>1.4</commons.fileupload.version>
|
||||
<velocity.version>1.7</velocity.version>
|
||||
<fastjson.version>1.2.76</fastjson.version>
|
||||
<minio.version>8.2.1</minio.version>
|
||||
<poi.version>4.1.2</poi.version>
|
||||
<common-pool.version>2.6.2</common-pool.version>
|
||||
<commons-collections.version>3.2.2</commons-collections.version>
|
||||
<alipay.sdk>4.15.14.ALL</alipay.sdk>
|
||||
<commons-beanutils.sdk>1.9.3</commons-beanutils.sdk>
|
||||
</properties>
|
||||
|
||||
<!-- 依赖声明 -->
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud 微服务 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-dependencies</artifactId>
|
||||
<version>${spring-cloud.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba 微服务 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
||||
<version>${spring-cloud-alibaba.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Alibaba Nacos 配置 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.nacos</groupId>
|
||||
<artifactId>nacos-client</artifactId>
|
||||
<version>${alibaba.nacos.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot 依赖配置 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot 监控客户端 -->
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-client</artifactId>
|
||||
<version>${spring-boot-admin.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- FastDFS 分布式文件系统 -->
|
||||
<dependency>
|
||||
<groupId>com.github.tobato</groupId>
|
||||
<artifactId>fastdfs-client</artifactId>
|
||||
<version>${tobato.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mybatis 依赖配置 -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>${spring-boot.mybatis}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger 依赖配置 -->
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
<version>${swagger.core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>${swagger.core.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 验证码 -->
|
||||
<dependency>
|
||||
<groupId>com.github.penggle</groupId>
|
||||
<artifactId>kaptcha</artifactId>
|
||||
<version>${kaptcha.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- pagehelper 分页插件 -->
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
<version>${pagehelper.boot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- io常用工具类 -->
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>${commons.io.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- excel工具 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 文件上传工具类 -->
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>${commons.fileupload.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 代码生成使用模板 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity</artifactId>
|
||||
<version>${velocity.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- Collection 增强Java集合框架 -->
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<version>${commons-collections.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JSON 解析器和生成器 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 公共资源池 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-pool2</artifactId>
|
||||
<version>${common-pool.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 核心模块 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-core</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 接口模块 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-swagger</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 安全模块 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-security</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 权限范围 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-datascope</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 多数据源 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-datasource</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 日志记录 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-log</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 缓存服务 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-redis</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 系统接口 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-api-system</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>${commons-beanutils.sdk}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<modules>
|
||||
<module>ruoyi-auth</module>
|
||||
<module>ruoyi-gateway</module>
|
||||
<module>ruoyi-visual</module>
|
||||
<module>ruoyi-modules</module>
|
||||
<module>ruoyi-api</module>
|
||||
<module>ruoyi-common</module>
|
||||
<module>xhpc-modules</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<dependencies>
|
||||
<!-- bootstrap 启动器 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
<?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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>3.0.0</version>
|
||||
|
||||
<name>ruoyi</name>
|
||||
<url>http://www.ruoyi.vip</url>
|
||||
<description>若依微服务系统</description>
|
||||
|
||||
<properties>
|
||||
<ruoyi.version>3.0.0</ruoyi.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-boot.version>2.5.1</spring-boot.version>
|
||||
<spring-cloud.version>2020.0.3</spring-cloud.version>
|
||||
<spring-cloud-alibaba.version>2021.1</spring-cloud-alibaba.version>
|
||||
<alibaba.nacos.version>2.0.2</alibaba.nacos.version>
|
||||
<spring-boot-admin.version>2.4.1</spring-boot-admin.version>
|
||||
<spring-boot.mybatis>2.1.4</spring-boot.mybatis>
|
||||
<swagger.fox.version>3.0.0</swagger.fox.version>
|
||||
<swagger.core.version>1.6.2</swagger.core.version>
|
||||
<tobato.version>1.26.5</tobato.version>
|
||||
<kaptcha.version>2.3.2</kaptcha.version>
|
||||
<pagehelper.boot.version>1.3.1</pagehelper.boot.version>
|
||||
<druid.version>1.2.6</druid.version>
|
||||
<dynamic-ds.version>3.4.0</dynamic-ds.version>
|
||||
<commons.io.version>2.10.0</commons.io.version>
|
||||
<commons.fileupload.version>1.4</commons.fileupload.version>
|
||||
<velocity.version>1.7</velocity.version>
|
||||
<fastjson.version>1.2.76</fastjson.version>
|
||||
<minio.version>8.2.1</minio.version>
|
||||
<poi.version>4.1.2</poi.version>
|
||||
<common-pool.version>2.6.2</common-pool.version>
|
||||
<commons-collections.version>3.2.2</commons-collections.version>
|
||||
<alipay.sdk>4.15.14.ALL</alipay.sdk>
|
||||
<commons-beanutils.sdk>1.9.3</commons-beanutils.sdk>
|
||||
</properties>
|
||||
|
||||
<!-- 依赖声明 -->
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringCloud 微服务 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-dependencies</artifactId>
|
||||
<version>${spring-cloud.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba 微服务 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
||||
<version>${spring-cloud-alibaba.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Alibaba Nacos 配置 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.nacos</groupId>
|
||||
<artifactId>nacos-client</artifactId>
|
||||
<version>${alibaba.nacos.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot 依赖配置 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot 监控客户端 -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>de.codecentric</groupId>-->
|
||||
<!-- <artifactId>spring-boot-admin-starter-client</artifactId>-->
|
||||
<!-- <version>${spring-boot-admin.version}</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- FastDFS 分布式文件系统 -->
|
||||
<dependency>
|
||||
<groupId>com.github.tobato</groupId>
|
||||
<artifactId>fastdfs-client</artifactId>
|
||||
<version>${tobato.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mybatis 依赖配置 -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>${spring-boot.mybatis}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger 依赖配置 -->
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
<version>${swagger.core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>${swagger.core.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 验证码 -->
|
||||
<dependency>
|
||||
<groupId>com.github.penggle</groupId>
|
||||
<artifactId>kaptcha</artifactId>
|
||||
<version>${kaptcha.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- pagehelper 分页插件 -->
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
<version>${pagehelper.boot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- io常用工具类 -->
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>${commons.io.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- excel工具 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 文件上传工具类 -->
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>${commons.fileupload.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 代码生成使用模板 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity</artifactId>
|
||||
<version>${velocity.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- Collection 增强Java集合框架 -->
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<version>${commons-collections.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JSON 解析器和生成器 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 公共资源池 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-pool2</artifactId>
|
||||
<version>${common-pool.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 核心模块 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-core</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 接口模块 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-swagger</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 安全模块 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-security</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 权限范围 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-datascope</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 多数据源 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-datasource</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 日志记录 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-log</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 缓存服务 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-redis</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 系统接口 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-api-system</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>${commons-beanutils.sdk}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<modules>
|
||||
<module>ruoyi-auth</module>
|
||||
<module>ruoyi-gateway</module>
|
||||
<module>ruoyi-visual</module>
|
||||
<module>ruoyi-modules</module>
|
||||
<module>ruoyi-api</module>
|
||||
<module>ruoyi-common</module>
|
||||
<module>xhpc-modules</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<dependencies>
|
||||
<!-- bootstrap 启动器 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<!-- <build>-->
|
||||
<!-- <plugins>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.apache.maven.plugins</groupId>-->
|
||||
<!-- <artifactId>maven-compiler-plugin</artifactId>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <source>${java.version}</source>-->
|
||||
<!-- <target>${java.version}</target>-->
|
||||
<!-- <encoding>${project.build.sourceEncoding}</encoding>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- </plugins>-->
|
||||
<!-- </build>-->
|
||||
|
||||
</project>
|
||||
|
||||
@ -1,25 +1,25 @@
|
||||
# Tomcat
|
||||
server:
|
||||
port: 9200
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: ruoyi-auth
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
# Tomcat
|
||||
server:
|
||||
port: 9200
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: ruoyi-auth
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 118.24.137.203:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 118.24.137.203:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
|
||||
@ -1,42 +1,42 @@
|
||||
# Tomcat
|
||||
server:
|
||||
port: 8080
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: ruoyi-gateway
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
sentinel:
|
||||
# 取消控制台懒加载
|
||||
eager: true
|
||||
transport:
|
||||
# 控制台地址
|
||||
dashboard: 127.0.0.1:8718
|
||||
# nacos配置持久化
|
||||
datasource:
|
||||
ds1:
|
||||
nacos:
|
||||
server-addr: 127.0.0.1:8848
|
||||
dataId: sentinel-ruoyi-gateway
|
||||
groupId: DEFAULT_GROUP
|
||||
data-type: json
|
||||
rule-type: flow
|
||||
# Tomcat
|
||||
server:
|
||||
port: 8080
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: ruoyi-gateway
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 118.24.137.203:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 118.24.137.203:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
sentinel:
|
||||
# 取消控制台懒加载
|
||||
eager: true
|
||||
transport:
|
||||
# 控制台地址
|
||||
dashboard: 127.0.0.1:8718
|
||||
# nacos配置持久化
|
||||
datasource:
|
||||
ds1:
|
||||
nacos:
|
||||
server-addr: 118.24.137.203:8848
|
||||
dataId: sentinel-ruoyi-gateway
|
||||
groupId: DEFAULT_GROUP
|
||||
data-type: json
|
||||
rule-type: flow
|
||||
|
||||
@ -1,25 +1,25 @@
|
||||
# Tomcat
|
||||
server:
|
||||
port: 9201
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: ruoyi-system
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
# Tomcat
|
||||
server:
|
||||
port: 9201
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: ruoyi-system
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 118.24.137.203:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 118.24.137.203:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
|
||||
@ -218,4 +218,11 @@ public interface XhpcChargingStationMapper {
|
||||
*/
|
||||
Set<String> getXchargingPileList(@Param("chargingStationId")Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 按照没30分钟为一段进行分组
|
||||
* @param chargingStationId
|
||||
* @return
|
||||
*/
|
||||
List<Map<String,Object>> getXhpcRateTimeNumber(@Param("chargingStationId")Long chargingStationId);
|
||||
|
||||
}
|
||||
|
||||
@ -1,10 +1,14 @@
|
||||
package com.xhpc.charging.station.service;
|
||||
|
||||
import cn.hutool.core.date.BetweenFormatter;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.xhpc.common.api.PowerPileService;
|
||||
import com.xhpc.common.api.dto.ChargingPileDto;
|
||||
import com.xhpc.common.core.domain.R;
|
||||
import com.xhpc.common.core.utils.DateUtils;
|
||||
import com.xhpc.common.core.web.domain.AjaxResult;
|
||||
import com.xhpc.common.data.redis.CacheRateModel;
|
||||
import com.xhpc.common.domain.XhpcChargingStation;
|
||||
import com.xhpc.common.domain.XhpcRate;
|
||||
import com.xhpc.common.domain.XhpcRateModel;
|
||||
@ -20,6 +24,7 @@ import org.springframework.data.annotation.Version;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
@ -244,6 +249,13 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
||||
}
|
||||
if(xhpcChargingStationDto.getXhpcRateTimeList() ==null && xhpcChargingStationDto.getXhpcRateTimeList().size()==0){
|
||||
return AjaxResult.error(1001,"费率时段不能为空");
|
||||
}else{
|
||||
for (int i = 0; i < xhpcChargingStationDto.getXhpcRateTimeList().size(); i++) {
|
||||
String id = xhpcChargingStationDto.getXhpcRateTimeList().get(i).getId();
|
||||
if("00".equals(id)||"01".equals(id)||"02".equals(id)||"03".equals(id)){}else{
|
||||
return AjaxResult.error("1003","费率id格式不对");
|
||||
}
|
||||
}
|
||||
}
|
||||
List<XhpcRateTimeDto> xhpcRateTimeList = xhpcChargingStationDto.getXhpcRateTimeList();
|
||||
|
||||
@ -251,10 +263,15 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
||||
XhpcRateTimeDto xhpcRateTime = xhpcRateTimeList.get(i);
|
||||
String start = xhpcRateTime.getStartTime();
|
||||
String end = xhpcRateTime.getEndTime();
|
||||
String id = xhpcRateTime.getId();
|
||||
//检查格式,正则验证 【[0-2][0-9]:[0-6][0]:[0]{2}】
|
||||
String pattern ="^([0-2][0-9]:([0]|[3])[0]:[0][0])";
|
||||
Pattern compile = Pattern.compile(pattern);
|
||||
Matcher m =compile.matcher(start);
|
||||
|
||||
if("00".equals(id)||"01".equals(id)||"02".equals(id)||"03".equals(id)){}else{
|
||||
return AjaxResult.error("1003","费率id格式不对");
|
||||
}
|
||||
boolean isMatch = m.matches();
|
||||
if(!isMatch){
|
||||
return AjaxResult.error("1003","时间格式不对");
|
||||
@ -339,6 +356,9 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
||||
}
|
||||
//默认费率类型值
|
||||
String rateValue =xhpcChargingStationDto.getDefaultPeriodId();
|
||||
|
||||
String[] tfPricesSeq = new String[48];
|
||||
int number =0;
|
||||
int sort =1;
|
||||
for (int k = 0; k < list.size(); k++) {
|
||||
XhpcRateTimeDto xhpcRateTimeDto = list.get(k);
|
||||
@ -351,34 +371,137 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
||||
if(!"00:00:00".equals(xhpcRateTimeDto.getStartTime())){
|
||||
//添加一条默认费率时段
|
||||
sort = addXhpcRateTime(chargingStationId,rateModelId,defaultPeriodId,"00:00:00",startTime,sort,2,rateValue);
|
||||
//时间差
|
||||
long betweenDay = DateUtil.between(DateUtil.parse("00:00:00"), DateUtil.parse(startTime), DateUnit.SECOND);
|
||||
int day1 = Math.toIntExact(betweenDay / 1800);
|
||||
for (int l = 0; l < day1; l++) {
|
||||
tfPricesSeq[number] =rateValue;
|
||||
number=number+1;
|
||||
}
|
||||
}
|
||||
//并把本条数据也添加上
|
||||
sort = addXhpcRateTime(chargingStationId,rateModelId,defaultPeriodIdMap,startTime,endTime,sort,1,rateValues);
|
||||
//时间差
|
||||
long betweenDay = DateUtil.between(DateUtil.parse(startTime), DateUtil.parse(endTime), DateUnit.SECOND);
|
||||
int day2 = Math.toIntExact(betweenDay / 1800);
|
||||
for (int l = 0; l < day2; l++) {
|
||||
tfPricesSeq[number] =rateValues;
|
||||
number=number+1;
|
||||
}
|
||||
}else if(k<list.size()){
|
||||
//判断上条数据的结束时间是否等于现在这条数据的开始时间,不等于添加一条默认费率时段
|
||||
String endTimeK = list.get(k - 1).getEndTime();
|
||||
if(!endTimeK.equals(startTime)){
|
||||
//添加一条默认费率时段
|
||||
sort = addXhpcRateTime(chargingStationId,rateModelId,defaultPeriodId,endTimeK,startTime,sort,2,rateValue);
|
||||
//时间差
|
||||
long betweenDay = DateUtil.between(DateUtil.parse(endTimeK), DateUtil.parse(startTime), DateUnit.SECOND);
|
||||
int day3 = Math.toIntExact(betweenDay / 1800);
|
||||
for (int l = 0; l < day3; l++) {
|
||||
tfPricesSeq[number] =rateValue;
|
||||
number=number+1;
|
||||
}
|
||||
}
|
||||
//并把本条数据也添加上
|
||||
sort = addXhpcRateTime(chargingStationId,rateModelId,defaultPeriodIdMap,startTime,endTime,sort,1,rateValues);
|
||||
//时间差
|
||||
long betweenDay = DateUtil.between(DateUtil.parse(startTime), DateUtil.parse(endTime), DateUnit.SECOND);
|
||||
int day4 = Math.toIntExact(betweenDay / 1800);
|
||||
for (int l = 0; l < day4; l++) {
|
||||
tfPricesSeq[number] =rateValues;
|
||||
number=number+1;
|
||||
}
|
||||
}else{
|
||||
String endTimeK = list.get(k - 1).getEndTime();
|
||||
if(!endTimeK.equals(startTime)){
|
||||
//添加一条默认费率时段
|
||||
sort = addXhpcRateTime(chargingStationId,rateModelId,defaultPeriodId,endTimeK,startTime,sort,2,rateValue);
|
||||
//时间差
|
||||
long betweenDay = DateUtil.between(DateUtil.parse(endTimeK), DateUtil.parse(startTime), DateUnit.SECOND);
|
||||
int day5 = Math.toIntExact(betweenDay / 1800);
|
||||
for (int l = 0; l < day5; l++) {
|
||||
tfPricesSeq[number] =rateValue;
|
||||
number=number+1;
|
||||
}
|
||||
}
|
||||
//并把本条数据也添加上
|
||||
sort = addXhpcRateTime(chargingStationId,rateModelId,defaultPeriodIdMap,startTime,endTime,sort,1,rateValues);
|
||||
//时间差
|
||||
long betweenDay1 = DateUtil.between(DateUtil.parse(startTime), DateUtil.parse(endTime), DateUnit.SECOND);
|
||||
int day6 = Math.toIntExact(betweenDay1 / 1800);
|
||||
for (int l = 0; l < day6; l++) {
|
||||
tfPricesSeq[number] =rateValues;
|
||||
number=number+1;
|
||||
}
|
||||
if(!endTime.equals("24:00:00")){
|
||||
//添加一条默认费率时段
|
||||
sort = addXhpcRateTime(chargingStationId,rateModelId,defaultPeriodId,startTime,"24:00:00",sort,2,rateValue);
|
||||
//时间差
|
||||
long betweenDay3 = DateUtil.between(DateUtil.parse(startTime), DateUtil.parse("24:00:00"), DateUnit.SECOND);
|
||||
int day7 = Math.toIntExact(betweenDay3 / 1800);
|
||||
for (int l = 0; l < day7; l++) {
|
||||
tfPricesSeq[number] =rateValue;
|
||||
number=number+1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//设置费率模型
|
||||
CacheRateModel cacheRateModel = new CacheRateModel();
|
||||
cacheRateModel.setLossRate(0);
|
||||
BigDecimal valueSec =new BigDecimal(100000);
|
||||
boolean t1 =true;
|
||||
boolean t2 =true;
|
||||
boolean t3 =true;
|
||||
boolean t4 =true;
|
||||
for (XhpcRateDto xhpcRateDto:xhpcRateList) {
|
||||
BigDecimal powerFee=xhpcRateDto.getPowerFee();
|
||||
BigDecimal serviceFee=xhpcRateDto.getServiceFee();
|
||||
String id =xhpcRateDto.getId();
|
||||
int i1 = powerFee.multiply(valueSec).intValue();
|
||||
int i2 = serviceFee.multiply(valueSec).intValue();
|
||||
if("00".equals(id)){
|
||||
cacheRateModel.setT1Price(i1);
|
||||
cacheRateModel.setT1SvcPrice(i2);
|
||||
t1=false;
|
||||
}else if("01".equals(id)){
|
||||
cacheRateModel.setT2Price(i1);
|
||||
cacheRateModel.setT2SvcPrice(i2);
|
||||
t2=false;
|
||||
}else if("02".equals(id)){
|
||||
cacheRateModel.setT3Price(i1);
|
||||
cacheRateModel.setT3SvcPrice(i2);
|
||||
t3=false;
|
||||
}else if("03".equals(id)){
|
||||
cacheRateModel.setT4Price(i1);
|
||||
cacheRateModel.setT4SvcPrice(i2);
|
||||
t4=false;
|
||||
}
|
||||
}
|
||||
if(t1){
|
||||
cacheRateModel.setT1Price(0);
|
||||
cacheRateModel.setT1SvcPrice(0);
|
||||
}
|
||||
if(t2){
|
||||
cacheRateModel.setT2Price(0);
|
||||
cacheRateModel.setT2SvcPrice(0);
|
||||
}
|
||||
if(t3){
|
||||
cacheRateModel.setT3Price(0);
|
||||
cacheRateModel.setT3SvcPrice(0);
|
||||
}
|
||||
if(t4){
|
||||
cacheRateModel.setT4Price(0);
|
||||
cacheRateModel.setT4SvcPrice(0);
|
||||
}
|
||||
cacheRateModel.setTfPricesSeq(tfPricesSeq);
|
||||
|
||||
R r = powerPileService.setStationRateModel(chargingStationId, rateModelId, cacheRateModel);
|
||||
System.out.println(r.toString());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 场站详情接口
|
||||
* @param chargingStationId
|
||||
@ -429,7 +552,7 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
||||
xhpcRateTime.setType(type);
|
||||
xhpcRateTime.setRateValue(rateValue);
|
||||
xhpcChargingStationMapper.addXhpcRateTime(xhpcRateTime);
|
||||
sort++;
|
||||
sort=sort+1;
|
||||
return sort;
|
||||
}
|
||||
|
||||
@ -747,4 +870,14 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
//时间差
|
||||
long betweenDay = DateUtil.between(DateUtil.parse("00:00:00"), DateUtil.parse("10:00:00"), DateUnit.SECOND);
|
||||
|
||||
System.out.println("betweenDay:"+betweenDay);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -293,6 +293,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
te.name as name,
|
||||
cp.power as power,
|
||||
cp.auxiliary_power_supply as auxiliaryPowerSupply,
|
||||
cp.serial_number as serialNumber,
|
||||
cp.input_voltage as inputVoltage
|
||||
from xhpc_terminal as te
|
||||
left join xhpc_charging_pile as cp on cp.charging_pile_id = te.charging_pile_id
|
||||
@ -679,9 +680,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select
|
||||
power_fee as powerFee,
|
||||
service_fee as serviceFee,
|
||||
name as name
|
||||
name as name,
|
||||
rate_value as rateValue
|
||||
from xhpc_rate
|
||||
where charging_station_id=#{chargingStationId} and del_flag =0
|
||||
GROUP BY rate_value
|
||||
</select>
|
||||
|
||||
<select id="getXhpcRateTimeTypeList" resultType="java.util.Map">
|
||||
@ -732,4 +735,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
from xhpc_charging_pile
|
||||
where charging_station_id=#{chargingStationId} and del_flag =0 and status =0
|
||||
</select>
|
||||
|
||||
<select id="getXhpcRateTimeNumber" resultType="java.util.Map">
|
||||
SELECT
|
||||
CAST(((UNIX_TIMESTAMP(end_time)-UNIX_TIMESTAMP(start_time))/1800) AS SIGNED) as number,
|
||||
rate_value as rateValue
|
||||
FROM
|
||||
xhpc_rate_time
|
||||
where charging_station_id=#{chargingStationId}
|
||||
order by sort
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@ -255,6 +255,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
ter.name as terminalName,
|
||||
ter.serial_number as serialNumber,
|
||||
cp.power as power,
|
||||
cp.type as type,
|
||||
cp.max_voltage as maxVoltage,
|
||||
cp.auxiliary_power_supply as auxiliaryPowerSupply,
|
||||
ct.parking_instructions as parkingInstructions,
|
||||
|
||||
@ -1,55 +1,44 @@
|
||||
package com.xhpc;
|
||||
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
||||
import org.springframework.boot.jackson.JsonComponent;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.TimeZone;
|
||||
|
||||
@JsonComponent
|
||||
public class DateFormatConfig {
|
||||
|
||||
@Value("${spring.jackson.date-format:yyyy-MM-dd HH:mm:ss}")
|
||||
private String pattern;
|
||||
|
||||
/**
|
||||
* @author xiaofu
|
||||
* @description date 类型全局时间格式化
|
||||
* @date 2020/8/31 18:22
|
||||
*/
|
||||
@Bean
|
||||
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilder() {
|
||||
|
||||
return builder -> {
|
||||
TimeZone tz = TimeZone.getTimeZone("UTC");
|
||||
DateFormat df = new SimpleDateFormat(pattern);
|
||||
df.setTimeZone(tz);
|
||||
builder.failOnEmptyBeans(false)
|
||||
.failOnUnknownProperties(false)
|
||||
.featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
|
||||
.dateFormat(df);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @author xiaofu
|
||||
* @description LocalDate 类型全局时间格式化
|
||||
* @date 2020/8/31 18:22
|
||||
*/
|
||||
@Bean
|
||||
public LocalDateTimeSerializer localDateTimeDeserializer() {
|
||||
return new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(pattern));
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer(LocalDateTimeSerializer localDateTimeDeserializer) {
|
||||
return builder -> builder.serializerByType(LocalDateTime.class, localDateTimeDeserializer);
|
||||
}
|
||||
}
|
||||
//
|
||||
// @Value("${spring.jackson.date-format:yyyy-MM-dd HH:mm:ss}")
|
||||
// private String pattern;
|
||||
//
|
||||
// /**
|
||||
// * @author xiaofu
|
||||
// * @description date 类型全局时间格式化
|
||||
// * @date 2020/8/31 18:22
|
||||
// */
|
||||
// @Bean
|
||||
// public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilder() {
|
||||
//
|
||||
// return builder -> {
|
||||
// TimeZone tz = TimeZone.getTimeZone("UTC");
|
||||
// DateFormat df = new SimpleDateFormat(pattern);
|
||||
// df.setTimeZone(tz);
|
||||
// builder.failOnEmptyBeans(false)
|
||||
// .failOnUnknownProperties(false)
|
||||
// .featuresToDisable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
|
||||
// .dateFormat(df);
|
||||
// };
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * @author xiaofu
|
||||
// * @description LocalDate 类型全局时间格式化
|
||||
// * @date 2020/8/31 18:22
|
||||
// */
|
||||
// @Bean
|
||||
// public LocalDateTimeSerializer localDateTimeDeserializer() {
|
||||
// return new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(pattern));
|
||||
// }
|
||||
//
|
||||
// @Bean
|
||||
// public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer(LocalDateTimeSerializer localDateTimeDeserializer) {
|
||||
// return builder -> builder.serializerByType(LocalDateTime.class, localDateTimeDeserializer);
|
||||
// }
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import com.xhpc.common.core.domain.R;
|
||||
import com.xhpc.common.api.factory.PowerPileFallbackFactory;
|
||||
import com.xhpc.common.data.down.StartChargingData;
|
||||
import com.xhpc.common.data.redis.CacheRateModel;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
@ -28,6 +29,6 @@ public interface PowerPileService {
|
||||
R deletePileWhitelist(@PathVariable("stationId") Long stationId, @RequestBody Set<String> pileNoSet);
|
||||
|
||||
@PostMapping("/station/rateModel/{stationId}/{rateModelId}")
|
||||
R setStationRateModel(@PathVariable("stationId") Long stationId, @PathVariable("rateModelId") Long rateModelId, @RequestBody CacheRateModel rateModel);
|
||||
R setStationRateModel(@PathVariable("stationId") @Param("stationId") Long stationId, @PathVariable("rateModelId") @Param("rateModelId") Long rateModelId, @RequestBody @Param("rateModel") CacheRateModel rateModel);
|
||||
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ public class ChargingController {
|
||||
clientHandler.sendClientBinary(msg);
|
||||
return R.ok();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error("send message failed. " + e.getMessage(), e);
|
||||
return R.fail(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,6 +8,8 @@ import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import static com.xhpc.pp.server.ChargingPileServer.REDIS;
|
||||
|
||||
@RestController
|
||||
@ -18,12 +20,16 @@ public class StationController {
|
||||
|
||||
String skey = "station:".concat(stationId.toString());
|
||||
ChargingStationDto cacheStation = REDIS.getCacheObject(skey);
|
||||
if (cacheStation==null) cacheStation = new ChargingStationDto();
|
||||
cacheStation.setRateModelId(rateModelId);
|
||||
REDIS.setCacheObject(skey, cacheStation);
|
||||
String rkey = "rateModel:".concat(rateModelId.toString());
|
||||
REDIS.setCacheObject(rkey, rateModel);
|
||||
String rmskey = "rateModelStation:".concat(stationId.toString());
|
||||
REDIS.setCacheSet(rmskey, cacheStation.getPiles());
|
||||
Set<String> piles = cacheStation.getPiles();
|
||||
if (piles!=null) {
|
||||
REDIS.setCacheSet(rmskey, piles);
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user