|
@@ -41,7 +41,7 @@ public class LiveGoodsServiceImpl extends BaseServiceImpl<Integer, LiveGoods> i
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public void updateLiveGoods(LiveGoods liveGoods) {
|
|
|
- Optional.ofNullable(liveGoodsDao.get(liveGoods.getId())).orElseThrow(() -> new RuntimeException("商品信息不存在"));
|
|
|
+ Optional.ofNullable(liveGoodsDao.get(liveGoods.getId())).orElseThrow(() -> new BizException("商品信息不存在"));
|
|
|
//如果商品已在直播间上架,那么不允许变更商品信息
|
|
|
if (liveGoodsMapperService.findByLiveGoodsIdAndStatus(liveGoods.getId(),true).size() > 0) {
|
|
|
throw new BizException("商品已在直播间上架,不能修改");
|