904118851 2 months ago
parent
commit
2c312a63c1

+ 27 - 4
5_CREATE_LINK_FACTORY/dz_create_link_factory.js

@@ -58,6 +58,22 @@ CMD.getSharedPlatform = function(PlatformShared,platform_shared_id){
     }
 }
 
+async function getAppletProduct(tg_platform_id) {
+    let temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:4},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:1},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:0},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    return []
+}
+
 async function processTask(){
     try{
         let MainConfig = await redis_help.getKeyValue("MainConfig")
@@ -84,10 +100,17 @@ async function processTask(){
         
         for (let index = 0; index < all_platform_list.length; index++) {
             const tg_platform_id = all_platform_list[index];
-            let temp_result = await video_applet_product_controllers.getAppletProductDataByStatus({status:0,wait_status:0,book_platform:tg_platform_id})
-            if(temp_result.success){
-                result = temp_result
-                break
+            // let temp_result = await video_applet_product_controllers.getAppletProductDataByStatus({status:0,wait_status:0,book_platform:tg_platform_id})
+            // if(temp_result.success){
+            //     result = temp_result
+            //     break
+            // }
+            let temp = await getAppletProduct(tg_platform_id)
+            if(temp.length>0){
+                result = {
+                    success:true,
+                    data: temp[0]
+                }
             }
         }
 

+ 27 - 4
5_CREATE_LINK_FACTORY/fq_create_link_factory.js

@@ -58,6 +58,22 @@ CMD.getSharedPlatform = function(PlatformShared,platform_shared_id){
     }
 }
 
+async function getAppletProduct(tg_platform_id) {
+    let temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:4},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:1},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:0},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    return []
+}
+
 async function processTask(){
     try{
         let MainConfig = await redis_help.getKeyValue("MainConfig")
@@ -84,10 +100,17 @@ async function processTask(){
         
         for (let index = 0; index < all_platform_list.length; index++) {
             const tg_platform_id = all_platform_list[index];
-            let temp_result = await video_applet_product_controllers.getAppletProductDataByStatus({status:0,wait_status:0,book_platform:tg_platform_id})
-            if(temp_result.success){
-                result = temp_result
-                break
+            // let temp_result = await video_applet_product_controllers.getAppletProductDataByStatus({status:0,wait_status:0,book_platform:tg_platform_id})
+            // if(temp_result.success){
+            //     result = temp_result
+            //     break
+            // }
+            let temp = await getAppletProduct(tg_platform_id)
+            if(temp.length>0){
+                result = {
+                    success:true,
+                    data: temp[0]
+                }
             }
         }
 

+ 27 - 4
5_CREATE_LINK_FACTORY/fqmf_create_link_factory.js

@@ -58,6 +58,22 @@ CMD.getSharedPlatform = function(PlatformShared,platform_shared_id){
     }
 }
 
+async function getAppletProduct(tg_platform_id) {
+    let temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:4},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:1},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:0},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    return []
+}
+
 async function processTask(){
     try{
         let MainConfig = await redis_help.getKeyValue("MainConfig")
@@ -84,10 +100,17 @@ async function processTask(){
         
         for (let index = 0; index < all_platform_list.length; index++) {
             const tg_platform_id = all_platform_list[index];
-            let temp_result = await video_applet_product_controllers.getAppletProductDataByStatus({status:0,wait_status:0,book_platform:tg_platform_id})
-            if(temp_result.success){
-                result = temp_result
-                break
+            // let temp_result = await video_applet_product_controllers.getAppletProductDataByStatus({status:0,wait_status:0,book_platform:tg_platform_id})
+            // if(temp_result.success){
+            //     result = temp_result
+            //     break
+            // }
+            let temp = await getAppletProduct(tg_platform_id)
+            if(temp.length>0){
+                result = {
+                    success:true,
+                    data: temp[0]
+                }
             }
         }
 

+ 22 - 5
5_CREATE_LINK_FACTORY/hy_create_link_factory.js

@@ -57,6 +57,22 @@ CMD.getSharedPlatform = function(PlatformShared,platform_shared_id){
         }
     }
 }
+
+async function getAppletProduct(tg_platform_id) {
+    let temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:4},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:1},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:0},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    return []
+}
 async function processTask(){
     try{
         let MainConfig = await redis_help.getKeyValue("MainConfig")
@@ -82,11 +98,12 @@ async function processTask(){
         let task_list = []
         for (let index = 0; index < all_platform_list.length; index++) {
             const tg_platform_id = all_platform_list[index];
-            let temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id},1)
-            if(temp_result.success){
-                task_list = temp_result.data
-                break
-            }
+            // let temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:4},1)
+            // if(temp_result.success){
+            //     task_list = temp_result.data
+            //     break
+            // }
+            task_list = await getAppletProduct(tg_platform_id)
         }
 
         if(task_list.length<=0){

+ 27 - 3
5_CREATE_LINK_FACTORY/hymf_create_link_factory.js

@@ -57,6 +57,23 @@ CMD.getSharedPlatform = function(PlatformShared,platform_shared_id){
         }
     }
 }
