904118851 4 months ago
parent
commit
613262bd57
1 changed files with 10 additions and 10 deletions
  1. 10 10
      task_script/sync_publish_time_hy_mf.js

+ 10 - 10
task_script/sync_publish_time_hy_mf.js

@@ -40,16 +40,16 @@ async function processTask(){
             }else{
 
                 let hy_book_data = CMD.add_parent_book(video_product_info.product_parent_id)
-                let publish_time = hy_book_data.createTime
-                let words = hy_book_data.words
-                let book_name = hy_book_data.name;
-                let genre = 1
-                if(words>100000){
-                    genre = 1;
-                }else{
-                    genre = 3;
-                }
                 if(hy_book_data!=null){
+                    let publish_time = hy_book_data.createTime
+                    let words = hy_book_data.words
+                    let book_name = hy_book_data.name;
+                    let genre = 1
+                    if(words>100000){
+                        genre = 1;
+                    }else{
+                        genre = 3;
+                    }
                     await CMD.insert_product({
                         tg_platform_id:config.platform_heiyan,
                         book_name:book_name,
@@ -62,7 +62,7 @@ async function processTask(){
                     await connection.execute(
                          ` UPDATE video_product SET  publish_time = '2000-01-01 01:01:01' WHERE id = ${video_product_info.id}  `
                     );
-                    console.error("查无此书:",video_product_info)
+                    console.error("查无此书:",video_product_info,hy_book_data)
                 }
             }
         }