修改小bug

dev-discount
yuanye 4 years ago
parent 7e3e0ad72b
commit 419ab18402
  1. 4
      hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java
  2. 6
      hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java

@ -96,7 +96,7 @@ public class HighMerchantStoreController {
// 校验商户 // 校验商户
HighMerchant merchant = highMerchantService.getMerchantById(userInfoModel.getMerchant().getId()); HighMerchant merchant = highMerchantService.getMerchantById(userInfoModel.getMerchant().getId());
if (merchant != null) { if (merchant == null) {
log.error("HighMerchantStoreController -> insertMerchantStore() error!","未找到商户"); log.error("HighMerchantStoreController -> insertMerchantStore() error!","未找到商户");
throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOF_FOUND, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOF_FOUND, "");
} }
@ -165,7 +165,7 @@ public class HighMerchantStoreController {
// 校验商户 // 校验商户
HighMerchant merchant = highMerchantService.getMerchantById(highMerchantStore.getMerchantId()); HighMerchant merchant = highMerchantService.getMerchantById(highMerchantStore.getMerchantId());
if (merchant != null) { if (merchant == null) {
log.error("HighMerchantStoreController -> editMerchantStore() error!","未找到商户"); log.error("HighMerchantStoreController -> editMerchantStore() error!","未找到商户");
throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOF_FOUND, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOF_FOUND, "");
} }

@ -72,7 +72,7 @@ public class HighMerchantStoreServiceImpl implements HighMerchantStoreService {
public void deleteMerchantStore(Long id) { public void deleteMerchantStore(Long id) {
// 查询门店 // 查询门店
HighMerchantStore store = highMerchantStoreMapper.selectByPrimaryKey(id); HighMerchantStore store = highMerchantStoreMapper.selectByPrimaryKey(id);
if (store != null) { if (store == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_STORE_NOF_FOUND, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_STORE_NOF_FOUND, "");
} }
store.setStatus(0); store.setStatus(0);
@ -126,9 +126,11 @@ public class HighMerchantStoreServiceImpl implements HighMerchantStoreService {
} }
if (StringUtils.isNotBlank(MapUtils.getString(map, "telephone"))) { 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"); example.setOrderByClause("create_time desc");
return highMerchantStoreMapper.selectByExample(example); return highMerchantStoreMapper.selectByExample(example);
} }

Loading…
Cancel
Save