模糊查询
@Select("select * from u_user u WHERE u.nickname LIKE CONCAT ('%',#{email},'%')" + " OR u.email LIKE CONCAT ('%',#{email},'%')") ListselectAccount(String email);
带分页的模糊查询
/** * 模糊查询分页 * @param email * @param index * @param currentCount * @return */ @Select("SELECT * FROM u_user u WHERE u.nickname LIKE CONCAT ('%',#{email},'%') " + "OR u.email LIKE CONCAT ('%',#{email},'%') LIMIT #{index},#{currentCount}") ListlimitLike(@Param("email") String email,@Param("index") int index,@Param("currentCount") int currentCount);