|  |  |  | 
|---|
|  |  |  | 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.InterfaceLogMapper; | 
|---|
|  |  |  | import com.doumee.dao.business.model.InterfaceLog; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private InterfaceLogMapper interfaceLogMapper; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private SystemDictDataBiz systemDictDataBiz; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public Integer create(InterfaceLog interfaceLog) { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @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){} | 
|---|
|  |  |  | interfaceLogMapper.delete(new UpdateWrapper<InterfaceLog>().lambda() | 
|---|
|  |  |  | .apply("to_days(create_date)+15 < to_days(now())") | 
|---|
|  |  |  | .like(InterfaceLog::getUrl,"/artemis/api/")); | 
|---|
|  |  |  | .apply("to_days(create_date)+"+days+" < to_days(now())") ); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|