作者 lyh

gx脚本更新路由

@@ -80,9 +80,11 @@ class UpdateBuildConfiguration extends Command @@ -80,9 +80,11 @@ class UpdateBuildConfiguration extends Command
80 * @time :2024/12/11 14:40 80 * @time :2024/12/11 14:40
81 */ 81 */
82 public function getProduct($project_id){ 82 public function getProduct($project_id){
  83 + $productModel = new Product();
  84 + $product_list = $productModel->formatQuery(['status'=>1,'content'=>['!=',null]])->count();
83 $detailModel = new Detail(); 85 $detailModel = new Detail();
84 $lists = $detailModel->list(); 86 $lists = $detailModel->list();
85 - if(empty($lists)){ 87 + if(($product_list > 0) && empty($lists)){
86 echo date('Y-m-d H:i:s') . '需要处理的项目:'.$project_id . PHP_EOL; 88 echo date('Y-m-d H:i:s') . '需要处理的项目:'.$project_id . PHP_EOL;
87 } 89 }
88 // Detail::truncate(); 90 // Detail::truncate();