<?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="AttachFileSql">
       
    <insert id="saveAttachFile" parameterType="hashmap">
    	<selectKey resultType="string" keyProperty="attachfileId" order="BEFORE">
            SELECT CONCAT('ATF-', LPAD(NEXTVAL(seq_attachfile_id), 21, '0'))
        </selectKey>
        /** AttachFileSql.saveAttachFile **/
        INSERT INTO HP_ATTACH_FILE(
                     ATTACHFILE_ID
                    ,ATTACHFILE_NM
                    ,FILE_PATH
                    ,FILE_SIZE
                    ,FILE_TYPE
                    ,REG_ID
                    ,REG_DATE
                    ,MOD_ID
                    ,MOD_DATE
        )VALUES(
        			 #{attachfileId}
                    ,#{attachfileNm}
                    ,#{filePath}
                    ,#{fileSize}
                    ,#{fileType}
                    ,#{regId}
                    ,NOW()
                    ,#{modId}
                    ,NOW()
        )
        
    </insert>

</mapper>