Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gjjh5
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
data_server
gjjh5
Commits
9057aa8e
Commit
9057aa8e
authored
Mar 01, 2019
by
姜登
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gjj展示页接口
parent
a83e8db0
Pipeline
#3996
passed with stage
in 11 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
order.js
app/controller/order.js
+2
-1
washData.js
app/service/washData.js
+22
-1
No files found.
app/controller/order.js
View file @
9057aa8e
...
...
@@ -100,7 +100,8 @@ class OrderController extends Controller {
if
(
data
)
{
if
(
data
.
status
===
'success'
&&
(
data
.
appKey
===
appKey
))
{
const
result
=
await
service
.
storage
.
read
(
orderId
,
appKey
);
ctx
.
success
(
result
);
const
ret
=
service
.
washData
.
dealData
(
result
);
ctx
.
success
(
ret
);
return
;
}
}
...
...
app/service/washData.js
View file @
9057aa8e
...
...
@@ -7,6 +7,8 @@ class WashDataService extends Service {
super
(
ctx
);
const
{
config
}
=
this
;
this
.
washUrl
=
config
.
washAPI
.
host
+
config
.
washAPI
.
washUrl
;
this
.
clearGjj
=
[
'ID'
,
'phone'
,
'birthday'
,
'email'
,
'address'
,
'card'
,
'deposit_base'
,
'person_rate'
,
'company_rate'
,
'marriage'
,
'sex'
,
'company_id'
];
this
.
clearLoan
=
[
'name'
,
'ID'
,
'warning_rate'
,
'fund_date'
,
'bank'
,
'phone'
,
'address'
,
'past_due'
,
'past_principle'
,
'past_interest'
,
'past_period'
,
'history_past_period'
,
'history_past_amount'
,
'assure_style'
,
'house_type'
,
'debit_account'
,
'left_period'
];
}
async
wash
(
data
)
{
const
{
app
,
washUrl
,
ctx
}
=
this
;
...
...
@@ -31,7 +33,7 @@ class WashDataService extends Service {
washData
.
data
.
data
.
general_analyzed_data
.
overdueClassify
=
{};
washData
.
data
.
data
.
general_analyzed_data
.
loanClassify
=
{};
washData
.
data
.
data
.
general_analyzed_data
.
blacklist
=
{};
return
washData
.
data
;
}
...
...
@@ -45,6 +47,25 @@ class WashDataService extends Service {
bar
.
appKey
=
''
;
return
bar
;
}
dealData
(
data
,
passID
=
false
)
{
const
{
clearGjj
,
clearLoan
}
=
this
;
delete
data
.
data
.
general_analyzed_data
;
for
(
let
gjjItem
of
data
.
data
.
gjj_data
)
{
for
(
let
text
of
clearGjj
)
{
if
(
!
(
passID
&&
text
==
'ID'
))
{
delete
gjjItem
.
gjj_brief
[
text
];
}
}
delete
gjjItem
.
gjj_account_analyzed_data
;
}
for
(
let
loanItem
of
data
.
data
.
loan_data
)
{
for
(
let
text
of
clearLoan
)
{
delete
loanItem
.
loan_brief
[
text
];
}
}
return
data
;
}
}
module
.
exports
=
WashDataService
;
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