Browse Source

Updated public

north 6 years ago
parent
commit
afe9fe350b
1 changed files with 4 additions and 1 deletions
  1. 4 1
      www/protected/commands/GetKennelDetailWorkCommand.php

+ 4 - 1
www/protected/commands/GetKennelDetailWorkCommand.php

@@ -33,7 +33,10 @@ class GetKennelDetailWorkCommand extends CConsoleCommand {
                 $data[] = $row;
                 $data[] = $row;
             }
             }
         }
         }
-        $type_name = 'all';
+        if (count($data) == 0) {
+            exit;
+        }
+        $type_name = 'food';
         $res=Service::factory('JRecordService')->push($data,$type_name,['start' => $start_time, 'end' => $end_time],1);
         $res=Service::factory('JRecordService')->push($data,$type_name,['start' => $start_time, 'end' => $end_time],1);
         $mail = Yii::app()->mailer;
         $mail = Yii::app()->mailer;
         try {
         try {