You've already forked FrameTour-BE
feat(puzzle): 添加统计人脸ID生成记录数量功能
- 在PuzzleGenerationRecordMapper接口中新增countByFaceId方法 - 在PuzzleGenerationRecordMapper.xml中实现对应的SQL查询 - 支持根据faceId统计生成记录的数量
This commit is contained in:
@@ -31,6 +31,12 @@ public interface PuzzleGenerationRecordMapper {
|
||||
*/
|
||||
List<PuzzleGenerationRecordEntity> listByFaceId(@Param("faceId") Long faceId);
|
||||
|
||||
|
||||
/**
|
||||
* 统计人脸ID的生成记录数量
|
||||
*/
|
||||
int countByFaceId(@Param("faceId") Long faceId);
|
||||
|
||||
/**
|
||||
* 插入记录
|
||||
*/
|
||||
|
||||
@@ -62,6 +62,13 @@
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 统计人脸ID的生成记录数量 -->
|
||||
<select id="countByFaceId" resultType="int">
|
||||
SELECT COUNT(*)
|
||||
FROM puzzle_generation_record
|
||||
WHERE face_id = #{faceId}
|
||||
</select>
|
||||
|
||||
<!-- 插入 -->
|
||||
<insert id="insert" parameterType="com.ycwl.basic.puzzle.entity.PuzzleGenerationRecordEntity"
|
||||
useGeneratedKeys="true" keyProperty="id">
|
||||
|
||||
Reference in New Issue
Block a user