|
@@ -196,9 +196,12 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
"产品删除失败");
|
|
|
}
|
|
|
- if(!productServiceFacade.deleteByProductId(updateProductVO.getId())){
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
- "产品令牌删除失败");
|
|
|
+ List<OpenedProducts> list = openedProductsFacade.getOpendById(openedProducts);
|
|
|
+ if(list.size() != 0){
|
|
|
+ if(!productServiceFacade.deleteByProductId(updateProductVO.getId())){
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
+ "产品令牌删除失败");
|
|
|
+ }
|
|
|
}
|
|
|
return true;
|
|
|
}
|