更改用户主页查询逻辑

This commit is contained in:
cyk
2023-07-05 10:28:57 +08:00
parent 2aa906cc01
commit 404ac0a863

View File

@@ -42,7 +42,8 @@ public class retUserServlet extends HttpServlet {
PrintWriter writer = resp.getWriter();
String username = req.getParameter("username");
String jsonString = JSONObject.toJSONString(userService.selectUserByName(username));
String jsonString="";
jsonString = JSONObject.toJSONString(userService.selectUserByName(username));
if(jsonString.equals(""))
{
setResultError("查询失败",writer);