From bf8d85d5f83c2036fb4239d764d33e99c1b62bd3 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期五, 31 五月 2024 14:53:23 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformInterfaceLogServiceImpl.java | 15 +++++++++++++++ 1 files changed, 15 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 99055b2..b5038a0 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; @@ -23,6 +26,9 @@ */ @Service public class PlatformInterfaceLogServiceImpl implements PlatformInterfaceLogService { + + @Autowired + private SystemDictDataBiz systemDictDataBiz; @Autowired private PlatformInterfaceLogMapper platformInterfaceLogMapper; @@ -125,4 +131,13 @@ QueryWrapper<PlatformInterfaceLog> wrapper = new QueryWrapper<>(platformInterfaceLog); return platformInterfaceLogMapper.selectCount(wrapper); } + @Override + public void clearThreeMonthLog() { + int days =15; + try { + days = Integer.parseInt(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.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