Skip to content
Snippets Groups Projects
Commit 9ca804b9 authored by jaron771's avatar jaron771
Browse files

fix /paper/refer & /author/refer

parent c9019747
No related branches found
No related tags found
No related merge requests found
Showing
with 50 additions and 2 deletions
......@@ -38,6 +38,8 @@ public interface ACMAuthorDetailMapper {
ArrayList<ReferenceVO> selectReferenceVOByAuthorId(@Param("id") int id, @Param("begin") int begin, @Param("pageSize") int pageSize);
Integer selectReferenceVONumByAuthorId(@Param("id") int id);
ArrayList<String> selectAuthorsByPaperId(@Param("id") int id);
ArrayList<String> selectKeywordsByPaperId(@Param("id") int id);
......
......@@ -19,6 +19,8 @@ public interface ACMPaperInfoMapper {
ArrayList<ReferenceVO> selectReferenceVOByPaperId(@Param("id") int id, @Param("begin") int begin, @Param("pageSize") int pageSize);
Integer selectReferenceVONumByAuthorId(@Param("id") int id);
ArrayList<String> selectAuthorsByPaperId(@Param("id") int id);
ArrayList<String> selectKeywordsByPaperId(@Param("id") int id);
......
......@@ -37,6 +37,8 @@ public interface IEEEAuthorDetailMapper {
ArrayList<ReferenceVO> selectReferenceVOByAuthorId(@Param("id") int id, @Param("begin") int begin, @Param("pageSize") int pageSize);
Integer selectReferenceVONumByAuthorId(@Param("id") int id);
ArrayList<String> selectAuthorsByPaperId(@Param("id") int id);
ArrayList<String> selectKeywordsByPaperId(@Param("id") int id);
......
......@@ -20,6 +20,8 @@ public interface IEEEPaperInfoMapper {
ArrayList<ReferenceVO> selectReferenceVOByPaperId(@Param("id") int id, @Param("begin") int begin, @Param("pageSize") int pageSize);
Integer selectReferenceVONumByAuthorId(@Param("id") int id);
ArrayList<String> selectAuthorsByPaperId(@Param("id") int id);
ArrayList<String> selectKeywordsByPaperId(@Param("id") int id);
......
......@@ -136,7 +136,13 @@ public class AuthorDetailServiceImp implements AuthorDetailService {
referenceVO.setAuthors(db.equals("ACM") ? acmAuthorDetailMapper.selectAuthorsByPaperId(paperId) : ieeeAuthorDetailMapper.selectAuthorsByPaperId(paperId));
referenceVO.setKeywords(db.equals("ACM") ? acmAuthorDetailMapper.selectKeywordsByPaperId(paperId) : ieeeAuthorDetailMapper.selectKeywordsByPaperId(paperId));
}
return ResponseVO.buildSuccess(referenceVOS);
ResponseVO responseVO = new ResponseVO();
responseVO.setMessage(
Integer.toString(db.equals("ACM") ? acmAuthorDetailMapper.selectReferenceVONumByAuthorId(id) : ieeeAuthorDetailMapper.selectReferenceVONumByAuthorId(id))
);
responseVO.setSuccess(true);
responseVO.setContent(referenceVOS);
return responseVO;
}
@Override
......
......@@ -61,7 +61,13 @@ public class PaperDetailServiceImp implements PaperDetailService {
referenceVO.setAuthors(db.equals("ACM") ? acmPaperInfoMapper.selectAuthorsByPaperId(paperId) : ieeePaperInfoMapper.selectAuthorsByPaperId(paperId));
referenceVO.setKeywords(db.equals("ACM") ? acmPaperInfoMapper.selectKeywordsByPaperId(paperId) : ieeePaperInfoMapper.selectKeywordsByPaperId(paperId));
}
return ResponseVO.buildSuccess(referenceVOS);
ResponseVO responseVO = new ResponseVO();
responseVO.setMessage(
Integer.toString(db.equals("ACM") ? acmPaperInfoMapper.selectReferenceVONumByAuthorId(id) : ieeePaperInfoMapper.selectReferenceVONumByAuthorId(id))
);
responseVO.setSuccess(true);
responseVO.setContent(referenceVOS);
return responseVO;
}
private ArrayList<PaperThemeVO> getThemes(String abs){
......
......@@ -110,6 +110,13 @@
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 author where author_id in
(select authorID from authorize where paperID = #{id})
......
......@@ -37,6 +37,13 @@
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 author where author_id in
(select authorID from authorize where paperID = #{id})
......
......@@ -110,6 +110,13 @@
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})
......
......@@ -37,6 +37,13 @@
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})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment