Browse Source

加入更新状态

liuyu 5 years ago
parent
commit
9f4c37ff88
1 changed files with 5 additions and 0 deletions
  1. 5 0
      app/service/excelimport.js

+ 5 - 0
app/service/excelimport.js

@@ -62,6 +62,11 @@ class ExcelimportService extends Service {
           body: exceldata,
         });
         console.log(studRes);
+        // 导入成功时更新状态
+        if(studRes != null){
+          const updatedata = {id: id, status: '1' };
+          await this.ctx.service.dataimp.update(updatedata);
+        }
       }
     }