voip 新增功能
voip新增界面优化
This commit is contained in:
@@ -18,7 +18,6 @@ import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.AvVoipAccountCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.AvVoipIpCfg;
|
||||
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -34,23 +33,39 @@ public class AvContentController extends BaseController {
|
||||
|
||||
//音视频VOIP配置新增界面
|
||||
@RequestMapping(value = {"/voipForm"})
|
||||
public String voipFrom(Model model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity){
|
||||
public String voipFrom(Model model,HttpServletRequest request,HttpServletResponse response,String ids,@ModelAttribute("cfg")CfgIndexInfo cfg){
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
entity.setCfgId(Long.parseLong(ids));
|
||||
entity = avContentCfgService.getCfgIndexInfo(entity);
|
||||
cfg.setCompileId(Integer.parseInt(ids));
|
||||
cfg = avContentCfgService.getCfgIndexInfo(cfg);
|
||||
}else{
|
||||
List<AvVoipAccountCfg> avVoipAccountCfgs=new ArrayList<AvVoipAccountCfg>();
|
||||
avVoipAccountCfgs.add(new AvVoipAccountCfg());
|
||||
entity.setVoipAccounts(avVoipAccountCfgs);
|
||||
cfg.setVoipAccounts(avVoipAccountCfgs);
|
||||
List<AvVoipIpCfg> avVoipIpCfgs=new ArrayList<AvVoipIpCfg>();
|
||||
avVoipIpCfgs.add(new AvVoipIpCfg());
|
||||
entity.setVoipIps(avVoipIpCfgs);
|
||||
cfg.setVoipIps(avVoipIpCfgs);
|
||||
}
|
||||
|
||||
initFormCondition(model,entity);
|
||||
model.addAttribute("_cfg", entity);
|
||||
initFormCondition(model,cfg);
|
||||
model.addAttribute("_cfg", cfg);
|
||||
return "/cfg/av/voip/voipForm";
|
||||
}
|
||||
|
||||
|
||||
//保存voip信息
|
||||
@RequestMapping(value = {"/saveVoip"})
|
||||
public String saveVoip(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")CfgIndexInfo cfg){
|
||||
try{
|
||||
avContentCfgService.saveOrUpdateAvVoip(cfg);
|
||||
}catch(Exception e){
|
||||
logger.error("voip信息保存失败",e);
|
||||
e.printStackTrace();
|
||||
addMessage(model,"save_voip_failed");
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/ntc/av/voipList?functionId="+cfg.getFunctionId();
|
||||
}
|
||||
|
||||
//视频文本VOIP配置列表
|
||||
@RequestMapping(value = {"/voipList"})
|
||||
public String voipCfgList(@ModelAttribute("cfg")CfgIndexInfo entity,Model model,HttpServletRequest request,HttpServletResponse response){
|
||||
|
||||
Reference in New Issue
Block a user