wugg 1 year ago
parent
commit
12ce8cd3cf
2 changed files with 7 additions and 3 deletions
  1. 4 0
      app/command/companyStats.php
  2. 3 3
      app/command/stat.php

+ 4 - 0
app/command/companyStats.php

@@ -9,6 +9,7 @@ use think\console\input\Argument;
 use think\console\input\Option;
 use think\console\Output;
 use think\facade\Db;
+use think\facade\Cache;
 
 class companyStats extends Command
 {
@@ -21,6 +22,9 @@ class companyStats extends Command
 
     protected function execute(Input $input, Output $output)
     {
+	    $sttime = Cache::get("compTips");
+	    if($sttime==1) return '';
+	    Cache::set("compTips",1,1800);
       $supplier = ["GS2302231124114965","GS2302231125079621","GS2302231323386950",'GS2203161855277894'];
       try{
 	      foreach ($supplier as $sp){

+ 3 - 3
app/command/stat.php

@@ -19,9 +19,9 @@ class stat extends Command
 	protected function execute(Input $input, Output $output)
 	{
 		// 指令输出
-//		$sttime = Cache::get("departTips");
-//		if($sttime==1) return '';
-//		Cache::set("departTips",1,1800);
+		$sttime = Cache::get("departTips");
+		if($sttime==1) return '';
+		Cache::set("departTips",1,1800);
 		$daprtid = [52,53,56,57];
 		$companyNo='GS2203161855277894' ;
 		$date=date("Y-m-d");