feat(puzzle): 添加模板封面图片字段并更新相关逻辑

- 在PuzzleTemplateDTO和TemplateCreateRequest中新增coverImage字段
- 在PuzzleTemplateEntity中新增coverImage字段并映射到数据库
- 更新FaceServiceImpl以支持获取模板封面图片URL
- 修改Mapper XML文件以支持coverImage字段的读写操作
- 调整SQL查询和插入语句以包含新的coverImage字段
- 更新三拼图内容页面逻辑以使用模板封面图片URL
This commit is contained in:
2025-11-21 16:04:59 +08:00
parent 038b2e6f08
commit cd5ba23d59
5 changed files with 27 additions and 5 deletions

View File

@@ -13,6 +13,7 @@
<result column="background_type" property="backgroundType"/>
<result column="background_color" property="backgroundColor"/>
<result column="background_image" property="backgroundImage"/>
<result column="cover_image" property="coverImage"/>
<result column="description" property="description"/>
<result column="category" property="category"/>
<result column="status" property="status"/>
@@ -26,7 +27,7 @@
<!-- 基础列 -->
<sql id="Base_Column_List">
id, name, code, canvas_width, canvas_height, background_type, background_color,
background_image, description, category, status, scenic_id, create_time, update_time, deleted, deleted_at
background_image, cover_image, description, category, status, scenic_id, create_time, update_time, deleted, deleted_at
</sql>
<!-- 根据ID查询 -->
@@ -67,10 +68,10 @@
useGeneratedKeys="true" keyProperty="id">
INSERT INTO puzzle_template (
name, code, canvas_width, canvas_height, background_type, background_color,
background_image, description, category, status, scenic_id, create_time, update_time, deleted
background_image, cover_image, description, category, status, scenic_id, create_time, update_time, deleted
) VALUES (
#{name}, #{code}, #{canvasWidth}, #{canvasHeight}, #{backgroundType}, #{backgroundColor},
#{backgroundImage}, #{description}, #{category}, #{status}, #{scenicId}, NOW(), NOW(), 0
#{backgroundImage}, #{coverImage}, #{description}, #{category}, #{status}, #{scenicId}, NOW(), NOW(), 0
)
</insert>
@@ -85,6 +86,7 @@
<if test="backgroundType != null">background_type = #{backgroundType},</if>
<if test="backgroundColor != null">background_color = #{backgroundColor},</if>
<if test="backgroundImage != null">background_image = #{backgroundImage},</if>
<if test="coverImage != null">cover_image = #{coverImage},</if>
<if test="description != null">description = #{description},</if>
<if test="category != null">category = #{category},</if>
<if test="status != null">status = #{status},</if>