项目是springBoot+MyBatis-Plus注释方式开发
/***
* 新增新闻
* @param news
* @return
*/
@Insert("insert into zhxy_news (image,title,content) values (#{image},#{title},#{content})")
Boolean insertNews(News news);
/***
* 按id查询新闻
* @param id
* @return
*/
@Select("select * from zhxy_news where id = #{id} and del_flag = 0")
News