Commit 116fda22 authored by 赵啸非's avatar 赵啸非

添加定时删除七天前的人流数据

parent dc31b9ca
...@@ -171,6 +171,7 @@ public class SyncAppointWaitAndFinTaskImpl implements ITaskExcuteService { ...@@ -171,6 +171,7 @@ public class SyncAppointWaitAndFinTaskImpl implements ITaskExcuteService {
private void updateWaitQueueTime() { private void updateWaitQueueTime() {
CareConfigEntity careConfigEntity = careConfigService.selectOne(new CareConfigQuery()); CareConfigEntity careConfigEntity = careConfigService.selectOne(new CareConfigQuery());
List<CareRecordsEntity> careRecordsEntities = careRecordsService.find(new CareRecordsQuery().processStatus(ProcessStatusEnum.排队中.getValue())); List<CareRecordsEntity> careRecordsEntities = careRecordsService.find(new CareRecordsQuery().processStatus(ProcessStatusEnum.排队中.getValue()));
log.info("排队数量:{}",careRecordsEntities.size());
if (!ObjectUtils.isEmpty(careRecordsEntities)) { if (!ObjectUtils.isEmpty(careRecordsEntities)) {
//更新等待时长 //更新等待时长
List<CareRecordsEntity> recordsEntities = careRecordsEntities.stream().map(item -> { List<CareRecordsEntity> recordsEntities = careRecordsEntities.stream().map(item -> {
......
...@@ -45,18 +45,18 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -45,18 +45,18 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
if (resp.getCode() == YesNoEnum.YES.getValue()) { if (resp.getCode() == YesNoEnum.YES.getValue()) {
//同步更新用户,以loginname为唯一标识,密码默认与用户相同 //同步更新用户,以loginname为唯一标识,密码默认与用户相同
resp.getData().getData().forEach(user -> { resp.getData().getData().forEach(user -> {
log.info("loginName:{}", user.getLoginName()); //log.info("loginName:{}", user.getLoginName());
UserEntity tempEntity = userService.selectOne(new UserQuery().loginName(user.getLoginName())); UserEntity tempEntity = userService.selectOne(new UserQuery().loginName(user.getLoginName()));
if (ObjectUtils.isEmpty(tempEntity)) { if (ObjectUtils.isEmpty(tempEntity)) {
UserEntity userEntity = new UserEntity(); UserEntity userEntity = new UserEntity();
BeanUtils.copyProperties(user, userEntity, new String[]{"id","lastLoginTime", "lastLoginAddress"}); BeanUtils.copyProperties(user, userEntity, new String[]{"id","lastLoginTime", "lastLoginAddress"});
log.info("新增:{}", JSON.toJSONString(userEntity)); //log.info("新增:{}", JSON.toJSONString(userEntity));
userService.getUserDao().insert(userEntity); userService.getUserDao().insert(userEntity);
}else { }else {
//更新基本信息 //更新基本信息
UserEntity userEntity = new UserEntity(); UserEntity userEntity = new UserEntity();
BeanUtils.copyProperties(user, userEntity, new String[]{"loginPwd","userType","status","lastLoginTime", "lastLoginAddress"}); BeanUtils.copyProperties(user, userEntity, new String[]{"loginPwd","userType","status","lastLoginTime", "lastLoginAddress"});
log.info("更新:{}", JSON.toJSONString(userEntity)); // log.info("更新:{}", JSON.toJSONString(userEntity));
userService.getUserDao().update(userEntity); userService.getUserDao().update(userEntity);
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment