/**
  * 添加终端信息
  *
  * @param ids
  * @return
  */
 @RequestMapping(params = "save")
 @ResponseBody
 public AjaxJson save(TerminalInfoEntity terminalInfo, HttpServletRequest request) {
   AjaxJson j = new AjaxJson();
   if (StringUtil.isNotEmpty(terminalInfo.getId())) {
     message = "终端信息更新成功";
     TerminalInfoEntity t =
         terminalInfoService.get(TerminalInfoEntity.class, terminalInfo.getId());
     try {
       MyBeanUtils.copyBeanNotNull2Bean(terminalInfo, t);
       terminalInfoService.saveOrUpdate(t);
       systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
     } catch (Exception e) {
       e.printStackTrace();
       message = "终端信息更新失败";
     }
   } else {
     message = "终端信息添加成功";
     terminalInfo.setStatus(Integer.valueOf(SystemType.TERMINAL_STATE_0));
     terminalInfoService.save(terminalInfo);
     systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
   }
   j.setMsg(message);
   return j;
 }