+
+async function getAppletProduct(tg_platform_id) {
+    let temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:4},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:1},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:0},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    return []
+}
+
 async function processTask(){
     try{
         let MainConfig = await redis_help.getKeyValue("MainConfig")
@@ -72,9 +89,16 @@ async function processTask(){
         }
        
    
-        let result = await video_applet_product_controllers.getAppletProductDataByStatus({status:0,wait_status:0,book_platform:config.platform_heiyanmf})
-        
-    
+        // let result = await video_applet_product_controllers.getAppletProductDataByStatus({status:0,wait_status:0,book_platform:config.platform_heiyanmf})
+        let result = null
+        let temp = await getAppletProduct(tg_platform_id)
+        if(temp.length>0){
+            result = {
+                success:true,
+                data: temp[0]
+            }
+        }
+
         if(result==null){
             return
         }

+ 28 - 4
5_CREATE_LINK_FACTORY/qm_create_link_factory.js

@@ -58,6 +58,23 @@ CMD.getSharedPlatform = function(PlatformShared,platform_shared_id){
     }
 }
 
+async function getAppletProduct(tg_platform_id) {
+    let temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:4},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:1},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:0},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    return []
+}
+
+
 async function processTask(){
     try{
         let MainConfig = await redis_help.getKeyValue("MainConfig")
@@ -81,11 +98,18 @@ async function processTask(){
         
         for (let index = 0; index < all_platform_list.length; index++) {
             const tg_platform_id = all_platform_list[index];
-            let temp_result = await video_applet_product_controllers.getAppletProductDataByStatus({status:0,wait_status:0,book_platform:tg_platform_id})
-            if(temp_result.success){
-                result = temp_result
-                break
+            // let temp_result = await video_applet_product_controllers.getAppletProductDataByStatus({status:0,wait_status:0,book_platform:tg_platform_id})
+            let temp_result = await getAppletProduct(tg_platform_id)
+            if(temp_result.length>0){
+                result = {
+                    success:true,
+                    data: temp_result[0]
+                }
             }
+            // if(temp_result.success){
+            //     result = temp_result
+            //     break
+            // }
         }
 
         if(result==null){

+ 27 - 4
5_CREATE_LINK_FACTORY/qm_mf_create_link_factory.js

@@ -58,6 +58,22 @@ CMD.getSharedPlatform = function(PlatformShared,platform_shared_id){
     }
 }
 
+async function getAppletProduct(tg_platform_id) {
+    let temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:4},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:1},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:0},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    return []
+}
+
 async function processTask(){
     try{
         let MainConfig = await redis_help.getKeyValue("MainConfig")
@@ -81,10 +97,17 @@ async function processTask(){
         
         for (let index = 0; index < all_platform_list.length; index++) {
             const tg_platform_id = all_platform_list[index];
-            let temp_result = await video_applet_product_controllers.getAppletProductDataByStatus({status:0,wait_status:0,book_platform:tg_platform_id})
-            if(temp_result.success){
-                result = temp_result
-                break
+            // let temp_result = await video_applet_product_controllers.getAppletProductDataByStatus({status:0,wait_status:0,book_platform:tg_platform_id})
+            // if(temp_result.success){
+            //     result = temp_result
+            //     break
+            // }
+            let temp_result = await getAppletProduct(tg_platform_id)
+            if(temp_result.length>0){
+                result = {
+                    success:true,
+                    data: temp_result[0]
+                }
             }
         }
 

+ 27 - 4
5_CREATE_LINK_FACTORY/yw_create_link_factory.js

@@ -59,6 +59,22 @@ CMD.getSharedPlatform = function(PlatformShared,platform_shared_id){
     }
 }
 
+async function getAppletProduct(tg_platform_id) {
+    let temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:4},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:1},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:0},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    return []
+}
+
 async function processTask(){
     try{
         await tools.getYwOPENSESSID()
@@ -88,10 +104,17 @@ async function processTask(){
         
         for (let index = 0; index < all_platform_list.length; index++) {
             const tg_platform_id = all_platform_list[index];
-            let temp_result = await video_applet_product_controllers.getAppletProductDataByStatus({status:0,wait_status:0,book_platform:tg_platform_id})
-            if(temp_result.success){
-                result = temp_result
-                break
+            // let temp_result = await video_applet_product_controllers.getAppletProductDataByStatus({status:0,wait_status:0,book_platform:tg_platform_id})
+            // if(temp_result.success){
+            //     result = temp_result
+            //     break
+            // }
+            let temp_result = await getAppletProduct(tg_platform_id)
+            if(temp_result.length>0){
+                result = {
+                    success:true,
+                    data: temp_result[0]
+                }
             }
         }
 

+ 27 - 4
5_CREATE_LINK_FACTORY/zh_create_link_factory.js

@@ -59,6 +59,22 @@ CMD.getSharedPlatform = function(PlatformShared,platform_shared_id){
     }
 }
 
+async function getAppletProduct(tg_platform_id) {
+    let temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:4},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:1},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:0},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    return []
+}
+
 async function processTask(){
     try{
         let MainConfig = await redis_help.getKeyValue("MainConfig")
@@ -82,10 +98,17 @@ async function processTask(){
         
         for (let index = 0; index < all_platform_list.length; index++) {
             const tg_platform_id = all_platform_list[index];
-            let temp_result = await video_applet_product_controllers.getAppletProductDataByStatus({status:0,wait_status:0,book_platform:tg_platform_id})
-            if(temp_result.success){
-                result = temp_result
-                break
+            // let temp_result = await video_applet_product_controllers.getAppletProductDataByStatus({status:0,wait_status:0,book_platform:tg_platform_id})
+            // if(temp_result.success){
+            //     result = temp_result
+            //     break
+            // }
+            let temp_result = await getAppletProduct(tg_platform_id)
+            if(temp_result.length>0){
+                result = {
+                    success:true,
+                    data: temp_result[0]
+                }
             }
         }
 

+ 27 - 4
5_CREATE_LINK_FACTORY/zy_create_link_factory.js

@@ -59,6 +59,22 @@ CMD.getSharedPlatform = function(PlatformShared,platform_shared_id){
     }
 }
 
+async function getAppletProduct(tg_platform_id) {
+    let temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:4},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:1},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    temp_result = await video_applet_product_controllers.getAppletProductByBookPlatformAndLimit({status:0,wait_status:0,book_platform:tg_platform_id,weight:0},1)
+    if(temp_result.success){
+        return temp_result.data
+    }
+    return []
+}
+
 async function processTask(){
     try{
         let MainConfig = await redis_help.getKeyValue("MainConfig")
@@ -82,10 +98,17 @@ async function processTask(){
         
         for (let index = 0; index < all_platform_list.length; index++) {
             const tg_platform_id = all_platform_list[index];
-            let temp_result = await video_applet_product_controllers.getAppletProductDataByStatus({status:0,wait_status:0,book_platform:tg_platform_id})
-            if(temp_result.success){
-                result = temp_result
-                break
+            // let temp_result = await video_applet_product_controllers.getAppletProductDataByStatus({status:0,wait_status:0,book_platform:tg_platform_id})
+            // if(temp_result.success){
+            //     result = temp_result
+            //     break
+            // }
+            let temp_result = await getAppletProduct(tg_platform_id)
+            if(temp_result.length>0){
+                result = {
+                    success:true,
+                    data: temp_result[0]
+                }
             }
         }
 

BIN
dump.rdb


+ 1 - 1
src/data_manager/Controllers/video_applet_product_controllers.js

@@ -165,7 +165,7 @@ class video_applet_product_controllers {
             }
 
             const status = params.status;
-            const filterData = await video_applet_product_model.findDataByLimit({ status: status,wait_status :params.wait_status,book_platform:params.book_platform},limit,"weight");
+            const filterData = await video_applet_product_model.findDataByLimit({ status: status,wait_status :params.wait_status,book_platform:params.book_platform},limit,null);
 
             if (!filterData) {
                 return {