SZX-927:学员端-个人设置-手机号未同步到

This commit is contained in:
emcchui
2025-03-25 08:47:19 +08:00
parent 77884d3e7e
commit b9f00f2602

View File

@@ -11,6 +11,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.retry.annotation.Recover;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
@@ -86,12 +87,6 @@ public class DataUserSyncServiceImpl implements IDataUserSyncService {
log.info("账号不存在,新添加账号【" + user.getId() + "");
}
Cache cache = cacheManager.getCache(CacheName.NAME_USER);
if(cache != null) {
String key = CacheName.KEY_ACCOUNT + user.getId();
cache.evict(key);
}
if (u != null) {
//更新部分用户字段
u.setDepartId(user.getDepartId());
@@ -129,6 +124,13 @@ public class DataUserSyncServiceImpl implements IDataUserSyncService {
userDao.save(u);
log.info("添加新用户");
}
Cache cache = cacheManager.getCache(CacheName.NAME_USER);
if(cache != null) {
cache.evict(CacheName.KEY_ACCOUNT + user.getId());
cache.evict(CacheName.KEY_USER + user.getId());
}
//对机构的判断,不为空时才会处理,为空时不处理
if (StringUtils.isNotBlank(user.getDepartId())) {
org = orgDao.get(user.getDepartId());