From 4bd10efebd38e7a0d5495b78b92b36f46fa51c7e Mon Sep 17 00:00:00 2001 From: User_cyk <1020691186@qq.com> Date: Mon, 10 Jul 2023 10:16:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E8=BF=94=E5=9B=9E=E6=A0=87?= =?UTF-8?q?=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/hellogithub/dao/UserDao.java | 13 +++++++------ .../hellogithub/servlet/selectUserLabelServlet.java | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/com/hellogithub/dao/UserDao.java b/src/com/hellogithub/dao/UserDao.java index 46aad93..3e8def8 100644 --- a/src/com/hellogithub/dao/UserDao.java +++ b/src/com/hellogithub/dao/UserDao.java @@ -131,18 +131,19 @@ public class UserDao { String sql = "select searchHistory from user where userName=? and isValid = 1"; userEntity = runner.query(conn, sql, new BeanHandler<>(userEntity.class),name); l = userEntity.getSearchHistory().split(";"); - - for(int i=0;i sss= new ArrayList<>(Arrays.asList(l)); + for(int i=0;i stringList = userService.selectLabel(name); if(stringList.get(0).equals("无搜索历史")){ - writer.println(jsonString); + writer.println("null"); } else{ jsonString = JSONObject.toJSONString(stringList);