Browse Source

[智价云] 低价&违规数据清洗队列更新

tangyuanwang 5 ngày trước cách đây
mục cha
commit
d8a7a1afc3

+ 61 - 0
app/Console/Commands/DailyTask.php

@@ -0,0 +1,61 @@
+<?php
+
+namespace App\Console\Commands;
+
+use Illuminate\Console\Command;
+use Illuminate\Support\Facades\Log;
+use App\Jobs\Manager\Process\LowPriceGoodsJobs;
+use App\Jobs\Manager\Process\ViolationProductJobs;
+use App\Jobs\Manager\Process\ViolationStoreJobs;
+
+/**
+ * 定时清洗采集的商品数据
+ * @author 唐远望
+ * @version 1.0
+ * @date 2025-12-10
+ */
+class DailyTask extends Command
+{
+    /**
+     * 命令名称和签名
+     *
+     * @var string
+     */
+    protected $signature = 'task:daily';
+
+    /**
+     * 命令描述
+     *
+     * @var string
+     */
+    protected $description = '每天12点执行的定时任务';
+
+    /**
+     * 执行命令
+     *
+     * @return int
+     */
+    public function handle()
+    {
+        $this->info('开始执行每日任务...');
+
+        try {
+            Log::info('每日数据清洗任务执行中 - ' . now());
+            $message_data = ['page' => '1', 'limit' => '50'];
+            //执行低价挂网商品数据清洗任务
+            LowPriceGoodsJobs::dispatch($message_data);
+            //执行违规商品数据清洗任务
+            ViolationProductJobs::dispatch($message_data);
+            //执行违规门店数据清洗任务
+            ViolationStoreJobs::dispatch($message_data);
+            // 示例:记录日志
+            $this->info('每日任务执行完成!');
+            return Command::SUCCESS;
+        } catch (\Exception $e) {
+            Log::error('每日定时任务执行失败: ' . $e->getMessage());
+            $this->error('任务执行失败: ' . $e->getMessage());
+
+            return Command::FAILURE;
+        }
+    }
+}

+ 17 - 1
app/Console/Kernel.php

