Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -148,7 +148,7 @@ 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 isValid = 1 and projectName LIKE %?%";
|
String sql = "SELECT * FROM project WHERE isValid = 1 and projectTitle LIKE \"%\"? \"%\"";
|
||||||
projectEntityList = runner.query(conn, sql, new BeanListHandler<>(projectEntity.class), str);
|
projectEntityList = runner.query(conn, sql, new BeanListHandler<>(projectEntity.class), str);
|
||||||
conn.close();
|
conn.close();
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
@@ -45,7 +45,7 @@ public class selectByInputServlet extends HttpServlet {
|
|||||||
resp.setContentType("application/json;charset=UTF-8");
|
resp.setContentType("application/json;charset=UTF-8");
|
||||||
//添加搜索历史
|
//添加搜索历史
|
||||||
PrintWriter writer = resp.getWriter();
|
PrintWriter writer = resp.getWriter();
|
||||||
String str = req.getParameter("xxxxx");
|
String str = req.getParameter("content");
|
||||||
List<projectEntity> projectEntityList = projectService.selectByInput(str);
|
List<projectEntity> projectEntityList = projectService.selectByInput(str);
|
||||||
|
|
||||||
HttpSession session = req.getSession();
|
HttpSession session = req.getSession();
|
||||||
@@ -59,7 +59,6 @@ public class selectByInputServlet extends HttpServlet {
|
|||||||
else{
|
else{
|
||||||
String jsonString = JSONObject.toJSONString(projectEntityList);
|
String jsonString = JSONObject.toJSONString(projectEntityList);
|
||||||
writer.println(jsonString);
|
writer.println(jsonString);
|
||||||
setResultOK("success",writer);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -72,7 +71,7 @@ public class selectByInputServlet extends HttpServlet {
|
|||||||
else{
|
else{
|
||||||
String jsonString = JSONObject.toJSONString(projectEntityList);
|
String jsonString = JSONObject.toJSONString(projectEntityList);
|
||||||
writer.println(jsonString);
|
writer.println(jsonString);
|
||||||
setResultOK("success",writer);
|
writer.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user