Explorar el Código

加入更新状态

liuyu hace 5 años
padre
commit
9f4c37ff88
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      app/service/excelimport.js

+ 5 - 0
app/service/excelimport.js

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