28 lines
727 B
Java
28 lines
727 B
Java
package com.xubx.springboot_01demo.mapper;
|
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
import com.xubx.springboot_01demo.dto.blog.addBlogDto;
|
|
import com.xubx.springboot_01demo.pojo.Blogs;
|
|
|
|
import java.util.List;
|
|
|
|
public interface BlogsMapper extends BaseMapper<Blogs> {
|
|
//获取所有博客文章信息
|
|
List<Blogs> findAllBlogs();
|
|
//根据id获取博客
|
|
Blogs findByIdBlogs(int id);
|
|
//新增博客
|
|
void addBlogs(addBlogDto blogs);
|
|
//更新博客
|
|
void updateBlogs(Blogs blogs);
|
|
//删除博客
|
|
void deleteBlogs(int id);
|
|
|
|
/**
|
|
* 插入博客分类中间表
|
|
* @param blogId
|
|
* @param categoryId
|
|
*/
|
|
void insertCategory(int blogId, String categoryId);
|
|
}
|