Commit 1d83b47f authored by 成亚卿's avatar 成亚卿

修改密码redis信息同步更新

parent f2dc0023
package com.archser.aserver.service;
import com.archser.aserver.util.redis.InfoUser;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
......@@ -22,7 +23,14 @@ public class UserService {
*/
@Before(Tx.class)
public int updatePwd(String password, String username) {
return Db.update(Db.getSql("updatePassword"), password, username);
int update = Db.update(Db.getSql("updatePassword"), password, username);
if(update>0) {
//更新redis信息
User user = InfoUser.getUser(username);
user.setPassword(password);
InfoUser.saveUser(user);
}
return update;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment