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

修改查询时间段

parent 012a19cb
...@@ -2,6 +2,8 @@ package com.mortals.xhx.module.access.service.impl; ...@@ -2,6 +2,8 @@ package com.mortals.xhx.module.access.service.impl;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Snowflake; import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import com.mortals.xhx.common.key.Constant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -22,6 +24,7 @@ import java.util.List; ...@@ -22,6 +24,7 @@ import java.util.List;
* @date 2022-08-17 * @date 2022-08-17
*/ */
@Service("accessLogService") @Service("accessLogService")
@Slf4j
public class AccessLogServiceImpl extends AbstractCRUDServiceImpl<AccessLogDao, AccessLogEntity, Long> implements AccessLogService { public class AccessLogServiceImpl extends AbstractCRUDServiceImpl<AccessLogDao, AccessLogEntity, Long> implements AccessLogService {
...@@ -33,6 +36,11 @@ public class AccessLogServiceImpl extends AbstractCRUDServiceImpl<AccessLogDao, ...@@ -33,6 +36,11 @@ public class AccessLogServiceImpl extends AbstractCRUDServiceImpl<AccessLogDao,
entity.setCreateUserName("system"); entity.setCreateUserName("system");
entity.setCreateTime(new Date()); entity.setCreateTime(new Date());
} }
if (!ObjectUtils.isEmpty(entity.getDuration()) && entity.getDuration() < Constant.ACCESS_EXPIRE_TIME) {
log.info("Duration:{}",entity.getDuration());
return null;
}
return super.save(entity, context); return super.save(entity, context);
} }
......
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