Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cash-loan-flow-boss
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
QG
cash-loan-flow-boss
Commits
53306eef
Commit
53306eef
authored
Jul 27, 2020
by
王向伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户信息枚举类型添加描述,导出配置添加orderCallback
parent
400be065
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
123 additions
and
8 deletions
+123
-8
ChannelConfServiceImpl.java
...nflowboss/api/channel/service/ChannelConfServiceImpl.java
+12
-0
CustomerService.java
...anflowboss/api/customer/service/impl/CustomerService.java
+9
-6
ClfOrderCallbackRepository.java
...owboss/spi/clf/repository/ClfOrderCallbackRepository.java
+3
-1
CLFCenterService.java
...up/cashloanflowboss/spi/clf/service/CLFCenterService.java
+3
-0
CLFCenterServiceImpl.java
...ashloanflowboss/spi/clf/service/CLFCenterServiceImpl.java
+5
-0
UserExtInfo.java
...ntgroup/cashloanflowboss/spi/user/entity/UserExtInfo.java
+1
-1
EnumInfoUtil.java
...va/cn/quantgroup/cashloanflowboss/utils/EnumInfoUtil.java
+90
-0
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/api/channel/service/ChannelConfServiceImpl.java
View file @
53306eef
...
@@ -9,6 +9,7 @@ import cn.quantgroup.cashloanflowboss.spi.clf.model.KANoticeType;
...
@@ -9,6 +9,7 @@ import cn.quantgroup.cashloanflowboss.spi.clf.model.KANoticeType;
import
cn.quantgroup.cashloanflowboss.spi.clf.service.CLFCenterService
;
import
cn.quantgroup.cashloanflowboss.spi.clf.service.CLFCenterService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -161,10 +162,15 @@ public class ChannelConfServiceImpl implements ChannelConfService {
...
@@ -161,10 +162,15 @@ public class ChannelConfServiceImpl implements ChannelConfService {
}
}
String
channelPublicKey
=
addInfo
.
getPublicKey
();
String
channelPublicKey
=
addInfo
.
getPublicKey
();
if
(
StringUtils
.
isBlank
(
channelPublicKey
)){
//没有key直接跳过
return
true
;
}
ChannelSecurityKey
channelSecurityKey
=
clfCenterService
.
findChannelSecurityByChannelId
(
channelConf
.
getChannelId
());
ChannelSecurityKey
channelSecurityKey
=
clfCenterService
.
findChannelSecurityByChannelId
(
channelConf
.
getChannelId
());
if
(
Objects
.
isNull
(
channelSecurityKey
))
{
if
(
Objects
.
isNull
(
channelSecurityKey
))
{
channelSecurityKey
=
new
ChannelSecurityKey
();
channelSecurityKey
=
new
ChannelSecurityKey
();
channelSecurityKey
.
setIsActive
(
true
);
channelSecurityKey
.
setIsActive
(
true
);
channelSecurityKey
.
setChannelId
(
channelConf
.
getChannelId
());
channelSecurityKey
.
setCreatedAt
(
new
Timestamp
(
System
.
currentTimeMillis
()));
channelSecurityKey
.
setCreatedAt
(
new
Timestamp
(
System
.
currentTimeMillis
()));
}
}
channelSecurityKey
.
setChannelPublicKey
(
channelPublicKey
);
channelSecurityKey
.
setChannelPublicKey
(
channelPublicKey
);
...
@@ -196,6 +202,7 @@ public class ChannelConfServiceImpl implements ChannelConfService {
...
@@ -196,6 +202,7 @@ public class ChannelConfServiceImpl implements ChannelConfService {
List
<
ChannelApplyInfoStrategy
>
channelApplyInfoStrategies
=
clfCenterService
.
findChannelApplyInfoStrategyByChannelId
(
channelId
);
List
<
ChannelApplyInfoStrategy
>
channelApplyInfoStrategies
=
clfCenterService
.
findChannelApplyInfoStrategyByChannelId
(
channelId
);
ChannelSecurityKey
channelSecurityKey
=
clfCenterService
.
findChannelSecurityByChannelId
(
channelId
);
ChannelSecurityKey
channelSecurityKey
=
clfCenterService
.
findChannelSecurityByChannelId
(
channelId
);
List
<
ClfOrderCallBack
>
orderCallBackList
=
clfCenterService
.
findClfOrderCallBackByChannelId
(
channelId
);
StringJoiner
joiner
=
new
StringJoiner
(
"\n"
);
StringJoiner
joiner
=
new
StringJoiner
(
"\n"
);
if
(
Objects
.
nonNull
(
channelConfiguration
))
{
if
(
Objects
.
nonNull
(
channelConfiguration
))
{
joiner
.
add
(
generateInsertSql
(
channelConfiguration
));
joiner
.
add
(
generateInsertSql
(
channelConfiguration
));
...
@@ -213,6 +220,11 @@ public class ChannelConfServiceImpl implements ChannelConfService {
...
@@ -213,6 +220,11 @@ public class ChannelConfServiceImpl implements ChannelConfService {
if
(
Objects
.
nonNull
(
channelSecurityKey
))
{
if
(
Objects
.
nonNull
(
channelSecurityKey
))
{
joiner
.
add
(
generateInsertSql
(
channelSecurityKey
));
joiner
.
add
(
generateInsertSql
(
channelSecurityKey
));
}
}
if
(
CollectionUtils
.
isNotEmpty
(
orderCallBackList
))
{
for
(
ClfOrderCallBack
orderCallBack
:
orderCallBackList
)
{
joiner
.
add
(
generateInsertSql
(
orderCallBack
));
}
}
return
joiner
.
toString
();
return
joiner
.
toString
();
}
}
...
...
src/main/java/cn/quantgroup/cashloanflowboss/api/customer/service/impl/CustomerService.java
View file @
53306eef
...
@@ -3,11 +3,11 @@ package cn.quantgroup.cashloanflowboss.api.customer.service.impl;
...
@@ -3,11 +3,11 @@ package cn.quantgroup.cashloanflowboss.api.customer.service.impl;
import
cn.quantgroup.cashloanflowboss.api.customer.entity.CustomerInfo
;
import
cn.quantgroup.cashloanflowboss.api.customer.entity.CustomerInfo
;
import
cn.quantgroup.cashloanflowboss.api.customer.service.ICustomerService
;
import
cn.quantgroup.cashloanflowboss.api.customer.service.ICustomerService
;
import
cn.quantgroup.cashloanflowboss.component.route.ServiceRoute
;
import
cn.quantgroup.cashloanflowboss.component.route.ServiceRoute
;
import
cn.quantgroup.cashloanflowboss.core.base.ServiceResult
;
import
cn.quantgroup.cashloanflowboss.spi.clf.entity.ClfOrderMapping
;
import
cn.quantgroup.cashloanflowboss.spi.clf.entity.ClfOrderMapping
;
import
cn.quantgroup.cashloanflowboss.spi.clf.repository.ClfOrderMappingRepository
;
import
cn.quantgroup.cashloanflowboss.spi.clf.repository.ClfOrderMappingRepository
;
import
cn.quantgroup.cashloanflowboss.spi.spiderCenter.SpiderCenter
;
import
cn.quantgroup.cashloanflowboss.spi.spiderCenter.SpiderCenter
;
import
cn.quantgroup.cashloanflowboss.spi.user.service.UserSysService
;
import
cn.quantgroup.cashloanflowboss.spi.user.service.UserSysService
;
import
cn.quantgroup.cashloanflowboss.utils.EnumInfoUtil
;
import
cn.quantgroup.user.retbean.*
;
import
cn.quantgroup.user.retbean.*
;
import
cn.quantgroup.user.vo.UserSysResult
;
import
cn.quantgroup.user.vo.UserSysResult
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -181,17 +181,20 @@ public class CustomerService implements ICustomerService {
...
@@ -181,17 +181,20 @@ public class CustomerService implements ICustomerService {
return
;
return
;
}
}
info
.
setIncome
(
xUserExtInfo
.
getIncomeEnum
().
name
(
));
info
.
setIncome
(
EnumInfoUtil
.
Income
(
xUserExtInfo
.
getIncomeEnum
()
));
info
.
setIncomeRange
(
xUserExtInfo
.
getIncomeRangeEnum
().
name
(
));
info
.
setIncomeRange
(
EnumInfoUtil
.
incomeRange
(
xUserExtInfo
.
getIncomeRangeEnum
()
));
info
.
setOccupation
(
xUserExtInfo
.
getOccupationEnum
().
name
(
));
info
.
setOccupation
(
EnumInfoUtil
.
occupation
(
xUserExtInfo
.
getOccupationEnum
()
));
info
.
setEducation
(
xUserExtInfo
.
getEducationEnum
().
name
(
));
info
.
setEducation
(
EnumInfoUtil
.
education
(
xUserExtInfo
.
getEducationEnum
()
));
info
.
setHasCar
(
xUserExtInfo
.
getHasCar
());
info
.
setHasCar
(
xUserExtInfo
.
getHasCar
());
info
.
setHasSocialSecurity
(
xUserExtInfo
.
getHasSocialSecurity
());
info
.
setHasSocialSecurity
(
xUserExtInfo
.
getHasSocialSecurity
());
info
.
setHasHouse
(
xUserExtInfo
.
getHasHouse
());
info
.
setHasHouse
(
xUserExtInfo
.
getHasHouse
());
info
.
setHasCreditCard
(
xUserExtInfo
.
getHasCar
());
info
.
setHasCreditCard
(
xUserExtInfo
.
getHasCar
());
info
.
setMarryStatus
(
xUserExtInfo
.
getMarryStatus
().
name
(
));
info
.
setMarryStatus
(
EnumInfoUtil
.
maritalStatus
(
xUserExtInfo
.
getMarryStatus
()
));
}
}
private
void
populateDetail
(
CustomerInfo
info
,
XUserDetail
xUserDetail
)
{
private
void
populateDetail
(
CustomerInfo
info
,
XUserDetail
xUserDetail
)
{
String
logStr
=
"CustomerService.populateDetail"
;
String
logStr
=
"CustomerService.populateDetail"
;
log
.
info
(
"{} xUser填充客户信息 xUser={}"
,
logStr
,
xUserDetail
);
log
.
info
(
"{} xUser填充客户信息 xUser={}"
,
logStr
,
xUserDetail
);
...
...
src/main/java/cn/quantgroup/cashloanflowboss/spi/clf/repository/ClfOrderCallbackRepository.java
View file @
53306eef
...
@@ -6,6 +6,8 @@ import org.springframework.data.jpa.repository.JpaRepository;
...
@@ -6,6 +6,8 @@ import org.springframework.data.jpa.repository.JpaRepository;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
/**
* function:
* function:
* date: 2019/8/7
* date: 2019/8/7
...
@@ -20,5 +22,5 @@ public interface ClfOrderCallbackRepository extends JpaRepository<ClfOrderCallBa
...
@@ -20,5 +22,5 @@ public interface ClfOrderCallbackRepository extends JpaRepository<ClfOrderCallBa
ClfOrderCallBack
findByCallbackStatusAndRegisteredFrom
(
String
callbackState
,
Long
channelId
);
ClfOrderCallBack
findByCallbackStatusAndRegisteredFrom
(
String
callbackState
,
Long
channelId
);
List
<
ClfOrderCallBack
>
findByRegisteredFrom
(
Long
registeredFrom
);
}
}
src/main/java/cn/quantgroup/cashloanflowboss/spi/clf/service/CLFCenterService.java
View file @
53306eef
...
@@ -52,4 +52,7 @@ public interface CLFCenterService {
...
@@ -52,4 +52,7 @@ public interface CLFCenterService {
ChannelSecurityKey
findChannelSecurityByChannelId
(
Long
channelId
);
ChannelSecurityKey
findChannelSecurityByChannelId
(
Long
channelId
);
List
<
ClfOrderCallBack
>
findClfOrderCallBackByChannelId
(
Long
channelId
);
}
}
src/main/java/cn/quantgroup/cashloanflowboss/spi/clf/service/CLFCenterServiceImpl.java
View file @
53306eef
...
@@ -189,4 +189,9 @@ public class CLFCenterServiceImpl implements CLFCenterService {
...
@@ -189,4 +189,9 @@ public class CLFCenterServiceImpl implements CLFCenterService {
public
ChannelSecurityKey
findChannelSecurityByChannelId
(
Long
channelId
)
{
public
ChannelSecurityKey
findChannelSecurityByChannelId
(
Long
channelId
)
{
return
channelSecurityKeyRepository
.
findByChannelId
(
channelId
);
return
channelSecurityKeyRepository
.
findByChannelId
(
channelId
);
}
}
@Override
public
List
<
ClfOrderCallBack
>
findClfOrderCallBackByChannelId
(
Long
channelId
)
{
return
clfOrderCallbackRepository
.
findByRegisteredFrom
(
channelId
);
}
}
}
src/main/java/cn/quantgroup/cashloanflowboss/spi/user/entity/UserExtInfo.java
View file @
53306eef
...
@@ -58,7 +58,7 @@ public class UserExtInfo implements Serializable {
...
@@ -58,7 +58,7 @@ public class UserExtInfo implements Serializable {
xUserExtInfo.setEducationEnum(cn.quantgroup.motan.enums.EducationEnum.valueOf(this.educationEnum.name()));
xUserExtInfo.setEducationEnum(cn.quantgroup.motan.enums.EducationEnum.valueOf(this.educationEnum.name()));
xUserExtInfo.setIncomeEnum(cn.quantgroup.motan.enums.IncomeEnum.valueOf(this.incomeEnum.name()));
xUserExtInfo.setIncomeEnum(cn.quantgroup.motan.enums.IncomeEnum.valueOf(this.incomeEnum.name()));
xUserExtInfo.setIncomeRangeEnum(cn.quantgroup.motan.enums.IncomeRangeEnum.valueOf(this.incomeRangeEnum.name()));
xUserExtInfo.setIncomeRangeEnum(cn.quantgroup.motan.enums.IncomeRangeEnum.valueOf(this.incomeRangeEnum.name()));
xUserExtInfo.setOccupationEnum(cn.quantgroup.motan.enums.OccupationEnum.valueOf(this.occupation
Enum
.name()));
xUserExtInfo.setOccupationEnum(cn.quantgroup.motan.enums.OccupationEnum.valueOf(this.occupation.name()));
xUserExtInfo.setHasCar(this.hasCar);
xUserExtInfo.setHasCar(this.hasCar);
xUserExtInfo.setHasSocialSecurity(this.hasSocialSecurity);
xUserExtInfo.setHasSocialSecurity(this.hasSocialSecurity);
xUserExtInfo.setHasCreditCard(this.hasCreditCard);
xUserExtInfo.setHasCreditCard(this.hasCreditCard);
...
...
src/main/java/cn/quantgroup/cashloanflowboss/utils/EnumInfoUtil.java
0 → 100644
View file @
53306eef
package
cn
.
quantgroup
.
cashloanflowboss
.
utils
;
import
cn.quantgroup.user.enums.*
;
/**
* @author Wang Xiangwei
* @version 2020/7/27
*/
public
class
EnumInfoUtil
{
public
static
String
Income
(
IncomeEnum
incomeEnum
)
{
switch
(
incomeEnum
)
{
case
UNKNOWN:
return
incomeEnum
.
name
()
+
"(未知)"
;
case
CASH:
return
incomeEnum
.
name
()
+
"(现金计算)"
;
case
PAY_CARD:
return
incomeEnum
.
name
()
+
"(工资卡)"
;
case
CASH_AND_PAY_CARD:
return
incomeEnum
.
name
()
+
"(混合)"
;
}
return
null
;
}
public
static
String
incomeRange
(
IncomeRangeEnum
incomeRangeEnum
)
{
switch
(
incomeRangeEnum
)
{
case
UNKNOWN:
return
incomeRangeEnum
.
name
()+
"(暂无)"
;
case
BELOW_1000:
return
incomeRangeEnum
.
name
()+
"(小于1000元)"
;
case
BELOW_3000:
return
incomeRangeEnum
.
name
()+
"(1000至3000元)"
;
case
BELOW_5000:
return
incomeRangeEnum
.
name
()+
"(3000至5000元)"
;
case
BELOW_8000:
return
incomeRangeEnum
.
name
()+
"(5000至8000元)"
;
case
BELOW_10000:
return
incomeRangeEnum
.
name
()+
"(8000至10000元)"
;
case
BELOW_15000:
return
incomeRangeEnum
.
name
()+
"(10000至15000元)"
;
case
BELOW_20000:
return
incomeRangeEnum
.
name
()+
"(15000至20000元)"
;
case
ABOVE_20000:
return
incomeRangeEnum
.
name
()+
"(大于20000元)"
;
}
return
null
;
}
public
static
String
occupation
(
OccupationEnum
occupationEnum
)
{
switch
(
occupationEnum
)
{
case
UNKNOWN:
return
occupationEnum
.
name
()+
"(暂未填写)"
;
case
WORKER:
return
occupationEnum
.
name
()+
"(工人)"
;
case
TEACHER:
return
occupationEnum
.
name
()+
"(教师)"
;
case
WHITE_COLLAR:
return
occupationEnum
.
name
()+
"(白领)"
;
case
STUDENT:
return
occupationEnum
.
name
()+
"(学生)"
;
case
CAREER_BUILDER:
return
occupationEnum
.
name
()+
"(创业者)"
;
case
SELF_EMPLOYER:
return
occupationEnum
.
name
()+
"(个体户)"
;
case
EMPLOYEE:
return
occupationEnum
.
name
()+
"(公司职员)"
;
case
BISUNESS_ENTITY:
return
occupationEnum
.
name
()+
"(企业法人)"
;
case
ONLINE_STORE_OWNER:
return
occupationEnum
.
name
()+
"(网店店主)"
;
case
UNEMPLOYED:
return
occupationEnum
.
name
()+
"(暂无职业)"
;
case
OTHER:
return
occupationEnum
.
name
()+
"(其他)"
;
}
return
null
;
}
public
static
String
education
(
EducationEnum
educationEnum
)
{
switch
(
educationEnum
){
case
UNKNOWN:
return
educationEnum
.
name
()+
"(暂无)"
;
case
MASTER:
return
educationEnum
.
name
()+
"(硕士及以上)"
;
case
UNDER_GRADUATE:
return
educationEnum
.
name
()+
"(本科)"
;
case
JUNIOR_COLLEGE:
return
educationEnum
.
name
()+
"(大专)"
;
case
TECHNICAL_SECONDARY_SCHOOL:
return
educationEnum
.
name
()+
"(中专)"
;
case
TECHNICAL_SCHOOL:
return
educationEnum
.
name
()+
"(技校)"
;
case
HIGH_SCHOOL:
return
educationEnum
.
name
()+
"(技校)"
;
case
MIDDLE_SCHOOL:
return
educationEnum
.
name
()+
"(初中)"
;
case
PRIMARY_SCHOOL:
return
educationEnum
.
name
()+
"(小学)"
;
case
OTHER:
return
educationEnum
.
name
()+
"(其他)"
;
}
return
null
;
}
public
static
String
maritalStatus
(
MaritalStatus
maritalStatus
)
{
switch
(
maritalStatus
){
case
UNKNOWN:
return
maritalStatus
.
name
()+
"(未知)"
;
case
SINGLE:
return
maritalStatus
.
name
()+
"(未婚)"
;
case
MARRIED:
return
maritalStatus
.
name
()+
"(已婚)"
;
case
DIVORCED:
return
maritalStatus
.
name
()+
"(离异)"
;
case
WINDOWED:
return
maritalStatus
.
name
()+
"(丧偶)"
;
case
OTHER:
return
maritalStatus
.
name
()+
"(其他)"
;
}
return
null
;
}
}
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