Browse Source

功能应用统计修改

zhongwei
段飞宇 1 year ago
parent
commit
4d6f931422
  1. 2
      hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/consumer/SysLogConsumer.java
  2. 2
      hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/consumer/SysLogQueue.java
  3. 9
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/entity/SysLog.java
  4. 3
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.xml

2
hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/consumer/SysLogConsumer.java

@ -27,7 +27,7 @@ public class SysLogConsumer implements Runnable {
/** /**
* 默认16 * 默认16
*/ */
private static final int DEFAULT_BATCH_SIZE = 16; private static final int DEFAULT_BATCH_SIZE = 1000;
@Resource @Resource
private SysLogQueue auditLogQueue; private SysLogQueue auditLogQueue;

2
hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/consumer/SysLogQueue.java

@ -27,7 +27,7 @@ public class SysLogQueue {
* @param auditLog * @param auditLog
*/ */
public void add(SysLogTo auditLog) { public void add(SysLogTo auditLog) {
blockingQueue.add(auditLog); blockingQueue.offer(auditLog);
} }
/** /**

9
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; package com.hnac.hzims.middle.systemlog.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.sql.Blob; import java.sql.Blob;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable; import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
@ -232,7 +228,8 @@ public class SysLog implements Serializable {
*/ */
@ApiModelProperty("逻辑删除") @ApiModelProperty("逻辑删除")
@TableField("is_deleted") @TableField("is_deleted")
private Integer isDeleted; @TableLogic(value = "0",delval = "1")
private Integer deleted;
} }

3
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.xml

@ -15,7 +15,8 @@
module_name, module_name,
count(module_name) moduleNameCount count(module_name) moduleNameCount
from hzims_sys_log 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; group by module_name;
</select> </select>
<select id="statisticsTitleByModuleName" <select id="statisticsTitleByModuleName"

Loading…
Cancel
Save