From 6fdded5413c9fa540048a0bd26574b7671ad5420 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 11 十月 2024 15:12:15 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformInterfaceLogServiceImpl.java | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 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 99055b2..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;
@@ -19,7 +22,7 @@
/**
* 浣滀笟璋冨害骞冲彴鎺ュ彛浜や簰璁板綍Service瀹炵幇
* @author 姹熻箘韫�
- * @since 2024/04/28 16:06
+ * @date 2024/06/28 10:03
*/
@Service
public class PlatformInterfaceLogServiceImpl implements PlatformInterfaceLogService {
@@ -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