Beispiel #1
0
  public void editOrderSMS(OrderBean orderBean) {
    SMSChannel smsChannel = getSmsChannel(orderBean);
    // 亲爱的,您从<皇包车天猫店>预订的<接机/送机/包车/次租>服务(订单号<J1506247268>)已取消成功,退款办理中,登陆APP查看退款进度及详情
    SmsParam smsMessageVo = new SmsParam();

    smsMessageVo.setSys_name(smsTrade);
    smsMessageVo.setArea_code(orderBean.getUserAreaCode1());
    smsMessageVo.setMobile(orderBean.getUserMobile1());

    OrderType orderType = OrderType.getType(orderBean.getOrderType());

    if (SMSChannel.APP.equals(smsChannel)) {

    } else if (SMSChannel.fenxiao.equals(smsChannel)) {
      smsMessageVo.setTemplate_id(SmsTemplate.EDIT_ORDER_FENXIAO.getTemplateId());
      smsMessageVo.setParams(
          new String[] {orderBean.getAgentName(), orderType.name, orderBean.getOrderNo()});
      noticeSmsCenter(orderBean, smsMessageVo, AlarmType.editOrderSMS);
    } else if (SMSChannel.zhixiao.equals(smsChannel)) {
      smsMessageVo.setTemplate_id(SmsTemplate.EDIT_ORDER_ZHIXIAO.getTemplateId());
      smsMessageVo.setParams(
          new String[] {orderBean.getAgentName(), orderType.name, orderBean.getOrderNo()});
      noticeSmsCenter(orderBean, smsMessageVo, AlarmType.editOrderSMS);
    } else {
      log.error(
          orderBean.getOrderNo()
              + " 既不属于 分销 也不属于直销 或者app,检查["
              + orderBean.getAgentId()
              + "] ["
              + orderBean.getOrderChannel()
              + "]");
    }
  }
Beispiel #2
0
  /**
   * 支付成功
   *
   * @param orderBean
   */
  public boolean paySuccessSms(OrderBean orderBean) {
    SMSChannel smsChannel = this.getSmsChannel(orderBean);
    SmsParam smsMessageVo = new SmsParam();

    smsMessageVo.setSys_name(smsTrade);
    smsMessageVo.setArea_code(orderBean.getUserAreaCode1());
    smsMessageVo.setMobile(orderBean.getUserMobile1());
    OrderType orderType = OrderType.getType(orderBean.getOrderType());

    if (SMSChannel.APP.equals(smsChannel)) {
      smsMessageVo.setTemplate_id(SmsTemplate.PAYSUCCESS_APP.getTemplateId());
      smsMessageVo.setParams(new String[] {orderType.name, orderBean.getOrderNo()});
    } else if (SMSChannel.fenxiao.equals(smsChannel)) {
      smsMessageVo.setTemplate_id(SmsTemplate.PAYSUCCESS_FENXIAO.getTemplateId());
      smsMessageVo.setParams(
          new String[] {orderBean.getAgentName(), orderType.name, orderBean.getOrderNo()});
    } else if (SMSChannel.zhixiao.equals(smsChannel)) {
      smsMessageVo.setTemplate_id(SmsTemplate.PAYSUCCESS_ZHIXIAO.getTemplateId());
      smsMessageVo.setParams(
          new String[] {orderBean.getAgentName(), orderType.name, orderBean.getOrderNo()});
    } else {
      log.error(
          orderBean.getOrderNo()
              + " 既不属于 分销 也不属于直销 或者app,检查["
              + orderBean.getAgentId()
              + "] ["
              + orderBean.getOrderChannel()
              + "]");
      return Boolean.FALSE;
    }
    return noticeSmsCenter(orderBean, smsMessageVo, AlarmType.SMSPAYSUCCESS);
  }
