Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
5
51business
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
方斌
51business
Commits
8b47714e
Commit
8b47714e
authored
Sep 04, 2019
by
Hsinli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addd
parent
8df4a89a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
92 additions
and
25 deletions
+92
-25
blacklist.js
app/service/credit/blacklist.js
+92
-25
No files found.
app/service/credit/blacklist.js
View file @
8b47714e
...
...
@@ -3,6 +3,7 @@
const
Service
=
require
(
'egg'
).
Service
;
const
moment
=
require
(
'moment'
);
const
_
=
require
(
'lodash'
);
const
RiskConfig
=
{
low
:
{
standard
:
'低'
,
...
...
@@ -17,11 +18,21 @@ const RiskConfig = {
msg
:
'您的风险指数较高, 再次申贷容易被拒,建议3个月内不再申请贷款,并养成良好的还款习惯。'
,
},
}
const
dtldConfig
=
{
null
:
'您最近6个月没有贷款记录,说明您是在自己的偿还范围内理性借贷,请继续保持。'
,
less
:
'您最近6个月很少进行贷款申请,说明您比较合理地利用和分配资金,有利于提高您的个人信用。'
,
medium
:
'您最近6个月有进行过贷款申请,说明您有资金需求,请您合理使用资金,并及时还款,有利于维护您的个人信用。'
,
more
:
'您最近6个月网贷申请次数与平台较多,已严重超过平均水平,存在多头共债风险,被拒概率极高。建议您在3个月内申请贷款控制在10次以内。'
,
const
DtldConfig
=
{
empty
:
'您最近6个月没有贷款记录,说明您是在自己的偿还范围内理性借贷,请继续保持。'
,
less
:
'您最近很少进行贷款申请,说明您比较合理地利用和分配资金,有利于提高您的个人信用。'
,
more
:
'您最近6个月网贷申请次数与平台较多,存在多头共债风险,被拒概率极高。建议您在6个月内申请贷款控制在7次以内。'
,
}
const
IdCardConfig
=
{
empty
:
'您的身份证和手机号暂无关联风险,请继续保持良好的信用行为,保护好您的身份信息,不要轻易将身份证借用给他人。'
,
have
:
'您的XX关联了多个NN,请联系平台更改,并同时保护好您的身份信息,不要轻易将身份证借用给他人。'
}
const
DeviceConfig
=
{
high
:
'您的设备关联的XX类APP数量较多,建议合理使用APP,并删除不常使用的APP,以免影响申贷通过率。'
,
low
:
'您的设备有关联XX类APP,建议删除此类APP,以免影响申贷通过率。'
,
empty
:
'您的设备关联APP表现很健康,请继续保持。'
,
}
class
BlacklistService
extends
Service
{
...
...
@@ -35,7 +46,7 @@ class BlacklistService extends Service {
basic
:
{
risk_index
:
'10%'
,
risk_standard
:
'低'
,
msg
:
'
您的风险指数较低,有利于机构对您的申贷评估,请继续保持良好的信用行为。
'
,
msg
:
''
,
name
:
'李鑫'
,
report_no
:
'9527'
,
phone
:
'183****5747'
,
...
...
@@ -100,7 +111,7 @@ class BlacklistService extends Service {
credit_platform_count_1month
:
8
,
//近1月放款机构数
credit_platform_count_3month
:
8
,
//近3月放款机构数
credit_platform_count_6month
:
8
,
//近6月放款机构数
msg
:
'
您最近很少进行贷款申请,说明您比较合理地利用和分配资金,有利于提高您的个人信用。
'
,
msg
:
''
,
},
overdue
:
{
//逾期详情
list
:
[
...
...
@@ -117,21 +128,21 @@ class BlacklistService extends Service {
is_settle
:
'是'
,
//是否已经结清
},
],
msg
:
'
解读:您存在逾期,请尽快偿还,否则将影响继续申贷。
'
,
msg
:
''
,
},
six_months
:
{
//近6个月关联风险
id_card_relevant
:
{
//身份关联风险
id_card_relevant_mobilephone_count
:
1
,
//身份证关联手机号
id_card_relevant_device_count
:
1
,
//身份证关联设备号
mobilephone_relevant_id_card_count
:
1
,
//手机号关联身份证
msg
:
'
您的身份证暂无关联风险,请继续保持良好的信用行为,保护好您的身份信息,不要轻易将身份证借用给他人。
'
,
id_card_relevant_mobilephone_count
:
1
,
//身份证关联手机号
个数
id_card_relevant_device_count
:
3
,
//身份证关联设备号个数
mobilephone_relevant_id_card_count
:
1
,
//手机号关联身份证
个数
msg
:
''
,
},
mobilephone_relecvant
:
{
//设备关联风险
relevant_loan_app_count_6month
:
1
,
//近6月关联的信贷app个数
relevant_gamble_app_count_6month
:
1
,
//近6月关联的赌博app个数
relevant_ip_app_count_6month
:
1
,
//近6月关联的代理ip或篡改gps的app个数
relevant_loan_app_count_6month
:
3
,
//近6月关联的信贷app个数
relevant_gamble_app_count_6month
:
2
,
//近6月关联的赌博app个数
relevant_ip_app_count_6month
:
2
,
//近6月关联的代理ip或篡改gps的app个数
relevant_other_app_count_6month
:
1
,
//近6月关联的其他app个数
msg
:
'
您的设备关联的赌博类APP占比较高,建议合理使用APP,并删除不常使用的APP,以免影响申贷通过率。
'
,
msg
:
''
,
}
}
};
...
...
@@ -156,17 +167,73 @@ class BlacklistService extends Service {
ret
.
basic
.
msg
=
RiskConfig
[
riskLevel
].
msg
;
//多头雷达msg
let
dtldLevel
=
null
;
if
(
dtScore
>
20
)
{
dtldLevel
=
'high'
;
}
else
if
(
dtScore
>
10
)
{
dtldLevel
=
'medium'
;
}
else
if
(
dtScore
>
0
)
{
dtScore
=
'low'
;
let
dtldLevel
=
'empty'
;
let
n
=
7
;
if
(
ret
.
dtld
.
reg_platform_count_6month
===
0
)
{
dtldLevel
=
'empty'
;
}
else
if
(
ret
.
dtld
.
reg_platform_count_6month
<
n
)
{
dtldLevel
=
'less'
;
}
else
{
dtldLevel
=
'more'
;
}
ret
.
dtld
.
msg
=
DtldConfig
[
dtldLevel
];
//逾期msg
ret
.
overdue
.
msg
=
'逾期次数过多,逾期天数较长,逾期金额较大等,会被认为你的还款能力弱,贷款申请被拒概率较大。如显示无记录,则未查得逾期记录,或贷款平台没有及时上传你的逾期信息。实际逾期情况,请以个人借贷情况为准。'
;
//近六个月msg
//身份关联
let
idCardLevel
=
'empty'
;
let
idCardNeedSort
=
[
{
n
:
ret
.
six_months
.
id_card_relevant
.
id_card_relevant_mobilephone_count
,
first
:
'身份证'
,
second
:
'手机号'
,
},
{
n
:
ret
.
six_months
.
id_card_relevant
.
mobilephone_relevant_id_card_count
,
first
:
'手机号'
,
second
:
'身份证'
,
},
{
n
:
ret
.
six_months
.
id_card_relevant
.
id_card_relevant_device_count
,
first
:
'身份证'
,
second
:
'设备号'
,
},
];
let
idCardMax
=
_
.
orderBy
(
idCardNeedSort
,
[
'n'
],
[
'desc'
])[
0
];
if
(
idCardMax
.
n
>=
2
)
{
idCardLevel
=
'have'
;
}
else
{
idCardLevel
=
'empty'
;
}
ret
.
six_months
.
id_card_relevant
.
msg
=
IdCardConfig
[
idCardLevel
].
replace
(
/XX/
,
idCardMax
.
first
).
replace
(
/NN/
,
idCardMax
.
second
);
//设备关联
let
deviceLevel
=
'empty'
;
let
deviceNeedSort
=
[
{
n
:
ret
.
six_months
.
mobilephone_relecvant
.
relevant_ip_app_count_6month
,
type
:
'代理ip/篡改GPS类'
,
},
{
n
:
ret
.
six_months
.
mobilephone_relecvant
.
relevant_gamble_app_count_6month
,
type
:
'赌博类'
},
{
n
:
ret
.
six_months
.
mobilephone_relecvant
.
relevant_loan_app_count_6month
,
type
:
'信贷类'
},
];
let
deviceMax
=
_
.
orderBy
(
deviceNeedSort
,
[
'n'
],
[
'desc'
])[
0
];
if
(
deviceMax
.
n
>=
2
)
{
deviceLevel
=
'high'
;
}
else
if
(
deviceMax
.
n
=
1
)
{
deviceLevel
=
'low'
;
}
else
{
d
tldLevel
=
'null
'
;
d
eviceLevel
=
'empty
'
;
}
ret
.
dtld
.
msg
=
dtldConfig
[
dtldLevel
]
;
ret
.
six_months
.
mobilephone_relecvant
.
msg
=
DeviceConfig
[
deviceLevel
].
replace
(
/XX/
,
deviceMax
.
type
)
;
return
ret
;
...
...
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