From 419ab18402fb9bc8cc9ba345f77def2891e45a3b Mon Sep 17 00:00:00 2001 From: yuanye Date: Tue, 16 Mar 2021 17:14:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B0=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bweb/controller/HighMerchantStoreController.java | 4 ++-- .../com/hai/service/impl/HighMerchantStoreServiceImpl.java | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java b/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java index 600caf3b..a965e0ff 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java @@ -96,7 +96,7 @@ public class HighMerchantStoreController { // 校验商户 HighMerchant merchant = highMerchantService.getMerchantById(userInfoModel.getMerchant().getId()); - if (merchant != null) { + if (merchant == null) { log.error("HighMerchantStoreController -> insertMerchantStore() error!","未找到商户"); throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOF_FOUND, ""); } @@ -165,7 +165,7 @@ public class HighMerchantStoreController { // 校验商户 HighMerchant merchant = highMerchantService.getMerchantById(highMerchantStore.getMerchantId()); - if (merchant != null) { + if (merchant == null) { log.error("HighMerchantStoreController -> editMerchantStore() error!","未找到商户"); throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOF_FOUND, ""); } diff --git a/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java index 34d0e27b..6a02ff6c 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java @@ -72,7 +72,7 @@ public class HighMerchantStoreServiceImpl implements HighMerchantStoreService { public void deleteMerchantStore(Long id) { // 查询门店 HighMerchantStore store = highMerchantStoreMapper.selectByPrimaryKey(id); - if (store != null) { + if (store == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_STORE_NOF_FOUND, ""); } store.setStatus(0); @@ -126,9 +126,11 @@ public class HighMerchantStoreServiceImpl implements HighMerchantStoreService { } if (StringUtils.isNotBlank(MapUtils.getString(map, "telephone"))) { - criteria.andTelephoneEqualTo("%" + MapUtils.getString(map, "telephone") + "%"); + criteria.andTelephoneEqualTo(MapUtils.getString(map, "telephone")); } + criteria.andStatusEqualTo(1); + example.setOrderByClause("create_time desc"); return highMerchantStoreMapper.selectByExample(example); }