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
f4c3171c
Commit
f4c3171c
authored
Sep 24, 2021
by
技术部-韩成龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改类型&加个日志
parent
2f5b2992
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
34 deletions
+41
-34
ChannelRuleEntity.java
...et/distribution/service/jpa/entity/ChannelRuleEntity.java
+33
-27
CoreFilter.java
...tgroup/asset/distribution/service/newrule/CoreFilter.java
+3
-1
FundInfo.java
...set/distribution/service/newrule/pojo/funds/FundInfo.java
+0
-1
ChannelRouteServiceImpl.java
...tribution/service/route/impl/ChannelRouteServiceImpl.java
+5
-5
No files found.
src/main/java/com/quantgroup/asset/distribution/service/jpa/entity/ChannelRuleEntity.java
View file @
f4c3171c
...
@@ -17,12 +17,12 @@ import java.util.Objects;
...
@@ -17,12 +17,12 @@ import java.util.Objects;
@DynamicInsert
@DynamicInsert
@DynamicUpdate
@DynamicUpdate
public
class
ChannelRuleEntity
{
public
class
ChannelRuleEntity
{
private
l
ong
id
;
private
L
ong
id
;
private
l
ong
fundProductId
;
private
L
ong
fundProductId
;
private
l
ong
channelId
;
private
L
ong
channelId
;
private
Byte
publishStatus
;
private
Integer
publishStatus
;
private
l
ong
fundId
;
private
L
ong
fundId
;
private
l
ong
fundProId
;
private
L
ong
fundProId
;
private
String
fundName
;
private
String
fundName
;
private
String
fundType
;
private
String
fundType
;
private
String
orgType
;
private
String
orgType
;
...
@@ -31,69 +31,69 @@ public class ChannelRuleEntity {
...
@@ -31,69 +31,69 @@ public class ChannelRuleEntity {
private
String
userTag
;
private
String
userTag
;
private
String
userLevel
;
private
String
userLevel
;
private
Integer
priority
;
private
Integer
priority
;
private
B
yte
routeWait
;
private
B
oolean
routeWait
;
private
B
yte
enable
;
private
B
oolean
enable
;
private
Timestamp
createdAt
;
private
Timestamp
createdAt
;
private
Timestamp
updatedAt
;
private
Timestamp
updatedAt
;
@Id
@Id
@GeneratedValue
@GeneratedValue
@Column
(
name
=
"id"
,
nullable
=
false
)
@Column
(
name
=
"id"
,
nullable
=
false
)
public
l
ong
getId
()
{
public
L
ong
getId
()
{
return
id
;
return
id
;
}
}
public
void
setId
(
l
ong
id
)
{
public
void
setId
(
L
ong
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
@Basic
@Basic
@Column
(
name
=
"fund_product_id"
,
nullable
=
false
)
@Column
(
name
=
"fund_product_id"
,
nullable
=
false
)
public
l
ong
getFundProductId
()
{
public
L
ong
getFundProductId
()
{
return
fundProductId
;
return
fundProductId
;
}
}
public
void
setFundProductId
(
l
ong
fundProductId
)
{
public
void
setFundProductId
(
L
ong
fundProductId
)
{
this
.
fundProductId
=
fundProductId
;
this
.
fundProductId
=
fundProductId
;
}
}
@Basic
@Basic
@Column
(
name
=
"channel_id"
,
nullable
=
false
)
@Column
(
name
=
"channel_id"
,
nullable
=
false
)
public
l
ong
getChannelId
()
{
public
L
ong
getChannelId
()
{
return
channelId
;
return
channelId
;
}
}
public
void
setChannelId
(
l
ong
channelId
)
{
public
void
setChannelId
(
L
ong
channelId
)
{
this
.
channelId
=
channelId
;
this
.
channelId
=
channelId
;
}
}
@Basic
@Basic
@Column
(
name
=
"publish_status"
,
nullable
=
true
)
@Column
(
name
=
"publish_status"
,
nullable
=
true
)
public
Byte
getPublishStatus
()
{
public
Integer
getPublishStatus
()
{
return
publishStatus
;
return
publishStatus
;
}
}
public
void
setPublishStatus
(
Byte
publishStatus
)
{
public
void
setPublishStatus
(
Integer
publishStatus
)
{
this
.
publishStatus
=
publishStatus
;
this
.
publishStatus
=
publishStatus
;
}
}
@Basic
@Basic
@Column
(
name
=
"fund_id"
,
nullable
=
false
)
@Column
(
name
=
"fund_id"
,
nullable
=
false
)
public
l
ong
getFundId
()
{
public
L
ong
getFundId
()
{
return
fundId
;
return
fundId
;
}
}
public
void
setFundId
(
l
ong
fundId
)
{
public
void
setFundId
(
L
ong
fundId
)
{
this
.
fundId
=
fundId
;
this
.
fundId
=
fundId
;
}
}
@Basic
@Basic
@Column
(
name
=
"fund_pro_id"
,
nullable
=
false
)
@Column
(
name
=
"fund_pro_id"
,
nullable
=
false
)
public
l
ong
getFundProId
()
{
public
L
ong
getFundProId
()
{
return
fundProId
;
return
fundProId
;
}
}
public
void
setFundProId
(
l
ong
fundProId
)
{
public
void
setFundProId
(
L
ong
fundProId
)
{
this
.
fundProId
=
fundProId
;
this
.
fundProId
=
fundProId
;
}
}
...
@@ -179,21 +179,21 @@ public class ChannelRuleEntity {
...
@@ -179,21 +179,21 @@ public class ChannelRuleEntity {
@Basic
@Basic
@Column
(
name
=
"route_wait"
,
nullable
=
true
)
@Column
(
name
=
"route_wait"
,
nullable
=
true
)
public
B
yte
getRouteWait
()
{
public
B
oolean
getRouteWait
()
{
return
routeWait
;
return
routeWait
;
}
}
public
void
setRouteWait
(
B
yte
routeWait
)
{
public
void
setRouteWait
(
B
oolean
routeWait
)
{
this
.
routeWait
=
routeWait
;
this
.
routeWait
=
routeWait
;
}
}
@Basic
@Basic
@Column
(
name
=
"enable"
,
nullable
=
true
)
@Column
(
name
=
"enable"
,
nullable
=
true
)
public
B
yte
getEnable
()
{
public
B
oolean
getEnable
()
{
return
enable
;
return
enable
;
}
}
public
void
setEnable
(
B
yte
enable
)
{
public
void
setEnable
(
B
oolean
enable
)
{
this
.
enable
=
enable
;
this
.
enable
=
enable
;
}
}
...
@@ -219,10 +219,16 @@ public class ChannelRuleEntity {
...
@@ -219,10 +219,16 @@ public class ChannelRuleEntity {
@Override
@Override
public
boolean
equals
(
Object
o
)
{
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
this
==
o
)
{
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
return
true
;
}
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
{
return
false
;
}
ChannelRuleEntity
that
=
(
ChannelRuleEntity
)
o
;
ChannelRuleEntity
that
=
(
ChannelRuleEntity
)
o
;
return
id
==
that
.
id
&&
fundProductId
==
that
.
fundProductId
&&
channelId
==
that
.
channelId
&&
fundId
==
that
.
fundId
&&
fundProId
==
that
.
fundProId
&&
creditResult
==
that
.
creditResult
&&
priority
==
that
.
priority
&&
Objects
.
equals
(
publishStatus
,
that
.
publishStatus
)
&&
Objects
.
equals
(
fundName
,
that
.
fundName
)
&&
Objects
.
equals
(
fundType
,
that
.
fundType
)
&&
Objects
.
equals
(
orgType
,
that
.
orgType
)
&&
Objects
.
equals
(
businessType
,
that
.
businessType
)
&&
Objects
.
equals
(
userTag
,
that
.
userTag
)
&&
Objects
.
equals
(
userLevel
,
that
.
userLevel
)
&&
Objects
.
equals
(
routeWait
,
that
.
routeWait
)
&&
Objects
.
equals
(
enable
,
that
.
enable
)
&&
Objects
.
equals
(
createdAt
,
that
.
createdAt
)
&&
Objects
.
equals
(
updatedAt
,
that
.
updatedAt
);
return
id
.
equals
(
that
.
id
)
&&
fundProductId
.
equals
(
that
.
fundProductId
)
&&
channelId
.
equals
(
that
.
channelId
)
&&
fundId
.
equals
(
that
.
fundId
)
&&
fundProId
.
equals
(
that
.
fundProId
)
&&
creditResult
.
equals
(
that
.
creditResult
)
&&
priority
.
equals
(
that
.
priority
)
&&
Objects
.
equals
(
publishStatus
,
that
.
publishStatus
)
&&
Objects
.
equals
(
fundName
,
that
.
fundName
)
&&
Objects
.
equals
(
fundType
,
that
.
fundType
)
&&
Objects
.
equals
(
orgType
,
that
.
orgType
)
&&
Objects
.
equals
(
businessType
,
that
.
businessType
)
&&
Objects
.
equals
(
userTag
,
that
.
userTag
)
&&
Objects
.
equals
(
userLevel
,
that
.
userLevel
)
&&
Objects
.
equals
(
routeWait
,
that
.
routeWait
)
&&
Objects
.
equals
(
enable
,
that
.
enable
)
&&
Objects
.
equals
(
createdAt
,
that
.
createdAt
)
&&
Objects
.
equals
(
updatedAt
,
that
.
updatedAt
);
}
}
@Override
@Override
...
...
src/main/java/com/quantgroup/asset/distribution/service/newrule/CoreFilter.java
View file @
f4c3171c
...
@@ -132,6 +132,7 @@ public class CoreFilter {
...
@@ -132,6 +132,7 @@ public class CoreFilter {
fundInfo
.
setFundId
(
fundProduct
.
getFundId
());
fundInfo
.
setFundId
(
fundProduct
.
getFundId
());
fundInfo
.
setFundProductId
(
fundProduct
.
getFundProId
()
+
""
);
fundInfo
.
setFundProductId
(
fundProduct
.
getFundProId
()
+
""
);
fundInfo
.
setCooperation
(
CooperationEnum
.
parse
(
fundProduct
.
getOrgType
()).
ordinal
());
fundInfo
.
setCooperation
(
CooperationEnum
.
parse
(
fundProduct
.
getOrgType
()).
ordinal
());
fundInfo
.
setWaitFlg
(
channelRuleEntity
.
getRouteWait
());
Terms
term
=
new
Terms
();
Terms
term
=
new
Terms
();
term
.
setTerm
(
Integer
.
parseInt
(
auditResponce
.
getTerm
()));
term
.
setTerm
(
Integer
.
parseInt
(
auditResponce
.
getTerm
()));
term
.
setFundInfos
(
Lists
.
newArrayList
(
fundInfo
));
term
.
setFundInfos
(
Lists
.
newArrayList
(
fundInfo
));
...
@@ -139,7 +140,8 @@ public class CoreFilter {
...
@@ -139,7 +140,8 @@ public class CoreFilter {
financeProduct
.
setTerms
(
Lists
.
newArrayList
(
term
));
financeProduct
.
setTerms
(
Lists
.
newArrayList
(
term
));
financeProduct
.
setMax
(
new
BigDecimal
(
auditResponce
.
getAmount
()));
financeProduct
.
setMax
(
new
BigDecimal
(
auditResponce
.
getAmount
()));
financeProduct
.
setMin
(
new
BigDecimal
(
auditResponce
.
getAmount
()));
financeProduct
.
setMin
(
new
BigDecimal
(
auditResponce
.
getAmount
()));
financeProduct
.
setWaitFlg
(
channelRuleEntity
.
getRouteWait
().
equals
(
new
Byte
(
"1"
)));
financeProduct
.
setWaitFlg
(
channelRuleEntity
.
getRouteWait
());
log
.
info
(
"构造资金产品集 financeProduct:{}"
,
JSONObject
.
toJSONString
(
financeProduct
));
return
financeProduct
;
return
financeProduct
;
}
}
...
...
src/main/java/com/quantgroup/asset/distribution/service/newrule/pojo/funds/FundInfo.java
View file @
f4c3171c
package
com
.
quantgroup
.
asset
.
distribution
.
service
.
newrule
.
pojo
.
funds
;
package
com
.
quantgroup
.
asset
.
distribution
.
service
.
newrule
.
pojo
.
funds
;
import
com.quantgroup.asset.distribution.service.newrule.pojo.enums.CooperationEnum
;
import
lombok.Data
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
...
src/main/java/com/quantgroup/asset/distribution/service/route/impl/ChannelRouteServiceImpl.java
View file @
f4c3171c
...
@@ -185,11 +185,11 @@ public class ChannelRouteServiceImpl implements IChannelRouteService {
...
@@ -185,11 +185,11 @@ public class ChannelRouteServiceImpl implements IChannelRouteService {
FundProductEntity
fundProductEntity
=
fundProductRepository
.
getByFundIdEqualsAndFundProIdEqualsAndEnableEquals
(
channelRuleEntity
.
getFundId
(),
channelRuleEntity
.
getFundProId
(),
Byte
.
valueOf
(
"1"
));
FundProductEntity
fundProductEntity
=
fundProductRepository
.
getByFundIdEqualsAndFundProIdEqualsAndEnableEquals
(
channelRuleEntity
.
getFundId
(),
channelRuleEntity
.
getFundProId
(),
Byte
.
valueOf
(
"1"
));
if
(
Objects
.
nonNull
(
fundProductEntity
)){
if
(
Objects
.
nonNull
(
fundProductEntity
)){
channelRuleEntity
.
setFundProductId
(
fundProductEntity
.
getId
());
channelRuleEntity
.
setFundProductId
(
fundProductEntity
.
getId
());
channelRuleEntity
.
setPublishStatus
(
Byte
.
valueOf
(
"0"
)
);
channelRuleEntity
.
setPublishStatus
(
0
);
if
(
0
==
type
){
if
(
0
==
type
){
channelRuleEntity
.
setEnable
(
Byte
.
valueOf
(
"1"
)
);
channelRuleEntity
.
setEnable
(
true
);
}
else
{
}
else
{
channelRuleEntity
.
setEnable
(
Byte
.
valueOf
(
"0"
)
);
channelRuleEntity
.
setEnable
(
false
);
}
}
channelRuleEntity
.
setUserTag
(
"["
+
channelRuleEntity
.
getUserTag
()+
"]"
);
channelRuleEntity
.
setUserTag
(
"["
+
channelRuleEntity
.
getUserTag
()+
"]"
);
channelRuleEntity
.
setUserLevel
(
"["
+
channelRuleEntity
.
getUserLevel
()+
"]"
);
channelRuleEntity
.
setUserLevel
(
"["
+
channelRuleEntity
.
getUserLevel
()+
"]"
);
...
@@ -213,7 +213,7 @@ public class ChannelRouteServiceImpl implements IChannelRouteService {
...
@@ -213,7 +213,7 @@ public class ChannelRouteServiceImpl implements IChannelRouteService {
List
<
ChannelRuleEntity
>
all
=
channelRuleRepository
.
getAllByChannelIdEqualsAndEnableEquals
(
channelId
,
Byte
.
valueOf
(
"1"
));
List
<
ChannelRuleEntity
>
all
=
channelRuleRepository
.
getAllByChannelIdEqualsAndEnableEquals
(
channelId
,
Byte
.
valueOf
(
"1"
));
all
.
stream
().
forEach
(
channelRuleEntity
->
{
all
.
stream
().
forEach
(
channelRuleEntity
->
{
channelRuleEntity
.
setPublishStatus
(
Byte
.
valueOf
(
"1"
)
);
channelRuleEntity
.
setPublishStatus
(
1
);
channelRuleRepository
.
save
(
channelRuleEntity
);
channelRuleRepository
.
save
(
channelRuleEntity
);
});
});
}
}
...
@@ -224,7 +224,7 @@ public class ChannelRouteServiceImpl implements IChannelRouteService {
...
@@ -224,7 +224,7 @@ public class ChannelRouteServiceImpl implements IChannelRouteService {
channelRuleRepository
.
deleteAllByChannelIdEqualsAndEnableEquals
(
channelId
,
Byte
.
valueOf
(
"1"
));
channelRuleRepository
.
deleteAllByChannelIdEqualsAndEnableEquals
(
channelId
,
Byte
.
valueOf
(
"1"
));
List
<
ChannelRuleEntity
>
allByChannelIdEqualsAndEnableEquals
=
channelRuleRepository
.
getAllByChannelIdEqualsAndEnableEquals
(
channelId
,
Byte
.
valueOf
(
"0"
));
List
<
ChannelRuleEntity
>
allByChannelIdEqualsAndEnableEquals
=
channelRuleRepository
.
getAllByChannelIdEqualsAndEnableEquals
(
channelId
,
Byte
.
valueOf
(
"0"
));
allByChannelIdEqualsAndEnableEquals
.
stream
().
forEach
(
channelRuleEntity
->
{
allByChannelIdEqualsAndEnableEquals
.
stream
().
forEach
(
channelRuleEntity
->
{
channelRuleEntity
.
setEnable
(
Byte
.
valueOf
(
"1"
)
);
channelRuleEntity
.
setEnable
(
true
);
channelRuleRepository
.
save
(
channelRuleEntity
);
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