You've already forked FrameTour-BE
feat(face): 添加人工调整标记更新功能
- 在 FaceMapper 接口中新增 updateManualFlag 方法 - 实现根据 ID 更新 is_manual 字段的 SQL 语句 - 优化 FaceServiceImpl 中设置人工调整标记的逻辑 - 使用专门的更新方法替代原有的通用更新方式 - 清理相关缓存以确保数据一致性
This commit is contained in:
@@ -26,6 +26,7 @@ public interface FaceMapper {
|
|||||||
int forceDeleteById(Long id);
|
int forceDeleteById(Long id);
|
||||||
int deleteByIds(@Param("list") List<Long> ids);
|
int deleteByIds(@Param("list") List<Long> ids);
|
||||||
int update(FaceEntity face);
|
int update(FaceEntity face);
|
||||||
|
int updateManualFlag(@Param("id") Long id, @Param("isManual") Integer isManual);
|
||||||
|
|
||||||
FaceRespVO getLatestByMemberId(@Param("userId") Long userId, @Param("scenicId") Long scenicId);
|
FaceRespVO getLatestByMemberId(@Param("userId") Long userId, @Param("scenicId") Long scenicId);
|
||||||
|
|
||||||
|
|||||||
@@ -1307,10 +1307,7 @@ public class FaceServiceImpl implements FaceService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 设置人工调整标记
|
// 设置人工调整标记
|
||||||
FaceEntity updateEntity = new FaceEntity();
|
faceMapper.updateManualFlag(faceId, 1);
|
||||||
updateEntity.setId(faceId);
|
|
||||||
updateEntity.setIsManual(1);
|
|
||||||
faceMapper.update(updateEntity);
|
|
||||||
faceRepository.clearFaceCache(faceId);
|
faceRepository.clearFaceCache(faceId);
|
||||||
|
|
||||||
handleCustomFaceMatching(faceId, finalSampleList);
|
handleCustomFaceMatching(faceId, finalSampleList);
|
||||||
|
|||||||
@@ -29,6 +29,11 @@
|
|||||||
</set>
|
</set>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateManualFlag">
|
||||||
|
update face
|
||||||
|
set is_manual = #{isManual}
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
<update id="finishedJourney">
|
<update id="finishedJourney">
|
||||||
update face set finished_journey = 1 where id = #{id}
|
update face set finished_journey = 1 where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
Reference in New Issue
Block a user