package cn.edu.whu.boot.collection.mapper;

import cn.edu.whu.boot.collection.domain.ExportMediaRecord;
import cn.edu.whu.boot.collection.domain.MultimediaItem;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Description：
 * Author：CXJ
 * Date： 2019-04-27 17:32
 * Remark：
 */
@Repository
public interface MultimediaMapper {

    Integer insertMultiMedia(MultimediaItem media);

    Integer deleteMulitMedia(@Param("mediaTableName") String mediaTableName , @Param("polygonId") Long polygonId);

    Integer deleteMulitMediaGreaterThanVersion(@Param("mediaTableName") String mediaTableName , @Param("polygonId") Long polygonId , @Param("version") int versionCode);

    List<MultimediaItem> selectMultiMedia(@Param("mediaTableName") String mediaTableName , @Param("polygonId") Long polygonId);

    List<MultimediaItem> selectHistoryMultiMedia(@Param("mediaTableName") String mediaTableName, @Param("polygonId") Long polygonId, @Param("version") int versionCode);

    List<ExportMediaRecord > selectByTableName(@Param("tableName") String tableName);
}
