Commit 638fe7a1 by zhiheng.zhang

Merge branch 'feature/20210310-master分支-张志恒' into develop

# Conflicts:
#	order-application-service/src/main/resources/application.properties
parents 69bfa84d 0cedb345
...@@ -67,7 +67,6 @@ ...@@ -67,7 +67,6 @@
<dependency> <dependency>
<groupId>cn.freemud.commons</groupId> <groupId>cn.freemud.commons</groupId>
<artifactId>commons-amqp</artifactId> <artifactId>commons-amqp</artifactId>
<version>2.1.0-release</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
...@@ -77,6 +76,7 @@ ...@@ -77,6 +76,7 @@
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
......
...@@ -9,7 +9,6 @@ import java.util.List; ...@@ -9,7 +9,6 @@ import java.util.List;
* 聚合退款返回 * 聚合退款返回
*/ */
@Data @Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class MultiOrderRefundResponse<T> { public class MultiOrderRefundResponse<T> {
private int code; private int code;
...@@ -18,7 +17,7 @@ public class MultiOrderRefundResponse<T> { ...@@ -18,7 +17,7 @@ public class MultiOrderRefundResponse<T> {
private RefundPlatform data; private RefundPlatform data;
@Data @Data
public class RefundPlatform { public static class RefundPlatform {
public List<RefundPlatformResponse> refundPlatformResponseList; public List<RefundPlatformResponse> refundPlatformResponseList;
} }
......
...@@ -13,7 +13,7 @@ order: ...@@ -13,7 +13,7 @@ order:
spring: spring:
db: db:
druid: druid:
driver-class: com.mysql.jdbc.ReplicationDriver driver-class: com.mysql.jdbc.Driver
min-idle: 1 min-idle: 1
validationQuery: SELECT 'x' validationQuery: SELECT 'x'
max-active: 100 max-active: 100
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
<dependency> <dependency>
<groupId>cn.freemud.commons</groupId> <groupId>cn.freemud.commons</groupId>
<artifactId>commons-base</artifactId> <artifactId>commons-base</artifactId>
<version>1.5.1-release</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
<dependency> <dependency>
<groupId>cn.freemud.commons</groupId> <groupId>cn.freemud.commons</groupId>
<artifactId>commons-amqp</artifactId> <artifactId>commons-amqp</artifactId>
<version>2.2.0-release</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.freemud.commons</groupId> <groupId>cn.freemud.commons</groupId>
...@@ -37,7 +36,7 @@ ...@@ -37,7 +36,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
...@@ -51,7 +50,7 @@ ...@@ -51,7 +50,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-feign</artifactId> <artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jasypt</groupId> <groupId>org.jasypt</groupId>
...@@ -60,7 +59,7 @@ ...@@ -60,7 +59,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId> <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.freemud</groupId> <groupId>cn.freemud</groupId>
...@@ -91,7 +90,6 @@ ...@@ -91,7 +90,6 @@
<dependency> <dependency>
<groupId>tk.mybatis</groupId> <groupId>tk.mybatis</groupId>
<artifactId>mapper-spring-boot-starter</artifactId> <artifactId>mapper-spring-boot-starter</artifactId>
<version>2.0.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.ctrip.framework.apollo</groupId> <groupId>com.ctrip.framework.apollo</groupId>
...@@ -105,13 +103,35 @@ ...@@ -105,13 +103,35 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.micrometer</groupId> <groupId>io.micrometer</groupId>
<artifactId>micrometer-spring-legacy</artifactId> <artifactId>micrometer-registry-prometheus</artifactId>
<version>1.1.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.micrometer</groupId> <groupId>com.freemud.nepxion</groupId>
<artifactId>micrometer-registry-prometheus</artifactId> <artifactId>discovery-plugin-starter-eureka</artifactId>
<version>1.1.2</version> <version>5.5.12-SNAPSHOT</version>
</dependency>
<!--服务需要依赖-->
<dependency>
<groupId>com.freemud.nepxion</groupId>
<artifactId>discovery-plugin-strategy-starter-service</artifactId>
<version>5.5.12-SNAPSHOT</version>
</dependency>
<!--所有应用都需要-->
<dependency>
<groupId>com.freemud.nepxion</groupId>
<artifactId>discovery-plugin-config-center-starter-apollo</artifactId>
<version>5.5.12-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>20.0</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
...@@ -152,6 +172,12 @@ ...@@ -152,6 +172,12 @@
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
<configuration> <configuration>
<mainClass>cn.freemud.ApiApplication</mainClass> <mainClass>cn.freemud.ApiApplication</mainClass>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
......
...@@ -14,6 +14,7 @@ package cn.freemud; ...@@ -14,6 +14,7 @@ package cn.freemud;
import cn.freemud.utils.LogTreadLocal; import cn.freemud.utils.LogTreadLocal;
import feign.RequestInterceptor; import feign.RequestInterceptor;
import org.apache.commons.lang.StringUtils;
import org.jasypt.encryption.StringEncryptor; import org.jasypt.encryption.StringEncryptor;
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor; import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig; import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
...@@ -24,7 +25,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; ...@@ -24,7 +25,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.context.annotation.EnableAspectJAutoProxy;
...@@ -45,7 +46,13 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy; ...@@ -45,7 +46,13 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
@EnableFeignClients @EnableFeignClients
@EnableAutoConfiguration @EnableAutoConfiguration
public class ApiApplication { public class ApiApplication {
private static final String GRAY_VERSION_PROD = "PROD"; //生产版本
private static final String GRAY_VERSION_GRAY = "GRAY"; //灰度版本
public static void main(String[] args) { public static void main(String[] args) {
String getenv = System.getenv("VERSION_FLAG");
System.setProperty("eureka.instance.metadataMap.version", StringUtils.isEmpty(getenv) ? GRAY_VERSION_PROD : GRAY_VERSION_GRAY.equals(getenv) ? GRAY_VERSION_GRAY : GRAY_VERSION_PROD);
SpringApplication.run(ApiApplication.class, args); SpringApplication.run(ApiApplication.class, args);
} }
......
/*
* Copyright (c) 2018 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
package cn.freemud.config;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.fastjson.support.config.FastJsonConfig;
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
/**
* WebMvcConfigurer
*/
@Configuration
@Slf4j
public class WebMvcConfig implements WebMvcConfigurer {
@Bean
public ObjectMapper objectMapper(){
ObjectMapper objectMapper = new ObjectMapper();
//忽略未知属性
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
SimpleModule simpleModule = new SimpleModule();
//将Long,BigInteger序列化的时候,转化为String,否则会出现精度问题
simpleModule.addSerializer(Long.class, com.fasterxml.jackson.databind.ser.std.ToStringSerializer.instance);
simpleModule.addSerializer(Long.TYPE, com.fasterxml.jackson.databind.ser.std.ToStringSerializer.instance);
simpleModule.addSerializer(BigInteger.class, com.fasterxml.jackson.databind.ser.std.ToStringSerializer.instance);
objectMapper.registerModule(simpleModule);
return objectMapper;
}
// @Bean
// public HttpMessageConverter fastjsonHttpMessageConverter() {
// //定义一个转换消息的对象
// FastJsonHttpMessageConverter fastConverter = new FastJsonHttpMessageConverter();
//
// //添加fastjson的配置信息 比如 :是否要格式化返回的json数据
// FastJsonConfig fastJsonConfig = new FastJsonConfig();
//
// //过滤并修改配置返回内容
// fastJsonConfig.setSerializerFeatures(
// //List字段如果为null,输出为[],而非null
// //SerializerFeature.WriteNullListAsEmpty,
// //字符类型字段如果为null,输出为"",而非null
//// SerializerFeature.WriteNullStringAsEmpty,
// //Boolean字段如果为null,输出为false,而非null
//// SerializerFeature.WriteNullBooleanAsFalse,
// //SerializerFeature.WriteNullBooleanAsFalse,
// //消除对同一对象循环引用的问题,默认为false(如果不配置有可能会进入死循环)
// SerializerFeature.DisableCircularReferenceDetect,
// SerializerFeature.PrettyFormat
// );
//
// //在转换器中添加配置信息
// fastConverter.setFastJsonConfig(fastJsonConfig);
// List<MediaType> supportedMediaTypes = new ArrayList<>();
// supportedMediaTypes.add(MediaType.APPLICATION_JSON);
// supportedMediaTypes.add(MediaType.APPLICATION_JSON_UTF8);
// fastConverter.setSupportedMediaTypes(supportedMediaTypes);
// return fastConverter;
// }
@Bean
public MappingJackson2HttpMessageConverter getMappingJackson2HttpMessageConverter() {
MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter = new MappingJackson2HttpMessageConverter();
//设置中文编码格式
List<MediaType> list = new ArrayList<MediaType>();
list.add(MediaType.APPLICATION_JSON_UTF8);
mappingJackson2HttpMessageConverter.setSupportedMediaTypes(list);
return mappingJackson2HttpMessageConverter;
}
}
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
// //
//import cn.freemud.entities.dto.*; //import cn.freemud.entities.dto.*;
//import cn.freemud.entities.dto.activity.ActivityQueryResponseDto; //import cn.freemud.entities.dto.activity.ActivityQueryResponseDto;
//import org.springframework.cloud.netflix.feign.FeignClient; //import org.springframework.cloud.openfeign.FeignClient;
//import org.springframework.web.bind.annotation.PostMapping; //import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping; //import org.springframework.web.bind.annotation.RequestMapping;
// //
......
...@@ -4,7 +4,7 @@ spring.profiles.active=test ...@@ -4,7 +4,7 @@ spring.profiles.active=test
##### 消息分发器专用db配置 ##### 消息分发器专用db配置
spring.db.druid.url=jdbc:mysql:replication://115.159.67.166:6630,115.159.67.166:6630/saas_micro_progeram?useUnicode=true&characterEncoding=utf8&useSSL=false&&roundRobinLoadBalance=true spring.db.druid.url=jdbc:mysql:replication://115.159.67.166:6630,115.159.67.166:6630/saas_micro_progeram?useUnicode=true&characterEncoding=utf8&useSSL=false&&roundRobinLoadBalance=true
spring.db.druid.driver-class=com.mysql.jdbc.ReplicationDriver spring.db.druid.driver-class=com.mysql.jdbc.Driver
spring.db.druid.username=Bf_User spring.db.druid.username=Bf_User
spring.db.druid.password=L$^U4P3^2p1uGF spring.db.druid.password=L$^U4P3^2p1uGF
spring.db.druid.initial-size=1 spring.db.druid.initial-size=1
......
...@@ -9,13 +9,14 @@ apollo.meta=http://212.129.229.203 ...@@ -9,13 +9,14 @@ apollo.meta=http://212.129.229.203
env=dev env=dev
apollo.bootstrap.enabled=true apollo.bootstrap.enabled=true
apollo.bootstrap.namespaces=micro_progeram_commons,i_callback_service apollo.bootstrap.namespaces=micro_progeram_commons,i_callback_service
spring.main.allow-bean-definition-overriding=true
endpoints.metrics.enabled=true management.endpoints.metrics.enabled=true
endpoints.health.sensitive=false management.endpoints.health.sensitive=false
endpoints.health.enabled=true management.endpoints.health.enabled=true
management.endpoint.health.show-details=always management.endpoint.health.show-details=always
management.endpoints.web.base-path=/ management.endpoints.web.base-path=/
management.endpoints.web.exposure.include=prometheus,info,health,shutdown management.endpoints.web.exposure.include=prometheus,info,health,shutdown
management.metrics.tags.application=${spring.application.name} management.metrics.tags.application=${spring.application.name}
management.endpoint.shutdown.enabled=true management.endpoint.shutdown.enabled=true
management.security.enabled=false management.health.rabbit.enabled=false
\ No newline at end of file apollo.plugin.namespace=openstore.gray.rule
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
//import org.springframework.boot.autoconfigure.EnableAutoConfiguration; //import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
//import org.springframework.boot.test.context.SpringBootTest; //import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.cloud.client.discovery.EnableDiscoveryClient; //import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
//import org.springframework.cloud.netflix.feign.EnableFeignClients; //import org.springframework.cloud.openfeign.EnableFeignClients;
//import org.springframework.test.context.junit4.SpringRunner; //import org.springframework.test.context.junit4.SpringRunner;
// //
//import java.util.ArrayList; //import java.util.ArrayList;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
//import org.springframework.boot.autoconfigure.EnableAutoConfiguration; //import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
//import org.springframework.boot.test.context.SpringBootTest; //import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.cloud.client.discovery.EnableDiscoveryClient; //import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
//import org.springframework.cloud.netflix.feign.EnableFeignClients; //import org.springframework.cloud.openfeign.EnableFeignClients;
//import org.springframework.test.context.junit4.SpringRunner; //import org.springframework.test.context.junit4.SpringRunner;
// //
//import static org.junit.Assert.assertEquals; //import static org.junit.Assert.assertEquals;
......
...@@ -6,7 +6,7 @@ import org.junit.runner.RunWith; ...@@ -6,7 +6,7 @@ import org.junit.runner.RunWith;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource; import javax.annotation.Resource;
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
...@@ -173,17 +173,11 @@ ...@@ -173,17 +173,11 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-feign</artifactId> <artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<!-- 使用Apache HttpClient替换Feign原生httpclient -->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<version>9.4.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId> <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency> </dependency>
<dependency> <dependency>
...@@ -277,12 +271,12 @@ ...@@ -277,12 +271,12 @@
<dependency> <dependency>
<groupId>io.github.openfeign.form</groupId> <groupId>io.github.openfeign.form</groupId>
<artifactId>feign-form</artifactId> <artifactId>feign-form</artifactId>
<version>3.2.2</version> <version>${feign-form.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.github.openfeign.form</groupId> <groupId>io.github.openfeign.form</groupId>
<artifactId>feign-form-spring</artifactId> <artifactId>feign-form-spring</artifactId>
<version>3.2.2</version> <version>${feign-form.version}</version>
</dependency> </dependency>
<!-- 生成id --> <!-- 生成id -->
<dependency> <dependency>
...@@ -352,6 +346,28 @@ ...@@ -352,6 +346,28 @@
<groupId>org.apache.skywalking</groupId> <groupId>org.apache.skywalking</groupId>
<artifactId>apm-toolkit-logback-1.x</artifactId> <artifactId>apm-toolkit-logback-1.x</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>com.freemud.nepxion</groupId>
<artifactId>discovery-plugin-starter-eureka</artifactId>
<version>5.5.12-SNAPSHOT</version>
</dependency>
<!--服务需要依赖-->
<dependency>
<groupId>com.freemud.nepxion</groupId>
<artifactId>discovery-plugin-strategy-starter-service</artifactId>
<version>5.5.12-SNAPSHOT</version>
</dependency>
<!--所有应用都需要-->
<dependency>
<groupId>com.freemud.nepxion</groupId>
<artifactId>discovery-plugin-config-center-starter-apollo</artifactId>
<version>5.5.12-SNAPSHOT</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
......
...@@ -16,6 +16,7 @@ import cn.freemud.core.db.DataSourcesConfig; ...@@ -16,6 +16,7 @@ import cn.freemud.core.db.DataSourcesConfig;
import com.alibaba.fastjson.parser.ParserConfig; import com.alibaba.fastjson.parser.ParserConfig;
import com.freemud.application.sdk.api.log.LogThreadLocal; import com.freemud.application.sdk.api.log.LogThreadLocal;
import feign.RequestInterceptor; import feign.RequestInterceptor;
import org.apache.commons.lang.StringUtils;
import org.jasypt.encryption.StringEncryptor; import org.jasypt.encryption.StringEncryptor;
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor; import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig; import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
...@@ -26,11 +27,13 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; ...@@ -26,11 +27,13 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import springfox.documentation.swagger2.annotations.EnableSwagger2; import springfox.documentation.swagger2.annotations.EnableSwagger2;
...@@ -49,10 +52,21 @@ import java.util.concurrent.ThreadPoolExecutor; ...@@ -49,10 +52,21 @@ import java.util.concurrent.ThreadPoolExecutor;
@ComponentScan({"cn.freemud", "com.freemud"}) @ComponentScan({"cn.freemud", "com.freemud"})
@MapperScan({"cn.freemud.*.dao","com.freemud.sdk.api.assortment.orderdistributor.mapper","com.freemud.api.assortment.datamanager.manager", @MapperScan({"cn.freemud.*.dao","com.freemud.sdk.api.assortment.orderdistributor.mapper","com.freemud.api.assortment.datamanager.manager",
"com.freemud.api.assortment.datamanager.queue.dao","com.freemud.api.assortment.datamanager.rbac.dao","com.freemud.api.assortment.datamanager.queue.entity"}) "com.freemud.api.assortment.datamanager.queue.dao","com.freemud.api.assortment.datamanager.rbac.dao","com.freemud.api.assortment.datamanager.queue.entity"})
@EnableFeignClients({"cn.freemud.service.thirdparty","com.freemud.sdk.api.assortment.message","cn.freemud.service.mccafe.thirdparty","cn.freemud.management.thirdparty"}) @EnableFeignClients({"cn.freemud.service.thirdparty",
"com.freemud.sdk.api.assortment.message",
"cn.freemud.service.mccafe.thirdparty",
"cn.freemud.management.thirdparty",
"cn.freemud.fuyou"
})
@EnableAutoConfiguration @EnableAutoConfiguration
public class OrderApplication { public class OrderApplication {
private static final String GRAY_VERSION_PROD = "PROD"; //生产版本
private static final String GRAY_VERSION_GRAY = "GRAY"; //灰度版本
public static void main(String[] args) { public static void main(String[] args) {
String getenv = System.getenv("VERSION_FLAG");
System.setProperty("eureka.instance.metadataMap.version", StringUtils.isEmpty(getenv) ? GRAY_VERSION_PROD : GRAY_VERSION_GRAY.equals(getenv) ? GRAY_VERSION_GRAY : GRAY_VERSION_PROD);
ParserConfig.getGlobalInstance().setAutoTypeSupport(true); ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
SpringApplication.run(OrderApplication.class, args); SpringApplication.run(OrderApplication.class, args);
} }
......
/*
* Copyright (c) 2018 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
package cn.freemud.config;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.fastjson.support.config.FastJsonConfig;
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.math.BigInteger;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
/**
* WebMvcConfigurer
*/
@Configuration
@Slf4j
public class WebMvcConfig implements WebMvcConfigurer {
@Bean
public ObjectMapper objectMapper(){
ObjectMapper objectMapper = new ObjectMapper();
//忽略未知属性
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
SimpleModule simpleModule = new SimpleModule();
//将Long,BigInteger序列化的时候,转化为String,否则会出现精度问题
simpleModule.addSerializer(Long.class, com.fasterxml.jackson.databind.ser.std.ToStringSerializer.instance);
simpleModule.addSerializer(Long.TYPE, com.fasterxml.jackson.databind.ser.std.ToStringSerializer.instance);
simpleModule.addSerializer(BigInteger.class, com.fasterxml.jackson.databind.ser.std.ToStringSerializer.instance);
objectMapper.registerModule(simpleModule);
return objectMapper;
}
// @Bean
// public HttpMessageConverter fastjsonHttpMessageConverter() {
// //定义一个转换消息的对象
// FastJsonHttpMessageConverter fastConverter = new FastJsonHttpMessageConverter();
//
// //添加fastjson的配置信息 比如 :是否要格式化返回的json数据
// FastJsonConfig fastJsonConfig = new FastJsonConfig();
//
// //过滤并修改配置返回内容
// fastJsonConfig.setSerializerFeatures(
// //List字段如果为null,输出为[],而非null
// //SerializerFeature.WriteNullListAsEmpty,
// //字符类型字段如果为null,输出为"",而非null
//// SerializerFeature.WriteNullStringAsEmpty,
// //Boolean字段如果为null,输出为false,而非null
//// SerializerFeature.WriteNullBooleanAsFalse,
// //SerializerFeature.WriteNullBooleanAsFalse,
// //消除对同一对象循环引用的问题,默认为false(如果不配置有可能会进入死循环)
// SerializerFeature.DisableCircularReferenceDetect,
// SerializerFeature.PrettyFormat
// );
//
// //在转换器中添加配置信息
// fastConverter.setFastJsonConfig(fastJsonConfig);
// List<MediaType> supportedMediaTypes = new ArrayList<>();
// supportedMediaTypes.add(MediaType.APPLICATION_JSON);
// supportedMediaTypes.add(MediaType.APPLICATION_JSON_UTF8);
// fastConverter.setSupportedMediaTypes(supportedMediaTypes);
// return fastConverter;
// }
@Bean
public MappingJackson2HttpMessageConverter getMappingJackson2HttpMessageConverter() {
MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter = new MappingJackson2HttpMessageConverter();
//设置中文编码格式
List<MediaType> list = new ArrayList<MediaType>();
list.add(MediaType.APPLICATION_JSON_UTF8);
mappingJackson2HttpMessageConverter.setSupportedMediaTypes(list);
return mappingJackson2HttpMessageConverter;
}
}
...@@ -2,6 +2,7 @@ package cn.freemud.entities.dto; ...@@ -2,6 +2,7 @@ package cn.freemud.entities.dto;
import lombok.*; import lombok.*;
import javax.validation.constraints.NotNull;
import java.util.List; import java.util.List;
@NoArgsConstructor @NoArgsConstructor
...@@ -119,17 +120,17 @@ public class ActivityQueryRequestDto { ...@@ -119,17 +120,17 @@ public class ActivityQueryRequestDto {
/** /**
* 商品ID * 商品ID
*/ */
@NonNull @NotNull
private String goodsId; private String goodsId;
/** /**
* 商品数量 * 商品数量
*/ */
@NonNull @NotNull
private Integer goodsQuantity; private Integer goodsQuantity;
/** /**
* 原价 * 原价
*/ */
@NonNull @NotNull
private Long originalPrice; private Long originalPrice;
} }
} }
...@@ -17,14 +17,15 @@ import lombok.Data; ...@@ -17,14 +17,15 @@ import lombok.Data;
import lombok.NonNull; import lombok.NonNull;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import javax.validation.constraints.NotNull;
import java.util.List; import java.util.List;
@Data @Data
@RequiredArgsConstructor @RequiredArgsConstructor
public class GetMemberCouponListRequestDto { public class GetMemberCouponListRequestDto {
@NonNull @NotNull
private String partnerId; private String partnerId;
@NonNull @NotNull
private String memberId; private String memberId;
/** /**
* 券状态{-1所有 0可用(剔除过期) 1已使用 6已过期(根据生失效日期)} * 券状态{-1所有 0可用(剔除过期) 1已使用 6已过期(根据生失效日期)}
...@@ -47,4 +48,9 @@ public class GetMemberCouponListRequestDto { ...@@ -47,4 +48,9 @@ public class GetMemberCouponListRequestDto {
*/ */
private Integer pageSize; private Integer pageSize;
public GetMemberCouponListRequestDto(String partnerId,String memberId){
this.partnerId = partnerId;
this.memberId = memberId;
}
} }
...@@ -16,14 +16,15 @@ package cn.freemud.entities.dto; ...@@ -16,14 +16,15 @@ package cn.freemud.entities.dto;
import lombok.Data; import lombok.Data;
import lombok.NonNull; import lombok.NonNull;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
@Data @Data
public class GetMemberCouponListResponseDto { public class GetMemberCouponListResponseDto {
@NonNull @NotNull
private String code; private String code;
@NonNull @NotNull
private String message; private String message;
private Integer ver; private Integer ver;
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
*/ */
package cn.freemud.entities.dto; package cn.freemud.entities.dto;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
......
...@@ -4,9 +4,11 @@ import lombok.Data; ...@@ -4,9 +4,11 @@ import lombok.Data;
import lombok.NonNull; import lombok.NonNull;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import javax.validation.constraints.NotNull;
@Data @Data
@RequiredArgsConstructor @RequiredArgsConstructor
public class GetPayEbCodeByAppIdRequestDto { public class GetPayEbCodeByAppIdRequestDto {
@NonNull @NotNull
private String appId; private String appId;
} }
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
*/ */
package cn.freemud.entities.dto.pay; package cn.freemud.entities.dto.pay;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
......
...@@ -17,16 +17,17 @@ import lombok.Data; ...@@ -17,16 +17,17 @@ import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.NonNull; import lombok.NonNull;
import javax.validation.constraints.NotNull;
import java.util.List; import java.util.List;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
public class GetMemberCouponListRequestVo { public class GetMemberCouponListRequestVo {
@NonNull @NotNull
private String sessionId; private String sessionId;
@NonNull @NotNull
private String partnerId; private String partnerId;
/** /**
* 券状态List * 券状态List
......
...@@ -171,6 +171,7 @@ public enum ResponseResult { ...@@ -171,6 +171,7 @@ public enum ResponseResult {
ORDER_CANCEL_ERROR_EXPECT_TIME("45067", "预约时间还剩15分钟,无法取消"), ORDER_CANCEL_ERROR_EXPECT_TIME("45067", "预约时间还剩15分钟,无法取消"),
ORDER_CANCEL_ERROR_ESTIMATE_TIME("45068", "预计送达还剩30分钟,无法取消"), ORDER_CANCEL_ERROR_ESTIMATE_TIME("45068", "预计送达还剩30分钟,无法取消"),
STORE_SELF_ERROR("45069", "请选择截止营业时间大于45分钟下单"), STORE_SELF_ERROR("45069", "请选择截止营业时间大于45分钟下单"),
COUPON_INVALID("45070", "券已锁定,请先支付或取消待支付订单"),
/** /**
......
...@@ -4,8 +4,8 @@ import feign.codec.Encoder; ...@@ -4,8 +4,8 @@ import feign.codec.Encoder;
import feign.form.spring.SpringFormEncoder; import feign.form.spring.SpringFormEncoder;
import org.springframework.beans.factory.ObjectFactory; import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.web.HttpMessageConverters; import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.cloud.netflix.feign.support.SpringEncoder; import org.springframework.cloud.openfeign.support.SpringEncoder;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
public class FormSupportConfig { public class FormSupportConfig {
......
...@@ -123,10 +123,9 @@ public class AppOrderServiceImpl implements AppOrderService { ...@@ -123,10 +123,9 @@ public class AppOrderServiceImpl implements AppOrderService {
requestDto.setCouponCodes(couponList); requestDto.setCouponCodes(couponList);
requestDto.setPartnerId(Integer.valueOf(createOrderVo.getPartnerId())); requestDto.setPartnerId(Integer.valueOf(createOrderVo.getPartnerId()));
InvalidCouponsResponseDto invalidCouponsResponseDto = couponOnlineClient.invalidCoupons(requestDto); InvalidCouponsResponseDto invalidCouponsResponseDto = couponOnlineClient.invalidCoupons(requestDto);
if (invalidCouponsResponseDto.getStatusCode() != 100 || invalidCouponsResponseDto.getData() == null || (invalidCouponsResponseDto.getData() != null && CollectionUtils.isEmpty(invalidCouponsResponseDto.getData().getInvalidCoupons()))){ if (invalidCouponsResponseDto.getStatusCode() != 100 || invalidCouponsResponseDto.getData() == null || (invalidCouponsResponseDto.getData() != null && CollectionUtils.isNotEmpty(invalidCouponsResponseDto.getData().getInvalidCoupons()))){
return ResponseUtil.error(ShoppingCartConstant.COUPON_INVALID); return ResponseUtil.error(ResponseResult.COUPON_INVALID.getCode(), ResponseResult.COUPON_INVALID.getMessage());
} }
} }
OrderExtInfoDto extInfo = orderservice.getExtInfo(userLoginInfoDto, storeResponseDto, pushOrderTime, createOrderVo, shoppingCartGoodsDto); OrderExtInfoDto extInfo = orderservice.getExtInfo(userLoginInfoDto, storeResponseDto, pushOrderTime, createOrderVo, shoppingCartGoodsDto);
......
...@@ -84,7 +84,6 @@ import java.util.*; ...@@ -84,7 +84,6 @@ import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Component @Component
@Log4j
public class CheckOrder { public class CheckOrder {
// 配送费逻辑是否使用旧的 // 配送费逻辑是否使用旧的
......
...@@ -2,7 +2,7 @@ package cn.freemud.service.mccafe.thirdparty; ...@@ -2,7 +2,7 @@ package cn.freemud.service.mccafe.thirdparty;
import cn.freemud.entities.dto.coupon.BatchQueryActivityInfoRequestDto; import cn.freemud.entities.dto.coupon.BatchQueryActivityInfoRequestDto;
import cn.freemud.entities.dto.coupon.GetAppKeyRequestDto; import cn.freemud.entities.dto.coupon.GetAppKeyRequestDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -4,7 +4,7 @@ import cn.freemud.entities.dto.BaseResponseDto; ...@@ -4,7 +4,7 @@ import cn.freemud.entities.dto.BaseResponseDto;
import cn.freemud.entities.dto.CancelDeliveryRequest; import cn.freemud.entities.dto.CancelDeliveryRequest;
import cn.freemud.entities.dto.CreateOrderRequestDto; import cn.freemud.entities.dto.CreateOrderRequestDto;
import cn.freemud.entities.dto.delivery.*; import cn.freemud.entities.dto.delivery.*;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
......
...@@ -5,7 +5,7 @@ import cn.freemud.entities.dto.CreateOrderRequestDto; ...@@ -5,7 +5,7 @@ import cn.freemud.entities.dto.CreateOrderRequestDto;
import cn.freemud.entities.dto.delivery.CancelDeliveryResponseDto; import cn.freemud.entities.dto.delivery.CancelDeliveryResponseDto;
import cn.freemud.entities.dto.delivery.MCCafeDeliveryBaseResponse; import cn.freemud.entities.dto.delivery.MCCafeDeliveryBaseResponse;
import cn.freemud.entities.dto.delivery.MCCafeDeliveryGetStoreIdResponse; import cn.freemud.entities.dto.delivery.MCCafeDeliveryGetStoreIdResponse;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
......
...@@ -15,7 +15,7 @@ package cn.freemud.service.thirdparty; ...@@ -15,7 +15,7 @@ package cn.freemud.service.thirdparty;
import cn.freemud.base.entity.BaseResponse; import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.dto.activity.PayGiftCheckAndJoinResponseDto; import cn.freemud.entities.dto.activity.PayGiftCheckAndJoinResponseDto;
import cn.freemud.entities.dto.activity.PayGitCheckAndJoinRequestDto; import cn.freemud.entities.dto.activity.PayGitCheckAndJoinRequestDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -16,7 +16,7 @@ package cn.freemud.service.thirdparty; ...@@ -16,7 +16,7 @@ package cn.freemud.service.thirdparty;
import cn.freemud.entities.dto.PaySuccessBuridPointDto; import cn.freemud.entities.dto.PaySuccessBuridPointDto;
import cn.freemud.entities.dto.pay.CombPayResponse; import cn.freemud.entities.dto.pay.CombPayResponse;
import com.freemud.sdk.api.assortment.order.request.payment.CombPayRequest; import com.freemud.sdk.api.assortment.order.request.payment.CombPayRequest;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestHeader;
......
...@@ -4,7 +4,7 @@ import cn.freemud.entities.dto.BatchQueryActivityInfoRequestDto; ...@@ -4,7 +4,7 @@ import cn.freemud.entities.dto.BatchQueryActivityInfoRequestDto;
import cn.freemud.entities.dto.BatchQueryActivityInfoResponseDto; import cn.freemud.entities.dto.BatchQueryActivityInfoResponseDto;
import cn.freemud.entities.dto.GetAppKeyRequestDto; import cn.freemud.entities.dto.GetAppKeyRequestDto;
import cn.freemud.entities.dto.GetAppKeyResponseDto; import cn.freemud.entities.dto.GetAppKeyResponseDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -15,7 +15,7 @@ package cn.freemud.service.thirdparty; ...@@ -15,7 +15,7 @@ package cn.freemud.service.thirdparty;
import cn.freemud.entities.dto.pay.CombPayResponse; import cn.freemud.entities.dto.pay.CombPayResponse;
import com.freemud.sdk.api.assortment.order.request.payment.CombPayRequest; import com.freemud.sdk.api.assortment.order.request.payment.CombPayRequest;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestHeader;
......
...@@ -13,12 +13,8 @@ ...@@ -13,12 +13,8 @@
package cn.freemud.service.thirdparty; package cn.freemud.service.thirdparty;
import cn.freemud.entities.dto.*; import cn.freemud.entities.dto.*;
import cn.freemud.entities.dto.coupon.InvalidCouponsRequestDto; import org.springframework.cloud.openfeign.FeignClient;
import cn.freemud.entities.dto.coupon.InvalidCouponsResponseDto;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
// 测试http://115.159.65.101:8002 线上http://10.51.0.37:8002 // 测试http://115.159.65.101:8002 线上http://10.51.0.37:8002
......
...@@ -2,7 +2,7 @@ package cn.freemud.service.thirdparty; ...@@ -2,7 +2,7 @@ package cn.freemud.service.thirdparty;
import cn.freemud.entities.dto.CouponCodeResponseDto; import cn.freemud.entities.dto.CouponCodeResponseDto;
import cn.freemud.entities.dto.CouponCodeVerificationDto; import cn.freemud.entities.dto.CouponCodeVerificationDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
@FeignClient(name = "COUPON",url="${saas.couponofflineclient.feign.url}") @FeignClient(name = "COUPON",url="${saas.couponofflineclient.feign.url}")
......
...@@ -6,10 +6,11 @@ import cn.freemud.entities.dto.GetCouponDetailResponseDto; ...@@ -6,10 +6,11 @@ import cn.freemud.entities.dto.GetCouponDetailResponseDto;
import cn.freemud.entities.dto.coupon.InvalidCouponsRequestDto; import cn.freemud.entities.dto.coupon.InvalidCouponsRequestDto;
import cn.freemud.entities.dto.coupon.InvalidCouponsResponseDto; import cn.freemud.entities.dto.coupon.InvalidCouponsResponseDto;
import cn.freemud.interceptor.FormSupportConfig; import cn.freemud.interceptor.FormSupportConfig;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Map; import java.util.Map;
...@@ -22,7 +23,7 @@ public interface CouponOnlineClient { ...@@ -22,7 +23,7 @@ public interface CouponOnlineClient {
@PostMapping(value = "/code_v4", produces = MediaType.APPLICATION_JSON_UTF8_VALUE, @PostMapping(value = "/code_v4", produces = MediaType.APPLICATION_JSON_UTF8_VALUE,
consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE} consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE}
) )
GetCouponDetailResponseDto getCouponDetails(@RequestBody Map<String, ?> map); GetCouponDetailResponseDto getCouponDetails(@RequestParam Map<String, ?> map);
/** /**
* 查询券详情 * 查询券详情
......
...@@ -2,7 +2,7 @@ package cn.freemud.service.thirdparty; ...@@ -2,7 +2,7 @@ package cn.freemud.service.thirdparty;
import cn.freemud.entities.dto.GetUserScoreUserDetailDto; import cn.freemud.entities.dto.GetUserScoreUserDetailDto;
import cn.freemud.entities.vo.GetUserScoreUseDetailVo; import cn.freemud.entities.vo.GetUserScoreUseDetailVo;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -2,7 +2,7 @@ package cn.freemud.service.thirdparty; ...@@ -2,7 +2,7 @@ package cn.freemud.service.thirdparty;
import cn.freemud.base.entity.BaseResponse; import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.dto.PurchasePaidRequestDto; import cn.freemud.entities.dto.PurchasePaidRequestDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -15,7 +15,7 @@ package cn.freemud.service.thirdparty; ...@@ -15,7 +15,7 @@ package cn.freemud.service.thirdparty;
import cn.freemud.entities.dto.*; import cn.freemud.entities.dto.*;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -16,7 +16,7 @@ package cn.freemud.service.thirdparty; ...@@ -16,7 +16,7 @@ package cn.freemud.service.thirdparty;
import cn.freemud.entities.dto.GetMemberCouponListRequestDto; import cn.freemud.entities.dto.GetMemberCouponListRequestDto;
import cn.freemud.entities.dto.GetMemberCouponListResponseDto; import cn.freemud.entities.dto.GetMemberCouponListResponseDto;
import cn.freemud.entities.dto.user.*; import cn.freemud.entities.dto.user.*;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -6,7 +6,7 @@ import cn.freemud.entities.dto.delivery.QueryDeliveryAmountRequestDto; ...@@ -6,7 +6,7 @@ import cn.freemud.entities.dto.delivery.QueryDeliveryAmountRequestDto;
import cn.freemud.entities.dto.delivery.QueryDeliveryAmountResponseDto; import cn.freemud.entities.dto.delivery.QueryDeliveryAmountResponseDto;
import cn.freemud.entities.vo.CreateDeliveryVo; import cn.freemud.entities.vo.CreateDeliveryVo;
import com.freemud.application.sdk.api.deliverycenter.response.CreateDeliveryOrderResponseDto; import com.freemud.application.sdk.api.deliverycenter.response.CreateDeliveryOrderResponseDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
......
...@@ -4,7 +4,7 @@ import cn.freemud.base.entity.BaseResponse; ...@@ -4,7 +4,7 @@ import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.dto.ecology.*; import cn.freemud.entities.dto.ecology.*;
import cn.freemud.entities.dto.wechat.GetAuthorizerRequestDto; import cn.freemud.entities.dto.wechat.GetAuthorizerRequestDto;
import cn.freemud.entities.dto.wechat.GetTokenResponseDto; import cn.freemud.entities.dto.wechat.GetTokenResponseDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
......
...@@ -4,7 +4,7 @@ import cn.freemud.base.entity.BaseResponse; ...@@ -4,7 +4,7 @@ import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.dto.GetStoreCloudPrintDto; import cn.freemud.entities.dto.GetStoreCloudPrintDto;
import cn.freemud.entities.dto.GetStoreCloudPrintResponseDto; import cn.freemud.entities.dto.GetStoreCloudPrintResponseDto;
import cn.freemud.entities.dto.OrderPrintDto; import cn.freemud.entities.dto.OrderPrintDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
//package cn.freemud.service.thirdparty; //package cn.freemud.service.thirdparty;
// //
//import cn.freemud.entities.dto.*; //import cn.freemud.entities.dto.*;
//import org.springframework.cloud.netflix.feign.FeignClient; //import org.springframework.cloud.openfeign.FeignClient;
//import org.springframework.web.bind.annotation.PostMapping; //import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody; //import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping; //import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -2,7 +2,7 @@ package cn.freemud.service.thirdparty; ...@@ -2,7 +2,7 @@ package cn.freemud.service.thirdparty;
import cn.freemud.entities.dto.order.FacePayRequestDto; import cn.freemud.entities.dto.order.FacePayRequestDto;
import cn.freemud.entities.dto.order.FacePayResponseDto; import cn.freemud.entities.dto.order.FacePayResponseDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -2,7 +2,7 @@ package cn.freemud.service.thirdparty; ...@@ -2,7 +2,7 @@ package cn.freemud.service.thirdparty;
import cn.freemud.base.entity.BaseResponse; import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.dto.pos.PosBaseRequestDto; import cn.freemud.entities.dto.pos.PosBaseRequestDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -14,7 +14,7 @@ package cn.freemud.service.thirdparty; ...@@ -14,7 +14,7 @@ package cn.freemud.service.thirdparty;
import cn.freemud.base.entity.BaseResponse; import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.dto.*; import cn.freemud.entities.dto.*;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@FeignClient(name = "PROMOTION-ACTIVITIES", url = "${saas.promotionactivityclient.feign.url}") @FeignClient(name = "PROMOTION-ACTIVITIES", url = "${saas.promotionactivityclient.feign.url}")
......
...@@ -16,7 +16,7 @@ import cn.freemud.entities.dto.ActivityQueryRequestDto; ...@@ -16,7 +16,7 @@ import cn.freemud.entities.dto.ActivityQueryRequestDto;
import cn.freemud.entities.dto.activity.ActivityQueryResponseDto; import cn.freemud.entities.dto.activity.ActivityQueryResponseDto;
import cn.freemud.entities.dto.promotion.CalculationDiscountRequestDto; import cn.freemud.entities.dto.promotion.CalculationDiscountRequestDto;
import cn.freemud.entities.dto.promotion.CalculationDiscountResponseDto; import cn.freemud.entities.dto.promotion.CalculationDiscountResponseDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@FeignClient(name = "promotion-service", url = "${saas.activityclient.feign.url}") @FeignClient(name = "promotion-service", url = "${saas.activityclient.feign.url}")
......
...@@ -2,7 +2,7 @@ package cn.freemud.service.thirdparty; ...@@ -2,7 +2,7 @@ package cn.freemud.service.thirdparty;
import cn.freemud.entities.dto.RecommendProductRequestDto; import cn.freemud.entities.dto.RecommendProductRequestDto;
import cn.freemud.entities.dto.RecommendProductResponseDto; import cn.freemud.entities.dto.RecommendProductResponseDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -18,7 +18,7 @@ import cn.freemud.entities.dto.shoppingCart.GetShoppingCartGoodsApportionDto; ...@@ -18,7 +18,7 @@ import cn.freemud.entities.dto.shoppingCart.GetShoppingCartGoodsApportionDto;
import cn.freemud.entities.dto.shoppingCart.NewShoppingCartClearDto; import cn.freemud.entities.dto.shoppingCart.NewShoppingCartClearDto;
import cn.freemud.entities.dto.shoppingCart.ShoppingCartGoodsDto; import cn.freemud.entities.dto.shoppingCart.ShoppingCartGoodsDto;
import cn.freemud.entities.dto.shoppingCart.CollageOrderDto; import cn.freemud.entities.dto.shoppingCart.CollageOrderDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -16,7 +16,7 @@ import cn.freemud.base.entity.BaseResponse; ...@@ -16,7 +16,7 @@ import cn.freemud.base.entity.BaseResponse;
import cn.freemud.entities.dto.GetProductStockRequestDto; import cn.freemud.entities.dto.GetProductStockRequestDto;
import cn.freemud.entities.dto.GetProductStockResponseDto; import cn.freemud.entities.dto.GetProductStockResponseDto;
import cn.freemud.entities.dto.UpdateProductStockRequestDto; import cn.freemud.entities.dto.UpdateProductStockRequestDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -15,7 +15,7 @@ package cn.freemud.service.thirdparty; ...@@ -15,7 +15,7 @@ package cn.freemud.service.thirdparty;
import cn.freemud.entities.dto.*; import cn.freemud.entities.dto.*;
import com.freemud.application.sdk.api.storecenter.request.ChangeTableOrderStateRequest; import com.freemud.application.sdk.api.storecenter.request.ChangeTableOrderStateRequest;
import com.freemud.application.sdk.api.storecenter.response.StoreBaseResponse; import com.freemud.application.sdk.api.storecenter.response.StoreBaseResponse;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
......
...@@ -14,7 +14,7 @@ package cn.freemud.service.thirdparty; ...@@ -14,7 +14,7 @@ package cn.freemud.service.thirdparty;
import cn.freemud.entities.dto.ShopBaseResponseDto; import cn.freemud.entities.dto.ShopBaseResponseDto;
import cn.freemud.entities.dto.*; import cn.freemud.entities.dto.*;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
......
...@@ -2,7 +2,7 @@ package cn.freemud.service.thirdparty; ...@@ -2,7 +2,7 @@ package cn.freemud.service.thirdparty;
import cn.freemud.entities.dto.SvcComPayRequestDto; import cn.freemud.entities.dto.SvcComPayRequestDto;
import cn.freemud.entities.dto.SvcComPayResponseDto; import cn.freemud.entities.dto.SvcComPayResponseDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
package cn.freemud.service.thirdparty; package cn.freemud.service.thirdparty;
import cn.freemud.entities.dto.BuriedPointRequestDto; import cn.freemud.entities.dto.BuriedPointRequestDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -17,7 +17,7 @@ import cn.freemud.entities.dto.WeChatGetAccessTokenResponseDto; ...@@ -17,7 +17,7 @@ import cn.freemud.entities.dto.WeChatGetAccessTokenResponseDto;
import cn.freemud.entities.dto.WechatSendMessageDto; import cn.freemud.entities.dto.WechatSendMessageDto;
import com.freemud.sdk.api.assortment.order.request.order.GroupBuyRequest; import com.freemud.sdk.api.assortment.order.request.order.GroupBuyRequest;
import com.freemud.sdk.api.assortment.order.response.order.GroupBuyResponse; import com.freemud.sdk.api.assortment.order.response.order.GroupBuyResponse;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// //
//import cn.freemud.entities.dto.wechat.GetAuthorizerRequestDto; //import cn.freemud.entities.dto.wechat.GetAuthorizerRequestDto;
//import cn.freemud.entities.dto.wechat.GetTokenResponseDto; //import cn.freemud.entities.dto.wechat.GetTokenResponseDto;
//import org.springframework.cloud.netflix.feign.FeignClient; //import org.springframework.cloud.openfeign.FeignClient;
//import org.springframework.web.bind.annotation.PostMapping; //import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody; //import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping; //import org.springframework.web.bind.annotation.RequestMapping;
......
//package cn.freemud.service.thirdparty; //package cn.freemud.service.thirdparty;
// //
//import org.springframework.cloud.netflix.feign.FeignClient; //import org.springframework.cloud.openfeign.FeignClient;
//import org.springframework.http.MediaType; //import org.springframework.http.MediaType;
//import org.springframework.web.bind.annotation.PostMapping; //import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody; //import org.springframework.web.bind.annotation.RequestBody;
......
...@@ -27,7 +27,7 @@ import org.apache.commons.lang.StringUtils; ...@@ -27,7 +27,7 @@ import org.apache.commons.lang.StringUtils;
import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.ProceedingJoinPoint;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.core.annotation.AnnotationUtils; import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
......
...@@ -9,13 +9,13 @@ apollo.meta=http://212.129.229.203 ...@@ -9,13 +9,13 @@ apollo.meta=http://212.129.229.203
env=dev env=dev
apollo.cluster=local apollo.cluster=local
apollo.bootstrap.enabled=true apollo.bootstrap.enabled=true
apollo.bootstrap.namespaces=micro_progeram_commons,order_service apollo.bootstrap.namespaces=order_service,micro_progeram_commons
#-Dapollo.configService=http://172.81.231.147 #-Dapollo.configService=http://172.81.231.147
spring.main.allow-bean-definition-overriding=true
endpoints.metrics.enabled=true management.endpoints.metrics.enabled=true
endpoints.health.sensitive=false management.endpoints.health.sensitive=false
endpoints.health.enabled=true management.endpoints.health.enabled=true
management.endpoint.health.show-details=always management.endpoint.health.show-details=always
management.endpoints.web.base-path=/ management.endpoints.web.base-path=/
management.endpoints.web.exposure.include=prometheus,info,health,shutdown management.endpoints.web.exposure.include=prometheus,info,health,shutdown
...@@ -23,5 +23,5 @@ management.metrics.tags.application=${spring.application.name} ...@@ -23,5 +23,5 @@ management.metrics.tags.application=${spring.application.name}
management.endpoint.shutdown.enabled=true management.endpoint.shutdown.enabled=true
management.security.enabled=false management.security.enabled=false
management.health.rabbit.enabled=false management.health.rabbit.enabled=false
mcCafe.partnerId=1206 mcCafe.partnerId=1206
apollo.plugin.namespace=openstore.gray.rule
\ No newline at end of file
...@@ -16,7 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -16,7 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import java.util.Arrays; import java.util.Arrays;
......
...@@ -13,7 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -13,7 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import java.util.*; import java.util.*;
......
...@@ -10,7 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -10,7 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import java.util.ArrayList; import java.util.ArrayList;
......
...@@ -14,7 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -14,7 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import java.util.ArrayList; import java.util.ArrayList;
......
...@@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
/** /**
......
...@@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
/** /**
......
...@@ -17,7 +17,7 @@ import org.springframework.beans.factory.annotation.Value; ...@@ -17,7 +17,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import java.util.Arrays; import java.util.Arrays;
......
...@@ -9,7 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -9,7 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
@Slf4j @Slf4j
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
//import org.springframework.boot.autoconfigure.EnableAutoConfiguration; //import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
//import org.springframework.boot.test.context.SpringBootTest; //import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.cloud.client.discovery.EnableDiscoveryClient; //import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
//import org.springframework.cloud.netflix.feign.EnableFeignClients; //import org.springframework.cloud.openfeign.EnableFeignClients;
//import org.springframework.test.context.junit4.SpringRunner; //import org.springframework.test.context.junit4.SpringRunner;
// //
//import java.util.ArrayList; //import java.util.ArrayList;
......
...@@ -24,7 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -24,7 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import java.util.ArrayList; import java.util.ArrayList;
......
...@@ -9,7 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -9,7 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import java.util.List; import java.util.List;
......
...@@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import java.util.List; import java.util.List;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
//import org.springframework.boot.autoconfigure.EnableAutoConfiguration; //import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
//import org.springframework.boot.test.context.SpringBootTest; //import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.cloud.client.discovery.EnableDiscoveryClient; //import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
//import org.springframework.cloud.netflix.feign.EnableFeignClients; //import org.springframework.cloud.openfeign.EnableFeignClients;
//import org.springframework.test.context.junit4.SpringRunner; //import org.springframework.test.context.junit4.SpringRunner;
// //
//import java.util.HashMap; //import java.util.HashMap;
......
...@@ -19,7 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -19,7 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
/** /**
......
...@@ -20,7 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -20,7 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import java.util.ArrayList; import java.util.ArrayList;
......
...@@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
/** /**
......
...@@ -43,7 +43,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -43,7 +43,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import java.util.List; import java.util.List;
......
...@@ -23,7 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -23,7 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import java.text.ParseException; import java.text.ParseException;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
//import org.springframework.boot.autoconfigure.EnableAutoConfiguration; //import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
//import org.springframework.boot.test.context.SpringBootTest; //import org.springframework.boot.test.context.SpringBootTest;
//import org.springframework.cloud.client.discovery.EnableDiscoveryClient; //import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
//import org.springframework.cloud.netflix.feign.EnableFeignClients; //import org.springframework.cloud.openfeign.EnableFeignClients;
//import org.springframework.test.context.junit4.SpringRunner; //import org.springframework.test.context.junit4.SpringRunner;
// //
//import java.util.HashMap; //import java.util.HashMap;
......
...@@ -19,7 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -19,7 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
......
...@@ -6,7 +6,7 @@ import org.junit.runner.RunWith; ...@@ -6,7 +6,7 @@ import org.junit.runner.RunWith;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import javax.annotation.Resource; import javax.annotation.Resource;
......
...@@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
......
...@@ -24,7 +24,7 @@ import org.springframework.beans.factory.annotation.Value; ...@@ -24,7 +24,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import java.util.Map; import java.util.Map;
......
...@@ -19,7 +19,7 @@ import org.springframework.boot.SpringBootVersion; ...@@ -19,7 +19,7 @@ import org.springframework.boot.SpringBootVersion;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.core.SpringVersion; import org.springframework.core.SpringVersion;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import springfox.documentation.spring.web.json.Json; import springfox.documentation.spring.web.json.Json;
......
...@@ -10,7 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -10,7 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
/** /**
......
...@@ -101,7 +101,6 @@ ...@@ -101,7 +101,6 @@
<dependency> <dependency>
<groupId>cn.freemud.commons</groupId> <groupId>cn.freemud.commons</groupId>
<artifactId>commons-base</artifactId> <artifactId>commons-base</artifactId>
<version>1.5.1-release</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!--freemud类库依赖--> <!--freemud类库依赖-->
...@@ -110,6 +109,11 @@ ...@@ -110,6 +109,11 @@
<artifactId>commons-base</artifactId> <artifactId>commons-base</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>20.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId> <groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId> <artifactId>springfox-swagger2</artifactId>
<version>2.7.0</version> <version>2.7.0</version>
......
...@@ -6,7 +6,7 @@ import cn.freemud.management.entities.dto.response.coupon.McdNetBatchQueryRespon ...@@ -6,7 +6,7 @@ import cn.freemud.management.entities.dto.response.coupon.McdNetBatchQueryRespon
import com.freemud.application.sdk.api.couponcenter.offline.response.CouponQueryResponse; import com.freemud.application.sdk.api.couponcenter.offline.response.CouponQueryResponse;
import com.freemud.application.sdk.api.couponcenter.offline.response.CouponRedeemResponse; import com.freemud.application.sdk.api.couponcenter.offline.response.CouponRedeemResponse;
import com.freemud.application.sdk.api.couponcenter.offline.response.CouponBaseResponse; import com.freemud.application.sdk.api.couponcenter.offline.response.CouponBaseResponse;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -15,7 +15,7 @@ package cn.freemud.management.thirdparty; ...@@ -15,7 +15,7 @@ package cn.freemud.management.thirdparty;
import cn.freemud.base.entity.BaseResponse; import cn.freemud.base.entity.BaseResponse;
import cn.freemud.management.entities.dto.request.customer.ForbiddenCardCodeRequest; import cn.freemud.management.entities.dto.request.customer.ForbiddenCardCodeRequest;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -3,7 +3,7 @@ package cn.freemud.management.thirdparty; ...@@ -3,7 +3,7 @@ package cn.freemud.management.thirdparty;
import cn.freemud.management.entities.dto.request.delivery.DeliveryOrderAssemblyackRequest; import cn.freemud.management.entities.dto.request.delivery.DeliveryOrderAssemblyackRequest;
import cn.freemud.management.entities.dto.request.delivery.DeliveryOrderHaltedRequest; import cn.freemud.management.entities.dto.request.delivery.DeliveryOrderHaltedRequest;
import com.freemud.application.sdk.api.deliverycenter.response.DeliveryResponseDto; import com.freemud.application.sdk.api.deliverycenter.response.DeliveryResponseDto;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -15,7 +15,7 @@ package cn.freemud.management.thirdparty; ...@@ -15,7 +15,7 @@ package cn.freemud.management.thirdparty;
import com.freemud.sdk.api.assortment.order.request.order.MultiOrderRefundRequest; import com.freemud.sdk.api.assortment.order.request.order.MultiOrderRefundRequest;
import com.freemud.sdk.api.assortment.order.response.order.MultiOrderRefundResponse; import com.freemud.sdk.api.assortment.order.response.order.MultiOrderRefundResponse;
import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
......
...@@ -11,14 +11,16 @@ ...@@ -11,14 +11,16 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<commons.version>1.5.1-release</commons.version> <commons.version>2.1.0-release</commons.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.netflix.version>1.3.0.BUILD-SNAPSHOT</spring.netflix.version> <spring.netflix.version>1.3.0.BUILD-SNAPSHOT</spring.netflix.version>
<spring.zookeeper.version>1.0.3.RELEASE</spring.zookeeper.version> <spring.zookeeper.version>1.0.3.RELEASE</spring.zookeeper.version>
<spring.cloud.version>Dalston.RELEASE</spring.cloud.version> <spring.cloud.version>Greenwich.SR2</spring.cloud.version>
<spring.cloud.amqp.version>1.5.3.RELEASE</spring.cloud.amqp.version> <spring.cloud.amqp.version>1.5.3.RELEASE</spring.cloud.amqp.version>
<spring.cloud.redis.version>1.5.3.RELEASE</spring.cloud.redis.version> <spring.cloud.redis.version>1.5.3.RELEASE</spring.cloud.redis.version>
<sharding-jdbc.version>2.0.1</sharding-jdbc.version> <sharding-jdbc.version>2.0.1</sharding-jdbc.version>
<lombok.version>1.16.16</lombok.version>
<feign-form.version>3.0.3</feign-form.version>
</properties> </properties>
<modules> <modules>
<module>ordercenter-sdk</module> <module>ordercenter-sdk</module>
...@@ -33,15 +35,15 @@ ...@@ -33,15 +35,15 @@
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version> <version>2.1.5.RELEASE</version>
</parent> </parent>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-boot-dependencies</artifactId> <artifactId>spring-cloud-dependencies</artifactId>
<version>1.5.3.RELEASE</version> <version>${spring.cloud.version}</version>
<type>pom</type> <type>pom</type>
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
...@@ -53,25 +55,27 @@ ...@@ -53,25 +55,27 @@
</dependency> </dependency>
<!-- commons 依赖 --> <!-- commons 依赖 -->
<dependency> <dependency>
<groupId>cn.freemud.commons</groupId> <groupId>cn.freemud.commons</groupId>
<artifactId>commons-base</artifactId> <artifactId>commons-base</artifactId>
<version>1.5.1-release</version> <version>2.1.5a-release</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.freemud.commons</groupId> <groupId>cn.freemud.commons</groupId>
<artifactId>commons-dao</artifactId> <artifactId>commons-dao</artifactId>
<version>2.0.1-release</version> <version>${commons.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.freemud.commons</groupId> <groupId>cn.freemud.commons</groupId>
<artifactId>commons-redis</artifactId> <artifactId>commons-redis</artifactId>
<version>1.5.1-release</version> <version>${commons.version}</version>
</dependency>
<dependency>
<groupId>cn.freemud.commons</groupId>
<artifactId>commons-amqp</artifactId>
<version>${commons.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.freemud.commons</groupId> <groupId>cn.freemud.commons</groupId>
<artifactId>data-manager-redis</artifactId> <artifactId>data-manager-redis</artifactId>
...@@ -94,50 +98,13 @@ ...@@ -94,50 +98,13 @@
<dependency> <dependency>
<groupId>com.github.pagehelper</groupId> <groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId> <artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.1.2</version> <version>1.2.13</version>
</dependency>
<!-- spring cloud -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring.cloud.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId>
<version>1.3.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka-server</artifactId>
<version>1.3.0.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons</artifactId> <artifactId>spring-cloud-commons</artifactId>
<version>1.3.1.RELEASE</version> <version>2.1.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-feign</artifactId>
<version>1.3.0.RELEASE</version>
</dependency>
<!-- 使用Apache HttpClient替换Feign原生httpclient -->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<version>9.4.0</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId>
<version>1.3.0.RELEASE</version>
</dependency> </dependency>
<!-- spring cloud end --> <!-- spring cloud end -->
...@@ -169,7 +136,7 @@ ...@@ -169,7 +136,7 @@
<dependency> <dependency>
<groupId>org.mybatis.spring.boot</groupId> <groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId> <artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.0</version> <version>2.1.3</version>
</dependency> </dependency>
<!--databases--> <!--databases-->
...@@ -185,6 +152,16 @@ ...@@ -185,6 +152,16 @@
<artifactId>apm-toolkit-logback-1.x</artifactId> <artifactId>apm-toolkit-logback-1.x</artifactId>
<version>6.2.0</version> <version>6.2.0</version>
</dependency> </dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.1.18.RELEASE</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
......
...@@ -73,7 +73,6 @@ ...@@ -73,7 +73,6 @@
<dependency> <dependency>
<groupId>tk.mybatis</groupId> <groupId>tk.mybatis</groupId>
<artifactId>mapper-spring-boot-starter</artifactId> <artifactId>mapper-spring-boot-starter</artifactId>
<version>2.0.2</version>
</dependency> </dependency>
<!-- commons 依赖 --> <!-- commons 依赖 -->
...@@ -102,7 +101,7 @@ ...@@ -102,7 +101,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-eureka</artifactId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency> </dependency>
<dependency> <dependency>
...@@ -139,17 +138,11 @@ ...@@ -139,17 +138,11 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-feign</artifactId> <artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<!-- 使用Apache HttpClient替换Feign原生httpclient -->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<version>9.4.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId> <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency> </dependency>
<dependency> <dependency>
...@@ -232,7 +225,6 @@ ...@@ -232,7 +225,6 @@
<dependency> <dependency>
<groupId>cn.freemud.commons</groupId> <groupId>cn.freemud.commons</groupId>
<artifactId>commons-amqp</artifactId> <artifactId>commons-amqp</artifactId>
<version>1.4.11-release</version>
</dependency> </dependency>
<!-- 券码SDK --> <!-- 券码SDK -->
<dependency> <dependency>
...@@ -244,12 +236,12 @@ ...@@ -244,12 +236,12 @@
<dependency> <dependency>
<groupId>io.github.openfeign.form</groupId> <groupId>io.github.openfeign.form</groupId>
<artifactId>feign-form</artifactId> <artifactId>feign-form</artifactId>
<version>3.2.2</version> <version>${feign-form.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.github.openfeign.form</groupId> <groupId>io.github.openfeign.form</groupId>
<artifactId>feign-form-spring</artifactId> <artifactId>feign-form-spring</artifactId>
<version>3.2.2</version> <version>${feign-form.version}</version>
</dependency> </dependency>
<!-- 生成id --> <!-- 生成id -->
<dependency> <dependency>
...@@ -296,7 +288,24 @@ ...@@ -296,7 +288,24 @@
<groupId>org.apache.skywalking</groupId> <groupId>org.apache.skywalking</groupId>
<artifactId>apm-toolkit-logback-1.x</artifactId> <artifactId>apm-toolkit-logback-1.x</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.freemud.nepxion</groupId>
<artifactId>discovery-plugin-starter-eureka</artifactId>
<version>5.5.12-SNAPSHOT</version>
</dependency>
<!--服务需要依赖-->
<dependency>
<groupId>com.freemud.nepxion</groupId>
<artifactId>discovery-plugin-strategy-starter-service</artifactId>
<version>5.5.12-SNAPSHOT</version>
</dependency>
<!--所有应用都需要-->
<dependency>
<groupId>com.freemud.nepxion</groupId>
<artifactId>discovery-plugin-config-center-starter-apollo</artifactId>
<version>5.5.12-SNAPSHOT</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
......
...@@ -16,6 +16,7 @@ import cn.freemud.core.db.DataSourcesConfig; ...@@ -16,6 +16,7 @@ import cn.freemud.core.db.DataSourcesConfig;
import com.alibaba.fastjson.parser.ParserConfig; import com.alibaba.fastjson.parser.ParserConfig;
import com.freemud.application.sdk.api.log.LogThreadLocal; import com.freemud.application.sdk.api.log.LogThreadLocal;
import feign.RequestInterceptor; import feign.RequestInterceptor;
import org.apache.commons.lang.StringUtils;
import org.jasypt.encryption.StringEncryptor; import org.jasypt.encryption.StringEncryptor;
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor; import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig; import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
...@@ -25,7 +26,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; ...@@ -25,7 +26,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy; import org.springframework.context.annotation.EnableAspectJAutoProxy;
...@@ -48,7 +49,12 @@ import tk.mybatis.spring.annotation.MapperScan; ...@@ -48,7 +49,12 @@ import tk.mybatis.spring.annotation.MapperScan;
@EnableFeignClients @EnableFeignClients
@EnableAsync @EnableAsync
public class ShoppingCartApplication { public class ShoppingCartApplication {
private static final String GRAY_VERSION_PROD = "PROD"; //生产版本
private static final String GRAY_VERSION_GRAY = "GRAY"; //灰度版本
public static void main(String[] args) { public static void main(String[] args) {
String getenv = System.getenv("VERSION_FLAG");
System.setProperty("eureka.instance.metadataMap.version", StringUtils.isEmpty(getenv) ? GRAY_VERSION_PROD : GRAY_VERSION_GRAY.equals(getenv) ? GRAY_VERSION_GRAY : GRAY_VERSION_PROD);
ParserConfig.getGlobalInstance().setAutoTypeSupport(true); ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
SpringApplication.run(ShoppingCartApplication.class, args); SpringApplication.run(ShoppingCartApplication.class, args);
} }
...@@ -77,5 +83,4 @@ public class ShoppingCartApplication { ...@@ -77,5 +83,4 @@ public class ShoppingCartApplication {
public RequestInterceptor headerInterceptor() { public RequestInterceptor headerInterceptor() {
return requestTemplate -> requestTemplate.header("x-transaction-id", LogThreadLocal.getTrackingNo()); return requestTemplate -> requestTemplate.header("x-transaction-id", LogThreadLocal.getTrackingNo());
} }
} }
/*
* Copyright (c) 2018 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
package cn.freemud.config;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.fastjson.support.config.FastJsonConfig;
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
/**
* WebMvcConfigurer
*/
@Configuration
@Slf4j
public class WebMvcConfig implements WebMvcConfigurer {
@Bean
public ObjectMapper objectMapper(){
ObjectMapper objectMapper = new ObjectMapper();
//忽略未知属性
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
SimpleModule simpleModule = new SimpleModule();
//将Long,BigInteger序列化的时候,转化为String,否则会出现精度问题
simpleModule.addSerializer(Long.class, com.fasterxml.jackson.databind.ser.std.ToStringSerializer.instance);
simpleModule.addSerializer(Long.TYPE, com.fasterxml.jackson.databind.ser.std.ToStringSerializer.instance);
simpleModule.addSerializer(BigInteger.class, com.fasterxml.jackson.databind.ser.std.ToStringSerializer.instance);
objectMapper.registerModule(simpleModule);
return objectMapper;
}
// @Bean
// public HttpMessageConverter fastjsonHttpMessageConverter() {
// //定义一个转换消息的对象
// FastJsonHttpMessageConverter fastConverter = new FastJsonHttpMessageConverter();
//
// //添加fastjson的配置信息 比如 :是否要格式化返回的json数据
// FastJsonConfig fastJsonConfig = new FastJsonConfig();
//
// //过滤并修改配置返回内容
// fastJsonConfig.setSerializerFeatures(
// //List字段如果为null,输出为[],而非null
// //SerializerFeature.WriteNullListAsEmpty,
// //字符类型字段如果为null,输出为"",而非null
//// SerializerFeature.WriteNullStringAsEmpty,
// //Boolean字段如果为null,输出为false,而非null
//// SerializerFeature.WriteNullBooleanAsFalse,
// //SerializerFeature.WriteNullBooleanAsFalse,
// //消除对同一对象循环引用的问题,默认为false(如果不配置有可能会进入死循环)
// SerializerFeature.DisableCircularReferenceDetect,
// SerializerFeature.PrettyFormat
// );
//
// //在转换器中添加配置信息
// fastConverter.setFastJsonConfig(fastJsonConfig);
// List<MediaType> supportedMediaTypes = new ArrayList<>();
// supportedMediaTypes.add(MediaType.APPLICATION_JSON);
// supportedMediaTypes.add(MediaType.APPLICATION_JSON_UTF8);
// fastConverter.setSupportedMediaTypes(supportedMediaTypes);
// return fastConverter;
// }
@Bean
public MappingJackson2HttpMessageConverter getMappingJackson2HttpMessageConverter() {
MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter = new MappingJackson2HttpMessageConverter();
//设置中文编码格式
List<MediaType> list = new ArrayList<MediaType>();
list.add(MediaType.APPLICATION_JSON_UTF8);
mappingJackson2HttpMessageConverter.setSupportedMediaTypes(list);
return mappingJackson2HttpMessageConverter;
}
}
...@@ -2,6 +2,7 @@ package cn.freemud.entities.dto; ...@@ -2,6 +2,7 @@ package cn.freemud.entities.dto;
import lombok.*; import lombok.*;
import javax.validation.constraints.NotNull;
import java.util.List; import java.util.List;
@NoArgsConstructor @NoArgsConstructor
...@@ -119,18 +120,24 @@ public class ActivityQueryRequestDto { ...@@ -119,18 +120,24 @@ public class ActivityQueryRequestDto {
/** /**
* 商品ID * 商品ID
*/ */
@NonNull @NotNull
private String goodsId; private String goodsId;
/** /**
* 商品数量 * 商品数量
*/ */
@NonNull @NotNull
private Integer goodsQuantity; private Integer goodsQuantity;
/** /**
* 原价 * 原价
*/ */
@NonNull @NotNull
private Long originalPrice; private Long originalPrice;
public QueryGoodsBeanDto(String goodsId,Integer goodsQuantity, Long originalPrice){
this.goodsId = goodsId;
this.goodsQuantity = goodsQuantity;
this.originalPrice = originalPrice;
}
} }
} }
...@@ -17,14 +17,15 @@ import lombok.Data; ...@@ -17,14 +17,15 @@ import lombok.Data;
import lombok.NonNull; import lombok.NonNull;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import javax.validation.constraints.NotNull;
import java.util.List; import java.util.List;
@Data @Data
@RequiredArgsConstructor @RequiredArgsConstructor
public class GetMemberCouponListRequestDto { public class GetMemberCouponListRequestDto {
@NonNull @NotNull
private String partnerId; private String partnerId;
@NonNull @NotNull
private String memberId; private String memberId;
/** /**
* 券状态{-1所有 0可用(剔除过期) 1已使用 6已过期(根据生失效日期)} * 券状态{-1所有 0可用(剔除过期) 1已使用 6已过期(根据生失效日期)}
...@@ -57,4 +58,9 @@ public class GetMemberCouponListRequestDto { ...@@ -57,4 +58,9 @@ public class GetMemberCouponListRequestDto {
private String tag; private String tag;
public GetMemberCouponListRequestDto(String partnerId,String memberId){
this.partnerId = partnerId ;
this.memberId = memberId;
}
} }
...@@ -16,14 +16,15 @@ package cn.freemud.entities.dto; ...@@ -16,14 +16,15 @@ package cn.freemud.entities.dto;
import lombok.Data; import lombok.Data;
import lombok.NonNull; import lombok.NonNull;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List; import java.util.List;
@Data @Data
public class GetMemberCouponListResponseDto { public class GetMemberCouponListResponseDto {
@NonNull @NotNull
private String code; private String code;
@NonNull @NotNull
private String message; private String message;
private Integer ver; private Integer ver;
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
*/ */
package cn.freemud.entities.dto; package cn.freemud.entities.dto;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment