Authored by Lixiaodi

编辑货号校验修改

... ... @@ -277,7 +277,7 @@ public class ProductServiceImpl implements IProductService, ApplicationContextAw
if (isCheckUrl && CollectionUtils.isEmpty(bo.getImageUrlList())) {
throw new CommonException(400, "请上传至少一张图片");
}
if (CollectionUtils.isNotEmpty(productMapper.selectByProductCode(bo.getProductCode()))) {
if (bo.getId() == null && CollectionUtils.isNotEmpty(productMapper.selectByProductCode(bo.getProductCode()))) {
throw new CommonException(400, "该货号已存在!");
}
}
... ...