查漏补缺 addMessage() messageType;
This commit is contained in:
@@ -1077,7 +1077,7 @@ public class AppCfgController extends BaseController {
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error","request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1202,7 +1202,7 @@ public class AppCfgController extends BaseController {
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error","request_service_failed");
|
||||
}else {
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1346,7 +1346,7 @@ public class AppCfgController extends BaseController {
|
||||
websiteDomainTopic.setIsValid(Constants.VALID_YES);
|
||||
appCfgService.saveDomainDict(websiteDomainTopic);
|
||||
}else{
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
return "redirect:" + adminPath +"/app/topicDomainCfgList?functionId="+entity.getFunctionId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ public class AvController extends BaseController {
|
||||
||Constants.SPEAKER_FILE_TYPE.contains(FileUtils.getSuffix(uploadSrcFile.getName(),false))
|
||||
){
|
||||
if(!validateAvDuration(uploadSrcFile)){
|
||||
addMessage(redirectAttributes,"exceeds_duration_limit");
|
||||
addMessage(redirectAttributes,"error","exceeds_duration_limit");
|
||||
logger.error("The duration of uploaded files exceeds the limit("+Constants.AV_DURATION_LIMIT+"s).");
|
||||
throw new MultiPartNewException(this.getMsgProp().getProperty("exceeds_duration_limit"));
|
||||
}
|
||||
@@ -319,7 +319,7 @@ public class AvController extends BaseController {
|
||||
@RequestMapping(value = {"/sample/updateAvFileSampleValid"})
|
||||
public String updateAvFileSampleValid(Integer isAudit,Integer isValid,String ids,Integer functionId,RedirectAttributes redirectAttributes){
|
||||
avCfgService.updateAvFileSampleValid(isAudit,isValid,ids);
|
||||
addMessage(redirectAttributes,"delete_success");
|
||||
addMessage(redirectAttributes,"success","delete_success");
|
||||
return "redirect:" + adminPath +"/ntc/av/sample/fileSampleList?functionId="+functionId;
|
||||
}
|
||||
//修改文件样例配置审核状态
|
||||
|
||||
@@ -146,7 +146,7 @@ public class FileTransferCfgController extends BaseController{
|
||||
public String updateFtpCfgValid(Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
fileTransferCfgService.updateFtpCfgValid(isValid,ids,functionId);
|
||||
addMessage(redirectAttributes,"delete_success");
|
||||
addMessage(redirectAttributes,"success","delete_success");
|
||||
} catch (Exception e) {
|
||||
if(e instanceof MaatConvertException) {
|
||||
e.printStackTrace();
|
||||
@@ -460,15 +460,42 @@ public class FileTransferCfgController extends BaseController{
|
||||
|
||||
@RequestMapping(value = {"saveP2pCfg"})
|
||||
@RequiresPermissions(value={"fileTransfer:p2p:config"})
|
||||
public String saveP2pCfg(Model model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) {
|
||||
fileTransferCfgService.saveP2pCfg(entity);
|
||||
public String saveP2pCfg(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
String ids,CfgIndexInfo entity,RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
fileTransferCfgService.saveP2pCfg(entity);
|
||||
addMessage(redirectAttributes,"success","save_success");
|
||||
} catch (Exception e) {
|
||||
if(e instanceof MaatConvertException) {
|
||||
e.printStackTrace();
|
||||
logger.error("P2P信息保存失败",e);
|
||||
addMessage(redirectAttributes,"error","request_service_failed");
|
||||
}else {
|
||||
e.printStackTrace();
|
||||
logger.error("P2P信息保存失败",e);
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/fileTransfer/p2pList?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"updateP2pCfgValid"})
|
||||
@RequiresPermissions(value={"fileTransfer:p2p:config"})
|
||||
public String updateP2pCfgValid(Integer isValid,String ids,Integer functionId) {
|
||||
fileTransferCfgService.updateP2pCfgValid(isValid,ids,functionId);
|
||||
public String updateP2pCfgValid(Integer isValid,String ids,Integer functionId,RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
fileTransferCfgService.updateP2pCfgValid(isValid,ids,functionId);
|
||||
addMessage(redirectAttributes,"success","delete_success");
|
||||
} catch (Exception e) {
|
||||
if(e instanceof MaatConvertException) {
|
||||
e.printStackTrace();
|
||||
logger.info("P2P配置删除失败:"+e.getMessage());;
|
||||
addMessage(redirectAttributes,"error","request_service_failed");
|
||||
}else {
|
||||
e.printStackTrace();
|
||||
logger.error("P2P配置删除失败",e);
|
||||
addMessage(redirectAttributes,"error","delete_failed");
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/fileTransfer/p2pList?functionId="+functionId;
|
||||
}
|
||||
|
||||
@@ -540,6 +567,7 @@ public class FileTransferCfgController extends BaseController{
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
fileTransferCfgService.auditP2pCfg(entity,isAudit);
|
||||
addMessage(redirectAttributes,"success","audit_success");
|
||||
} catch ( Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("p2p配置下发失败:"+e.getMessage());
|
||||
|
||||
@@ -531,7 +531,7 @@ public class PxyObjKeyringController extends BaseController {
|
||||
try {
|
||||
boolean certFileflag=validCertFileContent(certFileI,"-incert");
|
||||
if(!certFileflag){
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
logger.error(certFileI.getOriginalFilename()+" file non Certificate file format ");
|
||||
throw new MultiPartNewException(this.getMsgProp().getProperty("certificate_file_error"));
|
||||
}
|
||||
@@ -618,7 +618,7 @@ public class PxyObjKeyringController extends BaseController {
|
||||
if( crlFileI != null){
|
||||
boolean certFileflag=validCertFileContent(crlFileI,"-incrl");
|
||||
if(!certFileflag){
|
||||
addMessage(redirectAttributes,"save_failed");
|
||||
addMessage(redirectAttributes,"error","save_failed");
|
||||
logger.error(crlFileI.getOriginalFilename()+" file non crl file format ");
|
||||
throw new MultiPartNewException(this.getMsgProp().getProperty("crl_file_error"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user