package cn.reghao.oss.store.db.mapper;

import cn.reghao.jutil.jdk.store.SubDirCount;
import cn.reghao.oss.store.model.po.DataBlock;
import cn.reghao.jutil.jdk.db.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author reghao
 * @date 2022-11-24 11:11:24
 */
@Mapper
public interface DataBlockMapper extends BaseMapper<DataBlock> {
    void updateParent(@Param("id") int id, @Param("relativeDir") String relativeDir);
    void updateBatch(List<DataBlock> list);

    List<DataBlock> findDataBlocks(@Param("pageSize") int pageSize, @Param("nextId") int nextId);
    DataBlock findByContentId(String contentId);
    List<SubDirCount> findSubDirCount(String baseDir);
}
