feat(face): 添加人脸样本关联分组功能
All checks were successful
ZhenTu-BE/pipeline/head This commit looks good

- 新增 FaceSampleAssociationController 提供关联管理API
- 新增 ExpandSampleAssociationStage 扩展匹配结果中的关联样本
- 在人脸匹配流程中集成关联样本扩展逻辑
- 新增 FaceSampleAssociationMapper 和相关实体类
- 修改 UpdateFaceResultStage 使用扩展后的样本ID列表
- 添加关联样本扩展的日志记录和统计功能
This commit is contained in:
2026-02-15 02:48:13 +08:00
parent 062a128dcc
commit 9a18ffc167
11 changed files with 504 additions and 22 deletions

View File

@@ -0,0 +1,48 @@
package com.ycwl.basic.mapper;
import com.ycwl.basic.model.pc.faceSample.entity.FaceSampleAssociationEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 人脸样本关联分组 Mapper
*/
@Mapper
public interface FaceSampleAssociationMapper {
/**
* 根据景区ID和样本ID列表,查找同组的所有关联样本ID
*/
List<Long> findAssociatedSampleIds(@Param("scenicId") Long scenicId,
@Param("sampleIds") List<Long> sampleIds);
/**
* 批量插入关联记录(忽略重复)
*/
void batchInsertIgnore(@Param("list") List<FaceSampleAssociationEntity> list);
/**
* 删除指定组内的指定样本关联
*/
void deleteByGroupAndSampleIds(@Param("scenicId") Long scenicId,
@Param("groupKey") String groupKey,
@Param("sampleIds") List<Long> sampleIds);
/**
* 删除整个组的所有关联
*/
void deleteByGroup(@Param("scenicId") Long scenicId,
@Param("groupKey") String groupKey);
/**
* 查询指定组的所有样本ID
*/
List<Long> listSampleIdsByGroup(@Param("scenicId") Long scenicId,
@Param("groupKey") String groupKey);
/**
* 查询指定景区下的所有分组标识
*/
List<String> listGroupKeysByScenicId(@Param("scenicId") Long scenicId);
}