public PaymentMoneyWithdrawCondition getCondition() {
    PaymentMoneyWithdrawCondition paymentMoneyWithdrawCondition =
        new PaymentMoneyWithdrawCondition();
    paymentMoneyWithdrawCondition.setPageSize(this.getPageSize());
    paymentMoneyWithdrawCondition.setPageIndex(this.getPageIndex());

    List<SortItem> sortItemList = new ArrayList<SortItem>();
    SortItem sortItem = new SortItem();
    sortItem.setSortFeild("sn");
    sortItem.setSortType(this.getSortType());
    sortItemList.add(sortItem);
    paymentMoneyWithdrawCondition.setSortItemList(sortItemList);

    if (!StringHelper.isNullOrEmpty(bySn)) {
      paymentMoneyWithdrawCondition.setSn(bySn);
    }
    if (!StringHelper.isNullOrEmpty(byState)) {
      paymentMoneyWithdrawCondition.setState("0" + byState);
    }
    if (!StringHelper.isNullOrEmpty(byDate)) {
      paymentMoneyWithdrawCondition.setDateDown(byDate + " 00:00:00");
      paymentMoneyWithdrawCondition.setDateUp(byDate + " 23:59:59");
    }
    return paymentMoneyWithdrawCondition;
  }
Exemplo n.º 2
0
  public String newRegister() {
    this.setPageAlias(PageAlias.newRegister);
    String ret = super.execute();
    if (!ret.equals(SUCCESS)) return ret;

    this.captchaUrl = this.buildWWWSiteUrl(PageAlias.captcha);
    this.redirectUrl = this.buildWWWSiteUrl(PageAlias.registerSuccess);
    if (!StringHelper.isNullOrEmpty(code)) {
      WeiXinOauth2Token weiXinOauth2Token =
          AdvancedUtil.getOauthAccessToken(Constant.APPID, Constant.APPSECRET, code);
      String openId = weiXinOauth2Token.getOpenId();
      String number = StateValues.getWXOpenId();
      if (!StringHelper.isNullOrEmpty(openId)) {
        if (!openId.equals(number)) {
          StateValues.setWXOpenId(openId);
        }
      }
      /*if(!StringHelper.isNullOrEmpty(openId)&&!StringHelper.isNullOrEmpty(number)){
      	if(!openId.equals(number)){
      		StateValues.setWXOpenId(openId);
      	}
      }*/
      System.out.println(openId); // //////////////////
    }
    if (AuthenticationModel.getCustomerId() != 0) {
      return "INDEX";
    }
    return SUCCESS;
  }
Exemplo n.º 3
0
 static String getAbsolutePath(String path) {
   String rootPath = XmlHelper.class.getResource("/").getPath();
   if (rootPath.contains(":")) rootPath = StringHelper.trimStart(rootPath, "/");
   return StringHelper.trimEnd(rootPath, "/") + "/../../" + path;
   //        String temp = StringHelper.trimEnd(rootPath, "/");
   //        temp = temp.substring(0, temp.lastIndexOf("/"));
   //        return temp.substring(0, temp.lastIndexOf("/"))+"/" + path;
 }
