Commit e5d1a348 authored by Hsinli's avatar Hsinli

ddd

parent 8757be10
Pipeline #6095 passed with stage
in 2 seconds
......@@ -34,11 +34,18 @@ class OrderService extends Service {
operator: "equal"
},
],
orderConditions: [],
orderConditions: [{
key: 'createdAt',
orderSequence: 'desc',
}],
}
let orderHistory = await service.houseCommon.order.all(filter);
if (orderHistory.rowCount > 0) {
ctx.failed('已经预约过');
let ret = {
id: orderHistory.results[0].id,
msg: '已经预约过',
};
return ret;
}
let data = {
userId: ctx.userId,
......@@ -52,7 +59,7 @@ class OrderService extends Service {
remark: inputParams.remark || ''
};
let ret = await service.houseCommon.order.add(data);
return { id: ret.id };
return { id: ret.id, msg: '预约成功' };
}
/**
......
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