fuyu 4 years ago
parent
commit
4404e34823
2 changed files with 6 additions and 3 deletions
  1. 5 2
      src/service/log.js
  2. 1 1
      src/service/move.js

+ 5 - 2
src/service/log.js

@@ -2,14 +2,17 @@
  * @Author: fuyu
  * @Date: 2021-03-23 16:25:59
  * @LastEditors: fuyu
- * @LastEditTime: 2021-03-25 17:28:20
- * @FilePath: /202103/code/sql_merge/src/service/log.js
+ * @LastEditTime: 2021-03-28 22:22:39
+ * @FilePath: /sql_merge/src/service/log.js
  */
 const fs = require('fs')
 const path = require('path');
 const rootPath = path.join(__dirname, '..', '..', 'logs')
 import {getNowDay, getNowTime} from './time'
 export async function logSum(institution_id, count) {
+  if(typeof institution_id !== 'string') {
+    return
+  }
   const dirPath = path.join(rootPath, 'sum')
   checkPath(dirPath)
   const filePath = path.join(dirPath, getNowDay() + '.log')

+ 1 - 1
src/service/move.js

@@ -2,7 +2,7 @@
  * @Author: fuyu
  * @Date: 2021-03-23 12:00:09
  * @LastEditors: fuyu
- * @LastEditTime: 2021-03-28 22:20:26
+ * @LastEditTime: 2021-03-28 22:22:23
  * @FilePath: /sql_merge/src/service/move.js
  */