mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-10 11:26:50 +08:00
SZX-927:学员端-个人设置-手机号未同步到
This commit is contained in:
@@ -2,11 +2,15 @@ package com.xboe.data.service.impl;
|
|||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.transaction.Transactional;
|
import javax.transaction.Transactional;
|
||||||
|
|
||||||
import com.boe.feign.api.serverall.entity.UserData;
|
import com.boe.feign.api.serverall.entity.UserData;
|
||||||
|
import com.xboe.constants.CacheName;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
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.CacheManager;
|
||||||
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;
|
||||||
@@ -39,6 +43,9 @@ public class DataUserSyncServiceImpl implements IDataUserSyncService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
TeacherDao teacherDao;
|
TeacherDao teacherDao;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CacheManager cacheManager;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -76,6 +83,13 @@ public class DataUserSyncServiceImpl implements IDataUserSyncService {
|
|||||||
accountDao.save(a);
|
accountDao.save(a);
|
||||||
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());
|
||||||
|
|||||||
Reference in New Issue
Block a user