Merge branch 'develop_no_common_group' of https://git.mesalab.cn/K18_NTCS_WEB/NTC.git into develop_no_common_group
This commit is contained in:
@@ -314,7 +314,7 @@ public class AppCfgController extends BaseController {
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
Page<AppPolicyCfg> searchPage = new Page<AppPolicyCfg>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -492,8 +492,26 @@ public class AppCfgController extends BaseController {
|
||||
*/
|
||||
@RequestMapping(value = { "updateAppIpCfgValid" })
|
||||
@RequiresPermissions(value = { "app:ip:config" })
|
||||
public String updateAppIpCfgValid(Integer isValid, String ids, Integer functionId) {
|
||||
appCfgService.updateAppIpCfgValid(isValid, ids, functionId);
|
||||
public String updateAppIpCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")AppIpCfg cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
appCfgService.updateAppIpCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<AppIpCfg> searchPage = new Page<AppIpCfg>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath + "/app/ipCfgList?functionId=" + functionId;
|
||||
}
|
||||
|
||||
@@ -803,8 +821,26 @@ public class AppCfgController extends BaseController {
|
||||
*/
|
||||
@RequestMapping(value = { "updateAppDomainCfgValid" })
|
||||
@RequiresPermissions(value = { "app:domain:config" })
|
||||
public String updateAppDomainCfgValid(Integer isValid, String ids, Integer functionId) {
|
||||
appCfgService.updateAppDomainCfgValid(isValid, ids, functionId);
|
||||
public String updateAppDomainCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")AppDomainCfg cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
appCfgService.updateAppDomainCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<AppDomainCfg> searchPage = new Page<AppDomainCfg>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath + "/app/domainCfgList?functionId=" + functionId;
|
||||
}
|
||||
|
||||
@@ -1558,20 +1594,24 @@ public class AppCfgController extends BaseController {
|
||||
*/
|
||||
@RequestMapping(value = { "updateAppTopicDomainCfgValid" })
|
||||
@RequiresPermissions(value = { "app:topic:config" })
|
||||
public String updateAppTopicDomainCfgValid(Integer isValid, String ids, Integer functionId,
|
||||
RedirectAttributes redirectAttributes) {
|
||||
public String updateAppTopicDomainCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")AppTopicDomainCfg cfg) {
|
||||
try {
|
||||
appCfgService.updateAppTopicDomainCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
appCfgService.updateAppTopicDomainCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("app主题网站删除失败", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else if (e instanceof CallExternalProceduresException) {
|
||||
addMessage(redirectAttributes, "error", "call_external_procedures_failed");
|
||||
} else {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,8 +225,26 @@ public class AppFeatureCfgController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = { "updateAppFeatureCfgValid" })
|
||||
public String updateAppFeatureCfgValid(Integer isValid, String ids, Integer functionId) {
|
||||
appMultiFeatureCfgService.updateAppFeatureCfgValid(isValid, ids, functionId);
|
||||
public String updateAppFeatureCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")AppFeatureIndex cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
appMultiFeatureCfgService.updateAppFeatureCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<AppFeatureIndex> searchPage = new Page<AppFeatureIndex>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath + "/app/feature/multiFeatureCfgList?functionId=" + functionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@ public class BasicProtocolController extends BaseController {
|
||||
appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
Page<AppPolicyCfg> searchPage = new Page<AppPolicyCfg>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -279,7 +279,7 @@ public class EncryptedTunnelBehaviorController extends BaseController {
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
Page<AppPolicyCfg> searchPage = new Page<AppPolicyCfg>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -114,9 +114,26 @@ public class DnsIpCfgController extends BaseController {
|
||||
|
||||
@RequestMapping(value = { "/delete" })
|
||||
@RequiresPermissions(value = { "dns:fake:ip:config" })
|
||||
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId,
|
||||
RedirectAttributes redirectAttributes) {
|
||||
dnsIpCfgService.delete(isAudit, isValid, ids, functionId);
|
||||
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")DnsIpCfg cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
dnsIpCfgService.delete(isAudit, isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<DnsIpCfg> searchPage = new Page<DnsIpCfg>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath + "/cfg/dnsIp/list?functionId=" + functionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -103,12 +103,26 @@ public class DnsResStrategyController extends BaseController {
|
||||
|
||||
@RequestMapping(value = { "/delete" })
|
||||
@RequiresPermissions(value = { "dns:res:strategy:config" })
|
||||
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, Model model,
|
||||
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, Model model, @ModelAttribute("cfg")DnsResStrategy cfg,
|
||||
HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
dnsResStrategyService.delete(isAudit, isValid, ids, functionId);
|
||||
}
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
dnsResStrategyService.delete(isAudit, isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<DnsResStrategy> searchPage = new Page<DnsResStrategy>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath + "/maintenance/dnsResStrategy/list?functionId=" + functionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ public class DdosCfgController extends BaseController {
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
Page<DdosIpCfg> searchPage = new Page<DdosIpCfg>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -358,7 +358,7 @@ public class AvController extends BaseController {
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
Page<AvFileSampleCfg> searchPage = new Page<AvFileSampleCfg>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -328,10 +328,25 @@ public class PxyObjKeyringController extends BaseController {
|
||||
|
||||
@RequestMapping(value = { "/delete" })
|
||||
@RequiresPermissions(value = { "proxy:intercept:config" })
|
||||
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, Model model,
|
||||
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, Model model, @ModelAttribute("cfg")PxyObjKeyring cfg,
|
||||
HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
pxyObjKeyringService.delete(isAudit, isValid, ids, functionId);
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
pxyObjKeyringService.delete(isAudit, isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<PxyObjKeyring> searchPage = new Page<PxyObjKeyring>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath + "/proxy/intercept/strateagy/list?functionId=" + functionId;
|
||||
@@ -860,11 +875,25 @@ public class PxyObjKeyringController extends BaseController {
|
||||
@RequestMapping(value = { "/trustedCertDelete" })
|
||||
@RequiresPermissions(value = { "proxy:trustedCert:config" })
|
||||
public String trustedCertDelete(Integer isAudit, Integer isValid, String ids, Integer functionId, Model model,
|
||||
HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
pxyObjKeyringService.trustedCertDelete(isAudit, isValid, ids, functionId);
|
||||
}
|
||||
HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes, @ModelAttribute PxyObjTrustedCaCert cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
pxyObjKeyringService.trustedCertDelete(isAudit, isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<PxyObjKeyring> searchPage = new Page<PxyObjKeyring>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath + "/proxy/intercept/strateagy/trustedCertList?functionId=" + functionId;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user