Esempio n. 1
0
  @RequestMapping(value = "/resend")
  @ResponseBody
  public Map<String, Object> resend(String uuid, String contactId) {
    Map<String, Object> rsMap = new HashMap<String, Object>();
    boolean success = false;
    String message = "";

    SmsSendDto smsSendDto = null;
    try {
      smsSendDto = smsApiService.getSmsByUuid(uuid);
      smsSendDto.setCustomerId(contactId);
    } catch (ServiceException e1) {
    }

    try {
      smsSendService.sendSms(smsSendDto, null);
      success = true;
    } catch (Exception e) {
      e.printStackTrace();
      message = "发送短信提交失败" + e.getMessage();
      logger.error("发送短信提交失败", e);
    }
    rsMap.put("message", message);
    rsMap.put("success", success);

    return rsMap;
  }
Esempio n. 2
0
 /**
  * 查询短信模板列表
  *
  * @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;
 }
Esempio n. 3
0
  /**
   * 查询短信模板内容
   *
   * @param smsTemplateId
   * @return Map<String, Object>
   */
  @RequestMapping(value = "/querySmsContent")
  @ResponseBody
  public Map<String, Object> querySmsContent(Long smsTemplateId) {
    Map<String, Object> rsMap = new HashMap<String, Object>();
    boolean success = false;
    String message = "";
    try {
      SmsTemplate smsTemplate = smsApiService.getSmsTemplateById(smsTemplateId);
      rsMap.put("smsTemplate", smsTemplate);
      success = true;
    } catch (Exception e) {
      e.printStackTrace();
      message = e.getMessage();
      logger.error("查询短信模板失败", e);
    }

    rsMap.put("success", success);
    rsMap.put("message", message);

    return rsMap;
  }