import BaseController from "../baseController";
|
import { Post } from "egg-shell-decorators";
|
|
export default class ExpressBshtController extends BaseController {
|
//#region 推送订单 pushOrder
|
/// <summary>
|
///推送订单 pushOrder
|
/// </summary>
|
/// <returns>返回推送结果</returns>
|
///
|
@Post()
|
public async pushOrder() {
|
let { ctx } = this;
|
try {
|
//#region 校验数据
|
if (!this.body.orderIdList) {
|
this.info.result = false;
|
this.info.msg = "至少选择一条记录!";
|
|
ctx.body = this.info;
|
}
|
//#endregion
|
this.info = await ctx.service.express.bshtHelper.pushOrder(this.body.orderIdList);
|
ctx.body = this.info;
|
} catch (ex) {
|
this.info.result = false;
|
this.info.msg = ex.message;
|
ctx.body = this.info;
|
}
|
}
|
//#endregion
|
}
|