XMTT 7 年之前
父節點
當前提交
83cbdb1430

+ 4 - 2
src/main/java/com/ekexiu/portal/dao/ResourceDao.java

@ -1092,12 +1092,14 @@ public abstract class ResourceDao {
1092 1092
	public abstract PageQueryResult<Resource> pageQueryProPublish(Connection con,String professorId,int pageSize,int pageNo) throws SQLException;
1093 1093

1094 1094
    @LimitSelect
1095
    @OrderBy(cols = {@LimitColumn(value = "publishTime", asc = false), @LimitColumn(value = "shareId", handlerClass = LongHandler.class)}, value = "")
1095 1096
    @Where("STATUS='1'")
1096
    public abstract List<Resource> proPublish(Connection con, String professorId, @LessThan String publishTime, int rows) throws SQLException;
1097
    public abstract List<Resource> proPublish(Connection con, String professorId, String publishTime, long shareId, int rows) throws SQLException;
1097 1098

1098 1099
    @LimitSelect
1100
    @OrderBy(cols = {@LimitColumn(value = "publishTime", asc = false), @LimitColumn(value = "shareId", handlerClass = LongHandler.class)}, value = "")
1099 1101
    @Where("STATUS='1'")
1100
    public abstract List<Resource> orgPublish(Connection con, String orgId, @LessThan String publishTime, int rows) throws SQLException;
1102
    public abstract List<Resource> orgPublish(Connection con, String orgId, String publishTime, long shareId, int rows) throws SQLException;
1101 1103

1102 1104
	@SelectList
1103 1105
	@OrderBy("ORDER BY PUBLISH_TIME DESC")

+ 1 - 1
src/main/java/com/ekexiu/portal/service/PpaperService.java

@ -126,7 +126,7 @@ public class PpaperService {
126 126
		} else {
127 127
			name = "%" + name + "%";
128 128
		}
129
		return this.ppaperDao.queryProfessor(con, id, name, assTime, id,rows);
129
		return this.ppaperDao.queryProfessor(con, owner, name, assTime, id,rows);
130 130
	}
131 131

132 132
	@Get

+ 1 - 1
src/main/java/com/ekexiu/portal/service/PpatentServcie.java

@ -132,7 +132,7 @@ public class PpatentServcie {
132 132
		} else {
133 133
			name = "%" + name + "%";
134 134
		}
135
		return this.ppatentDao.queryProfessor(con, id, name, assTime, id,rows);
135
		return this.ppatentDao.queryProfessor(con, owner, name, assTime, id,rows);
136 136
	}
137 137

138 138
	@Get

+ 12 - 4
src/main/java/com/ekexiu/portal/service/ResourceService.java

@ -830,13 +830,21 @@ public class ResourceService {
830 830

831 831
	@Get
832 832
	@Path("/publish")
833
	List<Resource> queryPublish(@JdbcConn Connection con, String category, String owner, @DefaultValue("\"9\"") String publishTime, int rows) throws SQLException {
833
	List<Resource> queryPublish(@JdbcConn Connection con, String category, String owner, @DefaultValue("\"9\"") String publishTime,@DefaultValue("Long.MAX_VALUE")long shareId, int rows) throws SQLException {
834
		List<Resource> resources = null;
834 835
		if (Objects.equals(category, "1")) {
835
			return this.resourceDao.proPublish(con, owner, publishTime, rows);
836
			resources = this.resourceDao.proPublish(con, owner, publishTime,shareId, rows);
836 837
		} else if (Objects.equals(category, "2")) {
837
			return this.resourceDao.orgPublish(con, owner, publishTime, rows);
838
			resources = this.resourceDao.orgPublish(con, owner, publishTime,shareId, rows);
839
		}
840
		if (resources != null && resources.size() > 0) {
841
			for (Resource resource : resources) {
842
				resource.setImages(this.imageDao.queryRes(con, resource.getResourceId()));
843
			}
844
			return resources;
845
		} else {
846
			return null;
838 847
		}
839
		return null;
840 848
	}
841 849

842 850
	@Get