From ae6459cfe0a2d1b496ea1add51e50893e49abaf8 Mon Sep 17 00:00:00 2001 From: Qing Date: Sat, 1 Jul 2023 11:55:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=82=E6=95=B0=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/hellogithub/dao/projectDao.java | 4 ++-- src/com/hellogithub/servlet/selectMostStarServlet.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/hellogithub/dao/projectDao.java b/src/com/hellogithub/dao/projectDao.java index a68c562..e30da99 100644 --- a/src/com/hellogithub/dao/projectDao.java +++ b/src/com/hellogithub/dao/projectDao.java @@ -131,8 +131,8 @@ public class projectDao { try { Connection conn = JdbcUtils.getConnection(); QueryRunner runner = new QueryRunner(); - String sql = "select * from project where projectId = ? order by startNum desc"; - projectEntityList = runner.query(conn, sql, new BeanListHandler<>(projectEntity.class),id); + String sql = "select * from project order by lookCount desc"; + projectEntityList = runner.query(conn, sql, new BeanListHandler<>(projectEntity.class)); conn.close(); } catch (SQLException e) { throw new RuntimeException(e); diff --git a/src/com/hellogithub/servlet/selectMostStarServlet.java b/src/com/hellogithub/servlet/selectMostStarServlet.java index 83caebc..67c1113 100644 --- a/src/com/hellogithub/servlet/selectMostStarServlet.java +++ b/src/com/hellogithub/servlet/selectMostStarServlet.java @@ -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.setContentType("application/json;charset=UTF-8"); - String cate = req.getParameter("xxxxxxx"); - String id = req.getParameter("xxxxx"); + String cate = req.getParameter("num"); + String id = req.getParameter("index"); PrintWriter writer = resp.getWriter(); String jsonString = JSONObject.toJSONString(projectService.retSelcetByStar(Integer.valueOf(cate),id)); writer.println(jsonString);