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
11c5db8e
Commit
11c5db8e
authored
Feb 26, 2019
by
姜登
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notify
parent
45b5c8a8
Pipeline
#3901
passed with stage
in 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
order.js
app/controller/order.js
+3
-2
No files found.
app/controller/order.js
View file @
11c5db8e
...
@@ -28,13 +28,14 @@ class OrderController extends Controller {
...
@@ -28,13 +28,14 @@ class OrderController extends Controller {
const
{
ctx
,
service
}
=
this
;
const
{
ctx
,
service
}
=
this
;
const
uuid
=
require
(
'node-uuid'
);
const
uuid
=
require
(
'node-uuid'
);
ctx
.
validate
(
this
.
createRule
);
ctx
.
validate
(
this
.
createRule
);
const
{
appKey
,
userId
}
=
ctx
.
request
.
body
;
const
{
appKey
,
userId
,
notifyUrl
}
=
ctx
.
request
.
body
;
const
orderId
=
uuid
.
v1
();
const
orderId
=
uuid
.
v1
();
await
service
.
order
.
create
({
await
service
.
order
.
create
({
orderId
,
orderId
,
taskId
:
''
,
taskId
:
''
,
userId
:
userId
,
userId
:
userId
,
cityId
:
''
,
cityId
:
''
,
callbackUrl
:
notifyUrl
||
''
,
appKey
:
appKey
,
appKey
:
appKey
,
status
:
'init'
,
status
:
'init'
,
});
});
...
@@ -84,7 +85,7 @@ class OrderController extends Controller {
...
@@ -84,7 +85,7 @@ class OrderController extends Controller {
};
};
}
catch
(
err
)
{
}
catch
(
err
)
{
ctx
.
status
=
200
;
ctx
.
status
=
200
;
if
(
err
.
code
==
'invalid_param'
)
{
if
(
err
.
code
==
'invalid_param'
)
{
return
ctx
.
body
=
{
code
:
-
1
,
message
:
err
.
message
||
''
};
return
ctx
.
body
=
{
code
:
-
1
,
message
:
err
.
message
||
''
};
}
}
return
ctx
.
body
=
{
code
:
err
.
code
||
-
1
,
message
:
err
.
message
||
''
};
return
ctx
.
body
=
{
code
:
err
.
code
||
-
1
,
message
:
err
.
message
||
''
};
...
...
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