XMTT 5 years ago
parent
commit
0d6a71e576

+ 4 - 0
src/main/java/com/ekexiu/portal/resResult/ResearchResultDao.java

@ -53,6 +53,10 @@ public interface ResearchResultDao {
53 53
    @OrderBy("ORDER BY CREATE_TIME DESC")
54 54
    PageQueryResult<ResearchResult> pageQuery(Connection con, @Nullable @In String[] status, @Nullable @GroupSqlColumn(handlerClass = StringHandler.class, value = {"name like ?", "ID IN (SELECT ID FROM RESEARCHER WHERE NAME LIKE ?)", "SUBJECT LIKE ?", "INDUSTRY LIKE ?"}, isAnd = false) String key, int pageSize, int pageNo) throws SQLException;
55 55
56
    @PageQuery
57
    @OrderBy("ORDER BY PAGE_VIEWS DESC")
58
    PageQueryResult<ResearchResult> pqByPageViews(Connection con, @Nullable @In String[] status, @Nullable @GroupSqlColumn(handlerClass = StringHandler.class, value = {"name like ?", "ID IN (SELECT ID FROM RESEARCHER WHERE NAME LIKE ?)", "SUBJECT LIKE ?", "INDUSTRY LIKE ?"}, isAnd = false) String key, int pageSize, int pageNo) throws SQLException;
59
56 60
    @PageQuery
57 61
    @OrderBy("ORDER BY CREATE_TIME DESC")
58 62
    PageQueryResult<ResearchResult> pageQueryByResearcher(Connection con, @Nullable @In String[] status, @SqlColumn(handlerClass = StringHandler.class, value = "ID IN (SELECT ID FROM RESEARCHER WHERE PROFESSOR_ID = ?)") String id, int pageSize, int pageNo) throws SQLException;

+ 6 - 0
src/main/java/com/ekexiu/portal/resResult/ResearchResultService.java

@ -207,6 +207,12 @@ public class ResearchResultService {
207 207
        return researchResultDao.pageQuery(con, status, key == null ? null : "%" + key + "%", pageSize, pageNo);
208 208
    }
209 209
210
    @Get
211
    @Path("/pq/byPageViews")
212
    public PageQueryResult<ResearchResult> pqByPageView(@JdbcConn Connection con,@Nullable String[] status,@Nullable String key,int pageSize,int pageNo)throws SQLException {
213
        return researchResultDao.pqByPageViews(con, status, key == null ? null : "%" + key + "%", pageSize, pageNo);
214
    }
215
210 216
    @Get
211 217
    @Path("/pq/researcher")
212 218
    public PageQueryResult<ResearchResult> pqByResearcher(@JdbcConn Connection con,@Nullable String[] status, String id,int pageSize,int pageNo)throws SQLException {