26 lines
579 B
JavaScript
26 lines
579 B
JavaScript
'use strict';
|
|
|
|
const Service = require('egg').Service;
|
|
|
|
const result = {
|
|
platform: null,
|
|
count: 0,
|
|
datas: [],
|
|
};
|
|
class PrintDataService extends Service {
|
|
|
|
async getPrintData({ printType, orderId }) {
|
|
const { ctx } = this;
|
|
switch (printType) {
|
|
case 'delivery_order': {
|
|
const deliveryOrderData = await ctx.service.systems.deliveryOrder.getPrintData({ orderId });
|
|
return deliveryOrderData;
|
|
}
|
|
default:
|
|
return { success: false, error: `不支持的打印类型 ${printType}` };
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = PrintDataService;
|