lrf 2 年之前
父节点
当前提交
698bfcc632
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      app/service/user/cashOut.js

+ 7 - 0
app/service/user/cashOut.js

@@ -20,6 +20,13 @@ class CashOutService extends CrudService {
     return data;
     return data;
   }
   }
 
 
+  async beforeUpdate(filter, update) {
+    if (_.get(update, 'status') !== '0') {
+      update.deal_person = _.get(this.ctx, 'admin._id');
+    }
+    return { filter, update };
+  }
+
   async afterUpdate(filter, body, data) {
   async afterUpdate(filter, body, data) {
     const { status } = body;
     const { status } = body;
     if (status === '1') {
     if (status === '1') {