Browse Source

多人操作判断

wangyu 6 years ago
parent
commit
2960934f62

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

@@ -327,9 +327,11 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
      * @return 当条产品线下所有订单信息
      * @return 当条产品线下所有订单信息
      */
      */
     public IPage<OpendProductDTO> opendedProduct(OppendedProductVO oppendedProductVO) {
     public IPage<OpendProductDTO> opendedProduct(OppendedProductVO oppendedProductVO) {
-        LantoneProduct lantoneProduct = this.getById(oppendedProductVO.getProductId());
-        if(lantoneProduct.getIsDeleted().equals(IsDeleteEnum.Y.getKey())){
-            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
+        LantoneProduct lantoneProduct = new LantoneProduct();
+        lantoneProduct.setId(oppendedProductVO.getProductId());
+        LantoneProduct lantoneProducts = this.getById(lantoneProduct.getId());
+        if(lantoneProducts.getIsDeleted().equals(IsDeleteEnum.Y.getKey())){
+            throw new CommonException(CommonErrorCode.NOT_EXISTS,
                     "该产品已删除");
                     "该产品已删除");
         }
         }
         Page page =new Page();
         Page page =new Page();