(1)is_hex_bin字段值设置修改
(2)p2p 字符串域保存方法添加
This commit is contained in:
@@ -957,9 +957,9 @@ public class BaseController {
|
||||
}
|
||||
if(isCaseInsenstive==null) {
|
||||
if(hexP.equals("0")||hexP.equals("1")) {
|
||||
baseStringCfg.setIsHex(0);
|
||||
baseStringCfg.setIsCaseInsenstive(0);
|
||||
}else if(hexP.equals("2")){
|
||||
baseStringCfg.setIsHex(1);
|
||||
baseStringCfg.setIsCaseInsenstive(1);
|
||||
}else {
|
||||
errInfo.append(String.format(prop.getProperty("can_not_null"), prop.getProperty("is_case_insenstive"))+";");
|
||||
}
|
||||
@@ -983,14 +983,19 @@ public class BaseController {
|
||||
if(hexP.equals("2")&&isCaseInsenstive.intValue()==0){
|
||||
errInfo.append(String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive"))+";");
|
||||
}
|
||||
if(isHex==0&&isCaseInsenstive==0) {
|
||||
}
|
||||
isHex=baseStringCfg.getIsHex();
|
||||
isCaseInsenstive=baseStringCfg.getIsCaseInsenstive();
|
||||
if(isHex!=null&&isCaseInsenstive!=null) {
|
||||
if(isHex.intValue()==0&&isCaseInsenstive.intValue()==0) {
|
||||
baseStringCfg.setIsHexbin(0);
|
||||
}else if(isHex==1&&isCaseInsenstive==0) {
|
||||
}else if(isHex.intValue()==1&&isCaseInsenstive.intValue()==0) {
|
||||
baseStringCfg.setIsHexbin(1);
|
||||
}else if(isHex==1&&isCaseInsenstive==1) {
|
||||
}else if(isHex.intValue()==1&&isCaseInsenstive.intValue()==1) {
|
||||
baseStringCfg.setIsHexbin(2);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (errInfo.toString().length() > 0) {//
|
||||
errTip.append(String.format(prop.getProperty("line"), i + 2) + ",");
|
||||
@@ -1155,9 +1160,9 @@ public class BaseController {
|
||||
}
|
||||
if(isCaseInsenstive==null) {
|
||||
if(hexP.equals("0")||hexP.equals("1")) {
|
||||
baseStringCfg.setIsHex(0);
|
||||
baseStringCfg.setIsCaseInsenstive(0);
|
||||
}else if(hexP.equals("2")){
|
||||
baseStringCfg.setIsHex(1);
|
||||
baseStringCfg.setIsCaseInsenstive(1);
|
||||
}else {
|
||||
errInfo.append(String.format(prop.getProperty("can_not_null"), prop.getProperty("is_case_insenstive"))+";");
|
||||
}
|
||||
@@ -1181,15 +1186,18 @@ public class BaseController {
|
||||
if(hexP.equals("2")&&isCaseInsenstive.intValue()==0){
|
||||
errInfo.append(String.format(prop.getProperty("is_incorrect"), prop.getProperty("is_case_insenstive"))+";");
|
||||
}
|
||||
if(isHex==0&&isCaseInsenstive==0) {
|
||||
}
|
||||
isHex=baseStringCfg.getIsHex();
|
||||
isCaseInsenstive=baseStringCfg.getIsCaseInsenstive();
|
||||
if(isHex!=null&&isCaseInsenstive!=null) {
|
||||
if(isHex.intValue()==0&&isCaseInsenstive.intValue()==0) {
|
||||
baseStringCfg.setIsHexbin(0);
|
||||
}else if(isHex==1&&isCaseInsenstive==0) {
|
||||
}else if(isHex.intValue()==1&&isCaseInsenstive.intValue()==0) {
|
||||
baseStringCfg.setIsHexbin(1);
|
||||
}else if(isHex==1&&isCaseInsenstive==1) {
|
||||
}else if(isHex.intValue()==1&&isCaseInsenstive.intValue()==1) {
|
||||
baseStringCfg.setIsHexbin(2);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (errInfo.toString().length() > 0) {//
|
||||
errTip.append(String.format(prop.getProperty("line"), i + 2) + ",");
|
||||
@@ -3080,6 +3088,14 @@ public class BaseController {
|
||||
if(regionDict.getDictId().intValue()==36) {
|
||||
fileTransferCfgService.saveFtpCfg(stringCfgs);
|
||||
}
|
||||
if(regionDict.getFunctionId().equals(510)){ //P2p hash
|
||||
/*if("p2p_hash".equals(regionDict.getConfigServiceType())) {
|
||||
fileTransferCfgService.saveP2pHashCfg(stringCfgs);
|
||||
}else {*/
|
||||
fileTransferCfgService.saveP2pCfg(stringCfgs);
|
||||
/*}*/
|
||||
|
||||
}
|
||||
}else if (regionDict.getRegionType().equals(3)) {
|
||||
for(ComplexkeywordCfg cfg:complexkeywordCfgs) {
|
||||
cfg.setAction(serviceDict.getAction());
|
||||
@@ -3133,8 +3149,13 @@ public class BaseController {
|
||||
mailCfgService.saveMailCfg(complexkeywordCfgs);
|
||||
}
|
||||
}
|
||||
ipCfgService.saveCfgIndexOf(cfgIndexInfos);
|
||||
appCfgService.savePolicyList(appPolicyCfgs);
|
||||
if(cfgIndexInfos!=null&&cfgIndexInfos.size()>0) {
|
||||
ipCfgService.saveCfgIndexOf(cfgIndexInfos);
|
||||
}
|
||||
if(appPolicyCfgs!=null&&appPolicyCfgs.size()>0) {
|
||||
appCfgService.savePolicyList(appPolicyCfgs);
|
||||
}
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
|
||||
@@ -702,7 +702,22 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
dataMap.put("NTC_UNIVERSAL_IP", ipPortList);
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
/*public void saveP2pHashCfg(List<BaseStringCfg<?>> cfgs) {
|
||||
for(BaseStringCfg cfg:cfgs){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
cfg.setUserRegion1(cfg.getUserRegion2());
|
||||
cfg.setUserRegion2(null);
|
||||
fileTransferCfgDao.saveP2pHashCfg(cfg);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
public void saveP2pCfg(List<BaseStringCfg<?>> cfgs) {
|
||||
for(BaseStringCfg cfg:cfgs){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
fileTransferCfgDao.saveP2pHashCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 保存p2p配置
|
||||
* @param entity
|
||||
|
||||
Reference in New Issue
Block a user