调整app ip的协议位置
addMessage方法增加messageType,用于界面提示框颜色显示 统一部分错误提示信息增加messageType
This commit is contained in:
@@ -126,10 +126,10 @@ public class CommonController extends BaseController {
|
||||
cfg.setEditTime(new Date());
|
||||
ipCfgService.updateIpCfg(cfg);
|
||||
}
|
||||
addMessage(model,"save_success");
|
||||
addMessage(model,"success","save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("保存失败",e);
|
||||
addMessage(model,"save_failed");
|
||||
addMessage(model,"error","save_failed");
|
||||
}
|
||||
}
|
||||
public void _saveOrUpdateDomain(String cfgName,RedirectAttributes model, HttpUrlCfg cfg) {
|
||||
@@ -149,30 +149,30 @@ public class CommonController extends BaseController {
|
||||
cfg.setEditTime(new Date());
|
||||
domainService.updateStringCfg(cfg);
|
||||
}
|
||||
addMessage(model,"save_success");
|
||||
addMessage(model,"success","save_success");
|
||||
}catch(Exception e){
|
||||
logger.error("保存失败",e);
|
||||
addMessage(model,"save_failed");
|
||||
addMessage(model,"error","save_failed");
|
||||
}
|
||||
}
|
||||
public void _deleteIp(String cfgName,String ids,String compileIds,Integer functionId,RedirectAttributes model) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
try{
|
||||
ipCfgService.deleteIp(ids,compileIds,functionId.intValue());
|
||||
addMessage(model,"delete_success");
|
||||
addMessage(model,"success","delete_success");
|
||||
}catch(Exception e){
|
||||
logger.error("删除失败", e);
|
||||
addMessage(model,"delete_failed");
|
||||
addMessage(model,"error","delete_failed");
|
||||
}
|
||||
}
|
||||
public void _deleteDomain(String cfgName,String ids,String compileIds,Integer functionId,RedirectAttributes model) {
|
||||
model.addAttribute("cfgName", cfgName);
|
||||
try{
|
||||
domainService.deleteDomain(ids,compileIds,functionId.intValue());
|
||||
addMessage(model,"delete_success");
|
||||
addMessage(model,"success","delete_success");
|
||||
}catch(Exception e){
|
||||
logger.error("删除失败", e);
|
||||
addMessage(model,"delete_failed");
|
||||
addMessage(model,"error","delete_failed");
|
||||
}
|
||||
}
|
||||
public void _auditIp(String cfgName,String ids,IpPortCfg cfg,RedirectAttributes redirectAttributes) {
|
||||
@@ -191,13 +191,13 @@ public class CommonController extends BaseController {
|
||||
bean.setIsValid(cfg.getIsValid());
|
||||
ipCfgService.audit(bean);
|
||||
}
|
||||
addMessage(redirectAttributes,"audit_success");
|
||||
addMessage(redirectAttributes,"success","audit_success");
|
||||
}catch(MaatConvertException e){
|
||||
logger.error("审核失败", e);
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
addMessage(redirectAttributes,"error","request_service_failed");
|
||||
}catch(Exception e){
|
||||
logger.error("审核失败", e);
|
||||
addMessage(redirectAttributes, "audit_failed");
|
||||
addMessage(redirectAttributes,"error","audit_failed");
|
||||
}
|
||||
}
|
||||
public void _auditDomain(String ids,HttpUrlCfg cfg,RedirectAttributes redirectAttributes) {
|
||||
@@ -217,13 +217,13 @@ public class CommonController extends BaseController {
|
||||
domain.setIsValid(cfg.getIsValid());
|
||||
domainService.auditDomain(domain);
|
||||
}
|
||||
addMessage(redirectAttributes,"audit_success");
|
||||
addMessage(redirectAttributes,"success","audit_success");
|
||||
}catch(MaatConvertException e){
|
||||
logger.error("审核失败", e);
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
addMessage(redirectAttributes,"error", e.getMessage());
|
||||
}catch(Exception e){
|
||||
logger.error("审核失败", e);
|
||||
addMessage(redirectAttributes, "audit_failed");
|
||||
addMessage(redirectAttributes,"error", "audit_failed");
|
||||
}
|
||||
}
|
||||
/*public void _importIp(RedirectAttributes redirectAttributes,MultipartFile file,IpPortCfg ipCfg) {
|
||||
@@ -328,7 +328,7 @@ public class CommonController extends BaseController {
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, "导出失败!失败信息:"+e.getMessage());
|
||||
addMessage(redirectAttributes,"error", "导出失败!失败信息:"+e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user