ExercisePaperDAOImpl
// 查询训练记忆试题
public List findTTMemory(int userid, int ttid, int ttgid) {
String sql = "select * from tbTTrainMemory where userid= and ttid= and ttgid= order by dbms_random.value";
Object[] args = { userid, ttid, ttgid };
return basedao.getJdbcTemplate().queryForList(sql, args);
} www.2cto.com
几个参数值为
userid =1 ttid =41 ttgid=21
select * from tbTTrainMemory where userid=1 and ttid=41 and ttgid=21 order by dbms_random.value
转变成
mysql后
select * from tbTTrainMemory where userid=1 and ttid=41 and ttgid=21 order by rand();