修改密码

This commit is contained in:
lihongbiao 2025-07-24 18:07:59 +08:00
parent 311a9724cf
commit ceda53a5ae
2 changed files with 12 additions and 1 deletions

View File

@ -142,4 +142,15 @@ public class UserCacheManager {
redisUtils.set(LoginProperties.aCacheKey + username, employeeDto, time);
}
}
@Async
public void cleanCustomerCache(String username) {
// 转小写
username = StringUtils.lowerCase(username);
if (StringUtils.isNotEmpty(username)) {
// 清除数据
redisUtils.del(LoginProperties.bCacheKey + username);
}
}
}

View File

@ -61,7 +61,7 @@ public class CnCustomerServiceImpl extends ServiceImpl<CnCustomerMapper, CnCusto
@Override
public void updatePass(String username, String encryptPassword) {
this.baseMapper.updatePass(username, encryptPassword);
userCacheManager.cleanEmployeesCache(username);
userCacheManager.cleanCustomerCache(username);
}
/**