添加参数名称
This commit is contained in:
@@ -131,8 +131,8 @@ public class projectDao {
|
|||||||
try {
|
try {
|
||||||
Connection conn = JdbcUtils.getConnection();
|
Connection conn = JdbcUtils.getConnection();
|
||||||
QueryRunner runner = new QueryRunner();
|
QueryRunner runner = new QueryRunner();
|
||||||
String sql = "select * from project where projectId = ? order by startNum desc";
|
String sql = "select * from project order by lookCount desc";
|
||||||
projectEntityList = runner.query(conn, sql, new BeanListHandler<>(projectEntity.class),id);
|
projectEntityList = runner.query(conn, sql, new BeanListHandler<>(projectEntity.class));
|
||||||
conn.close();
|
conn.close();
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
@@ -38,8 +38,8 @@ public class selectMostStarServlet extends HttpServlet {
|
|||||||
resp.setHeader("Access-Control-Allow-Headers", "access-control-allow-origin, authority, content-type, version-info, X-Requested-With");
|
resp.setHeader("Access-Control-Allow-Headers", "access-control-allow-origin, authority, content-type, version-info, X-Requested-With");
|
||||||
resp.setContentType("application/json;charset=UTF-8");
|
resp.setContentType("application/json;charset=UTF-8");
|
||||||
|
|
||||||
String cate = req.getParameter("xxxxxxx");
|
String cate = req.getParameter("num");
|
||||||
String id = req.getParameter("xxxxx");
|
String id = req.getParameter("index");
|
||||||
PrintWriter writer = resp.getWriter();
|
PrintWriter writer = resp.getWriter();
|
||||||
String jsonString = JSONObject.toJSONString(projectService.retSelcetByStar(Integer.valueOf(cate),id));
|
String jsonString = JSONObject.toJSONString(projectService.retSelcetByStar(Integer.valueOf(cate),id));
|
||||||
writer.println(jsonString);
|
writer.println(jsonString);
|
||||||
|
Reference in New Issue
Block a user