refactor(printer): 优化人脸素材查询逻辑

- 移除不必要的MemberSourceEntity和相关Repository依赖
- 将数据查询逻辑从Repository层迁移到Mapper层
- 添加type参数支持素材类型过滤
- 修复方法注释中的人脸ID描述错误
- 直接返回SourceEntity列表避免额外的转换操作
This commit is contained in:
2026-01-03 23:46:52 +08:00
parent 21d8c56e82
commit 32297dc29c
3 changed files with 26 additions and 13 deletions

View File

@@ -173,4 +173,12 @@ public interface SourceMapper {
* @return 免费记录数
*/
int countFreeRelationsByFaceIdAndType(Long faceId, Integer type);
/**
* 根据faceId和type直接查询关联的source列表(避免N+1查询)
* @param faceId 人脸ID
* @param type 素材类型
* @return source实体列表
*/
List<SourceEntity> listSourceByFaceRelation(Long faceId, Integer type);
}