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
5c154c38
Commit
5c154c38
authored
Sep 22, 2021
by
王业雄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
8f83ae44
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
10 deletions
+19
-10
BusinessType.java
...antgroup/asset/distribution/enums/route/BusinessType.java
+1
-1
ChannelRouteResultVo.java
...model/entity/route/channelroute/ChannelRouteResultVo.java
+1
-0
IChannelRuleRepository.java
...bution/service/jpa/repository/IChannelRuleRepository.java
+1
-1
ChannelRouteServiceImpl.java
...tribution/service/route/impl/ChannelRouteServiceImpl.java
+16
-8
No files found.
src/main/java/com/quantgroup/asset/distribution/enums/route/BusinessType.java
View file @
5c154c38
...
...
@@ -9,7 +9,7 @@ import lombok.Getter;
*/
@Getter
public
enum
BusinessType
{
CASH
(
"CASH"
,
"
VCC
业务"
),
CASH
(
"CASH"
,
"
CASH
业务"
),
VCC
(
"VCC"
,
"VCC业务"
);
private
String
value
;
...
...
src/main/java/com/quantgroup/asset/distribution/model/entity/route/channelroute/ChannelRouteResultVo.java
View file @
5c154c38
...
...
@@ -19,6 +19,7 @@ public class ChannelRouteResultVo {
private
String
fundType
;
private
String
orgType
;
private
String
businessType
;
private
String
systermType
;
private
Integer
creditResult
;
private
String
userTag
;
private
String
userLevel
;
...
...
src/main/java/com/quantgroup/asset/distribution/service/jpa/repository/IChannelRuleRepository.java
View file @
5c154c38
...
...
@@ -17,6 +17,6 @@ public interface IChannelRuleRepository extends JpaRepository<ChannelRuleEntity,
List
<
ChannelRuleEntity
>
getAllByIdIn
(
List
<
Long
>
ids
);
Boolean
deleteAllByChannelIdEqualsAndEnableEquals
(
Long
channelId
,
Byte
enable
);
void
deleteAllByChannelIdEqualsAndEnableEquals
(
Long
channelId
,
Byte
enable
);
}
src/main/java/com/quantgroup/asset/distribution/service/route/impl/ChannelRouteServiceImpl.java
View file @
5c154c38
...
...
@@ -17,6 +17,7 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
...
...
@@ -64,6 +65,12 @@ public class ChannelRouteServiceImpl implements IChannelRouteService {
channelRuleEntities
.
stream
().
forEach
(
channelRuleEntity
->
{
ChannelRouteResultVo
channelRouteResultVo
=
new
ChannelRouteResultVo
();
BeanUtils
.
copyProperties
(
channelRuleEntity
,
channelRouteResultVo
);
FundProductEntity
one
=
fundProductRepository
.
findOne
(
channelRuleEntity
.
getFundProductId
());
if
(
Objects
.
nonNull
(
one
)){
channelRouteResultVo
.
setSystermType
(
one
.
getSystermType
());
}
channelRouteResultVos
.
add
(
channelRouteResultVo
);
});
...
...
@@ -147,6 +154,7 @@ public class ChannelRouteServiceImpl implements IChannelRouteService {
}
@Override
@Transactional
public
void
addChannelConfig
(
List
<
ChannelRouteSaveVo
>
channelRouteSaveVoList
,
Integer
type
)
{
/**
* 编辑时要去掉所有该渠道有效性为0的其他配置(覆盖之前的未更新编辑信息)
...
...
@@ -167,6 +175,7 @@ public class ChannelRouteServiceImpl implements IChannelRouteService {
}
else
{
channelRuleEntity
.
setEnable
(
Byte
.
valueOf
(
"0"
));
}
channelRuleEntity
.
setUserLevel
(
"["
+
channelRuleEntity
.
getUserLevel
()+
"]"
);
channelRuleRepository
.
save
(
channelRuleEntity
);
}
});
...
...
@@ -193,14 +202,13 @@ public class ChannelRouteServiceImpl implements IChannelRouteService {
}
@Override
@Transactional
public
void
updateChannelConfig
(
Long
channelId
)
{
Boolean
aBoolean
=
channelRuleRepository
.
deleteAllByChannelIdEqualsAndEnableEquals
(
channelId
,
Byte
.
valueOf
(
"1"
));
if
(
aBoolean
){
List
<
ChannelRuleEntity
>
allByChannelIdEqualsAndEnableEquals
=
channelRuleRepository
.
getAllByChannelIdEqualsAndEnableEquals
(
channelId
,
Byte
.
valueOf
(
"0"
));
allByChannelIdEqualsAndEnableEquals
.
stream
().
forEach
(
channelRuleEntity
->
{
channelRuleEntity
.
setEnable
(
Byte
.
valueOf
(
"1"
));
channelRuleRepository
.
save
(
channelRuleEntity
);
});
}
channelRuleRepository
.
deleteAllByChannelIdEqualsAndEnableEquals
(
channelId
,
Byte
.
valueOf
(
"1"
));
List
<
ChannelRuleEntity
>
allByChannelIdEqualsAndEnableEquals
=
channelRuleRepository
.
getAllByChannelIdEqualsAndEnableEquals
(
channelId
,
Byte
.
valueOf
(
"0"
));
allByChannelIdEqualsAndEnableEquals
.
stream
().
forEach
(
channelRuleEntity
->
{
channelRuleEntity
.
setEnable
(
Byte
.
valueOf
(
"1"
));
channelRuleRepository
.
save
(
channelRuleEntity
);
});
}
}
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