Jelajahi Sumber

朗通产品线修改

wangyu 6 tahun lalu
induk
melakukan
3595084e45

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

@@ -91,7 +91,7 @@ public class LantoneProductFacade extends LantoneProductServiceImpl {
      */
     public Boolean updateProduct(UpdateProductVO updateProductVO) {
         LantoneProduct lantoneProductInfo = this.selectProductByName(updateProductVO.getName());
-        if(updateProductVO.getName().equals(lantoneProductInfo.getName()) && updateProductVO.getId() != lantoneProductInfo.getId()){
+        if(null != lantoneProductInfo && updateProductVO.getName().equals(lantoneProductInfo.getName()) && updateProductVO.getId() != lantoneProductInfo.getId()){
             throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
                     "产品名称重复");
         }