|
|
@@ -2,26 +2,26 @@
|
|
|
|
|
|
namespace App\Console\Commands;
|
|
|
|
|
|
+use App\Http\Controllers\Controller;
|
|
|
+use App\OracleDOCOrderHeader;
|
|
|
use Carbon\Carbon;
|
|
|
use Illuminate\Console\Command;
|
|
|
-use Illuminate\Support\Facades\Date;
|
|
|
-use Illuminate\Support\Facades\DB;
|
|
|
|
|
|
-class LogExpireDelete extends Command
|
|
|
+class FluxOrderFix extends Command
|
|
|
{
|
|
|
/**
|
|
|
* The name and signature of the console command.
|
|
|
*
|
|
|
* @var string
|
|
|
*/
|
|
|
- protected $signature = 'LogExpireDelete';
|
|
|
+ protected $signature = 'FluxOrderFix';
|
|
|
|
|
|
/**
|
|
|
* The console command description.
|
|
|
*
|
|
|
* @var string
|
|
|
*/
|
|
|
- protected $description = 'LogExpireDelete';
|
|
|
+ protected $description = 'FluxOrderFix';
|
|
|
|
|
|
/**
|
|
|
* Create a new command instance.
|
|
|
@@ -40,16 +40,13 @@ class LogExpireDelete extends Command
|
|
|
*/
|
|
|
public function handle()
|
|
|
{
|
|
|
- $this->deleteLog();
|
|
|
+ $this->fixEdisendflagAtWrong();
|
|
|
}
|
|
|
|
|
|
- public function deleteLog(){
|
|
|
- //前一天
|
|
|
-// $date=Carbon::now()->subDays(150)->format('Y-m-d');
|
|
|
-// DB::table('logs')->where('created_at','like',$date.'%')->delete();
|
|
|
- DB::table('logs')->insert([
|
|
|
- ['operation' => 'App', 'type' => 'test','created_at'=>new Date()],
|
|
|
- ]);
|
|
|
-
|
|
|
+ public function fixEdisendflagAtWrong(){
|
|
|
+ OracleDOCOrderHeader::where('edisendflag','W')->whereNotNull('edisendtime')->where('edisendtime','>',Carbon::now()->subDays(2))
|
|
|
+ ->update(['edisendflag'=>'N','manualflag'=>'N',
|
|
|
+// 'edisendtime'=>null
|
|
|
+ ]);
|
|
|
}
|
|
|
}
|