mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-06 17:36:47 +08:00
SZX-927:学员端-个人设置-手机号未同步到
This commit is contained in:
@@ -11,6 +11,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.cache.Cache;
|
import org.springframework.cache.Cache;
|
||||||
import org.springframework.cache.CacheManager;
|
import org.springframework.cache.CacheManager;
|
||||||
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
import org.springframework.retry.annotation.Recover;
|
import org.springframework.retry.annotation.Recover;
|
||||||
import org.springframework.retry.annotation.Retryable;
|
import org.springframework.retry.annotation.Retryable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -86,12 +87,6 @@ public class DataUserSyncServiceImpl implements IDataUserSyncService {
|
|||||||
log.info("账号不存在,新添加账号【" + user.getId() + "】");
|
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) {
|
if (u != null) {
|
||||||
//更新部分用户字段
|
//更新部分用户字段
|
||||||
u.setDepartId(user.getDepartId());
|
u.setDepartId(user.getDepartId());
|
||||||
@@ -129,6 +124,13 @@ public class DataUserSyncServiceImpl implements IDataUserSyncService {
|
|||||||
userDao.save(u);
|
userDao.save(u);
|
||||||
log.info("添加新用户");
|
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())) {
|
if (StringUtils.isNotBlank(user.getDepartId())) {
|
||||||
org = orgDao.get(user.getDepartId());
|
org = orgDao.get(user.getDepartId());
|
||||||
|
|||||||
Reference in New Issue
Block a user