Commit 55da7933 authored by 张辰's avatar 张辰

Merge branch 'v2.4.1-logfilter' into dev

parents e37a0513 cfac8aa4
package com.tanpu.fund.config;
import com.tanpu.common.auth.intercept.FaLoginIntercept;
import com.tanpu.common.log.LoggingFilter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
......@@ -27,4 +30,15 @@ public class WebConfig implements WebMvcConfigurer {
log.info("添加拦截器FaLoginIntercept");
registry.addInterceptor(faLoginIntercept).addPathPatterns("/**");
}
@Bean
public FilterRegistrationBean<LoggingFilter> logFilterRegistration() {
log.info("logFilter Registration");
FilterRegistrationBean<LoggingFilter> registration = new FilterRegistrationBean<>();
registration.setFilter(new LoggingFilter());
registration.addUrlPatterns("/*");
return registration;
}
}
......@@ -13,12 +13,13 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.context.environment.EnvironmentChangeEvent;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.Set;
/*动态刷新日志参数配置*/
// @Component
@Component
@Slf4j
@ConditionalOnProperty(PropertySourcesConstants.APOLLO_BOOTSTRAP_ENABLED)
@AutoConfigureAfter(ApolloAutoConfiguration.class)
......
......@@ -24,6 +24,9 @@ public class ProductForPcServiceImpl implements ProductForPcService {
@Override
public List<Net> getFundNewnet(List<String> list) {
if (CollectionUtils.isEmpty(list)) {
return new ArrayList<>();
}
List<FundNav> fundInfoNewNet = fundInfoCustomMapper.getFundInfoNewNet(list);
if (CollectionUtils.isNotEmpty(fundInfoNewNet)) {
return fundInfoNewNet.stream().map(item -> Net.builder()
......@@ -38,6 +41,9 @@ public class ProductForPcServiceImpl implements ProductForPcService {
@Override
public List<Net> getPrivatefundNewnet(List<String> list) {
if (CollectionUtils.isEmpty(list)) {
return new ArrayList<>();
}
List<FundNav> fundInfoNewNet = fundInfoCustomMapper.getPrivateFundInfoNewNet(list);
if (CollectionUtils.isNotEmpty(fundInfoNewNet)) {
return fundInfoNewNet.stream().map(item -> Net.builder()
......
......@@ -55,9 +55,7 @@
res.price_date as priceDate,
res.nav as nav,
res.cumulative_nav as cumulativeNav,
res.cumulative_nav as cumulativeNavWithdrawal,
res.ishigh_or_low as ishighOrLow,
res.tohigh_nav_ratio as tohighNavRatio
res.cumulative_nav as cumulativeNavWithdrawal
from
(SELECT fund_id, max(price_date) as price_date FROM ifa_imported_fund_nav WHERE fund_id in
<foreach close=")" collection="list" item="fundId" open="(" separator=",">
......
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