|
@@ -15,7 +15,7 @@ async function processTask(){
|
|
|
multipleStatements: true
|
|
|
});
|
|
|
//先获取100本没有发布时间的番茄免费书籍
|
|
|
- let sql = `SELECT * FROM video_product WHERE book_platform = ${config.platform_fanqiemf} AND product_parent_id !="" AND publish_time IS NULL LIMIT 500`
|
|
|
+ let sql = `SELECT * FROM video_product WHERE book_platform = ${config.platform_fanqiemf} AND product_parent_id !="" AND publish_time IS NULL LIMIT 5`
|
|
|
console.log("sql:",sql)
|
|
|
const [rows] = await connection.execute(
|
|
|
sql
|
|
@@ -29,6 +29,7 @@ async function processTask(){
|
|
|
let video_product_info = rows[index]
|
|
|
let book_info = await video_product_controllers.getProductData({book_id:video_product_info.product_parent_id})
|
|
|
if(book_info.success){
|
|
|
+ console.log("book_info:",book_info)
|
|
|
if(book_info.data.publish_time!=null){
|
|
|
let publish_time = helper.getDate7DaysBefore(book_info.data.publish_time,null,'YYYY-MM-DD')
|
|
|
await connection.execute(
|
|
@@ -38,6 +39,7 @@ async function processTask(){
|
|
|
}else{
|
|
|
//添加到番茄付费里
|
|
|
let data = await require('../src/api/fq/fq_search_book').search_new_id(video_product_info.product_parent_id)
|
|
|
+ console.log("data:",data)
|
|
|
if(data!=null&&data!=""){
|
|
|
let publish_time = data.on_shelf_time
|
|
|
if(publish_time==""){
|