|
@@ -15,10 +15,11 @@ class BillService extends CrudService {
|
|
|
* @param {Object} data 订单数据
|
|
|
*/
|
|
|
async inBill(data) {
|
|
|
+ console.log(data);
|
|
|
const { _id } = data;
|
|
|
const res = await this.model.update({ _id: ObjectId(_id) }, data);
|
|
|
try {
|
|
|
- this.os.record(res._id, { method: 'in' });
|
|
|
+ this.os.record(_id, { method: 'in' });
|
|
|
} catch (error) {
|
|
|
this.logger.error(`订单id:${res.id}记录创建失败:${error.toString()}`);
|
|
|
}
|
|
@@ -32,7 +33,7 @@ class BillService extends CrudService {
|
|
|
const { _id } = data;
|
|
|
const res = await this.model.update({ _id: ObjectId(_id) }, data);
|
|
|
try {
|
|
|
- this.os.record(res._id, { method: 'out' });
|
|
|
+ this.os.record(_id, { method: 'out' });
|
|
|
} catch (error) {
|
|
|
this.logger.error(`订单id:${res.id}记录创建失败:${error.toString()}`);
|
|
|
}
|