You've already forked FrameTour-BE
feat(source): 新增根据人脸和设备ID获取素材的功能
- 在SourceMapper接口中新增getSourceByFaceAndDeviceId方法 - 支持通过faceId、deviceId、type和排序策略查询特定素材 - 在XML映射文件中实现对应的SQL查询逻辑 - 支持多种排序策略:最新、最早、评分降序、评分升序、随机和已购买优先 - 查询结果限制为一条记录
This commit is contained in:
@@ -131,4 +131,14 @@ public interface SourceMapper {
|
||||
* @return 设备ID列表
|
||||
*/
|
||||
List<Long> getDeviceIdsByFaceId(Long faceId);
|
||||
|
||||
/**
|
||||
* 根据faceId和设备ID获取source
|
||||
* @param faceId 人脸ID
|
||||
* @param deviceId 设备ID
|
||||
* @param type 素材类型(1-视频,2-图片)
|
||||
* @param sortStrategy 排序策略
|
||||
* @return source实体
|
||||
*/
|
||||
SourceEntity getSourceByFaceAndDeviceId(Long faceId, Long deviceId, Integer type, String sortStrategy);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user