|
@@ -278,21 +278,21 @@ public class BrandServiceImpl implements BrandService {
|
|
|
throw new ServiceException("第" + (i + 1) + "行的是否新品牌只可填(0:否 1:是)");
|
|
|
}
|
|
|
// 品牌唯一标识符正则校验
|
|
|
- if (StringUtils.isNotBlank(uniqueIdentifier)) {
|
|
|
- String regex = "(^[0-9a-zA-Z_&]{1,10}$)";
|
|
|
- if (!Pattern.matches(regex, uniqueIdentifier)) {
|
|
|
- throw new ServiceException("第" + (i + 1) + "行的品牌唯一简码包含特殊字符或长度过长");
|
|
|
- }
|
|
|
- }
|
|
|
- if (!ValidateUtils.validateSpecialAllowChinese(name)) {
|
|
|
- throw new ServiceException("第" + (i + 1) + "行的品牌名称包含特殊字符或长度过长");
|
|
|
- }
|
|
|
+ // if (StringUtils.isNotBlank(uniqueIdentifier)) {
|
|
|
+ // String regex = "(^[0-9a-zA-Z_&]{1,10}$)";
|
|
|
+ // if (!Pattern.matches(regex, uniqueIdentifier)) {
|
|
|
+ // throw new ServiceException("第" + (i + 1) + "行的品牌唯一简码包含特殊字符或长度过长");
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // if (!ValidateUtils.validateSpecialAllowChinese(name)) {
|
|
|
+ // throw new ServiceException("第" + (i + 1) + "行的品牌名称包含特殊字符或长度过长");
|
|
|
+ // }
|
|
|
if (StringUtils.isBlank(simpleDesc)) {
|
|
|
throw new ServiceException("第" + (i + 1) + "行的描述不能为空");
|
|
|
}
|
|
|
- if (!ValidateUtils.validateSpecialAllowChinese(simpleDesc)) {
|
|
|
- throw new ServiceException("第" + (i + 1) + "行的描述包含特殊字符或长度过长");
|
|
|
- }
|
|
|
+ // if (!ValidateUtils.validateSpecialAllowChinese(simpleDesc)) {
|
|
|
+ // throw new ServiceException("第" + (i + 1) + "行的描述包含特殊字符或长度过长");
|
|
|
+ // }
|
|
|
|
|
|
// 数据库查询是否存在对应名字的对象
|
|
|
BrandEntity isExist = brandDao.queryByName(name);
|