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
abc13e8b
Commit
abc13e8b
authored
Sep 06, 2019
by
李尚科
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix order
parent
6b28adbc
Pipeline
#13468
passed with stage
in 23 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
17 deletions
+16
-17
callrisk.js
app/controller/credit/callrisk.js
+3
-3
credit_order.js
app/model/prometheus/credit_order.js
+3
-3
credit.js
app/router/credit.js
+1
-1
callrisk.js
app/service/credit/callrisk.js
+3
-3
order.js
app/service/credit/order.js
+6
-7
No files found.
app/controller/credit/callrisk.js
View file @
abc13e8b
...
@@ -10,8 +10,8 @@ class CallriskController extends Controller {
...
@@ -10,8 +10,8 @@ class CallriskController extends Controller {
async
getReport
()
{
async
getReport
()
{
const
{
ctx
}
=
this
;
const
{
ctx
}
=
this
;
const
report_
no
=
ctx
.
params
.
report_no
;
const
report_
id
=
ctx
.
params
.
report_id
;
let
ret
=
await
ctx
.
service
.
credit
.
callrisk
.
getReport
(
report_
no
);
let
ret
=
await
ctx
.
service
.
credit
.
callrisk
.
getReport
(
report_
id
);
ctx
.
success
(
ret
);
ctx
.
success
(
ret
);
}
}
...
@@ -34,7 +34,7 @@ class CallriskController extends Controller {
...
@@ -34,7 +34,7 @@ class CallriskController extends Controller {
//TODO 三要素校验 调用数据服务接口
//TODO 三要素校验 调用数据服务接口
...
...
app/model/prometheus/credit_order.js
View file @
abc13e8b
...
@@ -55,9 +55,9 @@ module.exports = app => {
...
@@ -55,9 +55,9 @@ module.exports = app => {
},
},
}
}
},
{
},
{
timestamps
:
false
,
timestamps
:
false
,
tableName
:
'credit_order'
,
tableName
:
'credit_order'
,
});
});
return
CreditOrder
;
return
CreditOrder
;
...
...
app/router/credit.js
View file @
abc13e8b
...
@@ -11,7 +11,7 @@ module.exports = app => {
...
@@ -11,7 +11,7 @@ module.exports = app => {
//我的信用-个人通话风险
//我的信用-个人通话风险
router
.
get
(
'/callrisk/report/:report_
no
'
,
'credit.callrisk.getReport'
);
//获取报告信息
router
.
get
(
'/callrisk/report/:report_
id
'
,
'credit.callrisk.getReport'
);
//获取报告信息
router
.
post
(
'/callrisk/query'
,
'credit.callrisk.queryCallRisk'
);
//查询个人通话信息
router
.
post
(
'/callrisk/query'
,
'credit.callrisk.queryCallRisk'
);
//查询个人通话信息
...
...
app/service/credit/callrisk.js
View file @
abc13e8b
...
@@ -30,13 +30,13 @@ class CallriskService extends Service {
...
@@ -30,13 +30,13 @@ class CallriskService extends Service {
}
}
async
getReport
(
report_
no
)
{
async
getReport
(
report_
id
)
{
const
{
ctx
}
=
this
;
const
{
ctx
}
=
this
;
const
basics
=
await
ctx
.
prometheusModel
.
CreditCallriskReport
.
one
({
where
:
{
report_
no
}
});
const
basics
=
await
ctx
.
prometheusModel
.
CreditCallriskReport
.
one
({
where
:
{
report_
id
}
});
if
(
!
basics
||
!
basics
.
id
)
{
if
(
!
basics
||
!
basics
.
id
)
{
ctx
.
failed
(
'error report_
no
'
);
ctx
.
failed
(
'error report_
id
'
);
}
}
const
report_id
=
basics
.
id
;
const
report_id
=
basics
.
id
;
const
call_overview
=
await
this
.
getCallOverview
(
report_id
);
const
call_overview
=
await
this
.
getCallOverview
(
report_id
);
...
...
app/service/credit/order.js
View file @
abc13e8b
...
@@ -22,19 +22,18 @@ class OrderService extends Service {
...
@@ -22,19 +22,18 @@ class OrderService extends Service {
const
worth_h
=
[];
const
worth_h
=
[];
const
worth_l
=
[];
const
worth_l
=
[];
const
worth_time
=
type
===
1
?
15
:
30
;
const
worth_time
=
type
===
1
?
15
:
30
;
const
now_time
=
moment
().
format
(
'X'
);
const
now_time
=
moment
().
valueOf
(
);
for
(
let
i
in
order_records
)
{
for
(
let
i
in
order_records
)
{
const
order
=
order_records
[
i
];
const
order
=
order_records
[
i
];
const
expire_time
=
moment
(
state_time
).
format
(
'X'
)
+
worth_time
*
86400
;
const
expire_time
=
moment
(
order
.
state_time
).
valueOf
()
+
worth_time
*
86400
;
const
apply
=
{
phone
:
'15968762898'
,
report_no
:
'51gjj201909050100001'
};
const
apply
=
{
phone
:
'15968762898'
,
report_no
:
'51gjj201909050100001'
};
const
item
=
{
const
item
=
{
order_id
:
order
.
id
,
order_no
:
order
.
order_no
,
order_no
:
order
.
order_no
,
report_
no
:
apply
.
report_no
,
report_
id
:
apply
.
report_id
,
type
:
order_type
,
type
:
order_type
,
created_time
,
created_time
:
order
.
created_time
,
phone
:
apply
.
phone
.
replace
(
apply
.
phone
.
substring
(
3
,
7
),
"****"
),
phone
:
apply
.
phone
.
replace
(
apply
.
phone
.
substring
(
3
,
7
),
"****"
),
state
:
order
.
state
,
state
:
order
.
state
,
state_text
:
order
.
state
===
'已支付'
?
''
:
order
.
state
,
state_text
:
order
.
state
===
'已支付'
?
''
:
order
.
state
,
...
@@ -47,7 +46,6 @@ class OrderService extends Service {
...
@@ -47,7 +46,6 @@ class OrderService extends Service {
}
}
return
{
worth_h
,
worth_l
}
return
{
worth_h
,
worth_l
}
}
}
/**
/**
...
@@ -75,6 +73,7 @@ class OrderService extends Service {
...
@@ -75,6 +73,7 @@ class OrderService extends Service {
}
}
}
}
module
.
exports
=
OrderService
;
module
.
exports
=
OrderService
;
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