feat(face): 添加人工调整标记更新功能

- 在 FaceMapper 接口中新增 updateManualFlag 方法
- 实现根据 ID 更新 is_manual 字段的 SQL 语句
- 优化 FaceServiceImpl 中设置人工调整标记的逻辑
- 使用专门的更新方法替代原有的通用更新方式
- 清理相关缓存以确保数据一致性
This commit is contained in:
2025-10-30 10:16:24 +08:00
parent ef8a913636
commit a7fe0d715d
3 changed files with 7 additions and 4 deletions

View File

@@ -26,6 +26,7 @@ public interface FaceMapper {
int forceDeleteById(Long id);
int deleteByIds(@Param("list") List<Long> ids);
int update(FaceEntity face);
int updateManualFlag(@Param("id") Long id, @Param("isManual") Integer isManual);
FaceRespVO getLatestByMemberId(@Param("userId") Long userId, @Param("scenicId") Long scenicId);

View File

@@ -1307,10 +1307,7 @@ public class FaceServiceImpl implements FaceService {
}
// 设置人工调整标记
FaceEntity updateEntity = new FaceEntity();
updateEntity.setId(faceId);
updateEntity.setIsManual(1);
faceMapper.update(updateEntity);
faceMapper.updateManualFlag(faceId, 1);
faceRepository.clearFaceCache(faceId);
handleCustomFaceMatching(faceId, finalSampleList);

View File

@@ -29,6 +29,11 @@
</set>
where id = #{id}
</update>
<update id="updateManualFlag">
update face
set is_manual = #{isManual}
where id = #{id}
</update>
<update id="finishedJourney">
update face set finished_journey = 1 where id = #{id}
</update>