/**
   * @Function onEventRefreshPayDetailData @Description 根据请求条件 调用消费明细接口 @Input
   * entity:请求参数实体类数据 @Return 无返回值
   */
  public void onEventRefreshPayDetailData(MenuRefreshEventEntity entity) {
    // 排序方式
    if (!Handler_String.isBlank(entity.getMenuKindCode())
        && !Handler_String.isBlank(entity.getMenuKindName())) {
      cardType = Integer.parseInt(entity.getMenuKindCode());
      textview_title.setText(entity.getMenuKindName());
      mapList.clear();
      pageNo = 1;
      // 设置输入参数
      if (entity.getMenuKindCode().equals("0")) {
        filtermap.put("cardType", "");
      } else {
        filtermap.put("cardType", entity.getMenuKindCode());
      }
      filtermap.put("pageNo", pageNo + "");
      filtermap.put("pageCount", UrlParams.PAGESIZE + "");

      showDialog(); // 打开模式层
      // 调用消费明细信息接口
      FastHttpHander.ajaxString(
          Url.METHOD_CARDCONSUMEARRAY, Handler_Json.beanToJson(filtermap), internetConfig, this);
    }

    foodTopDown.setImageResource(R.drawable.arrow_down_white);
  }
  /**
   * @Function pageRefresh @Description 分页
   *
   * @input type:1:向下翻页 2,向上翻页
   * @return 无返回值
   */
  @InjectPullRefresh
  public void pageRefresh(int type) {
    // 消费列表接口分页
    Ioc.getIoc().getLogger().i("红树林卡消费接口:[" + Url.METHOD_CARDCONSUMEARRAY + "]");
    internetConfig.setKey(1);
    switch (type) {
      case InjectView.PULL: // 向下翻页
        pageNo++;
        if (pageNo > count) {
          pageUtil.isEndDownPage(); // 结束翻页
          return;
        }
        // 设置输入参数
        filtermap.put("pageNo", pageNo + "");
        filtermap.put("pageCount", UrlParams.PAGESIZE + "");
        showDialog();
        // 调用后接口
        FastHttpHander.ajaxString(
            Url.METHOD_CARDCONSUMEARRAY, Handler_Json.beanToJson(filtermap), internetConfig, this);

        break;
      case InjectView.DOWN:
        pageUtil.isEndDownPage();
        break;
    }
  }
Esempio n. 3
0
 // 获取会员信息
 private void getMemInfo() {
   internetConfig = new InternetConfig();
   Ioc.getIoc().getLogger().i("调用后台获取个人信息接口:[" + Url.METHOD_MEMBERINFO + "]");
   internetConfig.setKey(1);
   Map<String, String> map = new HashMap<>();
   map.put("proceedsPhone", "");
   internetConfig.setHead(FastHttp.inHeaders());
   // 调用后台个人信息接口
   FastHttpHander.ajaxString(
       Url.METHOD_MEMBERINFO, Handler_Json.beanToJson(map), internetConfig, this);
 }
Esempio n. 4
0
  /** 自动验证成功的方法 */
  @Override
  public void onValidationSucceeded() {
    showDialog("登录中...");
    Ioc.getIoc().getLogger().i("登录前端验证成功");
    // Toast.makeText(this, "前端验证通过", Toast.LENGTH_SHORT).show();

    loginMap = new HashMap<String, String>();
    loginMap.put("account", login_name.getText().toString().trim());
    loginMap.put("password", login_pwd.getText().toString().trim());

    // 验证手机是否联网
    if (!Handler_Network.isNetworkAvailable(this)) {
      Toast.makeText(this, ErrorMsgEnum.NET_ERROR.getName(), Toast.LENGTH_SHORT).show();
      return;
    }
    config = new InternetConfig();
    config.setKey(R.raw.client);
    config.setHead(CommonUtils.inHeaders());
    Ioc.getIoc().getLogger().i("调用后台登录接口:[" + Url.METHOD_LOGIN + "]");
    // 调用后台登录接口
    FastHttpHander.ajaxString(Url.METHOD_LOGIN, Handler_Json.beanToJson(loginMap), config, this);
  }
Esempio n. 5
0
  @Override
  public void onResp(BaseResp resp) {
    Ioc.getIoc().getLogger().i("onResp微信结果返回页面:" + Handler_Json.beanToJson(resp));
    Ioc.getIoc().getLogger().i("微信结果返回页面:errStr" + resp.errStr);
    Ioc.getIoc().getLogger().i("微信结果返回页面:getType" + resp.getType());
    Ioc.getIoc().getLogger().i("微信结果返回页面:openId" + resp.openId);
    Ioc.getIoc().getLogger().i("微信结果返回页面: transaction" + resp.transaction);
    Ioc.getIoc().getLogger().i("微信结果返回页面:errCode" + resp.errCode);

    if (resp.getType() >= ConstantsAPI.COMMAND_PAY_BY_WX) {
      if (resp.errCode == 0 || "0".equals(resp.errCode + "")) {
        // Intent i=getIntent();

        String orderId = getOrderId();
        Intent intent = new Intent(this, OrderPaySuccessfulActivity.class);
        intent.putExtra("orderId", orderId);
        intent.putExtra("payType", "微信支付");
        startActivity(intent);
      } else {
        Toast.makeText(this, "支付未完成...", Toast.LENGTH_LONG).show();
      }
      finish();
    }
  }
 /**
  * **********************************************
  *
  * @param page 设定文件
  * @return void 返回类型
  * @throws @Title: ajaxRoomList @Description: TODO(获取房间列表)
  * @date 2014-11-19 ***********************************************
  */
 private void ajaxRoomList(int page) {
   RoomResourceParamDto rrpd = new RoomResourceParamDto();
   rrpd.setStartDate(rd.getStartDate());
   rrpd.setEndDate(rd.getEndDate());
   rrpd.setHotelCode(rd.getHotelCode());
   rrpd.setCardNo(rd.getCardNo());
   rrpd.setPageNo(page + "");
   rrpd.setPageCount("5");
   ArrayList<HashMap<String, String>> conditions =
       (ArrayList<HashMap<String, String>>) MapVo.get("conditions");
   if (conditions != null) {
     rrpd.setBuildingCode(conditions.get(3).get("text_type_code") + "");
     rrpd.setFloorCode(conditions.get(4).get("text_type_code") + "");
     rrpd.setInfarIntro(conditions.get(2).get("text_type_code") + "");
     rrpd.setRoomTypeCode(conditions.get(0).get("text_type_code") + "");
     rrpd.setViewCode(conditions.get(1).get("text_type_code") + "");
     rrpd.setRoomIdxRange(conditions.get(5).get("text_type_code") + "");
   }
   InternetConfig config = new InternetConfig();
   config.setKey(1);
   String json = Handler_Json.beanToJson(rrpd);
   Ioc.getIoc().getLogger().i(json);
   FastHttpHander.ajaxString(Url.HOTELRESERVE_ASSET_RECOMMENDROOMARRAY, json, config, this);
 }
Esempio n. 7
0
 @Override
 public void onReq(BaseReq req) {
   Ioc.getIoc().getLogger().i("onReq微信结果返回页面:" + Handler_Json.beanToJson(req));
 }