Skip to content
Snippets Groups Projects
IEEEAuthorDetailMapper.xml 1.39 KiB
Newer Older
<?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">
jaron771's avatar
jaron771 committed
<mapper namespace="com.nju.svcdisambiguation.dataMapper.ieee.IEEEAuthorDetailMapper">
    <resultMap id="AuthorPublicationSummary" type="com.nju.svcdisambiguation.vo.detail.author.AuthorPublicationSummaryVO">
        <result column="publication" property="publication"/>
        <result column="docCount" property="docCount"/>
    </resultMap>

    <select id="selectAuthorPublicationSummaryByAuthorId" resultMap="AuthorPublicationSummary">
        select publication, count(*) as docCount from document
        where publication != '' and document_id in
        (select paperID from authorize where authorID = #{authorId})
        group by publication
    </select>

    <resultMap id="FieldSummary" type="com.nju.svcdisambiguation.po.FieldSummaryPO">
        <id column="fieldId" property="fieldId"/>
        <result column="fieldName" property="fieldName"/>
        <result column="count" property="count"/>
    </resultMap>

    <select id="selectFieldSummaryPOByAuthorId" resultMap="FieldSummary">
        select id as fieldId, field as fieldName, count(*) as count from keywords where id in
        (select fieldId from paperfield where paperId in
        (select paperID from authorize where authorID = #{authorId}))
        group by id, field
    </select>

</mapper>