<?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.resource.mapper.DmResourcesMapper">

    <insert id="insertOne" parameterType="com.xueyi.system.api.resource.domain.po.DmResourcesPo" useGeneratedKeys = "true" keyProperty = "id" >
        <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
            select LAST_INSERT_ID()
        </selectKey>
        insert into dm_resources(url, name, type, feature,file_size) values (#{url}, #{name}, ${type}, #{feature}, #{fileSize})
    </insert >
</mapper>