NewsMapper.java 960 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package com.redxun.knowledge.mapper;
  2. import com.baomidou.mybatisplus.core.metadata.IPage;
  3. import com.redxun.knowledge.entity.dao.News;
  4. import org.apache.ibatis.annotations.Mapper;
  5. import com.redxun.common.base.db.BaseDao;
  6. import org.apache.ibatis.annotations.Param;
  7. import java.io.Serializable;
  8. import java.util.Map;
  9. /**
  10. * 业务--新闻表数据库访问层
  11. */
  12. @Mapper
  13. public interface NewsMapper extends BaseDao<News> {
  14. /**
  15. * 分页查询
  16. * @param page
  17. * @param params
  18. * @return
  19. */
  20. IPage findAllNews(IPage<News> page,@Param("params")Map<String, Object> params,@Param("w") Map<String, Object> order);
  21. IPage findAllPcNews(IPage page,@Param("params") Map<String,Object> params);
  22. /**
  23. * 新增/修改时候变更sort
  24. * @param sort
  25. */
  26. void insertOrUpdateBySort(Integer sort);
  27. void deleteNews(Serializable id);
  28. void swapSort(@Param("newsId") String newsId, @Param("sort") Integer sort);
  29. }