<?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="org.jeecg.modules.stm.doc.mapper.DocFilesMapper">
    <select id="queryCtpFileCount" resultType="java.util.Map">
        SELECT ctp,count(*) as cnt FROM doc_files  GROUP BY ctp
    </select>

    <select id="saveFileLink">
        insert into doc_file_link(sid,tid) values(1,2)
        <if test="idList != null and idList.size()>0">
            and A.id in
            <foreach item="id" collection="idList" open="(" separator="," close=")">
                #{id}
            </foreach>
        </if>
    </select>

</mapper>