日期:2014-05-16  浏览次数:20398 次

spring的jdbcTemplate 返回值为list 带参数

	 * */
	public boolean findStuCourseById(int uid, int cid) {
	

		

		String sql = "select * from 7east_usercourse_right where userid=? and courseid=?";
		BeanPropertyRowMapper<UserCourse> argTypes = new BeanPropertyRowMapper<UserCourse>(UserCourse.class);

		Object[] args = new Object[] { uid, cid };
		List<UserCourse> list = getJdbcTemplate().query(sql, args, argTypes );
		
		
		
		
		if(list!=null){
			return list.size()>0?true:false;
		}else{
			return false;
		}
	}