class AbstractIFileService extends ServiceImpl<FileMapper, FileInfo> implements IFileService {
    private static final String FILE_SPLIT = ".";

    @Override
    public FileInfo upload(MultipartFile file) {
        FileInfo fileInfo = FileUtil.getFileInfo(file);
        if (!fileInfo.getName().contains(FILE_SPLIT)) {
            throw new IllegalArgumentException("缺少后缀名");
        }
        ObjectInfo objectInfo = uploadFile(file);
        fileInfo.setPath(objectInfo.getObjectPath());
        fileInfo.setUrl(objectInfo.getObjectUrl());
        // 设置文件来源
        fileInfo.setSource(fileType());
        // 将文件信息保存到数据库
        baseMapper.insert(fileInfo);

        return fileInfo;
    }

    /**
     * 文件来源
     *
     * @return
     */
    protected abstract String fileType();

    /**
     * 上传文件
     *
     * @param file
     */
    protected abstract ObjectInfo uploadFile(MultipartFile file);

    /**
     * 删除文件
     * @param id 文件id
     */
    @Override
    public void delete(String id) {
        FileInfo fileInfo = baseMapper.selectById(id);
        if (fileInfo != null) {
            baseMapper.deleteById(fileInfo.getId());
            this.deleteFile(fileInfo.getPath());
        }
    }

    /**
     * 删除文件资源
     *
     * @param objectPath 文件路径
     */
    protected abstract void deleteFile(String objectPath);

    @Override
    public PageResult<FileInfo> findList(Map<String, Object> params) {<FILL_FUNCTION_BODY>}
}

        Page<FileInfo> page = new Page<>(MapUtils.getInteger(params, "page"), MapUtils.getInteger(params, "limit"));
        List<FileInfo> list = baseMapper.findList(page, params);
        return PageResult.<FileInfo>builder().data(list).code(0).count(page.getTotal()).build();
    
<methods>public void <init>() ,public com.central.file.mapper.FileMapper getBaseMapper() ,public Class<com.central.file.model.FileInfo> getEntityClass() ,public Map<java.lang.String,java.lang.Object> getMap(Wrapper<com.central.file.model.FileInfo>) ,public V getObj(Wrapper<com.central.file.model.FileInfo>, Function<? super java.lang.Object,V>) ,public com.central.file.model.FileInfo getOne(Wrapper<com.central.file.model.FileInfo>, boolean) ,public Optional<com.central.file.model.FileInfo> getOneOpt(Wrapper<com.central.file.model.FileInfo>, boolean) ,public boolean removeBatchByIds(Collection<?>, int) ,public boolean removeBatchByIds(Collection<?>, int, boolean) ,public boolean removeById(java.io.Serializable) ,public boolean removeById(java.io.Serializable, boolean) ,public boolean removeByIds(Collection<?>) ,public boolean saveBatch(Collection<com.central.file.model.FileInfo>, int) ,public boolean saveOrUpdate(com.central.file.model.FileInfo) ,public boolean saveOrUpdateBatch(Collection<com.central.file.model.FileInfo>, int) ,public boolean updateBatchById(Collection<com.central.file.model.FileInfo>, int) <variables>protected com.central.file.mapper.FileMapper baseMapper,private final org.springframework.core.convert.ConversionService conversionService,protected final Class<com.central.file.model.FileInfo> entityClass,protected final org.apache.ibatis.logging.Log log,protected final Class<com.central.file.mapper.FileMapper> mapperClass,private volatile org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory,protected final Class<?>[] typeArguments