Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
taxh5
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
taxh5
Commits
e85b2db2
Commit
e85b2db2
authored
May 07, 2019
by
何娜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taxh5 修改回调key
parent
55c5be6e
Pipeline
#7047
passed with stage
in 2 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
order.js
app/controller/order.js
+2
-2
task.js
app/controller/task.js
+1
-0
order.js
app/service/order.js
+2
-2
No files found.
app/controller/order.js
View file @
e85b2db2
...
...
@@ -48,7 +48,7 @@ class OrderController extends Controller {
async
create
()
{
const
{
ctx
,
service
}
=
this
;
ctx
.
validate
(
this
.
createRule
);
let
{
appKey
,
userId
,
notifyUrl
,
back
Url
,
orderId
}
=
ctx
.
request
.
body
;
let
{
appKey
,
userId
,
notifyUrl
,
redirect
Url
,
orderId
}
=
ctx
.
request
.
body
;
ctx
.
logger
.
info
(
'【orders】 appKey'
,
appKey
);
const
appKeyInfo
=
await
service
.
partner
.
fetchInfo
(
appKey
);
ctx
.
logger
.
info
(
appKey
,
',appKeyInfo,'
,
appKeyInfo
);
...
...
@@ -61,7 +61,7 @@ class OrderController extends Controller {
userId
:
userId
||
''
,
cityId
:
''
,
notifyUrl
:
notifyUrl
||
(
ctx
.
app
.
notifyMap
&&
ctx
.
app
.
notifyMap
.
get
(
appKey
)
&&
ctx
.
app
.
notifyMap
.
get
(
appKey
).
notifyUrl
)
||
''
,
backUrl
:
back
Url
||
''
,
backUrl
:
redirect
Url
||
''
,
appkey
:
appKey
,
status
:
'init'
,
};
...
...
app/controller/task.js
View file @
e85b2db2
...
...
@@ -143,6 +143,7 @@ class TaskController extends Controller {
result
.
taskId
=
taskId
;
result
.
data
=
JSON
.
parse
(
result
.
data
.
data
);
result
.
orderId
=
orderId
;
result
.
orderSn
=
orderId
;
result
.
appKey
=
appkey
;
delete
result
.
code
;
delete
result
.
msg
;
...
...
app/service/order.js
View file @
e85b2db2
...
...
@@ -48,9 +48,9 @@ class OrderService extends Service {
return
;
}
}
const
{
appkey
,
taskId
,
notifyUrl
,
back
Url
,
userId
}
=
order
[
0
];
const
{
appkey
,
taskId
,
notifyUrl
,
redirect
Url
,
userId
}
=
order
[
0
];
if
(
taskId
)
{
await
ctx
.
model
.
TaskStatus
.
create
({
appkey
,
status
:
'init'
,
notifyUrl
,
backUrl
,
userId
,
...
params
})
await
ctx
.
model
.
TaskStatus
.
create
({
appkey
,
status
:
'init'
,
notifyUrl
,
backUrl
:
redirectUrl
,
userId
,
...
params
})
}
else
{
await
order
[
0
].
update
(
params
);
}
...
...
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