schangxiang@126.com
2025-09-09 3d8966ba2c81e7e0365c8b123e861d18ee4f94f5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
}