From a5ae312fc3305194498656d22e3a833ef22f258d Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Mon, 4 Sep 2023 12:03:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=BA=97=E9=93=BA=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/model/system/merchant/Merchant.php | 22 +++++++++---------- .../merchant/MerchantTypeRepository.php | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/common/model/system/merchant/Merchant.php b/app/common/model/system/merchant/Merchant.php index 2c5df509..441ae9d1 100644 --- a/app/common/model/system/merchant/Merchant.php +++ b/app/common/model/system/merchant/Merchant.php @@ -39,17 +39,17 @@ class Merchant extends BaseModel //定义店铺类型code const TypeCode = [ - 'TypeStore', //镇街店铺 - 'TypeCloudWarehouse', //镇级云仓 - 'TypeSupplyChain', //市级供应链 - 'TypePlatform', //市级里海云 - 'TypeTeamServer', //小组服务团 - 'TypeVillageServer', //村服务团队 - 'TypeTownServer', //镇服务团队 - 'TypeTownSupplyChain', //镇级供应链 - 'TypeFamousSpecialties', //名优特产 - 'TypeLocalCuisine', //当地美食 - 'TypeFeaturedCultural', //特色文旅 + 'TypeStore' => 'TypeStore', //镇街店铺 + 'TypeCloudWarehouse' => 'TypeCloudWarehouse', //镇级云仓 + 'TypeSupplyChain' => 'TypeSupplyChain', //市级供应链 + 'TypePlatform' => 'TypePlatform', //市级里海云 + 'TypeTeamServer' => 'TypeTeamServer', //小组服务团 + 'TypeVillageServer' => 'TypeVillageServer', //村服务团队 + 'TypeTownServer' => 'TypeTownServer', //镇服务团队 + 'TypeTownSupplyChain' => 'TypeTownSupplyChain', //镇级供应链 + 'TypeFamousSpecialties' => 'TypeFamousSpecialties', //名优特产 + 'TypeLocalCuisine' => 'TypeLocalCuisine', //当地美食 + 'TypeFeaturedCultural' => 'TypeFeaturedCultural', //特色文旅 ]; const TypeMap = [ diff --git a/app/common/repositories/system/merchant/MerchantTypeRepository.php b/app/common/repositories/system/merchant/MerchantTypeRepository.php index f94ce02f..edd570b9 100644 --- a/app/common/repositories/system/merchant/MerchantTypeRepository.php +++ b/app/common/repositories/system/merchant/MerchantTypeRepository.php @@ -68,7 +68,7 @@ class MerchantTypeRepository extends BaseRepository // unset($merTypeIds[$k]); // } // } - $queryBuilder = $queryBuilder->where('type_code', '<>', 'TypeSupplyChain'); + $queryBuilder = $queryBuilder->where('type_code', '<>', Merchant::TypeCode['TypeSupplyChain']); } $merTypeIds = $queryBuilder->fetchSql(false)->column('mer_type_id'); $query = MerchantType::getDB()->when(!$getAll, function ($query) use ($merTypeIds) {