(1)域名通用页面页面标题替换
(2)Ip配置导入增加来函,分类性质标签验证
This commit is contained in:
@@ -661,15 +661,88 @@ public class BaseController {
|
||||
errInfo.append(String.format(prop.getProperty("can_not_null"), prop.getProperty("direction"))+";");
|
||||
}
|
||||
//protocol check end
|
||||
// requestId check start
|
||||
Integer requestId=value.getRequestId();
|
||||
if(requestId==null){
|
||||
errInfo.append(String.format(prop.getProperty("can_not_null"), prop.getProperty("letter"))+";");
|
||||
}else{//查询数据库是否存在ID
|
||||
RequestInfo info=requestInfoService.getRequestInfoById((long)requestId.intValue());
|
||||
if(info==null){
|
||||
errInfo.append(String.format(prop.getProperty("id_not_exists"),requestId, prop.getProperty("letter"))+";");
|
||||
}else if(info.getIsValid()==Constants.VALID_NO||info.getIsValid()==Constants.VALID_DEL){
|
||||
errInfo.append(String.format(prop.getProperty("id_not_valid"),requestId, prop.getProperty("letter"))+";");
|
||||
}
|
||||
}
|
||||
// requestId check end
|
||||
//classification check start
|
||||
String classification=value.getClassify();
|
||||
if(StringUtils.isNotBlank(classification)){
|
||||
try{
|
||||
for(String classify:classification.split(",")){
|
||||
if(StringUtils.isNotBlank(classify)){
|
||||
int c=Integer.parseInt(classify);
|
||||
ServiceDictInfo dict=serviceDictInfoService.getDictById(c);
|
||||
if(dict==null){
|
||||
errInfo.append(String.format(prop.getProperty("id_not_exists"),classify, prop.getProperty("classification"))+";");
|
||||
}else if(dict.getIsValid()==Constants.VALID_NO||dict.getIsValid()==Constants.VALID_DEL){
|
||||
errInfo.append(String.format(prop.getProperty("id_not_valid"),classify, prop.getProperty("classification"))+";");
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
errInfo.append(String.format(prop.getProperty("num_split_by_comma"), prop.getProperty("classification"))+";");
|
||||
}
|
||||
}
|
||||
//classification check end
|
||||
//attribute check start
|
||||
String attributes=value.getAttribute();
|
||||
if(StringUtils.isNotBlank(attributes)){
|
||||
try{
|
||||
for(String attribute:attributes.split(",")){
|
||||
if(StringUtils.isNotBlank(attribute)){
|
||||
int c=Integer.parseInt(attribute);
|
||||
ServiceDictInfo dict=serviceDictInfoService.getDictById(c);
|
||||
if(dict==null){
|
||||
errInfo.append(String.format(prop.getProperty("id_not_exists"),attribute, prop.getProperty("attribute"))+";");
|
||||
}else if(dict.getIsValid()==Constants.VALID_NO||dict.getIsValid()==Constants.VALID_DEL){
|
||||
errInfo.append(String.format(prop.getProperty("id_not_valid"),attribute, prop.getProperty("attribute"))+";");
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
errInfo.append(String.format(prop.getProperty("num_split_by_comma"), prop.getProperty("attribute"))+";");
|
||||
}
|
||||
}
|
||||
//attribute check end
|
||||
//attribute check start
|
||||
String labels=value.getLable();
|
||||
if(StringUtils.isNotBlank(labels)){
|
||||
try{
|
||||
for(String label:labels.split(",")){
|
||||
if(StringUtils.isNotBlank(label)){
|
||||
int c=Integer.parseInt(label);
|
||||
ServiceDictInfo dict=serviceDictInfoService.getDictById(c);
|
||||
if(dict==null){
|
||||
errInfo.append(String.format(prop.getProperty("id_not_exists"),label, prop.getProperty("label"))+";");
|
||||
}else if(dict.getIsValid()==Constants.VALID_NO||dict.getIsValid()==Constants.VALID_DEL){
|
||||
errInfo.append(String.format(prop.getProperty("id_not_valid"),label, prop.getProperty("label"))+";");
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch (Exception e) {
|
||||
// TODO: handle exception
|
||||
errInfo.append(String.format(prop.getProperty("num_split_by_comma"), prop.getProperty("label"))+";");
|
||||
}
|
||||
}
|
||||
//attribute check end
|
||||
if(StringUtils.isNotBlank(errInfo.toString())){
|
||||
msg.append(lineStart).append(errInfo);
|
||||
if(line<list.size()){
|
||||
msg.append("<br/>");
|
||||
}
|
||||
}
|
||||
// requestId check start
|
||||
Integer requestId=value.getRequestId();
|
||||
// requestId check end
|
||||
line++;
|
||||
}
|
||||
if(StringUtils.isNotBlank(msg.toString())){
|
||||
|
||||
Reference in New Issue
Block a user