提交 92ac644e 作者: luyincheng

相关代码迁移

父级 a0cb5723
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
<maven.build.version>${project.version}-${maven.build.timestamp}</maven.build.version> <maven.build.version>${project.version}-${maven.build.timestamp}</maven.build.version>
<docker.image.prefix>registry-vpc.cn-hangzhou.aliyuncs.com/cams</docker.image.prefix> <docker.image.prefix>registry-vpc.cn-hangzhou.aliyuncs.com/cams</docker.image.prefix>
<start.class>com.starcharge.Application</start.class> <start.class>com.starcharge.Application</start.class>
<easyexcel.verion>3.3.2</easyexcel.verion>
<mapstruct.version>1.5.5.Final</mapstruct.version>
</properties> </properties>
<repositories> <repositories>
...@@ -258,7 +260,36 @@ ...@@ -258,7 +260,36 @@
<artifactId>redisson</artifactId> <artifactId>redisson</artifactId>
<version>3.13.4</version> <version>3.13.4</version>
</dependency> </dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId> <!-- use mapstruct-jdk8 for Java 8 or higher -->
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-jdk8</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>${easyexcel.verion}</version>
</dependency>
<dependency>
<groupId>com.dtflys.forest</groupId>
<artifactId>forest-spring-boot-starter</artifactId>
<version>1.5.27</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
</dependencies> </dependencies>
<dependencyManagement> <dependencyManagement>
......
package com.starcharge.config; package com.starcharge.config;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.TimeZone; import java.util.TimeZone;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
...@@ -27,6 +38,16 @@ public class JasksonConfig { ...@@ -27,6 +38,16 @@ public class JasksonConfig {
om.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); om.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
om.configure(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES, true); om.configure(JsonParser.Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);
om.configure(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS, true); om.configure(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS, true);
JavaTimeModule javaTimeModule = new JavaTimeModule();
javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
javaTimeModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
javaTimeModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
javaTimeModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
javaTimeModule.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern("HH:mm:ss")));
om.registerModule(javaTimeModule);
return om; return om;
} }
} }
\ No newline at end of file
...@@ -1227,7 +1227,7 @@ resultType="com.starcharge.wios.vo.OrderVo"> ...@@ -1227,7 +1227,7 @@ resultType="com.starcharge.wios.vo.OrderVo">
left join (SELECT a.* FROM (select * FROM t_system_info where account_id = 0 order by id desc) a GROUP BY a.third_party_id) si on si.third_party_id = t.id and si.order_status = t.status and si.overtime_flag > 0 left join (SELECT a.* FROM (select * FROM t_system_info where account_id = 0 order by id desc) a GROUP BY a.third_party_id) si on si.third_party_id = t.id and si.order_status = t.status and si.overtime_flag > 0
<where> <where>
<if test="id != null and id != ''"> <if test="id != null and id != ''">
and t.id = #{id} and t.id like concat('%', #{id}, '%')
</if> </if>
<if test="outOrderId != null and outOrderId != ''"> <if test="outOrderId != null and outOrderId != ''">
and t.out_order_id = #{outOrderId} and t.out_order_id = #{outOrderId}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论