<?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.zlpt.equip.mapper.SysFileInfoMapper">


    <select id="selectByMaId" resultType="com.bonus.zlpt.equip.api.domain.SysFileInfo">
        select * from  sys_file_info where model_id = #{maId}
    </select>
    <insert id="insertFileInfo" parameterType="com.bonus.zlpt.equip.api.domain.SysFileInfo">
        insert into sys_file_info (
            <if test="modelId != null">model_id,</if>
            <if test="fileName != null">file_name,</if>
            <if test="fileUrl != null">file_url,</if>
            <if test="dicId != null">dic_id,</if>
            <if test="creator != null">creator,</if>
           create_time
        )values(
        <if test="modelId != null">#{modelId},</if>
        <if test="fileName != null">#{fileName},</if>
        <if test="fileUrl != null">#{fileUrl},</if>
        <if test="dicId != null">#{dicId},</if>
        <if test="creator != null">#{creator},</if>
        sysdate()
        )
    </insert>

</mapper>