From 3890390b4f06647d4afe746dcdc7e3082885ee23 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期四, 12 十二月 2024 19:28:21 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
---
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformInterfaceLogServiceImpl.java | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformInterfaceLogServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformInterfaceLogServiceImpl.java
index fc07100..e1cb423 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformInterfaceLogServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformInterfaceLogServiceImpl.java
@@ -1,9 +1,12 @@
package com.doumee.service.business.impl;
+import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
+import com.doumee.core.utils.Constants;
import com.doumee.core.utils.Utils;
import com.doumee.dao.business.PlatformInterfaceLogMapper;
+import com.doumee.dao.business.model.InterfaceLog;
import com.doumee.dao.business.model.PlatformInterfaceLog;
import com.doumee.service.business.PlatformInterfaceLogService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -125,4 +128,17 @@
QueryWrapper<PlatformInterfaceLog> wrapper = new QueryWrapper<>(platformInterfaceLog);
return platformInterfaceLogMapper.selectCount(wrapper);
}
+
+ @Autowired
+ private SystemDictDataBiz systemDictDataBiz;
+
+ @Override
+ public void clearThreeMonthLog() {
+ int days =15;
+ try {
+ days = Integer.parseInt(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.HK_LOG_DEL_DAYS_LIMIT).getCode());
+ }catch (Exception e){}
+ platformInterfaceLogMapper.delete(new UpdateWrapper<PlatformInterfaceLog>().lambda()
+ .apply("to_days(create_date)+"+days+" < to_days(now())") );
+ }
}
--
Gitblit v1.9.3