修改所有业务,批量删除,仅删除一条bug
This commit is contained in:
@@ -197,9 +197,9 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
}
|
||||
}
|
||||
public void updateFtpCfgValid(Integer isValid,String ids,Integer functionId){
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
entity.setCfgId(Long.parseLong(id));
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
@@ -491,9 +491,9 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
}
|
||||
|
||||
public void updateFileDigestCfgValid(Integer isValid,String ids,Integer functionId){
|
||||
FileDigestCfg entity = new FileDigestCfg();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
FileDigestCfg entity = new FileDigestCfg();
|
||||
entity.setCfgId(Long.parseLong(id));
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
@@ -794,9 +794,9 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
}
|
||||
|
||||
public void updateP2pCfgValid(Integer isValid, String ids, Integer functionId) {
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
entity.setCfgId(Long.parseLong(id));
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
@@ -939,22 +939,27 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
maatCfg.setAreaIpRegionList(areaIpRegionList);
|
||||
maatCfg.setIsValid(entity.getIsValid());
|
||||
|
||||
//设置自定义域参数
|
||||
|
||||
String userRegion = "";
|
||||
for (IpPortCfg ipPortCfg : entity.getIpPortList()) {
|
||||
if(!ipPortCfg.getUserRegion1().equals("")) {
|
||||
userRegion += Constants.P2P_IP_TYPE_USER_REGION_KEY+"="+ipPortCfg.getUserRegion1();
|
||||
}
|
||||
for (BaseStringCfg p2pHashCfg : entity.getP2pHashList()) {
|
||||
if(!p2pHashCfg.getUserRegion1().equals("")) {
|
||||
userRegion += Constants.USER_REGION_SPLIT+Constants.P2P_HASH_TYPE_USER_REGION_KEY+"="+p2pHashCfg.getUserRegion1();
|
||||
}else {
|
||||
userRegion += Constants.USER_REGION_SPLIT+Constants.P2P_HASH_TYPE_USER_REGION_KEY+"=";
|
||||
}
|
||||
//存在IP域
|
||||
if(entity != null && entity.getIpPortList() != null && entity.getIpPortList().size() >0){
|
||||
IpPortCfg ipport=entity.getIpPortList().get(0);
|
||||
ipport.setUserRegion1(StringUtil.isEmpty(ipport.getUserRegion1()) ? "":ipport.getUserRegion1());
|
||||
userRegion += Constants.P2P_IP_TYPE_USER_REGION_KEY+"="+ipport.getUserRegion1();
|
||||
}
|
||||
//存在hash域
|
||||
if(entity != null && entity.getP2pHashList() != null && entity.getP2pHashList().size() >0){
|
||||
BaseStringCfg hashCfg=entity.getP2pHashList().get(0);
|
||||
hashCfg.setUserRegion1(StringUtil.isEmpty(hashCfg.getUserRegion1()) ? "":hashCfg.getUserRegion1());
|
||||
if(!StringUtil.isEmpty(userRegion)){
|
||||
userRegion =userRegion+Constants.USER_REGION_SPLIT+Constants.P2P_HASH_TYPE_USER_REGION_KEY+"="+hashCfg.getUserRegion1();
|
||||
}else{
|
||||
userRegion += Constants.P2P_HASH_TYPE_USER_REGION_KEY+"="+hashCfg.getUserRegion1();
|
||||
}
|
||||
}
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
|
||||
if(!StringUtil.isEmpty(userRegion)){
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
}
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
|
||||
Reference in New Issue
Block a user