XMTT 5 gadi atpakaļ
vecāks
revīzija
0d6a71e576

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

53
    @OrderBy("ORDER BY CREATE_TIME DESC")
53
    @OrderBy("ORDER BY CREATE_TIME DESC")
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;
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
    @PageQuery
60
    @PageQuery
57
    @OrderBy("ORDER BY CREATE_TIME DESC")
61
    @OrderBy("ORDER BY CREATE_TIME DESC")
58
    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;
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
        return researchResultDao.pageQuery(con, status, key == null ? null : "%" + key + "%", pageSize, pageNo);
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
    @Get
216
    @Get
211
    @Path("/pq/researcher")
217
    @Path("/pq/researcher")
212
    public PageQueryResult<ResearchResult> pqByResearcher(@JdbcConn Connection con,@Nullable String[] status, String id,int pageSize,int pageNo)throws SQLException {
218
    public PageQueryResult<ResearchResult> pqByResearcher(@JdbcConn Connection con,@Nullable String[] status, String id,int pageSize,int pageNo)throws SQLException {