Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tamp_fund
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周鹏
tamp_fund
Commits
55da7933
Commit
55da7933
authored
Oct 21, 2021
by
张辰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2.4.1-logfilter' into dev
parents
e37a0513
cfac8aa4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
4 deletions
+23
-4
WebConfig.java
src/main/java/com/tanpu/fund/config/WebConfig.java
+14
-0
ApolloRefresherConfiguration.java
...anpu/fund/config/apollo/ApolloRefresherConfiguration.java
+2
-1
ProductForPcServiceImpl.java
.../com/tanpu/fund/service/impl/ProductForPcServiceImpl.java
+6
-0
FundInfoCustomMapper.xml
...main/resources/mybatis/customize/FundInfoCustomMapper.xml
+1
-3
No files found.
src/main/java/com/tanpu/fund/config/WebConfig.java
View file @
55da7933
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
;
}
}
src/main/java/com/tanpu/fund/config/apollo/ApolloRefresherConfiguration.java
View file @
55da7933
...
...
@@ -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
)
...
...
src/main/java/com/tanpu/fund/service/impl/ProductForPcServiceImpl.java
View file @
55da7933
...
...
@@ -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
()
...
...
src/main/resources/mybatis/customize/FundInfoCustomMapper.xml
View file @
55da7933
...
...
@@ -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=
","
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment