添加参数名称
This commit is contained in:
@@ -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);
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user