Commit d261d450 authored by 赵啸非's avatar 赵啸非

添加下发日志

parent 8d99ed85
...@@ -3,7 +3,10 @@ package com.mortals.xhx.daemon.task; ...@@ -3,7 +3,10 @@ package com.mortals.xhx.daemon.task;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.ITask; import com.mortals.framework.service.ITask;
import com.mortals.framework.service.ITaskExcuteService; import com.mortals.framework.service.ITaskExcuteService;
import com.mortals.framework.util.DateUtils;
import com.mortals.xhx.base.system.user.service.UserService; import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.module.device.model.DeviceLogQuery;
import com.mortals.xhx.module.device.service.DeviceLogService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
...@@ -19,11 +22,19 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -19,11 +22,19 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
@Autowired @Autowired
private UserService userService; private UserService userService;
@Autowired
private DeviceLogService deviceLogService;
@Override @Override
public void excuteTask(ITask task) throws AppException { public void excuteTask(ITask task) throws AppException {
log.info("同步用户任务"); log.info("同步用户任务");
userService.refreshUser(); userService.refreshUser();
//定时删除日志 7天前
DeviceLogQuery contidion = new DeviceLogQuery();
contidion.setCreateTimeEnd(DateUtils.getDateTimeStr(DateUtils.addCurrDate(-3), DateUtils.P_yyyy_MM_dd_HH_mm_ss));
deviceLogService.getDao().delete(contidion);
} }
......
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