904118851 8 months ago
parent
commit
e35769d540
1 changed files with 10 additions and 10 deletions
  1. 10 10
      PULL_TIME_DATA/PULL_TIME_DATA.js

+ 10 - 10
PULL_TIME_DATA/PULL_TIME_DATA.js

@@ -10,15 +10,15 @@ const dbConfig = config.isDebug?config.debug_mysql:config.release_mysql
 const createTableSQL = (tableName) => `
 const createTableSQL = (tableName) => `
     CREATE TABLE IF NOT EXISTS ${tableName} (
     CREATE TABLE IF NOT EXISTS ${tableName} (
         id BIGINT PRIMARY KEY AUTO_INCREMENT,
         id BIGINT PRIMARY KEY AUTO_INCREMENT,
-        material_id VARCHAR(64),
-        aweme_id VARCHAR(255),
+        materialId VARCHAR(64),
+        awemeId VARCHAR(255),
         title VARCHAR(500),
         title VARCHAR(500),
-        aweme_url VARCHAR(500),
-        publish_time BIGINT,
-        has_anchor_info BOOLEAN,
-        landing_url VARCHAR(1024),
-        create_time BIGINT,
-        update_time BIGINT,
+        awemeUrl VARCHAR(500),
+        publishTime datetime DEFAULT NULL,
+        hasAnchorInfo BOOLEAN,
+        landingUrl VARCHAR(1024),
+        createTime datetime DEFAULT NULL,
+        updateTime datetime DEFAULT NULL,
         created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
         created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
     )
     )
 `;
 `;
@@ -117,8 +117,8 @@ const messageHandler = async (msg) => {
         // 执行批量插入
         // 执行批量插入
         const insertSQL = `
         const insertSQL = `
             INSERT INTO ${table_name}
             INSERT INTO ${table_name}
-            (material_id, aweme_id, title, aweme_url, publish_time, 
-             has_anchor_info, landing_url, create_time, update_time)
+            (materialId, awemeId, title, awemeUrl, publishTime, 
+             hasAnchorInfo, landingUrl, createTime, updateTime)
             VALUES ?
             VALUES ?
         `;
         `;