package com.jiayue.ipfcst.common.data.repository;

import com.jiayue.ipfcst.common.data.entity.UploadFileLogDetail;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import java.util.Date;

/**
 * 上报文件日志明细表仓储
 *
 * @author xsl
 * @version 3.0
 */
public interface UploadFileLogDetailRepository extends BaseRepository<UploadFileLogDetail, Integer> {
    /**
     * 删除指定日期之前的日志
     */
    @Modifying
    @Query(value = "delete from UploadFileLogDetail t where t.createTime < ?1")
    void deleteLessCreateTime(Date date);
}
