正在显示
1 个修改的文件
包含
4 行增加
和
1 行删除
| @@ -5,6 +5,7 @@ namespace App\Console\Commands\YesterdayCount; | @@ -5,6 +5,7 @@ namespace App\Console\Commands\YesterdayCount; | ||
| 5 | use App\Helper\Common; | 5 | use App\Helper\Common; |
| 6 | use App\Helper\FormGlobalsoApi; | 6 | use App\Helper\FormGlobalsoApi; |
| 7 | use App\Models\CustomerVisit\CustomerVisitItem; | 7 | use App\Models\CustomerVisit\CustomerVisitItem; |
| 8 | +use App\Models\HomeCount\Count as CountMo; | ||
| 8 | use App\Models\Project\DeployBuild; | 9 | use App\Models\Project\DeployBuild; |
| 9 | use Carbon\Carbon; | 10 | use Carbon\Carbon; |
| 10 | use Illuminate\Console\Command; | 11 | use Illuminate\Console\Command; |
| @@ -62,7 +63,9 @@ class Yesterday extends Command | @@ -62,7 +63,9 @@ class Yesterday extends Command | ||
| 62 | $arr['updated_at'] = date('Y-m-d H:i:s'); | 63 | $arr['updated_at'] = date('Y-m-d H:i:s'); |
| 63 | $data[] = $arr; | 64 | $data[] = $arr; |
| 64 | } | 65 | } |
| 65 | - DB::table('gl_count')->insert($data); | 66 | + //判断数据是否存在 |
| 67 | + $countModel = new CountModel(); | ||
| 68 | + $countModel->insert($data); | ||
| 66 | echo $this->error; | 69 | echo $this->error; |
| 67 | } | 70 | } |
| 68 | } | 71 | } |
-
请 注册 或 登录 后发表评论