You've already forked FrameTour-BE
feat(puzzle): 添加批量替换模板元素功能
- 在 PuzzleTemplateController 中新增 replaceElements 接口 - 在 PuzzleElementMapper 中新增 getByTemplateIdAndKey 查询方法 - 在 PuzzleTemplateServiceImpl 中实现 replaceElements 业务逻辑 - 在 IPuzzleTemplateService 接口中定义 replaceElements 方法 - 在 PuzzleElementMapper.xml 中添加对应 SQL 查询语句
This commit is contained in:
@@ -49,6 +49,14 @@
|
||||
ORDER BY z_index ASC, id ASC
|
||||
</select>
|
||||
|
||||
<!-- 根据模板ID和元素Key查询元素 -->
|
||||
<select id="getByTemplateIdAndKey" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM puzzle_element
|
||||
WHERE template_id = #{templateId} AND element_key = #{elementKey} AND deleted = 0
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<!-- 插入(重构版) -->
|
||||
<insert id="insert" parameterType="com.ycwl.basic.puzzle.entity.PuzzleElementEntity"
|
||||
useGeneratedKeys="true" keyProperty="id">
|
||||
|
||||
Reference in New Issue
Block a user