|
@@ -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,
|
|
|
"产品名称重复");
|
|
|
}
|