Merge remote-tracking branch 'origin/master' into master

# Conflicts:
#	src/main/java/com/yutou/tools/Tools/PasswordManager.java
This commit is contained in:
yutou 2021-06-25 18:30:38 +08:00
commit 0231b7cdf3
3 changed files with 13 additions and 2 deletions

View File

@ -68,13 +68,19 @@ public class PasswordManager {
return "";
}
ToolsPasswordExample example=new ToolsPasswordExample();
example.createCriteria().andUidEqualTo(uid);
ToolsPasswordExample.Criteria criteria=example.createCriteria();
criteria.andUidEqualTo(uid);
if(!StringUtils.isEmpty(search)){
criteria.search(search);
}
List<ToolsPassword> list=passwordDao.selectByExample(example);
for (ToolsPassword password : list) {
JSONObject item=new JSONObject();
item.put("id",password.getId());
item.put("account",password.getUsername());
item.put("title",password.getTitle());
item.put("desc",password.getInfo());
item.put("url",password.getUrl());
item.put("password",AESTools.decrypt(password.getPassword()));
array.add(item);
}

View File

@ -5,7 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class ToolsApplication {
public static final String version="1.1.3";
public static final String version="1.1.4";
public static void main(String[] args) {
System.out.println("当前版本号:" + version);

View File

@ -104,6 +104,11 @@ public class ToolsPasswordExample {
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria search(String value){
addCriterion("title like '%"+value+"%' or `info` like '%"+value+"%' or `url` like '%"+value+"%'");
return (Criteria) this;
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;