|
@@ -236,6 +236,11 @@ public class OpenedProductsFacade extends OpenedProductsServiceImpl {
|
|
|
return enShowOptionDTO;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 控制台-已开通产品状态校验
|
|
|
+ * @param openProductCheckVO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public OpenProductCheckDTO openProductCheck(OpenProductCheckVO openProductCheckVO){
|
|
|
OpenProductCheckDTO openProductCheckDTO = new OpenProductCheckDTO();
|
|
|
openProductCheckDTO.setHasPermission(false);
|
|
@@ -247,6 +252,12 @@ public class OpenedProductsFacade extends OpenedProductsServiceImpl {
|
|
|
if(lantoneProduct==null){
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该产品不存在,请刷新页面");
|
|
|
}
|
|
|
+ if(lantoneProduct.getIsDeleted().equals("Y")){
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "【"+lantoneProduct.getName()+"】已删除,请刷新页面");
|
|
|
+ }
|
|
|
+ if(lantoneProduct.getServiceStatus()==StatusEnum.Disable.getKey()){
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "【"+lantoneProduct.getName()+"】已停用,请刷新页面");
|
|
|
+ }
|
|
|
|
|
|
Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
|
|
|
if(openProductCheckVO.getOpenId()!=null){
|
|
@@ -260,20 +271,15 @@ public class OpenedProductsFacade extends OpenedProductsServiceImpl {
|
|
|
if(openedProducts.getIsDeleted().equals("Y")){
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "您的产品已删除,请刷新页面");
|
|
|
}
|
|
|
- if(openedProducts.getServiceStatus()==StatusEnum.Disable.getKey()){
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "您的产品已停用,请刷新页面");
|
|
|
- }
|
|
|
if(openedProducts.getEndTime().getTime()<DateUtil.now().getTime()){
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "【"+lantoneProduct.getName()+"】已到期,请刷新页面");
|
|
|
}
|
|
|
+ if(openedProducts.getServiceStatus()==StatusEnum.Disable.getKey()){
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "您的产品已停用,请刷新页面");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- if(lantoneProduct.getIsDeleted().equals("Y")){
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "【"+lantoneProduct.getName()+"】已删除,请刷新页面");
|
|
|
- }
|
|
|
- if(lantoneProduct.getServiceStatus()==StatusEnum.Disable.getKey()){
|
|
|
- throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "【"+lantoneProduct.getName()+"】已停用,请刷新页面");
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
openProductCheckDTO.setHasPermission(true);
|
|
|
return openProductCheckDTO;
|