Merge remote-tracking branch 'origin/master' into master
# Conflicts: # src/main/java/com/yutou/tools/Tools/PasswordManager.java
This commit is contained in:
commit
0231b7cdf3
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user