You've already forked FrameTour-BE
feat(ai-cam): 实现AI相机免费照片赠送逻辑
- 新增统计免费关联记录数的Mapper方法 - 在AppAiCamServiceImpl中注入ScenicRepository依赖 - 删除旧关系前查询已有免费记录避免重复赠送 - 根据景区配置获取免费照片数量 - 随机选择免费照片并标记为免费状态 - 保留已存在的免费照片记录 - 更新日志记录以区分普通和免费照片数量
This commit is contained in:
@@ -165,4 +165,12 @@ public interface SourceMapper {
|
||||
* @return 删除的记录数
|
||||
*/
|
||||
int deleteRelationsByFaceIdAndType(Long faceId, Integer type);
|
||||
|
||||
/**
|
||||
* 统计指定faceId和type的免费关联记录数
|
||||
* @param faceId 人脸ID
|
||||
* @param type 素材类型
|
||||
* @return 免费记录数
|
||||
*/
|
||||
int countFreeRelationsByFaceIdAndType(Long faceId, Integer type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user