package com.mcwl.resource.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mcwl.resource.domain.ModelImage;
import com.mcwl.resource.domain.response.ResponseModelImage;
import com.mcwl.resource.domain.vo.ModelImageLikeVo;
import com.mcwl.resource.domain.vo.PageVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ModelImageMapper extends BaseMapper<ModelImage> {
    Long sumLikeNumber(@Param("userId") Long userId);

    List<ModelImage> fetchModelImageSortedByTopStatus();


    void setModelImageTop(@Param("id") Long id, @Param("isTop") int i);

    List<ResponseModelImage> imageList(PageVo pageVo);

    Long sumImageNumber(Long userId);


    List<ModelImageLikeVo> selectLikedImagesByUser(
            @Param("page") Page<ModelImageLikeVo> page,
            @Param("userId") Long userId,
            @Param("orderByColumn") String orderByColumn                 // 新增参数
    );
}
