Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sb_h5
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
sb_h5
Commits
2bcab4ca
Commit
2bcab4ca
authored
Apr 29, 2019
by
高诸锋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix]
parent
e9b319c4
Pipeline
#6688
passed with stage
in 17 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
taskStatus.js
app/model/taskStatus.js
+2
-2
order.js
app/service/order.js
+4
-5
No files found.
app/model/taskStatus.js
View file @
2bcab4ca
...
...
@@ -22,7 +22,7 @@ module.exports = app => {
},
taskId
:
{
type
:
DataTypes
.
STRING
(
50
),
allowNull
:
fals
e
,
allowNull
:
tru
e
,
defaultValue
:
''
,
field
:
'taskId'
,
},
...
...
@@ -38,7 +38,7 @@ module.exports = app => {
defaultValue
:
''
,
field
:
'cityId'
,
},
app
k
ey
:
{
app
K
ey
:
{
type
:
DataTypes
.
STRING
(
100
),
allowNull
:
false
,
field
:
'appKey'
,
...
...
app/service/order.js
View file @
2bcab4ca
...
...
@@ -30,10 +30,8 @@ class OrderService extends Service {
where
:
{
orderId
:
params
.
orderId
},
order
:
[[
'createDate'
,
'DESC'
]],
});
// console.log(order);
if
(
order
.
length
===
0
)
{
// 创建订单号
// await ctx.model.TaskStatus.create(params);
ctx
.
throw
(
400
,
{
message
:
'no orderId'
});
if
(
order
.
length
===
0
)
{
ctx
.
throw
(
400
,
{
message
:
'no order'
});
return
;
}
for
(
const
item
of
order
)
{
...
...
@@ -46,8 +44,9 @@ class OrderService extends Service {
if
(
taskId
)
{
await
ctx
.
model
.
TaskStatus
.
create
({
appKey
,
status
:
'init'
,
notifyUrl
,
backUrl
,
userId
,
...
params
});
}
else
{
order
[
0
].
update
(
params
);
await
order
[
0
].
update
(
params
);
}
return
order
[
0
];
}
}
...
...
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