Compare commits

...

6 Commits

Author SHA1 Message Date
emcchui
e7384a0a40 关闭aop-log-record 2025-03-25 08:57:10 +08:00
emcchui
b9f00f2602 SZX-927:学员端-个人设置-手机号未同步到 2025-03-25 08:47:19 +08:00
emcchui
77884d3e7e SZX-927:学员端-个人设置-手机号未同步到 2025-03-25 08:39:48 +08:00
emcchui
3a9a8d86af SZX-927:学员端-个人设置-手机号未同步到 2025-03-24 18:10:41 +08:00
emcchui
3a139925c9 SZX-927:学员端-个人设置-手机号未同步到 2025-03-24 17:41:22 +08:00
emcchui
fdc0c7959e SZX-927:学员端-个人设置-手机号未同步到 2025-03-24 16:27:50 +08:00
2 changed files with 23 additions and 1 deletions

View File

@@ -2,11 +2,16 @@ 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.cache.annotation.Cacheable;
import org.springframework.retry.annotation.Recover;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
@@ -39,6 +44,9 @@ public class DataUserSyncServiceImpl implements IDataUserSyncService {
@Autowired
TeacherDao teacherDao;
@Resource
private CacheManager cacheManager;
@Override
@Transactional
@@ -59,6 +67,8 @@ public class DataUserSyncServiceImpl implements IDataUserSyncService {
a.setDeleted(user.getDeleted());
}
a.setLoginName(user.getCode());
a.setMobile(user.getMobile());
a.setEmail(user.getEmail());
log.info("更新账号code");
accountDao.update(a);
} else {
@@ -71,14 +81,18 @@ public class DataUserSyncServiceImpl implements IDataUserSyncService {
a.setRegTime(LocalDateTime.now());
a.setSysId(user.getKid());
a.setStatus(1);
a.setMobile(user.getMobile());
a.setEmail(user.getEmail());
accountDao.save(a);
log.info("账号不存在,新添加账号【" + user.getId() + "");
}
if (u != null) {
//更新部分用户字段
u.setDepartId(user.getDepartId());
u.setDepartName(user.getDepartName());
u.setName(user.getName());
u.setMobileNo(user.getMobile());
//2022-12-8 去掉用户类型的更新,因为返回的数据都是学员,
//u.setUserType(user.getUserType());
if (user.getLearningDuration() > 0) { //不大于0才会更新
@@ -106,9 +120,17 @@ public class DataUserSyncServiceImpl implements IDataUserSyncService {
} else {
u.setShowHome(true);//band16以下及其它无bandLevel的信息
}
u.setMobileNo(user.getMobile());
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());

View File

@@ -90,7 +90,7 @@ xxl:
logretentiondays: 30
aop-log-record:
#是否开启日志记录
enabled: true
enabled: false
#不进行拦截的包或者类
excludeClassNames:
activemq: