XMTT 7 vuotta sitten
vanhempi
commit
83cbdb1430

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

1092
	public abstract PageQueryResult<Resource> pageQueryProPublish(Connection con,String professorId,int pageSize,int pageNo) throws SQLException;
1092
	public abstract PageQueryResult<Resource> pageQueryProPublish(Connection con,String professorId,int pageSize,int pageNo) throws SQLException;
1093

1093

1094
    @LimitSelect
1094
    @LimitSelect
1095
    @OrderBy(cols = {@LimitColumn(value = "publishTime", asc = false), @LimitColumn(value = "shareId", handlerClass = LongHandler.class)}, value = "")
1095
    @Where("STATUS='1'")
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
    @LimitSelect
1099
    @LimitSelect
1100
    @OrderBy(cols = {@LimitColumn(value = "publishTime", asc = false), @LimitColumn(value = "shareId", handlerClass = LongHandler.class)}, value = "")
1099
    @Where("STATUS='1'")
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
	@SelectList
1104
	@SelectList
1103
	@OrderBy("ORDER BY PUBLISH_TIME DESC")
1105
	@OrderBy("ORDER BY PUBLISH_TIME DESC")

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

126
		} else {
126
		} else {
127
			name = "%" + name + "%";
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
	@Get
132
	@Get

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

132
		} else {
132
		} else {
133
			name = "%" + name + "%";
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
	@Get
138
	@Get

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

830

830

831
	@Get
831
	@Get
832
	@Path("/publish")
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
		if (Objects.equals(category, "1")) {
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
		} else if (Objects.equals(category, "2")) {
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
	@Get
850
	@Get