|
@ -38,12 +38,13 @@ public abstract class GrowthLogDao {
|
38
|
38
|
@Where("INVITE_PRO IS NULL")
|
39
|
39
|
public abstract List<GrowthLog> queryList(Connection con,String professorId,@LessThan String createTime,int rows)throws SQLException;
|
40
|
40
|
|
41
|
|
public List<InviteUserScore> queryInvite(Connection con,String professorId) throws SQLException{
|
|
41
|
public List<InviteUserScore> queryInvite(Connection con,String professorId,String createTime,int rows) throws SQLException{
|
42
|
42
|
int index = 1;
|
43
|
|
String sql = "SELECT INVITE_PRO,SUM(SCORE) S FROM GROWTH_LOG WHERE PROFESSOR_ID = ? AND INVITE_PRO IS NOT NULL GROUP BY INVITE_PRO ORDER BY S DESC";
|
|
43
|
String sql = "SELECT INVITE_PRO,SUM(SCORE) S FROM GROWTH_LOG WHERE PROFESSOR_ID = ? AND CREATE_TIME < ? AND INVITE_PRO IS NOT NULL GROUP BY INVITE_PRO ORDER BY S DESC LIMIT "+rows;
|
44
|
44
|
PreparedStatement ps = con.prepareStatement(sql);
|
45
|
45
|
try{
|
46
|
46
|
ps.setString(index++,professorId);
|
|
47
|
ps.setString(index++,createTime);
|
47
|
48
|
ResultSet rs = ps.executeQuery();
|
48
|
49
|
try{
|
49
|
50
|
List<InviteUserScore> inviteUserScores = new ArrayList<InviteUserScore>();
|