|
|
@@ -587,11 +587,10 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
|
|
|
|
|
|
@Override
|
|
|
public boolean deleteDetailById(Long id) {
|
|
|
- Product productTemp = getMapper().selectByPrimaryKey(id);
|
|
|
- if (ObjectUtils.isEmpty(productTemp)){
|
|
|
+ Long prodId = productDetailMapper.selectProdidByPrimaryKey(id);
|
|
|
+ if (prodId == null){
|
|
|
throw new BizException(BizExceptionCode.ORDER_NOT_EXITTS);
|
|
|
}
|
|
|
- Long prodId = productDetailMapper.selectProdidByPrimaryKey(id);
|
|
|
validProductOperation(prodId, BizExceptionCode.BIZ_RELDELETE_DELETEPROD);
|
|
|
String prCode = getMapper().selectByPrimaryKey(prodId).getPr_code();
|
|
|
//找到原始单据,反过账并删除
|