瀏覽代碼

多人操作判断

wangyu 6 年之前
父節點
當前提交
9373b39bf8
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      diagbotman-service/src/main/java/com/diagbot/facade/LantoneProductFacade.java

+ 4 - 4
diagbotman-service/src/main/java/com/diagbot/facade/LantoneProductFacade.java

@@ -108,7 +108,7 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
                     "产品名称重复");
         }
         LantoneProduct lantoneProduct = this.getById(updateProductVO.getId());
-        if(lantoneProduct.getIsDeleted().equals(IsDeleteEnum.Y)){
+        if(lantoneProduct.getIsDeleted().equals(IsDeleteEnum.Y.getKey())){
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
                     "该产品已删除");
         }
@@ -140,7 +140,7 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
      */
     public Boolean stopProduct(UpdateProductVO updateProductVO) {
         LantoneProduct lantoneProduct = this.getById(updateProductVO.getId());
-        if(lantoneProduct.getIsDeleted().equals(IsDeleteEnum.Y)){
+        if(lantoneProduct.getIsDeleted().equals(IsDeleteEnum.Y.getKey())){
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
                     "该产品已删除");
         }
@@ -198,7 +198,7 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
      */
     public Boolean deleteProduct(UpdateProductVO updateProductVO) {
         LantoneProduct lantoneProduct = getById(updateProductVO.getId());
-        if(lantoneProduct.getIsDeleted().equals(IsDeleteEnum.Y)){
+        if(lantoneProduct.getIsDeleted().equals(IsDeleteEnum.Y.getKey())){
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
                     "该产品已删除");
         }
@@ -328,7 +328,7 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
      */
     public IPage<OpendProductDTO> opendedProduct(OppendedProductVO oppendedProductVO) {
         LantoneProduct lantoneProduct = getById(oppendedProductVO.getProductId());
-        if(lantoneProduct.getIsDeleted().equals(IsDeleteEnum.Y)){
+        if(lantoneProduct.getIsDeleted().equals(IsDeleteEnum.Y.getKey())){
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
                     "该产品已删除");
         }