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">
<mapper namespace="com.nju.svcdisambiguation.dataMapper.ieee.IEEEPaperInfoMapper">
<resultMap id="PaperInstitution" type="com.nju.svcdisambiguation.po.PaperInstitutionsPO">
<id column="id" property="id"/>
<result column="name" property="name"/>
<result column="db" property="db"/>
</resultMap>
<select id="searchInstitutionsByPaperId" resultMap="PaperInstitution">
select affiliationID as id, affiliation_name as name, 'IEEE' as db from affiliation where affiliation_name in
(select distinct affiliationNAME from authoraffiliation where authorID in
(select authorID from authorize where paperID = #{paperId}))
</select>
<select id="searchPdfLinkByPaperId" resultType="java.lang.String">
select pdf_link from document where document_id = #{paperId}
</select>
<select id="searchAbsByPaperId" resultType="java.lang.String">
select abstract from document where document_id = #{paperId}
</select>
<resultMap id="ReferenceVO" type="com.nju.svcdisambiguation.vo.detail.ReferenceVO">
<result column="id" property="id"/>
<result column="db" property="db"/>
<result column="title" property="title"/>
<result column="publication" property="publication"/>
<result column="year" property="year"/>
</resultMap>
<select id="selectReferenceVOByPaperId" resultMap="ReferenceVO">
select document_id as id, 'IEEE' as db, title, publication, publish_year from document,
(select referredId from ref where refererId = #{id}) tmp
where document_id = tmp.referredId
limit #{begin},#{pageSize}
</select>
<select id="selectReferenceVONumByAuthorId" resultType="java.lang.Integer">
select count(*) from document,
(select referredId from ref where refererId in
(select paperID from authorize where authorID = #{id})) tmp
where document_id = tmp.referredId
</select>
<select id="selectAuthorsByPaperId" resultType="java.lang.String">
select name from authors where id in
(select authorID from authorize where paperID = #{id})
</select>
<select id="selectKeywordsByPaperId" resultType="java.lang.String">
select field from keywords where id in
(select fieldId from paperfield where paperId = #{id})
</select>