|
@@ -8,7 +8,9 @@ use think\console\Input;
|
|
|
use think\console\input\Argument;
|
|
|
use think\console\input\Option;
|
|
|
use think\console\Output;
|
|
|
-use think\facade\Config;use think\facade\Db;
|
|
|
+use think\facade\Cache;
|
|
|
+use think\facade\Config;
|
|
|
+use think\facade\Db;
|
|
|
|
|
|
class GetOrderInfoAndInvoiceInfo extends Command
|
|
|
{
|
|
@@ -22,6 +24,8 @@ class GetOrderInfoAndInvoiceInfo extends Command
|
|
|
protected function execute(Input $input, Output $output)
|
|
|
{
|
|
|
// 指令输出
|
|
|
+ $GetOrderInfoAndInvoiceInfo= Cache::store("redis")->get("GetOrderInfoAndInvoiceInfo");
|
|
|
+ if($GetOrderInfoAndInvoiceInfo==0) Cache::store("redis")->set("GetOrderInfoAndInvoiceInfo",1,180);
|
|
|
$data = $this->GetData();
|
|
|
foreach ($data as $value){
|
|
|
if($value['status']==1){
|
|
@@ -63,6 +67,7 @@ class GetOrderInfoAndInvoiceInfo extends Command
|
|
|
Db::name("invoice_interface")->where($value)->update(["is_check"=>1,"updatetime"=>date("Y-m-d H:i:s")]);
|
|
|
}
|
|
|
}
|
|
|
+ Cache::store("redis")->set("GetOrderInfoAndInvoiceInfo",0);
|
|
|
$output->writeln('getorderinfoandinvoiceinfo');
|
|
|
}
|
|
|
|