github 不知名

This commit is contained in:
cyk
2023-07-09 11:07:44 +08:00
parent 052d19a7de
commit 3a3b6741e6
2 changed files with 6 additions and 14 deletions

View File

@@ -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;
}
}

View File

@@ -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));
}
}