|
@ -134,13 +134,16 @@ public class GrowthLogService {
|
134
|
134
|
|
135
|
135
|
@Get
|
136
|
136
|
@Path("/qlInviter")
|
137
|
|
public List<String> queryInviterId(@JdbcConn Connection con,String professorId,@DefaultValue("com.ekexiu.portal.service.GrowthLogService.MAX_CREATE_TIME") String createTime,@DefaultValue("20") int rows)throws SQLException{
|
|
137
|
public List<User> queryInviterId(@JdbcConn Connection con,String professorId,@DefaultValue("com.ekexiu.portal.service.GrowthLogService.MAX_CREATE_TIME") String createTime,@DefaultValue("20") int rows)throws SQLException{
|
138
|
138
|
List<User> users = this.userDao.queryLimit(con, professorId, createTime, rows);
|
139
|
|
List<String> strings = new ArrayList<String>();
|
|
139
|
List<User> results = new ArrayList<User>();
|
140
|
140
|
for (User user : users) {
|
141
|
|
strings.add(user.getId());
|
|
141
|
User result = new User();
|
|
142
|
result.setId(user.getId());
|
|
143
|
result.setCreateTime(user.getCreateTime());
|
|
144
|
results.add(result);
|
142
|
145
|
}
|
143
|
|
return strings;
|
|
146
|
return results;
|
144
|
147
|
}
|
145
|
148
|
|
146
|
149
|
@Get
|
|
@ -148,6 +151,17 @@ public class GrowthLogService {
|
148
|
151
|
public int queryInviterCount(@JdbcConn Connection con,String professorId)throws SQLException{
|
149
|
152
|
return this.userDao.queryInviter(con, professorId);
|
150
|
153
|
}
|
|
154
|
|
|
155
|
@Get
|
|
156
|
@Path("/countByInviter")
|
|
157
|
public int inviterCountByInviter(@JdbcConn Connection con,String professorId)throws SQLException{
|
|
158
|
List<User> users = this.userDao.queryByInviter(con, professorId);
|
|
159
|
int count = 0;
|
|
160
|
for (User user : users) {
|
|
161
|
count += this.userDao.queryInviter(con, user.getId());
|
|
162
|
}
|
|
163
|
return count;
|
|
164
|
}
|
151
|
165
|
|
152
|
166
|
/**
|
153
|
167
|
* 分享专家
|