|
@@ -242,11 +242,15 @@ public class OpenedProductsFacade extends OpenedProductsServiceImpl {
|
|
|
|
|
|
LantoneProduct lantoneProduct =new LantoneProduct();
|
|
LantoneProduct lantoneProduct =new LantoneProduct();
|
|
lantoneProduct.setId(openProductCheckVO.getProductId());
|
|
lantoneProduct.setId(openProductCheckVO.getProductId());
|
|
- LantoneProduct lantoneProducts = lantoneProductFacade.getById(lantoneProduct);
|
|
|
|
|
|
+ lantoneProduct = lantoneProductFacade.getById(lantoneProduct);
|
|
|
|
+
|
|
|
|
+ if(lantoneProduct==null){
|
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该产品不存在,请刷新页面");
|
|
|
|
+ }
|
|
|
|
|
|
if(openProductCheckVO.getOpenId()!=null){
|
|
if(openProductCheckVO.getOpenId()!=null){
|
|
OpenedProducts openedProducts = baseMapper.selectById(openProductCheckVO.getOpenId());
|
|
OpenedProducts openedProducts = baseMapper.selectById(openProductCheckVO.getOpenId());
|
|
- if(openedProducts==null){
|
|
|
|
|
|
+ if(openedProducts==null||openedProducts.getProductId()!=openProductCheckVO.getProductId()){
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "您的产品不存在,请刷新页面");
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "您的产品不存在,请刷新页面");
|
|
}
|
|
}
|
|
if(openedProducts.getIsDeleted().equals("Y")){
|
|
if(openedProducts.getIsDeleted().equals("Y")){
|
|
@@ -256,13 +260,10 @@ public class OpenedProductsFacade extends OpenedProductsServiceImpl {
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "您的产品已停用,请刷新页面");
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "您的产品已停用,请刷新页面");
|
|
}
|
|
}
|
|
if(openedProducts.getEndTime().getTime()<DateUtil.now().getTime()){
|
|
if(openedProducts.getEndTime().getTime()<DateUtil.now().getTime()){
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "【"+lantoneProducts.getName()+"】已到期,请刷新页面");
|
|
|
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "【"+lantoneProduct.getName()+"】已到期,请刷新页面");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if(lantoneProduct==null){
|
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该产品不存在,请刷新页面");
|
|
|
|
- }
|
|
|
|
if(lantoneProduct.getIsDeleted().equals("Y")){
|
|
if(lantoneProduct.getIsDeleted().equals("Y")){
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "【"+lantoneProduct.getName()+"】已删除,请刷新页面");
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "【"+lantoneProduct.getName()+"】已删除,请刷新页面");
|
|
}
|
|
}
|
|
@@ -270,6 +271,7 @@ public class OpenedProductsFacade extends OpenedProductsServiceImpl {
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "【"+lantoneProduct.getName()+"】已停用,请刷新页面");
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "【"+lantoneProduct.getName()+"】已停用,请刷新页面");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ openProductCheckDTO.setHasPermission(true);
|
|
return openProductCheckDTO;
|
|
return openProductCheckDTO;
|
|
}
|
|
}
|
|
|
|
|