package com.mcwl.communityCenter.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.communityCenter.domain.Publish;
import com.mcwl.communityCenter.domain.PublishCollect;
import com.mcwl.communityCenter.domain.dto.MyPublishCollectPageRes;
import com.mcwl.communityCenter.domain.dto.PublishCollectRes;
import com.mcwl.communityCenter.domain.dto.PublishPageRes;
import com.mcwl.communityCenter.domain.vo.PublishVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PublishCollectMapper extends BaseMapper<PublishCollect> {


    @InterceptorIgnore(tenantLine = "true")
    List<PublishVo> myCollectList(Page<PublishCollect> page,
                                  @Param("myPublishCollectPageRes") MyPublishCollectPageRes myPublishCollectPageRes,
                                  @Param("userId") Long userId);

    @InterceptorIgnore(tenantLine = "true")
    void savePublishCollect(@Param("publishCollect") PublishCollect publishCollect);

    @InterceptorIgnore(tenantLine = "true")
    PublishCollect getPublishCollect(@Param("publishCollectRes") PublishCollectRes publishCollectRes,
                                     @Param("userId") Long userId);

    @InterceptorIgnore(tenantLine = "true")
    void updatePublishCollect(@Param("publishCollect") PublishCollect publishCollect);
}
