更改返回标签
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user