Explorar o código

多人操作判断

wangyu %!s(int64=6) %!d(string=hai) anos
pai
achega
9373b39bf8

+ 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,
                     "该产品已删除");
         }