github 不知名
This commit is contained in:
@@ -60,24 +60,17 @@ public class githubDao {
|
||||
return back;
|
||||
}
|
||||
|
||||
public ResultSetMetaData ret_Github_info(int projectid) {
|
||||
List<githubEntity> githubEntityList;
|
||||
ResultSetMetaData rsmd = null;
|
||||
public githubEntity ret_Github_info(int projectid) {
|
||||
githubEntity githubEntityList;
|
||||
String sql = "select * from githubinfo WHERE projectId = ?;";
|
||||
try {
|
||||
Connection conn = JdbcUtils.getConnection();
|
||||
PreparedStatement prep = conn.prepareStatement(sql);
|
||||
ResultSet rs = null;
|
||||
prep.setInt(1, projectid);
|
||||
rs = prep.executeQuery();
|
||||
while (rs.next()) {
|
||||
rsmd = rs.getMetaData();
|
||||
}
|
||||
conn.close();
|
||||
QueryRunner runner = new QueryRunner();
|
||||
githubEntityList = runner.query(conn,sql,new BeanHandler<>(githubEntity.class),projectid);
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return rsmd;
|
||||
return githubEntityList;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -17,7 +17,6 @@ public class githubService {
|
||||
}
|
||||
|
||||
public String ret_Github_info(int projectId){
|
||||
ResultSetMetaData rsmd = githubDao.ret_Github_info(projectId);
|
||||
return JSONObject.toJSONString(rsmd);
|
||||
return JSONObject.toJSONString(githubDao.ret_Github_info(projectId));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user