|
@@ -118,7 +118,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
|
|
|
public MerchantDetailDTO getMerchantDetail(@NonNull Long id) {
|
|
|
// 获取商家信息
|
|
|
MerchantDTO merchant = MerchantCopier.INSTANCE.copying(
|
|
|
- AssertUtils.available(this.getById(id), "商家不存在")
|
|
|
+ AssertUtils.nonnull(this.getById(id), "商家不存在")
|
|
|
);
|
|
|
|
|
|
// 获取商家全部商品列表
|
|
@@ -139,7 +139,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
|
|
|
public MerchantDetailDTO getMerchantDetail(Long id, LocationQueryParam param) {
|
|
|
// 获取商家信息
|
|
|
MerchantDTO merchant = MerchantCopier.INSTANCE.copying(
|
|
|
- AssertUtils.available(this.baseMapper.getMerchantById(id, param), "商家不存在")
|
|
|
+ AssertUtils.nonnull(this.baseMapper.getMerchantById(id, param), "商家不存在")
|
|
|
);
|
|
|
// Category category = this.categoryService.getById(merchant.getMainBusiness());
|
|
|
// if (null != category){
|
|
@@ -217,7 +217,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
|
|
|
|
|
|
@Override
|
|
|
public void updateMerchant(@NonNull Long id, @NonNull MerchantModifyParam param) {
|
|
|
- Merchant merchant = AssertUtils.available(this.getById(id), "商家不存在");
|
|
|
+ Merchant merchant = AssertUtils.nonnull(this.getById(id), "商家不存在");
|
|
|
MerchantCopier.INSTANCE.copying(param, merchant);
|
|
|
this.updateById(merchant);
|
|
|
List<Long> business = param.getAncillaryBusiness();
|
|
@@ -251,7 +251,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
|
|
|
|
|
|
@Override
|
|
|
public void deleteMerchant(@NonNull Long id) {
|
|
|
- AssertUtils.available(this.getById(id), "商家不存在");
|
|
|
+ AssertUtils.nonnull(this.getById(id), "商家不存在");
|
|
|
this.baseMapper.deleteById(id);
|
|
|
}
|
|
|
|
|
@@ -278,7 +278,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
|
|
|
|
|
|
@Override
|
|
|
public MerchantDTO getMerchant(@NonNull Long id) {
|
|
|
- Merchant merchant = AssertUtils.available(this.getById(id), "商家不存在");
|
|
|
+ Merchant merchant = AssertUtils.nonnull(this.getById(id), "商家不存在");
|
|
|
return this.convert(merchant);
|
|
|
}
|
|
|
|
|
@@ -515,7 +515,7 @@ public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> i
|
|
|
|
|
|
@Override
|
|
|
public void merchantAudit(Long id, MerchantStatus status){
|
|
|
- Merchant merchant = AssertUtils.available(this.getById(id), "商家不存在");
|
|
|
+ Merchant merchant = AssertUtils.nonnull(this.getById(id), "商家不存在");
|
|
|
merchant.setStatus(status);
|
|
|
this.updateById(merchant);
|
|
|
}
|