NewsDictMapper.java 959 Bytes
package com.laowu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.laowu.model.NewsDictDO;
import com.laowu.model.NewsLabelDictDO;
import com.laowu.vo.lables.NewsVO;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author Tuyp
 * @since 2023-05-16
 */
@Repository
public interface NewsDictMapper extends BaseMapper<NewsDictDO> {

    /**
     *  查看新闻
     */
    IPage<NewsVO> news(IPage iPage,Long labelId,String title);

    /**
     * 查看新闻有哪几个
     */
    List<NewsLabelDictDO> newsLabels(Long newId);

    /**
     * 把所有置顶状态都置为0
     */
    void updateTopStatus();

    /**
     * 查看一个新闻
     */
    NewsVO oneNews(Long id);

    /**
     *  查看除去置顶的新闻
     */
    IPage<NewsVO> noTopNews(IPage iPage,Long labelId,String title);


}