@@ -7,6 +7,15 @@ use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
 
 class Kernel extends ConsoleKernel
 {
+
+    /**
+     * 定义应用的自定义 Artisan 命令
+     *
+     * @var array
+     */
+    protected $commands = [
+        Commands\DailyTask::class,
+    ];
     /**
      * Define the application's command schedule.
      *
@@ -16,6 +25,13 @@ class Kernel extends ConsoleKernel
     protected function schedule(Schedule $schedule)
     {
         // $schedule->command('inspire')->hourly();
+        // 每天12:00执行
+        $schedule->command('task:daily')->dailyAt('12:00')
+            ->timezone('Asia/Shanghai') // 设置时区,可选
+            ->runInBackground() // 在后台运行,可选
+            ->withoutOverlapping() // 防止任务重叠执行
+            ->appendOutputTo(storage_path('logs/daily-task.log')) // 输出到日志文件
+            ->onOneServer(); // 如果使用多服务器,确保只在一台服务器上运行
     }
 
     /**
@@ -25,7 +41,7 @@ class Kernel extends ConsoleKernel
      */
     protected function commands()
     {
-        $this->load(__DIR__.'/Commands');
+        $this->load(__DIR__ . '/Commands');
 
         require base_path('routes/console.php');
     }

+ 120 - 0
app/Jobs/Manager/Process/LowPriceGoodsDataJobs.php

@@ -0,0 +1,120 @@
+<?php
+
+namespace App\Jobs\Manager\Process;
+
+use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldBeUnique;
+use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Foundation\Bus\Dispatchable;
+use Illuminate\Queue\InteractsWithQueue;
+use Illuminate\Queue\SerializesModels;
+use App\Facades\Servers\Logs\Log;
+use App\Models\Manager\Process\LowPriceGoods as LowPriceGoodsModel;
+use App\Models\Manager\Personnel\Employee as EmployeeModel;
+use App\Models\Api\Process\ExecuteLog as ExecuteLogModel;
+
+/**
+ * 数据清洗-低价挂网商品队列
+ * @author  唐远望
+ * @version 1.0
+ * @date  2025-12-10
+ */
+class LowPriceGoodsDataJobs implements ShouldQueue
+{
+    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
+    protected $message_data;
+    /**
+     * Create a new job instance.
+     *
+     * @return void
+     */
+    public function __construct(array $message_data)
+    {
+        $this->message_data = $message_data;
+    }
+
+    /**
+     * Execute the job.
+     *
+     * @return void
+     */
+    public function handle()
+    {
+        try {
+            $this->getLowPriceGoodsData($this->message_data);
+        } catch (\Exception $e) {
+            Log::info('job_error', '数据清洗-低价挂网商品队列失败', ['data' => $this->message_data, 'error' => $e->getMessage()]);
+        }
+    }
+
+
+    /**
+     * 采集商品数据清洗
+     * @author  唐远望
+     * @version 1.0
+     * @date  2025-12-10
+     */
+    public function getLowPriceGoodsData($message_data)
+    {
+        $EmployeeModel = new EmployeeModel();
+        $LowPriceGoodsModel = new LowPriceGoodsModel();
+        $platform = $message_data['platform'];//多个平台配置
+        $product_name = $message_data['product_name'];//商品名称
+        $product_specs = $message_data['product_specs'];//商品规格
+        $suggested_price = $message_data['suggested_price'];//指导价格
+        $store_scope = $message_data['store_scope'];//店铺范围(为空时全部)
+        $executeLog_id = $message_data['executeLog_id'];
+        $limit = isset($message_data['limit']) ? $message_data['limit'] : 50;
+        $page = isset($message_data['page']) ? $message_data['page'] : 1;
+        
+
+        $product_datas = []; //商品数据
+        if (empty($product_datas)) {
+            (new ExecuteLogModel())->where('id', $executeLog_id)->update(['status' => 0]);
+            return false;
+        }
+        foreach ($product_datas as $product_data) {
+            $insert_product_data = [
+                'platform'    => $product_data['platform'],
+                'company_name'    => $product_data['company_name'],
+                'product_name'    => $product_data['product_name'],
+                'product_specs'    => $product_data['product_specs'],
+                'suggested_price'    => $product_data['suggested_price'],
+                'online_posting_price'    => $product_data['online_posting_price'],
+                'online_posting_cunt'    => $product_data['online_posting_cunt'],
+                'link_url'    => $product_data['link_url'],
+                'store_name'    => $product_data['store_name'],
+            ];
+            //查询配置的第一责任人
+            $where_query1[] = ['city_ids', 'like', '%,' . $product_data['city_id'] . ',%'];
+            $where_query1[] = ['status', '=', 1];
+            $where_query1[] = ['duty_type', 'in', 1]; //责任类型1=第一责任人,2=责任人
+            $first_responsible_person = $EmployeeModel->where($where_query1)->pluck('id')->implode(',');
+            $insert_product_data['first_responsible_person'] = $first_responsible_person;
+            //查询配置的责任人
+            $where_query2[] = ['city_ids', 'like', '%,' . $product_data['city_id'] . ',%'];
+            $where_query2[] = ['status', '=', 1];
+            $where_query2[] = ['duty_type', 'in', 2]; //责任类型1=第一责任人,2=责任人
+            $responsible_person = $EmployeeModel->where($where_query2)->pluck('id')->implode(',');
+            $insert_product_data['responsible_person'] = $responsible_person;
+            //溯源责任人
+            $source_responsible_person = '';
+            if ($first_responsible_person && $responsible_person) {
+                $source_responsible_person = $first_responsible_person . ',' . $responsible_person;
+            }
+            $insert_product_data['source_responsible_person'] = $source_responsible_person;
+            //插入数据
+            $LowPriceGoodsModel->addLowPriceGoods($insert_product_data);
+        }
+        //继续执行下一页
+        $message_data['page'] = $page + 1;
+        $message_data['limit'] = $limit;
+        LowPriceGoodsDataJobs::dispatch($message_data);
+    }
+
+
+    public function failed(\Throwable $exception)
+    {
+        Log::info('job_error', '数据清洗-低价挂网商品队列完全失败', ['data' => $this->message_data, 'error' => $exception]);
+    }
+}

+ 83 - 0
app/Jobs/Manager/Process/LowPriceGoodsJobs.php

@@ -0,0 +1,83 @@
+<?php
+
+namespace App\Jobs\Manager\Process;
+
+use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldBeUnique;
+use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Foundation\Bus\Dispatchable;
+use Illuminate\Queue\InteractsWithQueue;
+use Illuminate\Queue\SerializesModels;
+use App\Facades\Servers\Logs\Log;
+use App\Models\Manager\WashConfig\LowPriceGoods as ConfigLowPriceGoodsModel;
+use App\Models\Api\Process\ExecuteLog as ExecuteLogModel;
+use App\Jobs\Manager\Process\LowPriceGoodsDataJobs;
+
+/**
+ * 数据清洗-低价挂网商品配置队列
+ * @author  唐远望
+ * @version 1.0
+ * @date  2025-12-10
+ */
+class LowPriceGoodsJobs implements ShouldQueue
+{
+    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
+    protected $message_data;
+    /**
+     * Create a new job instance.
+     *
+     * @return void
+     */
+    public function __construct(array $message_data)
+    {
+        $this->message_data = $message_data;
+    }
+
+    /**
+     * Execute the job.
+     *
+     * @return void
+     */
+    public function handle()
+    {
+        try {
+            $ConfigLowPriceGoodsModel = new ConfigLowPriceGoodsModel();
+            $limit = isset($this->message_data['limit']) ? $this->message_data['limit'] : 50;
+            $page = isset($this->message_data['page']) ? $this->message_data['page'] : 1;
+            $executeLog_id = isset($this->message_data['executeLog_id']) ? $this->message_data['executeLog_id'] : 0;
+            if($page == 1){
+                $ExecuteLogModel = new ExecuteLogModel();
+                $insert_data =['name' =>'低价挂网商品', 'code' => 'LowPriceGoodsJobs'];
+                $executeLog_id=$ExecuteLogModel->addExecuteLog_content($insert_data);
+            }
+            $list_data = $ConfigLowPriceGoodsModel->where('status', 1)->paginate($limit, ['*'], 'page', $page)->get()->toarray();
+            if (empty($list_data)) {
+                return true;
+            }
+            foreach ($list_data as $key => $value) {
+                $message_data = [
+                    'platform' => $value['platform'],
+                    'product_name' => $value['product_name'],
+                    'product_specs' => $value['product_specs'],
+                    'suggested_price' => $value['suggested_price'],
+                    'store_scope' => $value['store_scope'],
+                    'executeLog_id' => $executeLog_id,
+                ];
+                LowPriceGoodsDataJobs::dispatch($message_data);
+            }
+            $now_message_data = [
+                'limit' => $limit,
+                'page' => $page + 1,
+                'executeLog_id' => $executeLog_id,
+            ];
+            LowPriceGoodsJobs::dispatch($now_message_data);
+        } catch (\Exception $e) {
+            Log::info('job_error', '数据清洗-低价挂网商品配置队列失败', ['data' => $this->message_data, 'error' => $e->getMessage()]);
+        }
+    }
+
+    public function failed(\Throwable $exception)
+    {
+        Log::info('job_error', '数据清洗-低价挂网商品配置队列完全失败', ['data' => $this->message_data, 'error' => $exception]);
+    }
+}

+ 118 - 0
app/Jobs/Manager/Process/ViolationProductDataJobs.php

@@ -0,0 +1,118 @@
+<?php
+
+namespace App\Jobs\Manager\Process;
+
+use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldBeUnique;
+use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Foundation\Bus\Dispatchable;
+use Illuminate\Queue\InteractsWithQueue;
+use Illuminate\Queue\SerializesModels;
+use App\Facades\Servers\Logs\Log;
+use App\Models\Manager\Process\ViolationProduct as ViolationProductModel;
+use App\Models\Manager\Personnel\Employee as EmployeeModel;
+use App\Models\Api\Process\ExecuteLog as ExecuteLogModel;
+
+/**
+ * 数据清洗-违规挂网商品数据队列
+ * @author  唐远望
+ * @version 1.0
+ * @date  2025-12-10
+ */
+class ViolationProductDataJobs implements ShouldQueue
+{
+    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
+    protected $message_data;
+    /**
+     * Create a new job instance.
+     *
+     * @return void
+     */
+    public function __construct(array $message_data)
+    {
+        $this->message_data = $message_data;
+    }
+
+    /**
+     * Execute the job.
+     *
+     * @return void
+     */
+    public function handle()
+    {
+        try {
+            $this->getViolationProductData($this->message_data);
+        } catch (\Exception $e) {
+            Log::info('job_error', '数据清洗-违规挂网商品数据队列失败', ['data' => $this->message_data, 'error' => $e->getMessage()]);
+        }
+    }
+
+
+    /**
+     * 采集商品数据清洗
+     * @author  唐远望
+     * @version 1.0
+     * @date  2025-12-10
+     */
+    public function getViolationProductData($message_data)
+    {
+        $EmployeeModel = new EmployeeModel();
+        $ViolationProductModel = new ViolationProductModel();
+        $platform = $message_data['platform'];//多个平台配置
+        $product_name = $message_data['product_name'];//商品名称
+        $product_specs = $message_data['product_specs'];//商品规格
+        $store_scope = $message_data['store_scope'];//店铺范围(为空时全部)
+        $executeLog_id = $message_data['executeLog_id'];
+        $limit = isset($message_data['limit']) ? $message_data['limit'] : 50;
+        $page = isset($message_data['page']) ? $message_data['page'] : 1;
+
+        $product_datas = []; //商品数据
+        if (empty($product_datas)) {
+            (new ExecuteLogModel())->where('id', $executeLog_id)->update(['status' => 0]);
+            return false;
+        }
+        foreach ($product_datas as $product_data) {
+            $insert_product_data = [
+                'platform'    => $product_data['platform'],
+                'company_name'    => $product_data['company_name'],
+                'product_name'    => $product_data['product_name'],
+                'product_specs'    => $product_data['product_specs'],
+                'suggested_price'    => $product_data['suggested_price'],
+                'online_posting_price'    => $product_data['online_posting_price'],
+                'online_posting_cunt'    => $product_data['online_posting_cunt'],
+                'link_url'    => $product_data['link_url'],
+                'store_name'    => $product_data['store_name'],
+            ];
+            //查询配置的第一责任人
+            $where_query1[] = ['city_ids', 'like', '%,' . $product_data['city_id'] . ',%'];
+            $where_query1[] = ['status', '=', 1];
+            $where_query1[] = ['duty_type', 'in', 1]; //责任类型1=第一责任人,2=责任人
+            $first_responsible_person = $EmployeeModel->where($where_query1)->pluck('id')->implode(',');
+            $insert_product_data['first_responsible_person'] = $first_responsible_person;
+            //查询配置的责任人
+            $where_query2[] = ['city_ids', 'like', '%,' . $product_data['city_id'] . ',%'];
+            $where_query2[] = ['status', '=', 1];
+            $where_query2[] = ['duty_type', 'in', 2]; //责任类型1=第一责任人,2=责任人
+            $responsible_person = $EmployeeModel->where($where_query2)->pluck('id')->implode(',');
+            $insert_product_data['responsible_person'] = $responsible_person;
+            //溯源责任人
+            $source_responsible_person = '';
+            if ($first_responsible_person && $responsible_person) {
+                $source_responsible_person = $first_responsible_person . ',' . $responsible_person;
+            }
+            $insert_product_data['source_responsible_person'] = $source_responsible_person;
+            //插入数据
+            $ViolationProductModel->addViolationProduct($insert_product_data);
+        }
+        //继续执行下一页
+        $message_data['page'] = $page + 1;
+        $message_data['limit'] = $limit;
+        ViolationProductDataJobs::dispatch($message_data);
+    }
+
+
+    public function failed(\Throwable $exception)
+    {
+        Log::info('job_error', '数据清洗-违规挂网商品数据队列完全失败', ['data' => $this->message_data, 'error' => $exception]);
+    }
+}

+ 83 - 0
app/Jobs/Manager/Process/ViolationProductJobs.php

@@ -0,0 +1,83 @@
+<?php
+
+namespace App\Jobs\Manager\Process;
+
+use Illuminate\Bus\Queueable;
+use Illuminate\Contracts\Queue\ShouldBeUnique;
+use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Foundation\Bus\Dispatchable;
+use Illuminate\Queue\InteractsWithQueue;
+use Illuminate\Queue\SerializesModels;
+use App\Facades\Servers\Logs\Log;
+use App\Models\Manager\WashConfig\ViolationProduct as ConfigViolationProductModel;
+use App\Models\Api\Process\ExecuteLog as ExecuteLogModel;
+use App\Jobs\Manager\Process\ViolationProductDataJobs;
+
+/**
+ * 数据清洗-违规挂网商品队列
+ * @author  唐远望
+ * @version 1.0
+ * @date  2025-12-09
+ */
+class ViolationProductJobs implements ShouldQueue
+{
+    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
+    protected $message_data;
+    /**
+     * Create a new job instance.
+     *
+     * @return void
+     */
+    public function __construct(array $message_data)
+    {
+        $this->message_data = $message_data;
+    }
+
+    /**
+     * Execute the job.
+     *
+     * @return void
+     */
+    public function handle()
+    {
+        try {
+            $ConfigViolationProductModel = new ConfigViolationProductModel();
+            $limit = isset($this->message_data['limit']) ? $this->message_data['limit'] : 50;
+            $page = isset($this->message_data['page']) ? $this->message_data['page'] : 1;
+            $executeLog_id = isset($this->message_data['executeLog_id']) ? $this->message_data['executeLog_id'] : 0;
+            if($page == 1){
+                $ExecuteLogModel = new ExecuteLogModel();
+                $insert_data =['name' =>'违规挂网商品', 'code' => 'ViolationProductJobs'];
+                $executeLog_id=$ExecuteLogModel->addExecuteLog_content($insert_data);
+            }
+            $list_data = $ConfigViolationProductModel->where('status', 1)->paginate($limit, ['*'], 'page', $page)->get()->toarray();
+            if (empty($list_data)) {
+                return true;
+            }
+            foreach ($list_data as $key => $value) {
+                $message_data = [
+                    'platform' => $value['platform'],
+                    'product_name' => $value['product_name'],
+                    'product_specs' => $value['product_specs'],
+                    'store_scope' => $value['store_scope'],
+                    'executeLog_id' => $executeLog_id,
+                ];
+                ViolationProductDataJobs::dispatch($message_data);
+            }
+            $now_message_data = [
+                'limit' => $limit,
+                'page' => $page + 1,
+                'executeLog_id' => $executeLog_id,
+            ];
+            ViolationProductJobs::dispatch($now_message_data);
+        } catch (\Exception $e) {
+            Log::info('job_error', '数据清洗-违规挂网商品队列失败', ['data' => $this->message_data, 'error' => $e->getMessage()]);
+        }
+    }
+
+
+    public function failed(\Throwable $exception)
+    {
+        Log::info('job_error', '数据清洗-违规挂网商品队列完全失败', ['data' => $this->message_data, 'error' => $exception]);
+    }
+}

+ 159 - 0
app/Models/Api/Process/ExecuteLog.php

@@ -0,0 +1,159 @@
+<?php
+
+namespace App\Models\Api\Process;
+
+use Illuminate\Database\Eloquent\Factories\HasFactory;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Support\Facades\DB;
+
+/**
+ * 违规处理-执行日志模型
+ * @author: 唐远望
+ * @version: 1.0
+ * @date: 2025-12-09
+ */
+class ExecuteLog extends Model
+{
+    use HasFactory;
+    // 与模型关联的表名
+    protected $table = 'process_execute_log';
+    // 是否主动维护时间戳
+    public $timestamps = false;
+    // 定义时间戳字段名
+    // const CREATED_AT = 'insert_time';
+    // const UPDATED_AT = 'update_time';
+
+
+    /**
+     * 添加
+     * @author 唐远望
+     * @version 1.0
+     * @date 2025-12-09
+     */
+    public function addExecuteLog_content($data)
+    {
+        $insert_data = [
+            'name' => $data['name'],
+            'code' => $data['code'],
+            'start_logid'    => $data['start_logid'],
+            'end_logid'    => $data['end_logid'],
+            'admin_id'    => $data['admin_id'],
+            'insert_time' => time(),
+        ];
+        $ExecuteLog_id = $this->insertGetId($insert_data);
+        return $ExecuteLog_id;
+    }
+
+
+    /**
+     * 写入数据
+     * @author 唐远望
+     * @version 1.0
+     * @date 2025-12-09
+     * @param $data
+     * @return bool
+     */
+    public function addExecuteLog($data)
+    {
+        DB::beginTransaction();
+        try {
+            $this->addExecuteLog_content($data);
+            DB::commit();
+            return true;
+            // 成功处理...
+        } catch (\Exception $e) {
+            DB::rollBack();
+            // 错误处理...
+            return false;
+        }
+    }
+
+
+    /**
+     * 编辑内容
+     * @author 唐远望
+     * @version 1.0
+     * @date 2025-12-09
+     * @param $data
+     * @return bool
+     */
+    public function editExecuteLog_content($where, $data)
+    {
+        $ExecuteLog = $this->where($where)->first();
+        if (!$ExecuteLog) {
+            return false;
+        }
+        $ExecuteLog->name = $data['name'];
+        $ExecuteLog->code = $data['responsible_person'];
+        $ExecuteLog->start_logid = $data['platform'];
+        $ExecuteLog->end_logid = $data['company_name'];
+        $ExecuteLog->admin_id = $data['product_name'];
+        $ExecuteLog->update_time = time();
+        $ExecuteLog->save();
+        return true;
+    }
+
+
+
+    /**
+     * 更新数据
+     * @author 唐远望
+     * @version 1.0
+     * @date 2025-12-09
+     * @param $data
+     * @return bool
+     */
+    public function updateExecuteLog($where, $data)
+    {
+        DB::beginTransaction();
+        try {
+            $this->editExecuteLog_content($where, $data);
+            DB::commit();
+            return true;
+            // 成功处理...
+        } catch (\Exception $e) {
+            DB::rollBack();
+            // 错误处理...
+            return false;
+        }
+    }
+
+    /**
+     * 修改状态
+     * @author 唐远望
+     * @version 1.0
+     * @date 2025-12-09
+     * @param $id
+     * @param $status
+     * @return bool
+     */
+    public function changeStatus($where, $status)
+    {
+        $ExecuteLog = $this->where($where)->first();
+        if (!$ExecuteLog) {
+            return false;
+        }
+        $ExecuteLog->status = $status;
+        $ExecuteLog->update_time = time();
+        $ExecuteLog->save();
+        return true;
+    }
+
+    /**
+     * 删除数据
+     * @author 唐远望
+     * @version 1.0
+     * @date 2025-12-09
+     * @param $id
+     * @return bool
+     */
+    public function deleteExecuteLog($where)
+    {
+        $ExecuteLog = $this->where($where)->first();
+        if (!$ExecuteLog) {
+            return false;
+        }
+        $ExecuteLog->delete();
+        return true;
+    }
+}

+ 3 - 0
app/Models/Manager/Process/ViolationStore.php

@@ -39,6 +39,7 @@ class ViolationStore extends Model
             'responsible_person' => $data['responsible_person'],
             'platform'    => $data['platform'],
             'company_name'    => $data['company_name'],
+            'social_credit_code'    => $data['social_credit_code'],
             'link_url'    => $data['link_url'],
             'store_name'    => $data['store_name'],
             'source_responsible_person'    => $data['source_responsible_person'],
@@ -68,6 +69,7 @@ class ViolationStore extends Model
                 'responsible_person' => $data['responsible_person'],
                 'platform'    => $data['platform'],
                 'company_name'    => $data['company_name'],
+                'social_credit_code'    => $data['social_credit_code'],
                 'link_url'    => $data['link_url'],
                 'store_name'    => $data['store_name'],
                 'source_responsible_person'    => $data['source_responsible_person'],
@@ -140,6 +142,7 @@ class ViolationStore extends Model
         $ViolationStore->responsible_person = $data['responsible_person'];
         $ViolationStore->platform = $data['platform'];
         $ViolationStore->company_name = $data['company_name'];
+        $ViolationStore->social_credit_code = $data['social_credit_code'];
         $ViolationStore->link_url = $data['link_url'];
         $ViolationStore->store_name = $data['store_name'];
         $ViolationStore->source_responsible_person = $data['source_responsible_person'];

+ 1 - 1
config/app.php

@@ -67,7 +67,7 @@ return [
     |
     */
 
-    'timezone' => 'UTC',
+    'timezone' => 'Asia/Shanghai',
 
     /*
     |--------------------------------------------------------------------------