package cn.reghao.tnb.file.app.zdisk.db.mapper;

import cn.reghao.jutil.jdk.web.db.BaseMapper;
import cn.reghao.jutil.jdk.web.db.Page;
import cn.reghao.tnb.file.app.zdisk.model.po.DiskShare;
import cn.reghao.tnb.file.app.zdisk.model.po.DiskShareTo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author reghao
 * @date 2025-09-05 17:06:28
 */
@Mapper
public interface DiskShareMapper extends BaseMapper<DiskShare> {
    void saveDiskShareTo(List<DiskShareTo> list);
    void updateSetDelete(long shareId);
    void deleteShareToList(long shareId);

    int countDiskShare(long createBy);
    List<DiskShare> findDiskShareByPage(@Param("page") Page page, @Param("createBy") long createBy);
    DiskShare findDiskShare(long shareId);

    int countDiskShareTo(long shareId);
    List<Long> findDiskShareToList(@Param("shareId") long shareId);
    List<DiskShare> findDiskShareList(@Param("albumType") int albumType, @Param("shareTo") long shareTo);
}
