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