Authored by 周少峰

set condition

@@ -431,7 +431,7 @@ const sendUrls = (limit, page) => { @@ -431,7 +431,7 @@ const sendUrls = (limit, page) => {
431 431
432 // 根据 site 推送相应站点 432 // 根据 site 推送相应站点
433 return Promise.all([sendUrlsToBaidu({site: 'https://www.yohobuy.com'}, pcPages),sendUrlsToBaidu({site: 'https://m.yohobuy.com'}, wapPages)]).then(result => { 433 return Promise.all([sendUrlsToBaidu({site: 'https://www.yohobuy.com'}, pcPages),sendUrlsToBaidu({site: 'https://m.yohobuy.com'}, wapPages)]).then(result => {
434 - let updateSql = `UPDATE seo_keywords SET is_push = 1 WHERE id >= ${_.get(_.first(d), 'id')} and id <= ${_.get(_.last(d), 'id')}`; 434 + let updateSql = `UPDATE seo_keywords SET is_push = 1 WHERE id >= ${_.get(_.first(d), 'id')} and id <= ${_.get(_.last(d), 'id')} and yoho_goods_num > ${lestGoodsNum} and status=1`;
435 435
436 // 更新关键词推送状态 436 // 更新关键词推送状态
437 return mysql.query(updateSql).then(updateRes => { 437 return mysql.query(updateSql).then(updateRes => {