diff --git a/hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/consumer/SysLogConsumer.java b/hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/consumer/SysLogConsumer.java index 8916128..83d30b2 100644 --- a/hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/consumer/SysLogConsumer.java +++ b/hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/consumer/SysLogConsumer.java @@ -27,7 +27,7 @@ public class SysLogConsumer implements Runnable { /** * 默认16 */ - private static final int DEFAULT_BATCH_SIZE = 16; + private static final int DEFAULT_BATCH_SIZE = 1000; @Resource private SysLogQueue auditLogQueue; diff --git a/hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/consumer/SysLogQueue.java b/hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/consumer/SysLogQueue.java index 1424a74..5185582 100644 --- a/hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/consumer/SysLogQueue.java +++ b/hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/consumer/SysLogQueue.java @@ -27,7 +27,7 @@ public class SysLogQueue { * @param auditLog */ public void add(SysLogTo auditLog) { - blockingQueue.add(auditLog); + blockingQueue.offer(auditLog); } /** diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/SysLog.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/SysLog.java index d9e5131..92d7419 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/SysLog.java +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/SysLog.java @@ -1,14 +1,10 @@ package com.hnac.hzims.middle.systemlog.entity; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; import java.time.LocalDateTime; import java.sql.Blob; -import com.baomidou.mybatisplus.annotation.TableField; - import java.io.Serializable; import com.fasterxml.jackson.annotation.JsonFormat; @@ -232,7 +228,8 @@ public class SysLog implements Serializable { */ @ApiModelProperty("逻辑删除") @TableField("is_deleted") - private Integer isDeleted; + @TableLogic(value = "0",delval = "1") + private Integer deleted; } diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.xml b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.xml index 2ad6ef4..c059325 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.xml +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.xml @@ -15,7 +15,8 @@ module_name, count(module_name) moduleNameCount from hzims_sys_log - where to_days(operation_time) = to_days(now()) + where is_deleted = 0 + and to_days(operation_time) = to_days(now()) group by module_name;