Exemplo n.º 4
0
  public PaymentRefundCondition getCondition() {
    PaymentRefundCondition paymentRefundCondition = new PaymentRefundCondition();
    paymentRefundCondition.setPageSize(this.getPageSize());
    paymentRefundCondition.setPageIndex(this.getPageIndex());
    if ("query".equals(this.showAllList)) {
      paymentRefundCondition.setSalesNos(null);
    } else {
      List<Integer> workmate = UserHelper.getUserCache().getWorkMate();
      String workMateString = "";
      if (workmate != null) {
        workmate.add(UserHelper.getUserCache().getUserId());
        workMateString = StringHelper.listToString(workmate);
      } else {
        workMateString = String.valueOf(UserHelper.getUserCache().getUserId());
      }
      List<Sales> salesList = SalesModel.getListByEmps(workMateString);
      List<Integer> salesNos = new ArrayList<Integer>();
      for (Sales sales : salesList) {
        salesNos.add(sales.getId());
      }
      paymentRefundCondition.setSalesNos(StringHelper.listToString(salesNos));
    }

    if (!StringHelper.isNullOrEmpty(this.getIsTest())) {
      paymentRefundCondition.setIsTest(Byte.valueOf(this.getIsTest()));
    } else {
      paymentRefundCondition.setIsTest((byte) 0);
    }
    if (!StringHelper.isNullOrEmpty(this.byP2pProduct)) {
      paymentRefundCondition.setP2pProductNo(Integer.valueOf(this.byP2pProduct));
    }
    if (!StringHelper.isNullOrEmpty(this.byStatus)) {
      paymentRefundCondition.setStatus(Byte.valueOf(this.byStatus));
    }
    if (!StringHelper.isNullOrEmpty(this.byStartRepayIssue)) {
      paymentRefundCondition.setByStartRepayIssue(this.byStartRepayIssue);
    }
    if (!StringHelper.isNullOrEmpty(this.byEndRepayIssue)) {
      paymentRefundCondition.setByEndRepayIssue(this.byEndRepayIssue);
    }
    if (!StringHelper.isNullOrEmpty(this.smsStatus)) {
      paymentRefundCondition.setSmsStatus(Integer.parseInt(this.smsStatus));
    } else {
      paymentRefundCondition.setSmsStatus(-1);
    }
    if (!StringHelper.isNullOrEmpty(this.byPayType)) {
      paymentRefundCondition.setPayType(Byte.valueOf(this.byPayType));
    }
    List<SortItem> sortItemList = new ArrayList<SortItem>();
    SortItem sortItem = new SortItem();
    sortItem.setSortFeild(this.getSidx());
    sortItem.setSortType(this.getSortType());
    sortItemList.add(sortItem);
    paymentRefundCondition.setSortItemList(sortItemList);
    return paymentRefundCondition;
  }
Exemplo n.º 5
0
 public static int getCustomerId() {
   String strCustomerId =
       instance.cookieManager.getCookieValues(
           ServletActionContext.getRequest(), StateName.P2P_CUSTOMER_ID);
   if (StringHelper.canConvertToNumber(strCustomerId))
     return Integer.parseInt(EncodeHelper.extractRandomCustomerId(strCustomerId));
   else return 0;
 }
Exemplo n.º 6
0
  public static int getCaptchaKey() {
    String captchaKey =
        instance.cookieManager.getCookieValues(
            ServletActionContext.getRequest(), StateName.CAPTCHA_KEY);
    if (StringHelper.isNullOrEmpty(captchaKey)) return 0;

    return Integer.parseInt(captchaKey);
  }
  public String getInfoById() {
    if (StringHelper.isNullOrEmpty(this.getId())) {
      this.setErrCode("NoID");
      this.setErrDesc("NoID");
    } else {
      this.info = TempRecruitDetailModel.getInfo(Integer.parseInt(this.getId()));
      if (this.info == null) {
        this.setErrCode("No Info");
        this.setErrDesc("No Info");
      }
    }

    return SUCCESS;
  }
  public String getInfoById() {
    if (StringHelper.isNullOrEmpty(this.getId())) {
      this.setErrCode("NoID");
      this.setErrDesc("NoID");
    } else {
      this.info = PaymentMoneyWithdrawModel.getInfo(Integer.parseInt(this.getId()));
      if (this.info == null) {
        this.setErrCode("No Info");
        this.setErrDesc("No Info");
      }
    }

    return SUCCESS;
  }
Exemplo n.º 9
0
 public String cancelSendSmsByIds() {
   if (StringHelper.isNullOrEmpty(this.ids)) {
     this.setErrCode("NoID");
     this.setErrDesc("NoID");
   } else {
     String[] ids = this.ids.split(",");
     List idList = Arrays.asList(ids);
     int result = PaymentRefundModel.cancelSendSmsByIds(idList);
     if (result > 0) {
       this.setErrDesc("操作成功");
     } else {
       this.setErrDesc("操作失败");
     }
   }
   return SUCCESS;
 }
Exemplo n.º 10
0
 @Override
 public String execute() {
   this.setPageAlias(PageAlias.register);
   if (!StringHelper.isNullOrEmpty(inviterNo)) {
     String[] arrparam = inviterNo.split(",");
     inviterNo = arrparam[0];
     activityId = arrparam[1];
     // 根据用户id查询用户信息 inviterNo
     if (inviterNo != null) {
       phoneNo = P2pCustomerModel.getInfo(Integer.parseInt(inviterNo)).getCellphone();
     }
   }
   String ret = super.execute();
   if (!ret.equals(SUCCESS)) return ret;
   this.captchaUrl = this.buildWWWSiteUrl(PageAlias.captcha);
   this.redirectUrl = this.buildWWWSiteUrl(PageAlias.registerSuccess);
   // this.showLoginUrl = false;
   return SUCCESS;
 }
