|
@@ -0,0 +1,52 @@
|
|
|
+package com.rongwei.bscommon.sys.service.impl;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.rongwei.bsentity.domain.ZhcxLogTotalDo;
|
|
|
+import com.rongwei.bscommon.sys.dao.ZhcxLogTotalDao;
|
|
|
+import com.rongwei.bscommon.sys.service.ZhcxLogTotalService;
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.rongwei.rwadmincommon.system.domain.ModuleOperationRecordDo;
|
|
|
+import com.rongwei.rwadmincommon.system.service.ModuleOperationRecordService;
|
|
|
+import com.rongwei.rwcommoncomponent.file.service.SysFileItemService;
|
|
|
+import com.rongwei.rwcommonentity.commonservers.domain.SysFileItemDo;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.util.Arrays;
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>
|
|
|
+ * 日志统计 服务实现类
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @author dlc
|
|
|
+ * @since 2025-07-02
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class ZhcxLogTotalServiceImpl extends ServiceImpl<ZhcxLogTotalDao, ZhcxLogTotalDo> implements ZhcxLogTotalService {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ModuleOperationRecordService moduleOperationRecordService;
|
|
|
+ @Autowired
|
|
|
+ private SysFileItemService fileItemService;
|
|
|
+ @Autowired
|
|
|
+ private ZhcxLogTotalDao dao;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void generateData() {
|
|
|
+
|
|
|
+ int mailCount = dao.getMailCount();
|
|
|
+ int pmqCount = dao.getPmqCount();
|
|
|
+ QueryWrapper<SysFileItemDo> wrapper = new QueryWrapper<>();
|
|
|
+ wrapper.apply("TRUNC(CREATEDATE) = TRUNC(SYSDATE - 1)");
|
|
|
+ int uploadFileCount = fileItemService.count(wrapper);
|
|
|
+ QueryWrapper<ModuleOperationRecordDo> wrapper2 = new QueryWrapper<>();
|
|
|
+ wrapper2.in("EVENTTYPE", Arrays.asList("loginIn", "view", "info","insert","update","delete"));
|
|
|
+ wrapper2.apply("TRUNC(CREATEDATE) = TRUNC(SYSDATE - 1)");
|
|
|
+ int sysCount = moduleOperationRecordService.count(wrapper2);
|
|
|
+ QueryWrapper<ModuleOperationRecordDo> wrapper3 = new QueryWrapper<>();
|
|
|
+ wrapper3.in("EVENTTYPE",Arrays.asList("file-preview","file-download"));
|
|
|
+ wrapper3.apply("TRUNC(CREATEDATE) = TRUNC(SYSDATE - 1)");
|
|
|
+ int fileCount = moduleOperationRecordService.count(wrapper2);
|
|
|
+ }
|
|
|
+}
|