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
c80f5038
Commit
c80f5038
authored
Mar 01, 2019
by
姜登
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单号创建修改
parent
9057aa8e
Pipeline
#3998
passed with stage
in 55 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
order.js
app/controller/order.js
+9
-3
No files found.
app/controller/order.js
View file @
c80f5038
...
...
@@ -7,7 +7,13 @@ class OrderController extends Controller {
super
(
ctx
);
this
.
createRule
=
{
appKey
:
'string'
,
userId
:
'string'
userId
:
'string'
,
orderId
:
{
type
:
'string'
,
required
:
false
,
format
:
/^
(\w{8})
-
(\w{4})
-
(\w{4})
-
(\w{4})
-
(\w{12})
$/
,
message
:
'订单号格式错误'
,
}
};
this
.
showRule
=
{
...
...
@@ -28,8 +34,8 @@ class OrderController extends Controller {
const
{
ctx
,
service
}
=
this
;
const
uuid
=
require
(
'node-uuid'
);
ctx
.
validate
(
this
.
createRule
);
const
{
appKey
,
userId
,
notifyUrl
,
backUrl
}
=
ctx
.
request
.
body
;
const
orderId
=
uuid
.
v1
();
let
{
appKey
,
userId
,
notifyUrl
,
backUrl
,
orderId
}
=
ctx
.
request
.
body
;
orderId
=
orderId
||
uuid
.
v1
();
await
service
.
order
.
create
({
orderId
,
taskId
:
''
,
...
...
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