Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -148,7 +148,7 @@ public class projectDao {
|
||||
try {
|
||||
Connection conn = JdbcUtils.getConnection();
|
||||
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);
|
||||
conn.close();
|
||||
} catch (SQLException e) {
|
||||
|
@@ -45,7 +45,7 @@ public class selectByInputServlet extends HttpServlet {
|
||||
resp.setContentType("application/json;charset=UTF-8");
|
||||
//添加搜索历史
|
||||
PrintWriter writer = resp.getWriter();
|
||||
String str = req.getParameter("xxxxx");
|
||||
String str = req.getParameter("content");
|
||||
List<projectEntity> projectEntityList = projectService.selectByInput(str);
|
||||
|
||||
HttpSession session = req.getSession();
|
||||
@@ -59,7 +59,6 @@ public class selectByInputServlet extends HttpServlet {
|
||||
else{
|
||||
String jsonString = JSONObject.toJSONString(projectEntityList);
|
||||
writer.println(jsonString);
|
||||
setResultOK("success",writer);
|
||||
}
|
||||
}
|
||||
else{
|
||||
@@ -72,7 +71,7 @@ public class selectByInputServlet extends HttpServlet {
|
||||
else{
|
||||
String jsonString = JSONObject.toJSONString(projectEntityList);
|
||||
writer.println(jsonString);
|
||||
setResultOK("success",writer);
|
||||
writer.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user