删除无用接口
This commit is contained in:
parent
d536b4d84d
commit
5667ef5525
@ -71,20 +71,14 @@ public interface SysUserDao extends JpaRepository<SysUserEntity, Long>, JpaSpeci
|
|||||||
void updatePassword(Long userId, String newPassword);
|
void updatePassword(Long userId, String newPassword);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id查询用户的信息
|
* 修改用户登录次数
|
||||||
*/
|
|
||||||
@Query(value = "select * from sys_user where id = ?", nativeQuery = true)
|
|
||||||
SysUserEntity selectByUserId(Long userId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 记录用户登录次数
|
|
||||||
*/
|
*/
|
||||||
@Query(value = "update sys_user set login_num = ?2 where id = ?1", nativeQuery = true)
|
@Query(value = "update sys_user set login_num = ?2 where id = ?1", nativeQuery = true)
|
||||||
@Modifying(clearAutomatically = true)
|
@Modifying(clearAutomatically = true)
|
||||||
void updateLoginNum(Long userId, Integer loginNum);
|
void updateLoginNum(Long userId, Integer loginNum);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改登陆时间
|
* 修改最后登录时间
|
||||||
*/
|
*/
|
||||||
@Query(value = "update sys_user set login_last_time = ?2 where id = ?1", nativeQuery = true)
|
@Query(value = "update sys_user set login_last_time = ?2 where id = ?1", nativeQuery = true)
|
||||||
@Modifying(clearAutomatically = true)
|
@Modifying(clearAutomatically = true)
|
||||||
|
@ -275,7 +275,7 @@ public class SysUserServiceImpl implements SysUserService {
|
|||||||
if (!newPassword.equals(confirmPassword)) {
|
if (!newPassword.equals(confirmPassword)) {
|
||||||
return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL, "两次密码输入不一致", locale);
|
return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL, "两次密码输入不一致", locale);
|
||||||
}
|
}
|
||||||
SysUserEntity sysUserEntity = sysUserDao.selectByUserId(userId);
|
SysUserEntity sysUserEntity = sysUserDao.findById(userId).get();
|
||||||
String newAfterPassword = encry256(newPassword + sysUserEntity.getSalt());
|
String newAfterPassword = encry256(newPassword + sysUserEntity.getSalt());
|
||||||
sysUserDao.updatePassword(userId, newAfterPassword);
|
sysUserDao.updatePassword(userId, newAfterPassword);
|
||||||
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "密码修改成功", locale);
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "密码修改成功", locale);
|
||||||
|
Loading…
Reference in New Issue
Block a user