|
@@ -360,10 +360,14 @@ public class StoreModel {
|
360
|
360
|
//删除店铺商品
|
361
|
361
|
GoodsExample goodsExtend = new GoodsExample();
|
362
|
362
|
goodsExtend.setStoreId(store.getStoreId());
|
363
|
|
- count = goodsWriteMapper.deleteByExample(goodsExtend);
|
364
|
|
- if (count == 0) {
|
365
|
|
- throw new MallException("删除店铺商品表失败,请重试");
|
|
363
|
+ count = goodsWriteMapper.countByExample(goodsExtend);
|
|
364
|
+ if (count>0){
|
|
365
|
+ count = goodsWriteMapper.deleteByExample(goodsExtend);
|
|
366
|
+ if (count == 0) {
|
|
367
|
+ throw new MallException("删除店铺商品表失败,请重试");
|
|
368
|
+ }
|
366
|
369
|
}
|
|
370
|
+
|
367
|
371
|
return count;
|
368
|
372
|
}
|
369
|
373
|
|