修改批量操作时配置中compileId影响操作的bug

This commit is contained in:
zhanghongqing
2018-11-29 18:25:49 +08:00
parent 9c52d77954
commit 4f1bfc33f1
12 changed files with 31 additions and 31 deletions

View File

@@ -172,7 +172,7 @@ public class AppCfgController extends BaseController {
@RequiresPermissions(value={"app:policy:config"})
public String policyCfgForm(Model model,String ids,AppPolicyCfg entity) {
if(StringUtils.isNotBlank(ids)){
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids),entity.getCompileId());
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids),null);
initUpdateFormCondition(model,entity);
}else{
initFormCondition(model,entity);
@@ -227,7 +227,7 @@ public class AppCfgController extends BaseController {
AppPolicyCfg entity = new AppPolicyCfg();
String[] idArray = ids.split(",");
for(String id :idArray){
entity = appCfgService.getAppPolicyCfg(Long.parseLong(id),entity.getCompileId());
entity = appCfgService.getAppPolicyCfg(Long.parseLong(id),null);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());

View File

@@ -108,7 +108,7 @@ public class BasicProtocolController extends BaseController {
@RequiresPermissions(value={"basicprotocol:config"})
public String policyCfgForm(Model model,String ids,AppPolicyCfg entity) {
if(StringUtils.isNotBlank(ids)){
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids),entity.getCompileId());
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids),null);
initUpdateFormCondition(model,entity);
}else{
initFormCondition(model,entity);
@@ -166,7 +166,7 @@ public class BasicProtocolController extends BaseController {
AppPolicyCfg entity = new AppPolicyCfg();
String[] idArray = ids.split(",");
for(String id :idArray){
entity = appCfgService.getAppPolicyCfg(Long.parseLong(id),entity.getCompileId());
entity = appCfgService.getAppPolicyCfg(Long.parseLong(id),null);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());

View File

@@ -130,7 +130,7 @@ public class EncryptedTunnelBehaviorController extends BaseController {
@RequiresPermissions(value={"encryptedtunnelbehav:config"})
public String policyCfgForm(Model model,String ids,AppPolicyCfg entity) {
if(StringUtils.isNotBlank(ids)){
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids),entity.getCompileId());
entity = appCfgService.getAppPolicyCfg(Long.parseLong(ids),null);
initUpdateFormCondition(model,entity);
}else{
initFormCondition(model,entity);
@@ -187,7 +187,7 @@ public class EncryptedTunnelBehaviorController extends BaseController {
AppPolicyCfg entity = new AppPolicyCfg();
String[] idArray = ids.split(",");
for(String id :idArray){
entity = appCfgService.getAppPolicyCfg(Long.parseLong(id),entity.getCompileId());
entity = appCfgService.getAppPolicyCfg(Long.parseLong(id),null);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());

View File

@@ -50,7 +50,7 @@ public class DdosCfgController extends BaseController {
@RequiresPermissions(value={"ddos:ip:config"})
public String form(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")DdosIpCfg cfg){
if(!StringUtil.isEmpty(ids)){
cfg = ddosCfgService.getDdosIpCfg(Long.parseLong(ids),cfg.getCompileId());
cfg = ddosCfgService.getDdosIpCfg(Long.parseLong(ids),null);
initUpdateFormCondition(model, cfg);
}else{
initFormCondition(model,cfg);

View File

@@ -145,7 +145,7 @@ public class AvController extends BaseController {
@RequestMapping(value = {"/sample/fileSampleForm"})
public String fileSampleForm(Model model,HttpServletRequest request,HttpServletResponse response,String ids,AvFileSampleCfg entity){
if(!StringUtil.isEmpty(ids)){
entity = avCfgService.getAvFileSampleById(Long.parseLong(ids),entity.getCompileId());
entity = avCfgService.getAvFileSampleById(Long.parseLong(ids),null);
}
initFormCondition(model,entity);

View File

@@ -55,7 +55,7 @@ public class BgpCfgController extends BaseController{
@RequiresPermissions(value={"other:bgp:config"})
public String bgpForm(Model model,String ids,CfgIndexInfo entity,RedirectAttributes redirectAttributes) {
if(StringUtils.isNotBlank(ids)){
entity = bgpCfgService.getBgpCfg(Long.parseLong(ids),entity.getCompileId());
entity = bgpCfgService.getBgpCfg(Long.parseLong(ids),null);
initUpdateFormCondition(model,entity);
}else{
initFormCondition(model,entity);
@@ -134,7 +134,7 @@ public class BgpCfgController extends BaseController{
CfgIndexInfo entity = new CfgIndexInfo();
String[] idArray = ids.split(",");
for(String id :idArray){
entity = bgpCfgService.getBgpCfg(Long.parseLong(id),entity.getCompileId());
entity = bgpCfgService.getBgpCfg(Long.parseLong(id),null);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());

View File

@@ -66,7 +66,7 @@ public class FileTransferCfgController extends BaseController{
@RequiresPermissions(value={"fileTransfer:ftp:config"})
public String ftpForm(Model model,String compileIds,String ids,CfgIndexInfo entity) {
if(StringUtils.isNotBlank(ids)){
entity = fileTransferCfgService.getFtpCfg(Long.parseLong(ids),entity.getCompileId());
entity = fileTransferCfgService.getFtpCfg(Long.parseLong(ids),null);
initUpdateFormCondition(model,entity);
}else{
initFormCondition(model,entity);
@@ -163,7 +163,7 @@ public class FileTransferCfgController extends BaseController{
CfgIndexInfo entity = new CfgIndexInfo();
String[] idArray = ids.split(",");
for(String id :idArray){
entity = fileTransferCfgService.getFtpCfg(Long.parseLong(id),entity.getCompileId());
entity = fileTransferCfgService.getFtpCfg(Long.parseLong(id),null);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());
@@ -203,7 +203,7 @@ public class FileTransferCfgController extends BaseController{
@RequiresPermissions(value={"fileTransfer:fileDigest:config"})
public String fileDigestForm(Model model,String ids,FileDigestCfg entity,RedirectAttributes redirectAttributes) {
if(StringUtils.isNotBlank(ids)){
entity = fileTransferCfgService.getFileDigestCfg(Long.parseLong(ids),entity.getCompileId());
entity = fileTransferCfgService.getFileDigestCfg(Long.parseLong(ids),null);
initUpdateFormCondition(model,entity);
}else{
initFormCondition(model,entity);
@@ -335,7 +335,7 @@ public class FileTransferCfgController extends BaseController{
public String p2pForm(Model model,String ids,CfgIndexInfo entity) {
// 跳转操作页面根据ids判断是新增 or 修改)
if(StringUtils.isNotBlank(ids)){
entity = fileTransferCfgService.getP2pCfg(Long.parseLong(ids),entity.getCompileId());
entity = fileTransferCfgService.getP2pCfg(Long.parseLong(ids),null);
// 添加配置域Key,用于修改页面区分各域配置
P2pHashCfg hashCfg = new P2pHashCfg();
@@ -454,7 +454,7 @@ public class FileTransferCfgController extends BaseController{
CfgIndexInfo entity = new CfgIndexInfo();
String[] idArray = ids.split(",");
for(String id :idArray){
entity = fileTransferCfgService.getP2pCfg(Long.parseLong(id),entity.getCompileId());
entity = fileTransferCfgService.getP2pCfg(Long.parseLong(id),null);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());

View File

@@ -73,7 +73,7 @@ public class IpController extends BaseController{
@RequiresPermissions(value={"iplist:config"})
public String form(Model model,String ids,CfgIndexInfo entity) {
if(StringUtils.isNotBlank(ids)){
entity = ipCfgService.getIpPortCfg(Long.parseLong(ids),entity.getCompileId());
entity = ipCfgService.getIpPortCfg(Long.parseLong(ids),null);
initUpdateFormCondition(model,entity);
}else{
initFormCondition(model,entity);
@@ -133,7 +133,7 @@ public class IpController extends BaseController{
CfgIndexInfo entity = new CfgIndexInfo();
String[] idArray = ids.split(",");
for(String id :idArray){
entity = ipCfgService.getIpPortCfg(Long.parseLong(id),entity.getCompileId());
entity = ipCfgService.getIpPortCfg(Long.parseLong(id),null);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());

View File

@@ -61,7 +61,7 @@ public class MailCfgController extends BaseController{
@RequiresPermissions(value={"mail:config"})
public String mailForm(Model model,String ids,CfgIndexInfo entity) {
if(StringUtils.isNotBlank(ids)){
entity = mailCfgService.getMailCfg(Long.parseLong(ids),entity.getCompileId());
entity = mailCfgService.getMailCfg(Long.parseLong(ids),null);
initUpdateFormCondition(model,entity);
}else{
initFormCondition(model,entity);
@@ -168,7 +168,7 @@ public class MailCfgController extends BaseController{
CfgIndexInfo entity = new CfgIndexInfo();
String[] idArray = ids.split(",");
for(String id :idArray){
entity = mailCfgService.getMailCfg(Long.parseLong(id),entity.getCompileId());
entity = mailCfgService.getMailCfg(Long.parseLong(id),null);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());

View File

@@ -80,7 +80,7 @@ public class WebsiteController extends BaseController{
@RequiresPermissions(value={"website:http:config"})
public String httpForm(Model model,String ids,CfgIndexInfo entity) {
if(StringUtils.isNotBlank(ids)){
entity = websiteCfgService.getHttpCfg(Long.parseLong(ids),entity.getCompileId());
entity = websiteCfgService.getHttpCfg(Long.parseLong(ids),null);
//设置http各类配置的配置域类型
IpPortCfg ipCfg = new IpPortCfg();
@@ -212,7 +212,7 @@ public class WebsiteController extends BaseController{
CfgIndexInfo entity = new CfgIndexInfo();
String[] idArray = ids.split(",");
for(String id :idArray){
entity = websiteCfgService.getHttpCfg(Long.parseLong(id),entity.getCompileId());
entity = websiteCfgService.getHttpCfg(Long.parseLong(id),null);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());
@@ -243,7 +243,7 @@ public class WebsiteController extends BaseController{
@RequiresPermissions(value={"website:ssl:config"})
public String sslForm(Model model,String ids,CfgIndexInfo entity) {
if(StringUtils.isNotBlank(ids)){
entity = websiteCfgService.getSslCfg(Long.parseLong(ids),entity.getCompileId());
entity = websiteCfgService.getSslCfg(Long.parseLong(ids),null);
initUpdateFormCondition(model,entity);
}else{
initFormCondition(model,entity);
@@ -307,7 +307,7 @@ public class WebsiteController extends BaseController{
CfgIndexInfo entity = new CfgIndexInfo();
String[] idArray = ids.split(",");
for(String id :idArray){
entity = websiteCfgService.getSslCfg(Long.parseLong(id),entity.getCompileId());
entity = websiteCfgService.getSslCfg(Long.parseLong(id),null);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());
@@ -335,7 +335,7 @@ public class WebsiteController extends BaseController{
@RequiresPermissions(value={"website:dns:config"})
public String dnsForm(Model model,String ids,CfgIndexInfo entity) {
if(StringUtils.isNotBlank(ids)){
entity = websiteCfgService.getDnsCfg(Long.parseLong(ids),entity.getCompileId());
entity = websiteCfgService.getDnsCfg(Long.parseLong(ids),null);
initUpdateFormCondition(model,entity);
}else{
initFormCondition(model,entity);
@@ -400,7 +400,7 @@ public class WebsiteController extends BaseController{
CfgIndexInfo entity = new CfgIndexInfo();
String[] idArray = ids.split(",");
for(String id :idArray){
entity = websiteCfgService.getDnsCfg(Long.parseLong(id),entity.getCompileId());
entity = websiteCfgService.getDnsCfg(Long.parseLong(id),null);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());

View File

@@ -81,7 +81,7 @@ public class WhiteListController extends CommonController{
public String ipForm(Model model,String ids,CfgIndexInfo entity) {
if(StringUtils.isNotBlank(ids)){
entity = this.ipCfgService.getIpPortCfg(Long.parseLong(ids),entity.getCompileId());
entity = this.ipCfgService.getIpPortCfg(Long.parseLong(ids),null);
initUpdateFormCondition(model,entity);
}else{
initFormCondition(model,entity);
@@ -100,7 +100,7 @@ public class WhiteListController extends CommonController{
CfgIndexInfo entity = new CfgIndexInfo();
String[] idArray = ids.split(",");
for(String id :idArray){
entity = ipCfgService.getIpPortCfg(Long.parseLong(id),entity.getCompileId());
entity = ipCfgService.getIpPortCfg(Long.parseLong(id),null);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());
@@ -157,7 +157,7 @@ public class WhiteListController extends CommonController{
@RequiresPermissions(value={"whitelist:domain:config"})
public String domainForm(Model model,String ids,CfgIndexInfo entity) {
if(StringUtils.isNotBlank(ids)){
entity = domainService.getDomainCfg(Long.parseLong(ids),entity.getCompileId());
entity = domainService.getDomainCfg(Long.parseLong(ids),null);
HttpUrlCfg urlCfg = new HttpUrlCfg();
urlCfg.setCfgType(Constants.HTTP_URL_REGION);
entity.setHttpUrl(urlCfg);
@@ -234,7 +234,7 @@ public class WhiteListController extends CommonController{
CfgIndexInfo entity = new CfgIndexInfo();
String[] idArray = ids.split(",");
for(String id :idArray){
entity = domainService.getDomainCfg(Long.parseLong(id),entity.getCompileId());
entity = domainService.getDomainCfg(Long.parseLong(id),null);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());

View File

@@ -70,7 +70,7 @@ public class HttpRedirectPolicyController extends BaseController{
,logical=Logical.OR)
public String form(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")CfgIndexInfo entity){
if(StringUtils.isNotBlank(ids)){
entity = httpRedirectCfgService.getHttpCfg(Long.parseLong(ids),entity.getCompileId());
entity = httpRedirectCfgService.getHttpCfg(Long.parseLong(ids),null);
HttpUrlCfg urlCfg = new HttpUrlCfg();
urlCfg.setCfgType(Constants.HTTP_REDIRECT_URL_REGION);
@@ -227,7 +227,7 @@ public class HttpRedirectPolicyController extends BaseController{
CfgIndexInfo entity = new CfgIndexInfo();
String[] idArray = ids.split(",");
for(String id :idArray){
entity = httpRedirectCfgService.getHttpCfg(Long.parseLong(id),entity.getCompileId());
entity = httpRedirectCfgService.getHttpCfg(Long.parseLong(id),null);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());