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
e48ee5d9
Commit
e48ee5d9
authored
Oct 10, 2019
by
李尚科
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
callrisk fix
parent
c9ca81d5
Pipeline
#14602
passed with stage
in 33 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
callrisk.js
app/controller/credit/callrisk.js
+3
-2
apply.js
app/service/credit/apply.js
+4
-4
yys.js
app/service/credit/yys.js
+3
-2
No files found.
app/controller/credit/callrisk.js
View file @
e48ee5d9
...
...
@@ -39,7 +39,8 @@ class CallriskController extends Controller {
name
:
{
type
:
'string'
,
required
:
true
},
phone
:
{
type
:
'string'
,
required
:
true
},
id_card
:
{
type
:
'string'
,
required
:
true
},
password
:
{
type
:
'string'
,
required
:
true
}
password
:
{
type
:
'string'
,
required
:
true
},
net
:
{
type
:
'string'
,
required
:
true
},
}
ctx
.
validate
(
rule
,
input_params
);
const
result
=
await
ctx
.
service
.
credit
.
apply
.
applyCallrisk
(
input_params
);
...
...
@@ -70,7 +71,7 @@ class CallriskController extends Controller {
const
{
ctx
}
=
this
;
const
order_id
=
ctx
.
params
.
order_id
;
const
result
=
await
ctx
.
service
.
credit
.
callrisk
.
queryTaskStatus
(
order_id
);
ctx
.
success
({
result
});
}
...
...
app/service/credit/apply.js
View file @
e48ee5d9
...
...
@@ -342,7 +342,7 @@ class ApplyService extends Service {
async
applyCallrisk
(
input
)
{
const
{
ctx
}
=
this
;
const
{
name
,
phone
,
id_card
,
password
}
=
input
;
const
{
name
,
phone
,
id_card
,
password
,
net
}
=
input
;
const
user_id
=
ctx
.
userId
;
const
app_type_id
=
ctx
.
appTypeId
;
const
app_user_id
=
ctx
.
appUserId
;
...
...
@@ -365,7 +365,7 @@ class ApplyService extends Service {
const
order_id
=
order
.
id
;
//创建yys-order apply 记录
const
apply
=
await
this
.
createYysApply
({
name
,
phone
,
id_card
,
password
,
order_id
});
const
apply
=
await
this
.
createYysApply
({
name
,
phone
,
id_card
,
password
,
net
,
order_id
});
const
order_sn
=
apply
.
r_order_id
;
//第一次调用运营商获取验证码接口
...
...
@@ -404,10 +404,10 @@ class ApplyService extends Service {
const
app_type_id
=
ctx
.
appTypeId
;
const
app_user_id
=
ctx
.
appUserId
;
const
app_id
=
ctx
.
appId
;
const
{
name
,
phone
,
id_card
,
password
,
order_id
}
=
input
;
const
{
name
,
phone
,
id_card
,
password
,
net
,
order_id
}
=
input
;
//运营商API.创建订单号
const
order_sn_info
=
await
ctx
.
service
.
credit
.
yys
.
getOrderSn
(
phone
);
const
order_sn_info
=
await
ctx
.
service
.
credit
.
yys
.
getOrderSn
(
{
phone
,
net
}
);
if
(
order_sn_info
.
code
!==
0
)
{
ctx
.
failed
(
'getOrderSn error msg:'
+
order_sn_info
.
msg
);
}
...
...
app/service/credit/yys.js
View file @
e48ee5d9
...
...
@@ -12,10 +12,11 @@ class YysService extends Service {
* 创建订单号
* @param {*}
*/
async
getOrderSn
(
phone
)
{
async
getOrderSn
(
{
phone
,
net
}
)
{
const
{
ctx
}
=
this
;
let
params
=
{
phone
:
phone
phone
:
phone
,
net
:
Number
(
net
),
}
let
url
=
this
.
config
.
NODE_BASE_URL
+
'/yys_api/getorderSn'
+
'?appKey='
+
this
.
config
.
YYS_APP_KEY
;
let
resp
=
await
ctx
.
helper
.
send_request
(
url
,
params
,
{
method
:
'POST'
,
timeout
:
30000
});
...
...
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