|
@@ -2,10 +2,9 @@ |
|
@@ -2,10 +2,9 @@ |
|
2
|
|
2
|
|
|
3
|
namespace App\Console\Commands\Test;
|
3
|
namespace App\Console\Commands\Test;
|
|
4
|
|
4
|
|
|
5
|
-use App\Models\SyncSubmitTask\SyncSubmitTemp;
|
5
|
+use App\Models\SyncSubmitTask\SyncSubmitTask;
|
|
6
|
use App\Models\Visit\Visit;
|
6
|
use App\Models\Visit\Visit;
|
|
7
|
use App\Services\ProjectServer;
|
7
|
use App\Services\ProjectServer;
|
|
8
|
-use Carbon\Carbon;
|
|
|
|
9
|
use Illuminate\Console\Command;
|
8
|
use Illuminate\Console\Command;
|
|
10
|
|
9
|
|
|
11
|
class InquiryVisit extends Command
|
10
|
class InquiryVisit extends Command
|
|
@@ -26,7 +25,7 @@ class InquiryVisit extends Command |
|
@@ -26,7 +25,7 @@ class InquiryVisit extends Command |
|
26
|
|
25
|
|
|
27
|
public function handle()
|
26
|
public function handle()
|
|
28
|
{
|
27
|
{
|
|
29
|
- $list = SyncSubmitTemp::select(['project_id', 'data', 'created_at'])->where('project_id', '>', 0)->where('type', 'inquiry')->where('status', 1)->get();
|
28
|
+ $list = SyncSubmitTask::select(['id', 'project_id', 'data', 'created_at'])->where('project_id', '>', 0)->where('type', 'inquiry')->where('status', 1)->get();
|
|
30
|
|
29
|
|
|
31
|
foreach ($list as $item) {
|
30
|
foreach ($list as $item) {
|
|
32
|
$project_id = $item->project_id;
|
31
|
$project_id = $item->project_id;
|
|
@@ -38,9 +37,9 @@ class InquiryVisit extends Command |
|
@@ -38,9 +37,9 @@ class InquiryVisit extends Command |
|
38
|
->where("created_at", "<=", $day_time . ' 23:59:59')
|
37
|
->where("created_at", "<=", $day_time . ' 23:59:59')
|
|
39
|
->first();
|
38
|
->first();
|
|
40
|
if ($visit) {
|
39
|
if ($visit) {
|
|
41
|
- dd($visit);
|
|
|
|
42
|
$visit->is_inquiry = 1;
|
40
|
$visit->is_inquiry = 1;
|
|
43
|
$visit->save();
|
41
|
$visit->save();
|
|
|
|
42
|
+ dump($item->id);
|
|
44
|
}
|
43
|
}
|
|
45
|
}
|
44
|
}
|
|
46
|
}
|
45
|
}
|