<?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.xueyi.system.staff.mapper.DmVisitorsMapper">


    <insert id="addOne" parameterType="DmVisitorsPo" useGeneratedKeys = "true"   keyProperty = "id">
        <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
            select LAST_INSERT_ID()
        </selectKey>
        insert into dm_visitors(name,nickname,phone,visitor_company,type,resource_id,avatar) values
        (
            #{name},
            #{nickname},
            #{phone},
            #{visitorCompany},
            #{type},
            #{resourceId},
            #{avatar}
        )
    </insert >
</mapper>