/**
  * 查询短信模板列表
  *
  * @param dataGridModel
  * @return Map<String, Object>
  */
 @RequestMapping(value = "/queryTemplateList")
 @ResponseBody
 public Map<String, Object> queryTemplateList(DataGridModel dataGridModel) {
   AgentUser user = SecurityHelper.getLoginUser();
   Map<String, Object> rsMap = new HashMap<String, Object>();
   try {
     rsMap = smsApiService.findSmsTemplatePageList(user.getDepartment(), "", dataGridModel);
   } catch (Exception e) {
     e.printStackTrace();
     logger.error("查询短信模板列表失败", e);
   }
   return rsMap;
 }
  /**
   * 短信页面初始化
   *
   * @param contactId
   * @param leadId
   * @return ModelAndView
   */
  @RequestMapping(value = "/index")
  public ModelAndView index(String contactId, String leadId) {
    ModelAndView mav = new ModelAndView("sms/sms");

    AgentUser user = SecurityHelper.getLoginUser();
    // 主管权限
    boolean isManager = user.hasRole("COMPLAIN_MANAGER");
    boolean isKFWL = false;

    mav.addObject("isManager", isManager);
    mav.addObject("isKFWL", isKFWL);
    mav.addObject("contactId", contactId);
    mav.addObject("leadId", leadId);
    return mav;
  }