feat(source): 添加根据sourceId查询faceId和根据faceId分页查询source的功能

- 在SourceController中新增getFaceIdsBySourceIds接口,支持根据sourceId列表查询关联的faceId
- 在SourceController中新增pageByFaceId接口,支持根据faceId分页查询关联的source记录
- 在SourceMapper中新增listFaceIdsBySourceIds和pageByFaceId数据访问方法
- 在SourceService中实现getFaceIdsBySourceIds和pageByFaceId业务逻辑
- 在SourceMapper.xml中新增对应的SQL查询语句
- 添加MemberSourceEntity实体类引用和LinkedHashMap导入
- 实现空值处理和分页功能,确保查询结果准确性
This commit is contained in:
2026-02-11 16:38:30 +08:00
parent 13b1b37c8a
commit 122d430dbb
5 changed files with 100 additions and 0 deletions

View File

@@ -181,4 +181,18 @@ public interface SourceMapper {
* @return source实体列表
*/
List<SourceEntity> listSourceByFaceRelation(Long faceId, Integer type);
/**
* 根据sourceId列表查询关联的faceId
* @param sourceIds sourceId列表
* @return member_source记录列表(包含sourceId和faceId)
*/
List<MemberSourceEntity> listFaceIdsBySourceIds(List<Long> sourceIds);
/**
* 根据faceId分页查询关联的source记录
* @param sourceReqQuery 查询参数(需设置faceId)
* @return source响应列表
*/
List<SourceRespVO> pageByFaceId(SourceReqQuery sourceReqQuery);
}