'use strict'; // 查询业绩汇总表-->关联sale表 async function getSalePerformance(ctx, next) { const { type } = ctx.params; let rslt = null; try { rslt = await ctx.fs.dc.models.salePerformance.findAll({ order: [['id', 'DESC']], // where: { type: type } }) ctx.status = 200 ctx.body = rslt } catch (error) { ctx.fs.logger.error(`path:${ctx.path},error:${error}`) ctx.status = 400; ctx.body = { name: 'FindAllError', message: '获取失败' } } } module.exports = { getSalePerformance, }