瀏覽代碼

对接关注

chen 5 年之前
父節點
當前提交
4fa2c2c50f
共有 2 個文件被更改,包括 10 次插入1 次删除
  1. 2 1
      app/service/intelligentDocking.js
  2. 8 0
      app/service/intelligentFollow.js

+ 2 - 1
app/service/intelligentDocking.js

@@ -323,7 +323,8 @@ class IntelligentDockingService extends CrudService {
           guanzhu.creditStatus = '3';
           guanzhu.refusemessage = reason;
           await guanzhu.save();
-          // intelligent.status = '2';
+          // 对接需求表状态
+          intelligent.status = '1';
           this.ctx.service.viewnews.insertViewNews('智能对接', '您已被拒绝3次,不再指派银行受理,请重新提交申请,详情请查看智能对接需求列表', intelligent.uid);
         }
         res = await intelligent.save();

+ 8 - 0
app/service/intelligentFollow.js

@@ -83,6 +83,14 @@ class IntelligentFollowService extends CrudService {
     const now = new Date();
     const nowtime = now.getTime();// 当前时间戳(授信时间)
     const intelligentFollow = await this.model.findById(id);
+
+    if (creditStatus == '1' || creditStatus == '3') {
+      const xuqiuId = intelligentFollow.intelligentId;
+      const xuqiuData = await this.dmodel.findById(xuqiuId);
+      xuqiuData.status = '1';
+      await xuqiuData.save();
+    }
+
     if (senhemessage) {
       intelligentFollow.senhemessage = senhemessage;
     }