部分不需要打印具体的 异常
This commit is contained in:
@@ -84,6 +84,9 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
|||||||
@Cacheable(key = "#id")
|
@Cacheable(key = "#id")
|
||||||
public ShopInfo getById(Serializable id) {
|
public ShopInfo getById(Serializable id) {
|
||||||
ShopInfo shopInfo = super.getById(id);
|
ShopInfo shopInfo = super.getById(id);
|
||||||
|
if(shopInfo == null){
|
||||||
|
throw new ApiNotPrintException("店铺不存在");
|
||||||
|
}
|
||||||
ShopConfig shopConfig = shopConfigService.getById(shopInfo.getId());
|
ShopConfig shopConfig = shopConfigService.getById(shopInfo.getId());
|
||||||
BeanUtil.copyProperties(shopConfig, shopInfo);
|
BeanUtil.copyProperties(shopConfig, shopInfo);
|
||||||
return shopInfo;
|
return shopInfo;
|
||||||
|
|||||||
Reference in New Issue
Block a user