lrf 2 년 전
부모
커밋
81afb377e5
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      app/service/shop/shopCashOut.js

+ 3 - 3
app/service/shop/shopCashOut.js

@@ -30,9 +30,9 @@ class ShopCashOutService extends CrudService {
   async afterUpdate(filter, body, data) {
     const { status } = body;
     if (status === '1') {
-      const { customer: inviter, money } = data;
-      const obj = { inviter, money, time: moment().format('YYYY-MM-DD HH:mm:ss'), status: '-1', source: '-1', source_id: data._id };
-      const num = await this.shopInBillModel.count({ inviter, status: '-1', source: '-1', source_id: data._id });
+      const { money: receipts, shop } = data;
+      const obj = { shop, receipts, time: moment().format('YYYY-MM-DD HH:mm:ss'), status: '-1', source: '-1', source_id: data._id };
+      const num = await this.shopInBillModel.count({ shop, status: '-1', source: '-1', source_id: data._id });
       // 说明该申请没有流水,添加流水;有流水就不加了
       if (num <= 0) await this.shopInBillModel.create(obj);
     }