Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xuexin_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
xuexin_h5
Commits
9be6d4ad
Commit
9be6d4ad
authored
Apr 18, 2019
by
何娜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix通知
parent
04d6d96b
Pipeline
#6179
passed with stage
in 2 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
order.js
app/controller/order.js
+1
-0
task.js
app/controller/task.js
+1
-8
taskStatus.js
app/model/taskStatus.js
+6
-0
No files found.
app/controller/order.js
View file @
9be6d4ad
...
@@ -80,6 +80,7 @@ class OrderController extends Controller {
...
@@ -80,6 +80,7 @@ class OrderController extends Controller {
const
result
=
await
service
.
signature
.
partnerOrderId
(
ctx
.
request
.
body
);
const
result
=
await
service
.
signature
.
partnerOrderId
(
ctx
.
request
.
body
);
await
service
.
order
.
create
({
await
service
.
order
.
create
({
orderId
:
result
.
data
.
orderSn
,
orderId
:
result
.
data
.
orderSn
,
notifyUrl
:
ctx
.
app
.
notifyMap
.
get
(
appKey
)
&&
ctx
.
app
.
notifyMap
.
get
(
appKey
).
notifyUrl
||
''
,
taskId
:
''
,
taskId
:
''
,
userId
:
''
,
userId
:
''
,
cityId
:
''
,
cityId
:
''
,
...
...
app/controller/task.js
View file @
9be6d4ad
...
@@ -87,7 +87,6 @@ class TaskController extends Controller {
...
@@ -87,7 +87,6 @@ class TaskController extends Controller {
async
handleCallback
()
{
async
handleCallback
()
{
const
{
ctx
,
service
}
=
this
;
const
{
ctx
,
service
}
=
this
;
ctx
.
logger
.
info
(
'【handleCallback】'
,
ctx
.
request
.
body
);
const
{
taskId
}
=
ctx
.
request
.
body
;
const
{
taskId
}
=
ctx
.
request
.
body
;
const
result
=
await
service
.
task
.
fetchTask
({
taskId
});
const
result
=
await
service
.
task
.
fetchTask
({
taskId
});
ctx
.
success
();
ctx
.
success
();
...
@@ -133,15 +132,9 @@ class TaskController extends Controller {
...
@@ -133,15 +132,9 @@ class TaskController extends Controller {
if
(
!
order
)
{
if
(
!
order
)
{
throw
new
Error
(
'任务已经结束了'
);
throw
new
Error
(
'任务已经结束了'
);
}
}
const
{
orderId
,
appkey
}
=
order
;
const
{
orderId
}
=
order
;
const
script
=
await
service
.
scripts
.
fetchOneScripts
(
result
.
data
.
cityId
);
result
.
cityId
=
Number
(
result
.
data
.
cityId
);
result
.
cityName
=
script
.
hub_name
||
'unknown'
;
result
.
taskId
=
taskId
;
result
.
data
=
JSON
.
parse
(
result
.
data
.
data
);
result
.
data
=
JSON
.
parse
(
result
.
data
.
data
);
result
.
orderSn
=
orderId
;
result
.
orderId
=
orderId
;
result
.
orderId
=
orderId
;
result
.
appKey
=
appkey
;
delete
result
.
code
;
delete
result
.
code
;
delete
result
.
msg
;
delete
result
.
msg
;
await
service
.
storage
.
write
(
result
);
await
service
.
storage
.
write
(
result
);
...
...
app/model/taskStatus.js
View file @
9be6d4ad
...
@@ -103,6 +103,12 @@ module.exports = app => {
...
@@ -103,6 +103,12 @@ module.exports = app => {
defaultValue
:
''
,
defaultValue
:
''
,
field
:
'text3'
,
field
:
'text3'
,
},
},
notice
:
{
type
:
DataTypes
.
STRING
(
2
),
allowNull
:
true
,
defaultValue
:
''
,
field
:
'notice'
,
},
},
{
},
{
tableName
:
'xuexin_status'
,
tableName
:
'xuexin_status'
,
// timestamps: false,
// timestamps: false,
...
...
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