增加高级功能菜单下的配置审核不通过、删除功能.
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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user