From 71d5427b22e0c7aa915d9585d2ef1c0f67493c79 Mon Sep 17 00:00:00 2001 From: lanzu_qsy <334039090@qq.com> Date: Tue, 1 Sep 2020 16:13:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=95=86=E7=BB=A7=E7=BB=AD?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=97=A7=E7=9A=84=E5=95=86=E6=88=B7=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Metrics/Examples/ServiceCard/TotalStore.php | 5 +++-- app/Models/ImsCjdcStore.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Admin/Metrics/Examples/ServiceCard/TotalStore.php b/app/Admin/Metrics/Examples/ServiceCard/TotalStore.php index 2555d43..a5300c7 100644 --- a/app/Admin/Metrics/Examples/ServiceCard/TotalStore.php +++ b/app/Admin/Metrics/Examples/ServiceCard/TotalStore.php @@ -4,6 +4,7 @@ namespace App\Admin\Metrics\Examples\ServiceCard; +use App\Models\ImsCjdcStore; use App\Models\LanzuMmInfo; use App\Models\LanzuStore; use Dcat\Admin\Admin; @@ -21,12 +22,12 @@ class TotalStore extends Card if ($aud->isRole('lanzu_mm')){ $mm = LanzuMmInfo::where('admin_user_id',$aud->id)->first(); if ($mm){ - $count = LanzuStore::where('mm_user_id',$mm->user_id)->count(); + $count = ImsCjdcStore::where('mm_user_id',$mm->user_id)->count(); } }elseif($aud->isRole('lanzu_mp')){ $count = 0; }else{ - $count = LanzuStore::count(); + $count = ImsCjdcStore::count(); } $this->content($count); } diff --git a/app/Models/ImsCjdcStore.php b/app/Models/ImsCjdcStore.php index f25750f..c9763d4 100644 --- a/app/Models/ImsCjdcStore.php +++ b/app/Models/ImsCjdcStore.php @@ -10,7 +10,7 @@ use App\Models\StoreAccount; class ImsCjdcStore extends Model { use HasDateTimeFormatter; - protected $table = 'lanzu_store'; + protected $table = 'ims_cjdc_store'; public $timestamps = false; public function market(){ return $this->hasOne('\App\Models\ImsCjdcMarket','id','market_id');