<?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.yida.data.form.apply.mapper.ApplyFormDataMapper">

    <!-- 查询数据表字段 -->
    <select id="findApplyFormFiled" resultType="java.lang.String">
        SELECT
            COLUMN_NAME
        FROM
            information_schema.COLUMNS
        WHERE TABLE_NAME = #{tableName}
    </select>

    <!-- 没有返回值并且带参数的动态sql -->
    <insert id="saveFormData">
        ${sql}
        <selectKey resultType="long" order="AFTER" keyProperty="parameterMap.id">
            SELECT LAST_INSERT_ID()
        </selectKey>
    </insert>

    <!-- 查询用户填报数据信息 -->
    <select id="findFillUserData" resultType="java.util.Map">
        ${sql}
    </select>

</mapper>
