增加高级功能菜单下的配置审核不通过、删除功能.
This commit is contained in:
@@ -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