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
2a70e4d0
Commit
2a70e4d0
authored
Sep 01, 2020
by
郑建
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '6.7-2' into 'master'
资方配置增加 See merge request
!10
parents
0b6adc13
8d5408be
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
2 deletions
+47
-2
FundModuleChannelFundConfigNewServiceImpl.java
...nding/impl/FundModuleChannelFundConfigNewServiceImpl.java
+25
-1
FundModuleChannelFundConfigServiceImpl.java
.../funding/impl/FundModuleChannelFundConfigServiceImpl.java
+22
-1
No files found.
src/main/java/com/quantgroup/asset/distribution/service/funding/impl/FundModuleChannelFundConfigNewServiceImpl.java
View file @
2a70e4d0
package
com
.
quantgroup
.
asset
.
distribution
.
service
.
funding
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.quantgroup.asset.distribution.enums.funding.AuditTargetEnum
;
import
com.quantgroup.asset.distribution.enums.funding.AuditTypeEnum
;
import
com.quantgroup.asset.distribution.enums.response.FundModuleResponse
;
import
com.quantgroup.asset.distribution.exception.QGException
;
import
com.quantgroup.asset.distribution.exception.QGExceptionType
;
import
com.quantgroup.asset.distribution.model.entity.fund.ChannelFundConfigNew
;
import
com.quantgroup.asset.distribution.model.response.GlobalResponse
;
import
com.quantgroup.asset.distribution.service.approval.IApprovalLogService
;
import
com.quantgroup.asset.distribution.service.funding.IFundModuleChannelFundConfigNewService
;
...
...
@@ -229,7 +232,7 @@ public class FundModuleChannelFundConfigNewServiceImpl implements IFundModuleCha
private
FundModuleChannelFundConfigNew
createdNewChannelFundConfigNew
(
String
bizChannel
,
String
funds
,
String
remarks
)
{
FundModuleChannelFundConfigNew
config
=
new
FundModuleChannelFundConfigNew
();
config
.
setBizChannel
(
bizChannel
);
config
.
setFunds
(
funds
);
config
.
setFunds
(
supplementDefaultFundsInfo
(
funds
)
);
config
.
setRemarks
(
remarks
);
config
.
setFundIds
(
ChannelFundConfigUtil
.
getAllFundIds
(
funds
));
config
.
setFundLimitTranslate
(
ChannelFundConfigUtil
.
getFundLimitTranslate
(
funds
));
...
...
@@ -237,6 +240,27 @@ public class FundModuleChannelFundConfigNewServiceImpl implements IFundModuleCha
return
fundModuleChannelFundConfigNewRepository
.
save
(
config
);
}
/**
*
* @param funds
* @return
*/
private
String
supplementDefaultFundsInfo
(
String
funds
)
{
List
<
ChannelFundConfigNew
>
channelFundConfigNewList
=
JSONArray
.
parseArray
(
funds
,
ChannelFundConfigNew
.
class
);
channelFundConfigNewList
.
forEach
(
channelFundConfigNew
->
{
if
(
channelFundConfigNew
.
getFeeType
()
==
null
)
{
channelFundConfigNew
.
setFeeType
(
1
);
}
if
(
channelFundConfigNew
.
getRateType
()
==
null
)
{
channelFundConfigNew
.
setRateType
(
1
);
}
if
(
StringUtils
.
isEmpty
(
channelFundConfigNew
.
getRate
()))
{
channelFundConfigNew
.
setRate
(
"0"
);
}
});
return
JSON
.
toJSONString
(
channelFundConfigNewList
);
}
/**
* 创建渠道资方配置审批记录
* @param bizChannel
...
...
src/main/java/com/quantgroup/asset/distribution/service/funding/impl/FundModuleChannelFundConfigServiceImpl.java
View file @
2a70e4d0
...
...
@@ -150,7 +150,7 @@ public class FundModuleChannelFundConfigServiceImpl implements IFundModuleChanne
private
FundModuleChannelFundConfig
createdNewChannelFundConfig
(
String
bizChannel
,
String
funds
,
String
remarks
)
{
FundModuleChannelFundConfig
fundModuleChannelFundConfig
=
new
FundModuleChannelFundConfig
();
fundModuleChannelFundConfig
.
setBizChannel
(
bizChannel
);
fundModuleChannelFundConfig
.
setFunds
(
funds
);
fundModuleChannelFundConfig
.
setFunds
(
supplementDefaultFundsInfo
(
funds
)
);
fundModuleChannelFundConfig
.
setRemarks
(
remarks
);
fundModuleChannelFundConfig
.
setFundIds
(
ChannelFundConfigUtil
.
getAllFundIds
(
funds
));
// 默认测试
...
...
@@ -158,6 +158,27 @@ public class FundModuleChannelFundConfigServiceImpl implements IFundModuleChanne
fundModuleChannelFundConfig
.
setEnable
(
false
);
return
fundModuleChannelFundConfigRepository
.
save
(
fundModuleChannelFundConfig
);
}
/**
* 默认补充资金方相关信息
* @param funds
* @return
*/
private
String
supplementDefaultFundsInfo
(
String
funds
)
{
List
<
ChannelFundConfig
>
channelFundConfigList
=
JSONArray
.
parseArray
(
funds
,
ChannelFundConfig
.
class
);
for
(
ChannelFundConfig
channelFundConfig
:
channelFundConfigList
)
{
if
(
channelFundConfig
.
getFeeType
()
==
null
)
{
channelFundConfig
.
setFeeType
(
1
);
}
if
(
channelFundConfig
.
getRateType
()
==
null
)
{
channelFundConfig
.
setRateType
(
1
);
}
if
(
StringUtils
.
isEmpty
(
channelFundConfig
.
getRate
()))
{
channelFundConfig
.
setRate
(
"0"
);
}
}
return
JSON
.
toJSONString
(
channelFundConfigList
);
}
/**
* 创建渠道资方配置审批记录
...
...
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