/**
  * 编码器录制服务器关系列表页面跳转
  *
  * @return
  */
 @RequestMapping(params = "addorupdate")
 public ModelAndView addorupdate(
     ConfCodecRecordSrvEntity confCodecRecordSrv, HttpServletRequest req) {
   if (StringUtil.isNotEmpty(confCodecRecordSrv.getId())) {
     confCodecRecordSrv =
         confCodecRecordSrvService.getEntity(
             ConfCodecRecordSrvEntity.class, confCodecRecordSrv.getId());
     req.setAttribute("confCodecRecordSrvPage", confCodecRecordSrv);
   }
   return new ModelAndView("vod/confcodecrecordsrv/confCodecRecordSrv");
 }
  /**
   * 删除编码器录制服务器关系
   *
   * @return
   */
  @RequestMapping(params = "del")
  @ResponseBody
  public AjaxJson del(ConfCodecRecordSrvEntity confCodecRecordSrv, HttpServletRequest request) {
    AjaxJson j = new AjaxJson();
    confCodecRecordSrv =
        systemService.getEntity(ConfCodecRecordSrvEntity.class, confCodecRecordSrv.getId());
    message = "编码器录制服务器关系删除成功";
    confCodecRecordSrvService.delete(confCodecRecordSrv);
    systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);

    j.setMsg(message);
    return j;
  }
 /**
  * 添加编码器录制服务器关系
  *
  * @param ids
  * @return
  */
 @RequestMapping(params = "save")
 @ResponseBody
 public AjaxJson save(ConfCodecRecordSrvEntity confCodecRecordSrv, HttpServletRequest request) {
   AjaxJson j = new AjaxJson();
   if (StringUtil.isNotEmpty(confCodecRecordSrv.getId())) {
     message = "编码器录制服务器关系更新成功";
     ConfCodecRecordSrvEntity t =
         confCodecRecordSrvService.get(ConfCodecRecordSrvEntity.class, confCodecRecordSrv.getId());
     try {
       MyBeanUtils.copyBeanNotNull2Bean(confCodecRecordSrv, t);
       confCodecRecordSrvService.saveOrUpdate(t);
       systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
     } catch (Exception e) {
       e.printStackTrace();
       message = "编码器录制服务器关系更新失败";
     }
   } else {
     message = "编码器录制服务器关系添加成功";
     confCodecRecordSrvService.save(confCodecRecordSrv);
     systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
   }
   j.setMsg(message);
   return j;
 }