Commit 5c96b54d authored by 何娜's avatar 何娜

taxh5 查询数据库优化

parent 1622fa17
Pipeline #7066 passed with stage
in 10 seconds
...@@ -3,11 +3,10 @@ ...@@ -3,11 +3,10 @@
const Service = require('egg').Service; const Service = require('egg').Service;
class OrderService extends Service { class OrderService extends Service {
async getOneByOrderId(orderId) { async getOneByOrderId(params) {
const { ctx } = this; const { ctx } = this;
const order = await ctx.model.TaskStatus.findOne({ const order = await ctx.model.TaskStatus.findOne({
where: { orderId }, where: params,
order: [['createDate', 'DESC']],
}); });
return order; return order;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment