Esempio n. 1
0
 @Override
 public ApplyInfoDomain queryApplyInfoById(String id) {
   try {
     ApplyInfoDomain domain = (ApplyInfoDomain) queryForObject("query_applyInfo_info_by_id", id);
     if (StringUtils.isNotBlank(domain.getVerifyStart())) {
       domain.setVerifyStart(FlagChangeName.verifyStart(domain.getVerifyStart()));
     }
     return domain;
   } catch (Exception e) {
     logger.error("query_applyInfo_by_id", e);
     throw new RuntimeException();
   }
 }
Esempio n. 2
0
  @SuppressWarnings("unchecked")
  @Override
  public void queryApplyInfoList(ApplyInfoDomain applyInfoDomain) {
    try {
      Map<String, Object> queryMap = new HashMap<String, Object>();
      queryMap.put("pageSize", applyInfoDomain.getPageInfo().getPageSize()); // 每页记录数
      queryMap.put(
          "start",
          (applyInfoDomain.getPageInfo().getCurPage() - 1)
              * applyInfoDomain.getPageInfo().getPageSize());
      // 检索条件
      queryMap.put(
          "companyId", java.net.URLDecoder.decode(applyInfoDomain.getCompanyId(), "utf-8"));
      queryMap.put("applyType", applyInfoDomain.getApplyType());
      queryMap.put("applyTimeQ", applyInfoDomain.getApplyTimeQ());
      queryMap.put("applyTimeZ", applyInfoDomain.getApplyTimeZ());
      queryMap.put(
          "contactName", java.net.URLDecoder.decode(applyInfoDomain.getContactName(), "utf-8"));
      queryMap.put("verifyStart", applyInfoDomain.getVerifyStart());
      applyInfoDomain
          .getPageInfo()
          .setTotalRecords((Integer) queryForObject("query_applyInfo_info_count", queryMap)); // 总页数

      List<ApplyInfoDomain> dataList =
          (List<ApplyInfoDomain>) queryForList("query_applyInfo_info_by_page", queryMap);
      for (ApplyInfoDomain domain : dataList) {
        if (StringUtils.isNotBlank(domain.getApplyType())) {
          domain.setApplyType(FlagChangeName.applyType(domain.getApplyType()));
        }
        if (StringUtils.isNotBlank(domain.getVerifyStart())) {
          domain.setVerifyStart(FlagChangeName.verifyStart(domain.getVerifyStart()));
        }
      }
      applyInfoDomain.setDataList(dataList);
    } catch (Exception e) {
      logger.error("query_applyInfo_list", e);
      throw new RuntimeException();
    }
  }