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