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');