コード例 #1
0
  /**
   * 分页查询
   *
   * @param phonenum
   * @param start
   * @param limit
   * @return
   */
  public List<TmpGprs> search(String phonenum, String loginName, int start, int limit)
      throws Exception {
    Cnd condition = null;
    if (null != phonenum && !"".equals(phonenum)) {
      condition =
          Cnd.where("d_phone_number", "=", phonenum)
              .and("d_uid", "=", loginName.replace("weinan2", "weinan1"));
      //			if(null != loginName && !"".equals(loginName)){
      //				if(loginName.equals("weinan1")){
      //					condition.and("d_id","<","2368");
      //				}else if(loginName.equals("weinan2")){
      //					condition.and("d_id",">","2367").and("d_id","<","4736");
      //				}else if(loginName.equals("weinan3")){
      //					condition.and("d_id",">","4735").and("d_id","<","7103");
      //				}else if(loginName.equals("weinan5")){
      //					condition.and("d_id",">","7102");
      //				}
      //			}

      start = start / limit + 1;
      if (start == 0) {
        start = 1;
      }
      List<TmpGprs> list = tmpGprsDao.searchByPage(TmpGprs.class, condition, start, limit);
      return list;
    } else {
      return null;
    }
  }
コード例 #2
0
 /**
  * 分页查询
  *
  * @param phonenum
  * @param start
  * @param limit
  * @return
  */
 public List<TmpGprs> search(String phonenum, int start, int limit) throws Exception {
   Cnd condition = null;
   if (null != phonenum && !"".equals(phonenum)) {
     condition = Cnd.where("d_phone_number", "=", phonenum);
   }
   start = start / limit + 1;
   if (start == 0) {
     start = 1;
   }
   List<TmpGprs> list = tmpGprsDao.searchByPage(TmpGprs.class, condition, start, limit);
   return list;
 }
コード例 #3
0
 /**
  * 分页查询
  *
  * @param phonenum
  * @param start
  * @param limit
  * @return
  */
 public List<TmpGprs> search(
     String bdcode, String phonenum, String loginName, int start, int limit) throws Exception {
   Cnd condition = null;
   if (null != phonenum && !"".equals(phonenum)) {
     condition =
         Cnd.where("d_phone_number", "=", phonenum)
             .and("d_uid", "=", loginName.replace("weinan2", "weinan1"))
             .and("", "=", bdcode);
     start = start / limit + 1;
     if (start == 0) {
       start = 1;
     }
     List<TmpGprs> list = tmpGprsDao.searchByPage(TmpGprs.class, condition, start, limit);
     return list;
   } else {
     return null;
   }
 }