Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
asset-distribution
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data-spider
asset-distribution
Commits
e8f68eb9
Commit
e8f68eb9
authored
Apr 07, 2020
by
liwenbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加获取所有已进行资方配置的渠道
parent
e5a934f2
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
0 deletions
+36
-0
FundModuleController.java
...p/asset/distribution/controller/FundModuleController.java
+8
-0
IFundModuleChannelFundConfigNewService.java
...rvice/funding/IFundModuleChannelFundConfigNewService.java
+3
-0
IFundModuleService.java
...sset/distribution/service/funding/IFundModuleService.java
+6
-0
FundModuleChannelFundConfigNewServiceImpl.java
...nding/impl/FundModuleChannelFundConfigNewServiceImpl.java
+5
-0
FundModuleServiceImpl.java
...tribution/service/funding/impl/FundModuleServiceImpl.java
+11
-0
IFundModuleChannelFundConfigNewRepository.java
...repository/IFundModuleChannelFundConfigNewRepository.java
+3
-0
No files found.
src/main/java/com/quantgroup/asset/distribution/controller/FundModuleController.java
View file @
e8f68eb9
...
...
@@ -123,6 +123,14 @@ public class FundModuleController {
return
simulation
(
JSON
.
parseArray
(
configConditions
,
FundConfigCondition
.
class
),
configId
);
}
@RequestMapping
(
"/get_all_channel"
)
public
GlobalResponse
getAllConfigingChannels
()
{
Stopwatch
stopwatch
=
Stopwatch
.
createStarted
();
GlobalResponse
response
=
fundModuleService
.
getAllConfigChannel
();
log
.
info
(
"资方模块接口, 获取所有已进行资方配置的渠道号结束, response : {}, 耗时 : {}"
,
JSON
.
toJSONString
(
response
),
stopwatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
));
return
response
;
}
private
GlobalResponse
saveChannelFundsConfigCommon
(
Integer
type
,
Long
id
,
String
bizChannel
,
String
funds
,
String
remarks
,
String
auditor
,
String
proposer
,
int
oldOrNew
)
{
log
.
info
(
"资方模块接口, 新增或修改资方配置开始, type : {}, id : {}, bizChannel : {}, funds : {}, remarks : {}, auditor : {}, proposer : {}"
,
type
,
id
,
bizChannel
,
funds
,
remarks
,
auditor
,
proposer
);
...
...
src/main/java/com/quantgroup/asset/distribution/service/funding/IFundModuleChannelFundConfigNewService.java
View file @
e8f68eb9
...
...
@@ -4,6 +4,7 @@ import com.quantgroup.asset.distribution.model.response.GlobalResponse;
import
com.quantgroup.asset.distribution.service.jpa.entity.FundModuleChannelFundConfig
;
import
com.quantgroup.asset.distribution.service.jpa.entity.FundModuleChannelFundConfigNew
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -26,4 +27,6 @@ public interface IFundModuleChannelFundConfigNewService {
public
FundModuleChannelFundConfigNew
auditPassConfig
(
Long
preId
,
Long
auditId
);
public
void
clearChannelFundConfigCache
(
String
bizChannel
);
public
List
<
String
>
getAllConfigChanels
();
}
src/main/java/com/quantgroup/asset/distribution/service/funding/IFundModuleService.java
View file @
e8f68eb9
...
...
@@ -104,6 +104,12 @@ public interface IFundModuleService {
*/
public
GlobalResponse
audit
(
Long
id
,
Integer
auditStatus
);
/**
* 获取所有已进行资方配置的渠道
* @return
*/
public
GlobalResponse
getAllConfigChannel
();
GlobalResponse
getAllConditionsOfFundConfig
(
Long
configId
);
GlobalResponse
simulationCases
(
List
<
FundConfigCondition
>
configConditions
,
Long
configId
);
...
...
src/main/java/com/quantgroup/asset/distribution/service/funding/impl/FundModuleChannelFundConfigNewServiceImpl.java
View file @
e8f68eb9
...
...
@@ -155,6 +155,11 @@ public class FundModuleChannelFundConfigNewServiceImpl implements IFundModuleCha
log
.
info
(
"渠道资方配置缓存清除, bizChannel : {}"
,
bizChannel
);
}
@Override
public
List
<
String
>
getAllConfigChanels
()
{
return
fundModuleChannelFundConfigNewRepository
.
getAllBizChannel
();
}
/**
* 更改配置enable状态
* @param id
...
...
src/main/java/com/quantgroup/asset/distribution/service/funding/impl/FundModuleServiceImpl.java
View file @
e8f68eb9
...
...
@@ -7,6 +7,7 @@ import java.util.concurrent.TimeUnit;
import
java.util.stream.Collectors
;
import
com.alibaba.fastjson.JSON
;
import
com.google.common.collect.Lists
;
import
com.quantgroup.asset.distribution.enums.RuleOperator
;
import
com.quantgroup.asset.distribution.exception.QGException
;
import
com.quantgroup.asset.distribution.model.entity.fund.ChannelFundConfigNew
;
...
...
@@ -194,6 +195,16 @@ public class FundModuleServiceImpl implements IFundModuleService{
}
}
@HandleException
@Override
public
GlobalResponse
getAllConfigChannel
()
{
List
<
String
>
channels
=
fundModuleChannelFundConfigNewService
.
getAllConfigChanels
();
if
(
channels
==
null
)
{
channels
=
Lists
.
newArrayList
();
}
return
GlobalResponse
.
success
(
channels
);
}
@HandleException
@Override
public
GlobalResponse
getAllConditionsOfFundConfig
(
Long
configId
){
...
...
src/main/java/com/quantgroup/asset/distribution/service/jpa/repository/IFundModuleChannelFundConfigNewRepository.java
View file @
e8f68eb9
...
...
@@ -4,6 +4,7 @@ import com.quantgroup.asset.distribution.service.jpa.entity.FundModuleChannelFun
import
com.quantgroup.asset.distribution.service.jpa.entity.FundModuleChannelFundConfigNew
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
org.springframework.data.jpa.repository.Query
;
import
java.util.List
;
...
...
@@ -35,4 +36,6 @@ public interface IFundModuleChannelFundConfigNewRepository extends JpaRepository
*/
public
FundModuleChannelFundConfigNew
findById
(
Long
id
);
@Query
(
value
=
"select biz_channel from fund_module_channel_fund_config_new where enable = 1"
,
nativeQuery
=
true
)
public
List
<
String
>
getAllBizChannel
();
}
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