Beispiel #3
0
  /**
   * 导游重新指派
   *
   * @param orderBean
   */
  public void guideResignSMS(OrderBean orderBean) {
    SMSChannel smsChannel = getSmsChannel(orderBean);
    if (SMSChannel.APP.equals(smsChannel)) {

    } else if (SMSChannel.fenxiao.equals(smsChannel)) {

    } else if (SMSChannel.fenxiao.equals(smsChannel)) {

    } else {
      log.error(
          orderBean.getOrderNo()
              + " 既不属于 分销 也不属于直销 或者app,检查["
              + orderBean.getAgentId()
              + "] ["
              + orderBean.getOrderChannel()
              + "]");
    }
  }
Beispiel #4
0
  /**
   * 临行前 C端发送短信
   *
   * @param orderBean
   */
  public boolean leaveStartSMSConfirm(OrderBean orderBean) {
    SMSChannel smsChannel = getSmsChannel(orderBean);
    SmsParam smsMessageVo = new SmsParam();

    smsMessageVo.setSys_name(smsTrade);
    smsMessageVo.setArea_code(orderBean.getUserAreaCode1());
    smsMessageVo.setMobile(orderBean.getUserMobile1());
    OrderType orderType = OrderType.getType(orderBean.getOrderType());
    Date serviceTime = orderBean.getServiceTime();

    Date curTime = orderServiceTime.getServiceCityCurTime(orderBean.getServiceCityId());
    long hour = (serviceTime.getTime() - curTime.getTime()) / (60 * 60 * 1000);

    if (hour >= 23 && hour <= 24) {
      if ("泰国".equalsIgnoreCase(orderBean.getServiceCountryName())
          && OrderType.PICKUPORDER.equals(orderType)) {
        // 待完成
        // 素万那普国际机场4号门内侧铁栏杆处/廊曼机场2号门/普吉国际机场出口左转TMB旁,taxi接机牌候客区/清迈国际机场8号门
        String msgStr = taiguoGetMsgInfo(orderBean.getFlightDestCode());
        smsMessageVo.setParams(
            new String[] {orderType.name, hour + "", orderBean.getGuideName(), msgStr});
        if (SMSChannel.APP.equals(smsChannel)) {
          smsMessageVo.setTemplate_id(SmsTemplate.LININ_MORE_TAIGUO_APP.getTemplateId());
          return noticeSmsCenter(orderBean, smsMessageVo, AlarmType.SMSLOGKEAVING);
        } else if (SMSChannel.fenxiao.equals(smsChannel)) {
          smsMessageVo.setTemplate_id(SmsTemplate.LININ_MORE_TAIGUO_FENXIAO.getTemplateId());
          return noticeSmsCenter(orderBean, smsMessageVo, AlarmType.SMSLOGKEAVING);
        } else if (SMSChannel.zhixiao.equals(smsChannel)) {
          smsMessageVo.setTemplate_id(SmsTemplate.LININ_MORE_TAIGUO_ZHIXIAO.getTemplateId());
          return noticeSmsCenter(orderBean, smsMessageVo, AlarmType.SMSLOGKEAVING);
        } else {
          log.error(
              orderBean.getOrderNo()
                  + " 既不属于 分销 也不属于直销 或者app,检查["
                  + orderBean.getAgentId()
                  + "] ["
                  + orderBean.getOrderChannel()
                  + "]");
        }
      } else {
        if (SMSChannel.APP.equals(smsChannel)) {
          smsMessageVo.setTemplate_id(SmsTemplate.LINXIN_MORE_APP.getTemplateId());
          smsMessageVo.setParams(new String[] {orderType.name, hour + ""});
          return noticeSmsCenter(orderBean, smsMessageVo, AlarmType.SMSLOGKEAVING);
        } else if (SMSChannel.fenxiao.equals(smsChannel)) {
          smsMessageVo.setTemplate_id(SmsTemplate.LINXIN_MORE_FENXIAO.getTemplateId());
          smsMessageVo.setParams(
              new String[] {
                orderType.name, hour + "", orderBean.getGuideAreaCode() + orderBean.getGuideMobile()
              });
          return noticeSmsCenter(orderBean, smsMessageVo, AlarmType.SMSLOGKEAVING);
        } else if (SMSChannel.zhixiao.equals(smsChannel)) {
          smsMessageVo.setTemplate_id(SmsTemplate.LINXIN_MORE_ZHIXIAO.getTemplateId());
          smsMessageVo.setParams(new String[] {orderType.name, hour + ""});
          return noticeSmsCenter(orderBean, smsMessageVo, AlarmType.SMSLOGKEAVING);
        } else {
          log.error(
              orderBean.getOrderNo()
                  + " 既不属于 分销 也不属于直销 或者app,检查["
                  + orderBean.getAgentId()
                  + "] ["
                  + orderBean.getOrderChannel()
                  + "]");
        }
      }
    } else if (hour < 23 && hour > 0) {
      if ("泰国".equalsIgnoreCase(orderBean.getServiceCountryName())
          && OrderType.PICKUPORDER.equals(orderType)) {
        String msgStr = taiguoGetMsgInfo(orderBean.getFlightDestCode());
        smsMessageVo.setParams(
            new String[] {orderType.name, hour + "", orderBean.getGuideName(), msgStr});

        if (SMSChannel.APP.equals(smsChannel)) {
          // 11
          smsMessageVo.setTemplate_id(SmsTemplate.LININ_LESS_TAIGUO_APP.getTemplateId());
          return noticeSmsCenter(orderBean, smsMessageVo, AlarmType.SMSLOGKEAVING);
        } else if (SMSChannel.fenxiao.equals(smsChannel)) {
          smsMessageVo.setTemplate_id(SmsTemplate.LININ_LESS_TAIGUO_FENXIAO.getTemplateId());
          return noticeSmsCenter(orderBean, smsMessageVo, AlarmType.SMSLOGKEAVING);
        } else if (SMSChannel.zhixiao.equals(smsChannel)) {
          smsMessageVo.setTemplate_id(SmsTemplate.LININ_LESS_TAIGUO_ZHIXIAO.getTemplateId());
          return noticeSmsCenter(orderBean, smsMessageVo, AlarmType.SMSLOGKEAVING);
        } else {
          log.error(
              orderBean.getOrderNo()
                  + " 既不属于 分销 也不属于直销 或者app,检查["
                  + orderBean.getAgentId()
                  + "] ["
                  + orderBean.getOrderChannel()
                  + "]");
        }
      } else {
        if (SMSChannel.APP.equals(smsChannel)) {
          smsMessageVo.setTemplate_id(SmsTemplate.LINXIN_LESS_APP.getTemplateId());
          smsMessageVo.setParams(new String[] {orderType.name, hour + ""});
          return noticeSmsCenter(orderBean, smsMessageVo, AlarmType.SMSLOGKEAVING);
        } else if (SMSChannel.fenxiao.equals(smsChannel)) {
          smsMessageVo.setTemplate_id(SmsTemplate.LINXIN_LESS_FENXIAO.getTemplateId());
          smsMessageVo.setParams(
              new String[] {orderType.name, hour + "", orderBean.getAgentName()});
          return noticeSmsCenter(orderBean, smsMessageVo, AlarmType.SMSLOGKEAVING);
        } else if (SMSChannel.zhixiao.equals(smsChannel)) {
          smsMessageVo.setTemplate_id(SmsTemplate.LINXIN_LESS_ZHIXIAO.getTemplateId());
          smsMessageVo.setParams(new String[] {orderType.name, hour + ""});
          return noticeSmsCenter(orderBean, smsMessageVo, AlarmType.SMSLOGKEAVING);
        } else {
          log.error(
              orderBean.getOrderNo()
                  + " 既不属于 分销 也不属于直销 或者app,检查["
                  + orderBean.getAgentId()
                  + "] ["
                  + orderBean.getOrderChannel()
                  + "]");
        }
      }
    } else {
      log.warn("订单[" + orderBean.getOrderNo() + "] 没到发送时间");
    }

    return false;
  }