liufumingren 561cd27f81 初始化
2026-07-25 00:46:47 +08:00

35 lines
1023 B
JavaScript

const { Controller } = require('egg');
class dgjController extends Controller {
async Print(){
const { ctx } = this;
const parmas = ctx.request.body;
if('orders' in parmas && 'expressName' in parmas){
ctx.body = await ctx.service.dgj.Print(parmas.orders,parmas.expressName);
}
}
async Print1(){
const { ctx } = this;
const parmas = ctx.request.body;
if('orders' in parmas && 'expressName' in parmas){
ctx.body = await ctx.service.dgj.Print1(parmas.orders,parmas.expressName);
}
}
async Print2(){
const { ctx } = this;
const parmas = ctx.request.body;
if('orders' in parmas && 'expressName' in parmas){
ctx.body = await ctx.service.dgj.Print2(parmas.orders,parmas.expressName);
}
}
async CreateOrder(){
const {ctx} = this;
const parmas = ctx.request.body;
if('orders' in parmas){
ctx.body = await ctx.service.dgj.CreateOrder(parmas.orders);
}else{
ctx.body = 0;
}
}
}
module.exports = dgjController;