feat: 优化代码生成及文案模板渲染

This commit is contained in:
王鹏
2026-07-29 16:17:49 +08:00
parent c631d058c1
commit e9d627df9c
15 changed files with 560 additions and 199 deletions

View File

@@ -21,6 +21,14 @@ public interface AppBlogArticleMapper
*/
public AppBlogArticle selectAppBlogArticleById(Long id);
/**
* 根据完整标题精确查询文章。
*
* @param title 文章标题
* @return 文章
*/
public AppBlogArticle selectAppBlogArticleByTitle(String title);
/**
* 查询文章列表
*

View File

@@ -91,6 +91,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectAppBlogArticleVo"/>
where id = #{id}
</select>
<select id="selectAppBlogArticleByTitle" parameterType="String" resultMap="AppBlogArticleResult">
<include refid="selectAppBlogArticleVo"/>
where title = #{title}
limit 1
</select>
<insert id="insertAppBlogArticle" parameterType="AppBlogArticle" useGeneratedKeys="true" keyProperty="id">
insert into app_blog_article
@@ -168,4 +174,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
</mapper>
</mapper>