更改返回标签

This commit is contained in:
cyk
2023-07-09 14:06:11 +08:00
parent 72c015801f
commit f816d065e6

View File

@@ -131,6 +131,7 @@ 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<l.length;i++)
{
if(l[i].equals(str))
@@ -140,6 +141,10 @@ public class UserDao {
}
}
label = String.join(";",l)+";";
if(l.length == 1)
{
label="";
}
sql="UPDATE user SET searchHistory = ? WHERE userName= ?";
num = runner.update(conn,sql,label,name);
} catch (SQLException e) {