|
|
|
@ -118,8 +118,8 @@ public class UserService {
|
|
|
|
|
user.setRegdate(new Date());
|
|
|
|
|
user.setUpdatedate(new Date());
|
|
|
|
|
user.setLastdate(new Date());
|
|
|
|
|
// String newPassword = encoder.encode(user.getPassword());
|
|
|
|
|
// user.setPassword(newPassword);
|
|
|
|
|
String newPassword = encoder.encode(user.getPassword());
|
|
|
|
|
user.setPassword(newPassword);
|
|
|
|
|
userDao.save(user);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -214,7 +214,7 @@ public class UserService {
|
|
|
|
|
Map<String,String> map = new HashMap<>();
|
|
|
|
|
map.put("mobile",mobile);
|
|
|
|
|
map.put("checkcode",checkcode);
|
|
|
|
|
rabbitTemplate.convertAndSend("sms",map);
|
|
|
|
|
// rabbitTemplate.convertAndSend("sms",map);
|
|
|
|
|
|
|
|
|
|
// 在控制台放一份(方便测试)
|
|
|
|
|
|
|
|
|
@ -222,9 +222,9 @@ public class UserService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public User login(String loginname, String password) {
|
|
|
|
|
User user = userDao.findByLoginname(loginname);
|
|
|
|
|
// User user = userDao.findByMobile(mobile);
|
|
|
|
|
public User login(String mobile, String password) {
|
|
|
|
|
// User user = userDao.findByLoginname(loginname);
|
|
|
|
|
User user = userDao.findByMobile(mobile);
|
|
|
|
|
if (user!=null && encoder.matches(password,user.getPassword())) {
|
|
|
|
|
return user;
|
|
|
|
|
}
|
|
|
|
@ -235,4 +235,5 @@ public class UserService {
|
|
|
|
|
userDao.updatefanscount(x,friendid);
|
|
|
|
|
userDao.updatefollowcount(x,userid);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|