提交 9b08adce authored 作者: yangqi's avatar yangqi

1

上级 12f8d232
...@@ -10,6 +10,6 @@ ...@@ -10,6 +10,6 @@
INSERT INTO ali_face_entity (ali_face_db_id, entity_id, labels) VALUES(#{aliFaceDbId}, #{entityId}, #{labels}); INSERT INTO ali_face_entity (ali_face_db_id, entity_id, labels) VALUES(#{aliFaceDbId}, #{entityId}, #{labels});
</insert> </insert>
<update id="updateEntity" keyProperty="aliFaceEntityId" useGeneratedKeys="true" parameterType="cn.lefull.repository.model.face.AliFaceEntity"> <update id="updateEntity" keyProperty="aliFaceEntityId" useGeneratedKeys="true" parameterType="cn.lefull.repository.model.face.AliFaceEntity">
UPDATE ali_face_entity set labels = #{lables} where ali_face_entity_id = #{aliFaceEntiyId}; UPDATE ali_face_entity set labels = #{labels} where ali_face_entity_id = #{aliFaceEntityId};
</update> </update>
</mapper> </mapper>
...@@ -74,7 +74,8 @@ public class FaceServiceImpl implements FaceService{ ...@@ -74,7 +74,8 @@ public class FaceServiceImpl implements FaceService{
if(data == null){ if(data == null){
entityMapper.addEntity(entity); entityMapper.addEntity(entity);
}else{ }else{
entityMapper.updateEntity(entity); data.setLabels(labels);
entityMapper.updateEntity(data);
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论