Exemplo n.º 1
0
  public AbFmcar findByMobileAndUserId(String userId, String mobile) {
    StringBuffer sql = new StringBuffer("select b.* from ( ");
    sql.append(" select * from ab_fmcar_user where user_id = ? ");
    sql.append(" ) a");
    sql.append(" right join ( select * from ab_fmcar where mobile = ? ) b");
    sql.append(" on b.id=a.car_id");

    AbFmcar car = dao.findFirst(sql.toString(), userId, mobile);
    return car;
  }
Exemplo n.º 2
0
 public AbFmcar findByMobile(String mobile) {
   StringBuffer sql = new StringBuffer(" select * from ab_fmcar where mobile = ? ");
   AbFmcar car = dao.findFirst(sql.toString(), mobile);
   return car;
 }