<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.canteen.core.user.mapper.UserFaceMapper">
    <insert id="insertUserFace" parameterType="com.bonus.canteen.core.user.domain.UserFace" useGeneratedKeys="true" keyProperty="faceId">
        insert into user_face(user_id,photo_url,features,create_by,error_msg,create_time,update_by,update_time)
        values(#{userId},#{photoUrl},#{features},#{createBy},#{errorMsg},#{createTime},#{updateBy},#{updateTime})
        on duplicate key update features = #{features},
                                photo_url = #{photoUrl},
                                error_msg = #{errorMsg},
                                update_by = #{updateBy},
                                update_time = #{updateTime}
    </insert>
</mapper>