| | |
| | | |
| | | 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.InterfaceLogMapper; |
| | | import com.doumee.dao.business.model.InterfaceLog; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.yaml.snakeyaml.scanner.Constant; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | .apply("to_days(create_date)+15 < to_days(now())") |
| | | .like(InterfaceLog::getUrl,"/artemis/api/")); |
| | | } |
| | | @Override |
| | | public void remainLastLogs(){ |
| | | InterfaceLog log = interfaceLogMapper.selectOne(new QueryWrapper<InterfaceLog>() |
| | | .select("max(id) as id").last("limit 1")); |
| | | //只保留进10w条数据 |
| | | if(log!=null) { |
| | | interfaceLogMapper.delete(new UpdateWrapper<InterfaceLog>().lambda() |
| | | .lt(InterfaceLog::getId, Constants.formatIntegerNum(log.getId()) - 100000)); |
| | | } |
| | | |
| | | } |
| | | } |