Exemplo n.º 11
0
  public String ajaxSendSms() {

    if (StringHelper.isNullOrEmpty(this.ids)) {
      this.setErrCode("NoID");
      this.setErrDesc("请选择数据");
      return SUCCESS;
    } else {
      String[] ids = this.ids.split(",");
      List<String> idList = Arrays.asList(ids);
      for (String id : idList) {
        PaymentRefund paymentRefund = PaymentRefundModel.getInfo(Integer.parseInt(id));
        String cellphone = "";
        try {
          if (paymentRefund.getPayType() == 1) {
            cellphone = P2pCustomerModel.getInfo(paymentRefund.getP2pCustomerNo()).getCellphone();
          } else {
            cellphone =
                CustomerPersonalModel.getInfo(paymentRefund.getCustomerNo()).getCellphone1();
          }
        } catch (Exception e) {
          this.setErrCode("0000");
          this.setErrDesc("没有手机号");
        }
        String productName = P2pProductModel.getInfo(paymentRefund.getP2pProductNo()).getName();
        int times = PaymentRefundModel.getTimesIsUseBySalesNo(paymentRefund.getSalesNo());
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        int result = 0;
        if (Integer.parseInt(this.type) == 1) {
          String money = Double.toString(paymentRefund.getPayMoney());
          if (paymentRefund.getTimes() == times) {
            result =
                SmsModel.smsProductExpire(
                    cellphone, sdf.format(paymentRefund.getActualPayTime()), productName, money);
          } else {
            result =
                SmsModel.smsProductInterest(
                    cellphone,
                    sdf.format(paymentRefund.getActualPayTime()),
                    productName,
                    money,
                    String.valueOf(paymentRefund.getTimes()));
          }
        }
        if (Integer.parseInt(this.type) == 2) {
          result =
              SmsModel.smsContinueInvestment(
                  cellphone,
                  sdf.format(paymentRefund.getActualPayTime()),
                  productName,
                  String.valueOf(paymentRefund.getInterest()),
                  String.valueOf(paymentRefund.getSalesMoney()));
        }
        if (result > 0) {
          paymentRefund.setIsSendSms(2);
          PaymentRefundModel.update(paymentRefund);
          this.setErrCode("0000");
          this.setErrDesc("操作成功");
          if (paymentRefund.getTimes()
              == PaymentRefundModel.getTimesIsUseBySalesNo(paymentRefund.getSalesNo())) {
            SalesModel.updateStatus(paymentRefund.getSalesNo(), SalesStatus.payment);
          }
        } else {
          this.setErrDesc("操作失败");
        }
      }
    }
    return SUCCESS;
  }
