|
@@ -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")
|
|
@@ -82,11 +99,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){
|