Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
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
bp
op-web-service
Commits
4892e70b
Commit
4892e70b
authored
Aug 07, 2021
by
your yuchenglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:老订单管理接口名更改
parent
bb560f93
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
45 deletions
+37
-45
groupmeal.js
server/controllers/groupmeal.js
+19
-18
router.js
server/router.js
+9
-10
groupmeal.js
src/service/Groupmeal/groupmeal.js
+9
-17
No files found.
server/controllers/groupmeal.js
View file @
4892e70b
const
GROUPMEAL_URI
=
require
(
"../config.js"
).
GROUPMEAL_URI
;
const
GROUPMEAL_URI
=
require
(
"../config.js"
).
GROUPMEAL_URI
;
const
req
=
require
(
"../utils/request"
).
httpReq
;
const
req
=
require
(
"../utils/request"
).
httpReq
;
// 获取订单管理列表
exports
.
getOrderList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 获取主页配送列表
// 获取主页配送列表
exports
.
getList
=
async
ctx
=>
{
exports
.
getList
=
async
ctx
=>
{
const
opts
=
{
const
opts
=
{
...
@@ -51,9 +41,20 @@ exports.getSaveDeliverer = async ctx => {
...
@@ -51,9 +41,20 @@ exports.getSaveDeliverer = async ctx => {
};
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
};
// 获取订单管理列表
exports
.
getOrderList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/oldbackground/order_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 获取活动名称
// 获取活动名称
exports
.
getMarketingList
=
async
ctx
=>
{
exports
.
getMarketingList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/marketing_list`
;
const
url
=
`
${
GROUPMEAL_URI
}
/order/
old
background/marketing_list`
;
const
opts
=
{
const
opts
=
{
url
,
url
,
method
:
"GET"
method
:
"GET"
...
@@ -63,7 +64,7 @@ exports.getMarketingList = async ctx => {
...
@@ -63,7 +64,7 @@ exports.getMarketingList = async ctx => {
// 获取商品名称
// 获取商品名称
exports
.
getGoodsList
=
async
ctx
=>
{
exports
.
getGoodsList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/goods_list`
;
const
url
=
`
${
GROUPMEAL_URI
}
/order/
old
background/goods_list`
;
const
opts
=
{
const
opts
=
{
url
,
url
,
method
:
"GET"
method
:
"GET"
...
@@ -73,7 +74,7 @@ exports.getGoodsList = async ctx => {
...
@@ -73,7 +74,7 @@ exports.getGoodsList = async ctx => {
// 获取自提点
// 获取自提点
exports
.
getSubShopList
=
async
ctx
=>
{
exports
.
getSubShopList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/sub_shop_list`
;
const
url
=
`
${
GROUPMEAL_URI
}
/order/
old
background/sub_shop_list`
;
const
opts
=
{
const
opts
=
{
url
,
url
,
method
:
"GET"
method
:
"GET"
...
@@ -83,7 +84,7 @@ exports.getSubShopList = async ctx => {
...
@@ -83,7 +84,7 @@ exports.getSubShopList = async ctx => {
// 导出订单
// 导出订单
exports
.
orderExport
=
async
ctx
=>
{
exports
.
orderExport
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_export`
;
const
url
=
`
${
GROUPMEAL_URI
}
/order/
old
background/order_export`
;
const
opts
=
{
const
opts
=
{
url
,
url
,
method
:
"GET"
method
:
"GET"
...
@@ -93,7 +94,7 @@ exports.orderExport = async ctx => {
...
@@ -93,7 +94,7 @@ exports.orderExport = async ctx => {
// 打印订单
// 打印订单
exports
.
orderPrint
=
async
ctx
=>
{
exports
.
orderPrint
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_print`
;
const
url
=
`
${
GROUPMEAL_URI
}
/order/
old
background/order_print`
;
const
opts
=
{
const
opts
=
{
url
,
url
,
method
:
"GET"
method
:
"GET"
...
@@ -103,7 +104,7 @@ exports.orderPrint = async ctx => {
...
@@ -103,7 +104,7 @@ exports.orderPrint = async ctx => {
// 订单退款列表
// 订单退款列表
exports
.
orderItemList
=
async
ctx
=>
{
exports
.
orderItemList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_item_list`
;
const
url
=
`
${
GROUPMEAL_URI
}
/order/
old
background/order_item_list`
;
const
opts
=
{
const
opts
=
{
url
,
url
,
method
:
"GET"
method
:
"GET"
...
@@ -113,7 +114,7 @@ exports.orderItemList = async ctx => {
...
@@ -113,7 +114,7 @@ exports.orderItemList = async ctx => {
// 订单退款列表
// 订单退款列表
exports
.
orderRefund
=
async
ctx
=>
{
exports
.
orderRefund
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_refund`
;
const
url
=
`
${
GROUPMEAL_URI
}
/order/
old
background/order_refund`
;
const
opts
=
{
const
opts
=
{
url
,
url
,
method
:
"POST"
,
method
:
"POST"
,
...
@@ -125,7 +126,7 @@ exports.orderRefund = async ctx => {
...
@@ -125,7 +126,7 @@ exports.orderRefund = async ctx => {
// 订单驳回
// 订单驳回
exports
.
orderRefundReject
=
async
ctx
=>
{
exports
.
orderRefundReject
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_refund_reject`
;
const
url
=
`
${
GROUPMEAL_URI
}
/order/
old
background/order_refund_reject`
;
const
opts
=
{
const
opts
=
{
url
,
url
,
method
:
"GET"
method
:
"GET"
...
...
server/router.js
View file @
4892e70b
...
@@ -69,15 +69,14 @@ router.post(`${API_VERSION}/order/deliverer/add_deliverer`, groupmeal.getAddDeli
...
@@ -69,15 +69,14 @@ router.post(`${API_VERSION}/order/deliverer/add_deliverer`, groupmeal.getAddDeli
router
.
post
(
`
${
API_VERSION
}
/order/deliverer/save_day_deliverer`
,
groupmeal
.
getSaveDeliverer
)
router
.
post
(
`
${
API_VERSION
}
/order/deliverer/save_day_deliverer`
,
groupmeal
.
getSaveDeliverer
)
// 订单管理
// 订单管理
router
.
get
(
`
${
API_VERSION
}
/order/background/order_list`
,
groupmeal
.
getOrderList
);
router
.
get
(
`
${
API_VERSION
}
/order/oldbackground/order_list`
,
groupmeal
.
getOrderList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/marketing_list`
,
groupmeal
.
getMarketingList
);
router
.
get
(
`
${
API_VERSION
}
/order/oldbackground/marketing_list`
,
groupmeal
.
getMarketingList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/goods_list`
,
groupmeal
.
getGoodsList
);
router
.
get
(
`
${
API_VERSION
}
/order/oldbackground/goods_list`
,
groupmeal
.
getGoodsList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/sub_shop_list`
,
groupmeal
.
getSubShopList
);
router
.
get
(
`
${
API_VERSION
}
/order/oldbackground/sub_shop_list`
,
groupmeal
.
getSubShopList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_export`
,
groupmeal
.
orderExport
);
router
.
get
(
`
${
API_VERSION
}
/order/oldbackground/order_export`
,
groupmeal
.
orderExport
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_export`
,
groupmeal
.
orderExport
);
router
.
get
(
`
${
API_VERSION
}
/order/oldbackground/order_print`
,
groupmeal
.
orderPrint
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_print`
,
groupmeal
.
orderPrint
);
router
.
get
(
`
${
API_VERSION
}
/order/oldbackground/order_item_list`
,
groupmeal
.
orderItemList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_item_list`
,
groupmeal
.
orderItemList
);
router
.
get
(
`
${
API_VERSION
}
/order/oldbackground/order_refund_reject`
,
groupmeal
.
orderRefundReject
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_refund_reject`
,
groupmeal
.
orderRefundReject
);
router
.
post
(
`
${
API_VERSION
}
/order/oldbackground/order_refund`
,
groupmeal
.
orderRefund
);
router
.
post
(
`
${
API_VERSION
}
/order/background/order_refund`
,
groupmeal
.
orderRefund
);
module
.
exports
=
router
;
module
.
exports
=
router
;
src/service/Groupmeal/groupmeal.js
View file @
4892e70b
...
@@ -29,7 +29,7 @@ export async function getSaveDeliverer(params) {
...
@@ -29,7 +29,7 @@ export async function getSaveDeliverer(params) {
// 获取订单列表
// 获取订单列表
export
async
function
getOrderList
(
params
)
{
export
async
function
getOrderList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_list"
,
{
const
res
=
await
axios
.
get
(
"/api/v1/order/
old
background/order_list"
,
{
params
params
});
});
return
res
;
return
res
;
...
@@ -37,13 +37,13 @@ export async function getOrderList(params) {
...
@@ -37,13 +37,13 @@ export async function getOrderList(params) {
// 获取活动名称
// 获取活动名称
export
async
function
getMarketingList
()
{
export
async
function
getMarketingList
()
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/marketing_list"
);
const
res
=
await
axios
.
get
(
"/api/v1/order/
old
background/marketing_list"
);
return
res
;
return
res
;
}
}
// 获取商品名称
// 获取商品名称
export
async
function
getGoodsList
(
params
)
{
export
async
function
getGoodsList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/goods_list"
,
{
const
res
=
await
axios
.
get
(
"/api/v1/order/
old
background/goods_list"
,
{
params
params
});
});
return
res
;
return
res
;
...
@@ -51,15 +51,7 @@ export async function getGoodsList(params) {
...
@@ -51,15 +51,7 @@ export async function getGoodsList(params) {
// 获取自提点
// 获取自提点
export
async
function
getSubShopList
(
params
)
{
export
async
function
getSubShopList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/sub_shop_list"
,{
const
res
=
await
axios
.
get
(
"/api/v1/order/oldbackground/sub_shop_list"
,{
params
});
return
res
;
}
// 导出订单
export
async
function
orderExport
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_export"
,
{
params
params
});
});
return
res
;
return
res
;
...
@@ -67,7 +59,7 @@ export async function orderExport(params) {
...
@@ -67,7 +59,7 @@ export async function orderExport(params) {
// 打印订单
// 打印订单
export
async
function
orderPrint
(
params
)
{
export
async
function
orderPrint
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_print"
,
{
const
res
=
await
axios
.
get
(
"/api/v1/order/
old
background/order_print"
,
{
params
params
});
});
return
res
;
return
res
;
...
@@ -75,7 +67,7 @@ export async function orderPrint(params) {
...
@@ -75,7 +67,7 @@ export async function orderPrint(params) {
// 订单退款列表
// 订单退款列表
export
async
function
orderItemList
(
params
)
{
export
async
function
orderItemList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_item_list"
,
{
const
res
=
await
axios
.
get
(
"/api/v1/order/
old
background/order_item_list"
,
{
params
params
});
});
return
res
;
return
res
;
...
@@ -87,7 +79,7 @@ export async function refundOrder(orderId, itemsToRefund) {
...
@@ -87,7 +79,7 @@ export async function refundOrder(orderId, itemsToRefund) {
// order_id: orderId,
// order_id: orderId,
// refund_list: itemsToRefund
// refund_list: itemsToRefund
// };
// };
const
res
=
await
axios
.
post
(
"/api/v1/order/background/order_refund"
,
{
const
res
=
await
axios
.
post
(
"/api/v1/order/
old
background/order_refund"
,
{
order_id
:
orderId
,
order_id
:
orderId
,
refund_list
:
itemsToRefund
refund_list
:
itemsToRefund
});
});
...
@@ -96,7 +88,7 @@ export async function refundOrder(orderId, itemsToRefund) {
...
@@ -96,7 +88,7 @@ export async function refundOrder(orderId, itemsToRefund) {
// 订单驳回
// 订单驳回
export
async
function
orderRefundReject
(
params
)
{
export
async
function
orderRefundReject
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_refund_reject"
,
{
const
res
=
await
axios
.
get
(
"/api/v1/order/
old
background/order_refund_reject"
,
{
params
params
});
});
return
res
;
return
res
;
...
@@ -110,5 +102,5 @@ export function getOrderExportURL(eventId, type) {
...
@@ -110,5 +102,5 @@ export function getOrderExportURL(eventId, type) {
}
else
{
}
else
{
ENV
=
"http://bp-test.ini.yidian-inc.com/"
ENV
=
"http://bp-test.ini.yidian-inc.com/"
}
}
return
`
${
ENV
}
order/background/order_export?marketing_id=
${
eventId
}
&type=
${
type
}
`
;
return
`
${
ENV
}
order/
old
background/order_export?marketing_id=
${
eventId
}
&type=
${
type
}
`
;
}
}
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