diff --git a/hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/annotation/OperationAnnotation.java b/hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/annotation/OperationAnnotation.java
index 516dfa2..e29ad1e 100644
--- a/hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/annotation/OperationAnnotation.java
+++ b/hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/annotation/OperationAnnotation.java
@@ -20,7 +20,7 @@ public @interface OperationAnnotation {
/**
* 功能模块
*/
- String moduleName() default "";
+ String moduleName() default "功能模块";
/**
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 fae7e99..d385f23 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
@@ -2,16 +2,22 @@
-
+
+
+
+
+
+
+
+
+
diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/StatisticsService.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/StatisticsService.java
index 39a9e5f..165c705 100644
--- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/StatisticsService.java
+++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/StatisticsService.java
@@ -5,9 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzims.middle.systemlog.entity.Statistics;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hnac.hzims.middle.systemlog.vo.StatisticsVo;
-
-import java.time.YearMonth;
-import java.util.List;
+import com.hnac.hzims.middle.systemlog.vo.SysLogStatisticsVo;
/**
*
@@ -26,10 +24,10 @@ public interface StatisticsService extends IService {
/**
* 根据时间查询数据
- * @param operationTime
+ * @param sysLogStatistics
* @return
*/
- Statistics getStatisticsBydateCalculated(String operationTime);
+ Statistics getStatisticsBydateCalculated(SysLogStatisticsVo sysLogStatistics);
/**
diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java
index 26f1d5a..3f01484 100644
--- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java
+++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java
@@ -15,7 +15,6 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
-import java.time.YearMonth;
import java.util.List;
/**
@@ -51,8 +50,11 @@ public class StatisticsServiceImpl extends ServiceImpl statisticsQueryWrapper = new QueryWrapper<>();
- statisticsQueryWrapper.eq("date_calculated", operationTime);
+ statisticsQueryWrapper.eq("date_calculated", sysLogStatistics.getOperationTime());
+ statisticsQueryWrapper.eq("module_name", sysLogStatistics.getModuleName());
return baseMapper.selectOne(statisticsQueryWrapper);
}
@@ -101,11 +104,10 @@ public class StatisticsServiceImpl extends ServiceImpl selectPage(Page page1, StatisticsVo statistics) {
QueryWrapper queryWrapper = new QueryWrapper<>();
//开始时间
- queryWrapper.lambda().ge(StringUtils.isNotEmpty(statistics.getCreateTime()),Statistics::getDateCalculated,
- statistics.getCreateTime());
+ queryWrapper.lambda().ge(StringUtils.isNotEmpty(statistics.getCreateTime()), Statistics::getDateCalculated, statistics.getCreateTime());
//结束时间
- queryWrapper.lambda().le(StringUtils.isNotEmpty(statistics.getEndTime()),Statistics::getDateCalculated,
- statistics.getEndTime());
+ queryWrapper.lambda().le(StringUtils.isNotEmpty(statistics.getEndTime()), Statistics::getDateCalculated, statistics.getEndTime());
+ queryWrapper.lambda().orderByDesc(Statistics::getDateCalculated);
IPage statisticsPage = baseMapper.selectPage(page1, queryWrapper);
return statisticsPage;
}
diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java
index 6f49c9d..0e5231e 100644
--- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java
+++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java
@@ -66,6 +66,7 @@ public class SysLogServiceImpl extends ServiceImpl impleme
String dateCalculated = sysLog.getDateCalculated();
String moduleName = sysLog.getModuleName();
String path = sysLog.getPath();
+ String title = sysLog.getTitle();
QueryWrapper queryWrapper = new QueryWrapper<>();
if (StringUtils.isNotEmpty(sysLog.getKeyword())) {
@@ -79,6 +80,16 @@ public class SysLogServiceImpl extends ServiceImpl impleme
queryWrapper.lambda().eq(SysLog::getPath, path);
}
+ //功能模块
+ if (StringUtils.isNotEmpty(moduleName)){
+ queryWrapper.lambda().eq(SysLog::getModuleName,moduleName);
+ }
+
+ //操作方法
+ if (StringUtils.isNotEmpty(title)){
+ queryWrapper.lambda().eq(SysLog::getTitle,title);
+ }
+
//开始时间
if (ObjectUtils.isNotEmpty(createTime)) {
@@ -96,6 +107,9 @@ public class SysLogServiceImpl extends ServiceImpl impleme
queryWrapper.eq("date_format(operation_time,'%Y-%m')",dateCalculated);
}
+
+ queryWrapper.lambda().orderByDesc(SysLog::getOperationTime);
+
return queryWrapper;
}
diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/SysLogVo.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/SysLogVo.java
index e4b6a4f..4d31efa 100644
--- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/SysLogVo.java
+++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/SysLogVo.java
@@ -53,4 +53,8 @@ public class SysLogVo {
private String path;
+ @ApiModelProperty("请求地址")
+ private String title;
+
+
}