You've already forked FrameTour-BE
refactor(printer): 优化人脸素材查询逻辑
- 移除不必要的MemberSourceEntity和相关Repository依赖 - 将数据查询逻辑从Repository层迁移到Mapper层 - 添加type参数支持素材类型过滤 - 修复方法注释中的人脸ID描述错误 - 直接返回SourceEntity列表避免额外的转换操作
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user