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

This commit is contained in:
emcchui
2025-03-24 17:41:22 +08:00
parent fdc0c7959e
commit 3a139925c9

View File

@@ -2,11 +2,15 @@ package com.xboe.data.service.impl;
import java.time.LocalDateTime;
import javax.annotation.Resource;
import javax.transaction.Transactional;
import com.boe.feign.api.serverall.entity.UserData;
import com.xboe.constants.CacheName;
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.retry.annotation.Recover;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
@@ -39,6 +43,9 @@ public class DataUserSyncServiceImpl implements IDataUserSyncService {
@Autowired
TeacherDao teacherDao;
@Resource
private CacheManager cacheManager;
@Override
@Transactional
@@ -76,6 +83,13 @@ public class DataUserSyncServiceImpl implements IDataUserSyncService {
accountDao.save(a);
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());