Exemplo n.º 12
0
  @Override
  public String execute() {
    String ret = super.execute();
    if (!ret.equals(SUCCESS)) return ret;

    if (this.pageAlias.toString().isEmpty()) this.pageAlias = PageAlias.index;

    this.buildTitle();
    this.buildCss();
    this.buildJs();

    this.homeUrl = this.buildWWWSiteUrl(PageAlias.index);
    this.loginUrl = this.buildWWWSiteUrl(PageAlias.login);
    this.registerUrl = this.buildWWWSiteUrl(PageAlias.register);
    this.reservationUrl = this.buildWWWSiteUrl(PageAlias.myReservation);
    this.investmentUrl = this.buildWWWSiteUrl(PageAlias.myInvestment);
    this.personalInfoUrl = this.buildWWWSiteUrl(PageAlias.personalInfo);
    this.editPasswordUrl = this.buildWWWSiteUrl(PageAlias.editPassword);
    this.productFeaturesUrl = this.buildWWWSiteUrl(PageAlias.productFeatures);
    this.forgetPasswordUrl = this.buildWWWSiteUrl(PageAlias.forgetPassword);
    this.logoutUrl = this.buildWWWSiteUrl(PageAlias.logout);
    this.educationtUrl = this.buildWWWSiteUrl(PageAlias.investorEducationt);
    this.accountUrl = this.buildWWWSiteUrl(PageAlias.account);
    this.moneyDetailUrl = this.buildWWWSiteUrl(PageAlias.moneyDetail);
    this.paymentAccountSecurityUrl = this.buildWWWSiteUrl(PageAlias.paymentAccountSecurity);
    this.paymentMoneyRechargeUrl = this.buildWWWSiteUrl(PageAlias.myPaymentMoneyRechargeList);
    this.paymentMoneyWithdrawUrl = this.buildWWWSiteUrl(PageAlias.myPaymentMoneyWithdrawList);
    this.p2pProductListUrl = this.buildWWWSiteUrl(PageAlias.p2pProductList);
    this.productDetailsUrl = this.buildWWWSiteUrl(PageAlias.productDetails);
    this.bankCardUrl = this.buildWWWSiteUrl(PageAlias.bankCard);
    this.myCouponsUrl = this.buildWWWSiteUrl(PageAlias.myCoupons);
    this.myIntegralUrl = this.buildWWWSiteUrl(PageAlias.myIntegral);
    this.myRewardUrl = this.buildWWWSiteUrl(PageAlias.myReward);
    this.myInfoUrl = this.buildWWWSiteUrl(PageAlias.myInfo);
    this.helpCenterUrl = this.buildWWWSiteUrl(PageAlias.helpCenter);
    this.knowledgeForumUrl = this.buildWWWSiteUrl(PageAlias.knowledgeForum);
    this.knowledgeForumContentUrl = this.buildWWWSiteUrl(PageAlias.knowledgeForumContent);
    this.logoUrl = this.buildImg("favicon.ico");
    this.securityAssuranceUrl = this.buildWWWSiteUrl(PageAlias.securityAssurance);
    this.lawsRegulationsUrl = this.buildWWWSiteUrl(PageAlias.lawsRegulations);
    this.lawsRegulationsContentUrl = this.buildWWWSiteUrl(PageAlias.lawsRegulationsContent);
    this.productSuperiorityUrl = this.buildWWWSiteUrl(PageAlias.productSuperiority);
    this.popularizeUrl = this.buildWWWSiteUrl(PageAlias.popularize);
    this.reservationHelpUrl = this.buildWWWSiteUrl(PageAlias.reservationHelp);
    this.financingUrl = this.buildWWWSiteUrl(PageAlias.financing);
    this.accountCentralUrl = this.buildWWWSiteUrl(PageAlias.accountCentral);

    this.enterpriseCultureUrl = this.buildWWWSiteUrl(PageAlias.enterpriseCulture);
    this.mediaReportsUrl = this.buildWWWSiteUrl(PageAlias.mediaReports);
    this.aboutCompanyUrl = this.buildWWWSiteUrl(PageAlias.aboutCompany);
    this.bulletinUrl = this.buildWWWSiteUrl(PageAlias.bulletin);
    this.joinUsUrl = this.buildWWWSiteUrl(PageAlias.joinUs);
    this.joinUsContentUrl = this.buildWWWSiteUrl(PageAlias.joinUsContent);
    this.contactUsUrl = this.buildWWWSiteUrl(PageAlias.contactUs);
    this.storeUrl = this.buildWWWSiteUrl(PageAlias.storeList);
    this.serviceContractUrl = this.buildWWWSiteUrl(PageAlias.serviceContract);
    this.noviceAreaUrl = this.buildWWWSiteUrl(PageAlias.noviceArea);
    this.myInviteUrl = this.buildWWWSiteUrl(PageAlias.myInvite);

    qqLoginImg = this.buildImg("qq_login.png");

    showInvestBtn = ComponentHelper.SHOW_INVESTBTN;
    showReservatBtn = ComponentHelper.SHOW_RESERVATBTN;

    if (AuthenticationModel.isLogin()) {
      this.showLoginUrl = false;
      String realName = AuthenticationModel.getLoginInfo().getP2pCustomer().getRealName();
      String userName = AuthenticationModel.getUserName();
      String cellPhone = AuthenticationModel.getLoginInfo().getP2pCustomer().getCellphone();
      if (!StringHelper.isNullOrEmpty(realName)) this.currentUser = realName;
      else if (userName.length() < 36) this.currentUser = userName;
      else if (!StringHelper.isNullOrEmpty(cellPhone)) this.currentUser = cellPhone;
    } else this.showLoginUrl = true;

    return SUCCESS;
  }
Exemplo n.º 13
0
 public static String buildWWWSiteUrl(PageAlias pageAlias) {
   switch (pageAlias) {
     default:
       return StringHelper.trimEnd(WebInfoHelper.WEB_MOBILE_WWW, "/") + "/index";
   }
 }