|
@@ -56,6 +56,12 @@ public class YxnnServiceImpl implements YxnnService {
|
|
|
if (!Validator.isMobile(impressionNanan.getUploaderPhone())) {
|
|
|
return SendUtil.send(false, ConstStr.ADD_FAILED, "电话格式不正确,请填入移动电话号码");
|
|
|
}
|
|
|
+ if (impressionNanan.getPictureTitle().length() > 200) {
|
|
|
+ return SendUtil.send(false, ConstStr.ADD_FAILED, "标题长度不能大于100");
|
|
|
+ }
|
|
|
+ if (impressionNanan.getPictureAuthor().length() > 50) {
|
|
|
+ return SendUtil.send(false, ConstStr.ADD_FAILED, "作者长度不能大于50");
|
|
|
+ }
|
|
|
if (impressionNanan.getPictureDescription().length() > 200) {
|
|
|
return SendUtil.send(false, ConstStr.ADD_FAILED, "图片描述长度不能大于200");
|
|
|
}
|
|
@@ -94,7 +100,7 @@ public class YxnnServiceImpl implements YxnnService {
|
|
|
if (Blank.isNotEmpty(impressionNanan.getUrlAddress())) {
|
|
|
File file = new File(path + "/" + impressionNanan.getUrlAddress());
|
|
|
//删出对应的文件,以及对应的文件信息
|
|
|
- if(file.exists()){
|
|
|
+ if (file.exists()) {
|
|
|
file.delete();
|
|
|
}
|
|
|
}
|
|
@@ -109,6 +115,12 @@ public class YxnnServiceImpl implements YxnnService {
|
|
|
if (!Validator.isMobile(impressionNanan.getUploaderPhone())) {
|
|
|
return SendUtil.send(false, ConstStr.ADD_FAILED, "电话格式不正确,请填入移动电话号码");
|
|
|
}
|
|
|
+ if (impressionNanan.getPictureTitle().length() > 200) {
|
|
|
+ return SendUtil.send(false, ConstStr.ADD_FAILED, "标题长度不能大于100");
|
|
|
+ }
|
|
|
+ if (impressionNanan.getPictureAuthor().length() > 50) {
|
|
|
+ return SendUtil.send(false, ConstStr.ADD_FAILED, "作者长度不能大于50");
|
|
|
+ }
|
|
|
if (impressionNanan.getPictureDescription().length() > 200) {
|
|
|
return SendUtil.send(false, ConstStr.ADD_FAILED, "图片描述长度不能大于200");
|
|
|
}
|
|
@@ -142,6 +154,12 @@ public class YxnnServiceImpl implements YxnnService {
|
|
|
if (!Validator.isMobile(impressionNanan.getUploaderPhone())) {
|
|
|
return SendUtil.send(false, ConstStr.ADD_FAILED, "电话格式不正确,请填入移动电话号码");
|
|
|
}
|
|
|
+ if (impressionNanan.getPictureTitle().length() > 200) {
|
|
|
+ return SendUtil.send(false, ConstStr.ADD_FAILED, "标题长度不能大于100");
|
|
|
+ }
|
|
|
+ if (impressionNanan.getPictureAuthor().length() > 50) {
|
|
|
+ return SendUtil.send(false, ConstStr.ADD_FAILED, "作者长度不能大于50");
|
|
|
+ }
|
|
|
if (impressionNanan.getPictureDescription().length() > 200) {
|
|
|
return SendUtil.send(false, ConstStr.ADD_FAILED, "图片描述长度不能大于200");
|
|
|
}
|