"git@git.nju.edu.cn:191250140wwy/frontend-practice-mirror.git" did not exist on "fb79b999baf3be40a216bd50b93177df9ab3239e"
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.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>
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<resultMap id="Institution" type="com.nju.svcdisambiguation.vo.detail.author.InstitutionAuthorDetailVO">
<id column="id" property="id"/>
<result column="name" property="name"/>
</resultMap>
<select id="selectInstitutionByAuthorId" resultMap="Institution">
select affiliationID as id, affiliation_name as name from affiliation
where affiliation_name in
(select affiliationNAME from authoraffiliation where authorID = #{authorId})
</select>
<resultMap id="AuthorDetail" type="com.nju.svcdisambiguation.vo.detail.author.AuthorDetailVO">
<id column="id" property="id"/>
<result column="name" property="name"/>
</resultMap>
<select id="selectAuthorDetailById" resultMap="AuthorDetail">
select id, name from authors where id = #{authorId}
</select>
<resultMap id="PaperActivation" type="com.nju.svcdisambiguation.po.PaperActivationPO">
<id column="docId" property="docId"/>
<result column="citations" property="citations"/>
<result column="year" property="year"/>
</resultMap>
<select id="selectPaperActivationPOByAuthorId" resultMap="PaperActivation">
select document_id as docId, publish_year, count(*) as citations from (select document_id, publish_year from document where document_id in
(select paperID from authorize where authorID = #{authorId})) doc join ref
on ref.referredId = doc.document_id
group by document_id, publish_year
</select>
<select id="selectSameAuthorsByAuthorId" resultType="java.lang.String">
select name from authors where alias != '' and alias in
(select alias from authors where id = #{authorId})
</select>
<select id="selectDocCountByAuthorId" resultType="java.lang.Integer">
select count(*) from authorize where authorID = #{authorId}
</select>
<resultMap id="KeywordsAuthorDetail" type="com.nju.svcdisambiguation.vo.detail.author.KeywordsAuthorDetailVO">
<id column="id" property="id"/>
<result column="name" property="name"/>
<result column="docCount" property="docCount"/>
</resultMap>
<select id="selectKeywordsAuthorDetailByAuthorId" resultMap="KeywordsAuthorDetail">
select id, field as name, count(*) as docCount from keywords,
(select fieldId, paperId from paperfield where paperId in
(select paperID from authorize where authorID = #{authorId})) temp1
where id = fieldId
group by id, field
</select>
<select id="selectPAVOByFieldNameAndAuthorId" resultMap="PaperActivation">
select document_id as docId, publish_year as year, count(*) as citations from
(select document_id, publish_year from document where document_id in
(select paperId from paperfield
where fieldId in (select id from keywords where field = #{fieldName})
and paperId in (select paperID from authorize where authorID = #{authorId}))) temp
left join ref
on temp.document_id = ref.referredId
group by document_id, publish_year
</select>
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<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="selectReferenceVOByAuthorId" resultMap="ReferenceVO">
select document_id as id, 'IEEE' as db, title, publication, publish_year from document,
(select referredId from ref where refererId in
(select paperID from authorize where authorID = #{id})) tmp
where document_id = tmp.referredId
limit #{begin},#{pageSize}
</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>
<select id="selectAuthorReferred" resultType="java.lang.Integer">
select sum(citation_count) from document where document_id in
((select paperID from authorize where authorID = #{id}))
</select>
<select id="selectDocCnt" resultType="java.lang.Integer">
select count(*) from authorize where authorID = #{id}
</select>