增加APP session Feature
This commit is contained in:
@@ -24,6 +24,7 @@ import com.nis.domain.configuration.AppHttpCfg;
|
||||
import com.nis.domain.configuration.AppIpCfg;
|
||||
import com.nis.domain.configuration.AppPolicyCfg;
|
||||
import com.nis.domain.configuration.AppSslCertCfg;
|
||||
import com.nis.domain.configuration.AppTcpCfg;
|
||||
import com.nis.domain.configuration.AppTopicDomainCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
@@ -759,6 +760,126 @@ public class AppCfgController extends BaseController {
|
||||
appCfgService.updateAppSslCfgValid(isValid,ids,functionId);
|
||||
return "redirect:" + adminPath +"/app/sslCfgList?functionId="+functionId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* APP TCP会话字节数特征 列表
|
||||
* @param model
|
||||
* @param cfg
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"tcpCfgList"})
|
||||
public String tcpCfgList(Model model,@ModelAttribute("cfg")AppTcpCfg cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
Page<AppTcpCfg> searchPage=new Page<AppTcpCfg>(request,response,"r");
|
||||
Page<AppTcpCfg> page = appCfgService.findAppTcpList(searchPage, cfg);
|
||||
for(AppTcpCfg entity:page.getList()){
|
||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
|
||||
entity.setAppName(app.getSpecServiceName());
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model,cfg);
|
||||
return "/cfg/app/appTcpCfgList";
|
||||
}
|
||||
|
||||
/**
|
||||
* APP TCP会话字节数特征表单(新增/修改)
|
||||
* @param model
|
||||
* @param ids
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"tcpCfgForm"})
|
||||
@RequiresPermissions(value={"app:tcp:config"})
|
||||
public String tcpCfgForm(Model model,String ids,AppTcpCfg entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = appCfgService.getAppTcpCfg(Long.parseLong(ids));
|
||||
initUpdateFormCondition(model,entity);
|
||||
}else{
|
||||
initFormCondition(model,entity);
|
||||
}
|
||||
model.addAttribute("_cfg", entity);
|
||||
return "/cfg/app/appTcpCfgForm";
|
||||
}
|
||||
|
||||
/**
|
||||
* APP TCP会话字节数特征配置(新增/修改)提交
|
||||
* @param model
|
||||
* @param request
|
||||
* @param response
|
||||
* @param entity
|
||||
* @param redirectAttributes
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"saveAppTcpCfg"})
|
||||
@RequiresPermissions(value={"app:tcp:config"})
|
||||
public String saveAppTcpCfg(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
AppTcpCfg entity,RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
SpecificServiceCfg specificService = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
|
||||
if(specificService!=null){
|
||||
entity.setAppCode(specificService.getSpecServiceCode());
|
||||
}
|
||||
appCfgService.saveOrUpdateAppTcpeCfg(entity);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/app/tcpCfgList?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
/**
|
||||
* APP TCP会话字节数特征配置删除
|
||||
* @param isValid
|
||||
* @param ids
|
||||
* @param functionId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"updateAppTcpCfgValid"})
|
||||
@RequiresPermissions(value={"app:tcp:config"})
|
||||
public String updateAppTcpCfgValid(Integer isValid,String ids,Integer functionId) {
|
||||
appCfgService.updateAppTcpCfgValid(isValid,ids,functionId);
|
||||
return "redirect:" + adminPath +"/app/tcpCfgList?functionId="+functionId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* APP TCP会话字节数特征配置 审核
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids
|
||||
* @param functionId
|
||||
* @param redirectAttributes
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"auditAppTcpCfg"})
|
||||
@RequiresPermissions(value={"app:tcp:confirm"})
|
||||
public String auditAppTcpCfg(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) {
|
||||
AppTcpCfg entity = new AppTcpCfg();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = appCfgService.getAppTcpCfg(Long.parseLong(id));
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
appCfgService.auditAppTcpCfg(entity,isAudit);
|
||||
} catch (MaatConvertException e) {
|
||||
e.printStackTrace();
|
||||
logger.info("app SSL配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/app/tcpCfgList?functionId="+functionId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* APP header特征配置 列表
|
||||
* @param model
|
||||
|
||||
Reference in New Issue
Block a user