904118851 3 months ago
parent
commit
e1700735d5

+ 3 - 3
task_script/sync_publish_time_dz.js

@@ -33,9 +33,9 @@ async function processTask(){
                     `UPDATE video_product SET publish_time = "${publish_time}"  WHERE id = ${video_product_info.id} `
                 );
             }else{
-                // await connection.execute(
-                //     ` delete from video_product  where   id = ${video_product_info.id}; `
-                // );
+                await connection.execute(
+                    ` UPDATE video_product SET status = 0 , publish_time = '2000-01-01 01:01:01' WHERE id = ${video_product_info.id}  `
+                );
                 console.error("查无此书:",video_product_info)
             }
         }

+ 3 - 3
task_script/sync_publish_time_fq.js

@@ -33,9 +33,9 @@ async function processTask(){
                 );
                 await new Promise(resolve => setTimeout(resolve,1000));
             }else{
-                // await connection.execute(
-                //     ` delete from video_product  where   id = ${video_product_info.id}; `
-                // );
+                await connection.execute(
+                    ` UPDATE video_product SET status = 0 , publish_time = '2000-01-01 01:01:01' WHERE id = ${video_product_info.id}  `
+                );
                 console.error("查无此书:",video_product_info)
             }
         }

+ 3 - 3
task_script/sync_publish_time_fq_mf.js

@@ -33,9 +33,9 @@ async function processTask(){
                 );
             }else{
                 console.error("查无此书:",video_product_info)
-                // await connection.execute(
-                //     ` delete from video_product  where   id = ${video_product_info.id}; `
-                // );
+                await connection.execute(
+                    ` UPDATE video_product SET status = 0 , publish_time = '2000-01-01 01:01:01' WHERE id = ${video_product_info.id}  `
+                );
             }
         }
 

+ 14 - 7
task_script/sync_publish_time_hy.js

@@ -33,13 +33,20 @@ async function processTask(){
             if(data==undefined||data==null){
                 data = null
             }
-            if(data.rows==null||data.rows==undefined){
-                data = null
+
+            if(data!=null){
+                if(data.rows==null||data.rows==undefined){
+                    data = null
+                }
             }
+     
 
-            if(data.rows.length<=0){
-                data = null
+            if(data!=null){
+                if(data.rows.length<=0){
+                    data = null
+                }
             }
+
             
             if(data!=null){
                 let publish_time = data.rows[0].createTime
@@ -47,9 +54,9 @@ async function processTask(){
                     `UPDATE video_product SET publish_time = "${publish_time}"  WHERE id = ${video_product_info.id} `
                 );
             }else{
-                // await connection.execute(
-                //     ` delete from video_product  where   id = ${video_product_info.id}; `
-                // );
+                await connection.execute(
+                    ` UPDATE video_product SET status = 0 , publish_time = '2000-01-01 01:01:01' WHERE id = ${video_product_info.id}  `
+                );
                 console.error("查无此书:",video_product_info)
             }
         }

+ 1 - 1
task_script/sync_publish_time_qm.js

@@ -34,7 +34,7 @@ async function processTask(){
                 );
             }else{
                 await connection.execute(
-                    ` delete from video_product  where   id = ${video_product_info.id}; `
+                    ` UPDATE video_product SET status = 0 , publish_time = '2000-01-01 01:01:01' WHERE id = ${video_product_info.id}  `
                 );
             }
         }

+ 3 - 3
task_script/sync_publish_time_yw.js

@@ -32,9 +32,9 @@ async function processTask(){
                     `UPDATE video_product SET publish_time = "${publish_time}"  WHERE id = ${video_product_info.id} `
                 );
             }else{
-                // await connection.execute(
-                //     ` delete from video_product  where   id = ${video_product_info.id}; `
-                // );
+                await connection.execute(
+                    ` UPDATE video_product SET status = 0 , publish_time = '2000-01-01 01:01:01' WHERE id = ${video_product_info.id}  `
+                );
                 console.error("查无此书:",video_product_info)
             }
         }

+ 3 - 3
task_script/sync_publish_time_zh.js

@@ -32,9 +32,9 @@ async function processTask(){
                     `UPDATE video_product SET publish_time = "${publish_time}"  WHERE id = ${video_product_info.id} `
                 );
             }else{
-                // await connection.execute(
-                //     ` delete from video_product  where   id = ${video_product_info.id}; `
-                // );
+                await connection.execute(
+                    ` UPDATE video_product SET status = 0 , publish_time = '2000-01-01 01:01:01' WHERE id = ${video_product_info.id}  `
+                );
                 console.error("查无此书:",video_product_info)
             }
         }