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
10e835cc
Commit
10e835cc
authored
Oct 31, 2019
by
姜登
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gjjh5
parent
11b85bba
Pipeline
#15641
passed with stage
in 5 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
1 deletion
+42
-1
order.js
app/controller/order.js
+32
-1
router.js
app/router.js
+10
-0
No files found.
app/controller/order.js
View file @
10e835cc
...
...
@@ -4,7 +4,7 @@
* @Author: jd
* @Date: 2019-02-25 18:59:53
* @LastEditors: jd
* @LastEditTime: 2019-10-31 14:
45:58
* @LastEditTime: 2019-10-31 14:
59:50
*/
'use strict'
;
...
...
@@ -124,6 +124,37 @@ class OrderController extends Controller {
}
}
async
partnerGjjShow
()
{
const
{
ctx
,
service
}
=
this
;
try
{
ctx
.
validate
(
this
.
showRule
);
let
{
appKey
,
orderId
,
orderSn
}
=
ctx
.
request
.
body
.
params
;
orderId
=
orderId
||
orderSn
;
const
appKeyInfo
=
await
service
.
partner
.
fetchInfo
(
appKey
);
if
(
!
(
appKeyInfo
&&
appKeyInfo
.
valid
===
true
&&
appKeyInfo
.
enableHfData
===
true
))
{
return
ctx
.
fail
(
'未开通此服务'
);
}
await
service
.
signature
.
signatureCheck
(
ctx
.
request
.
body
);
const
data
=
await
service
.
order
.
getOneByOrderId
({
orderId
,
status
:
'success'
});
if
(
data
)
{
await
service
.
partner
.
appKeyLimit
(
appKey
);
const
result
=
await
service
.
storage
.
read
(
orderId
,
appKey
);
ctx
.
body
=
{
code
:
0
,
data
:
result
,
};
return
;
}
ctx
.
body
=
{
code
:
-
1
,
msg
:
'无此订单号'
,
};
}
catch
(
err
)
{
ctx
.
logger
.
error
(
'partnerShow'
,
JSON
.
stringify
(
err
));
ctx
.
error
(
err
);
}
}
async
orderShow
()
{
const
{
ctx
,
service
}
=
this
;
const
{
appKey
,
orderId
}
=
ctx
.
params
;
...
...
app/router.js
View file @
10e835cc
/*
* @Descripttion:
* @version:
* @Author: jd
* @Date: 2019-02-25 18:59:53
* @LastEditors: jd
* @LastEditTime: 2019-10-31 14:57:56
*/
'use strict'
;
/**
...
...
@@ -38,6 +46,8 @@ module.exports = app => {
gjjRouter
.
post
(
'/getData'
,
controller
.
order
.
partnerShow
);
// 合作方获取订单数据
gjjRouter
.
post
(
'/getGjjData'
,
controller
.
order
.
partnerGjjShow
);
// 合作方获取订单数据
gjjRouter
.
post
(
'/getCityConfig'
,
controller
.
task
.
fetchCityConfig
);
// 获取城市配置
gjjRouter
.
get
(
'/getCityList'
,
controller
.
script
.
partnerScripts
);
// 获取城市列表状态
...
...
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