XMTT %!s(int64=7) %!d(string=hace) años
padre
commit
d17ff75acd

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

120

120

121
	@LimitSelect
121
	@LimitSelect
122
	@Exclude("articleContent")
122
	@Exclude("articleContent")
123
	@OrderBy(cols = {@LimitColumn(value = "publishTime", asc = false), @LimitColumn(value = "shareId", handlerClass = LongHandler.class)}, value = "")
123
	@OrderBy(cols = {@LimitColumn(value = "publishTime", asc = false), @LimitColumn(value = "shareId",asc = false, handlerClass = LongHandler.class)}, value = "")
124
	@Where("STATUS = '1'")
124
	@Where("STATUS = '1'")
125
	public abstract List<Article> proPublish(Connection con, String professorId, String publishTime, long shareId, int rows)throws SQLException;
125
	public abstract List<Article> proPublish(Connection con, String professorId, String publishTime, long shareId, int rows)throws SQLException;
126

126

127
	@LimitSelect
127
	@LimitSelect
128
	@Exclude("articleContent")
128
	@Exclude("articleContent")
129
	@OrderBy(cols = {@LimitColumn(value = "publishTime", asc = false), @LimitColumn(value = "shareId", handlerClass = LongHandler.class)}, value = "")
129
	@OrderBy(cols = {@LimitColumn(value = "publishTime", asc = false), @LimitColumn(value = "shareId",asc = false, handlerClass = LongHandler.class)}, value = "")
130
	@Where("STATUS = '1'")
130
	@Where("STATUS = '1'")
131
	public abstract List<Article> orgPublish(Connection con, String orgId, String publishTime, long shareId, int rows)throws SQLException;
131
	public abstract List<Article> orgPublish(Connection con, String orgId, String publishTime, long shareId, int rows)throws SQLException;
132

132


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

23
import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
23
import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
24
import org.jfw.apt.orm.annotation.dao.param.GroupSqlColumn;
24
import org.jfw.apt.orm.annotation.dao.param.GroupSqlColumn;
25
import org.jfw.apt.orm.annotation.dao.param.In;
25
import org.jfw.apt.orm.annotation.dao.param.In;
26
import org.jfw.apt.orm.annotation.dao.param.LessThan;
27
import org.jfw.apt.orm.annotation.dao.param.Like;
26
import org.jfw.apt.orm.annotation.dao.param.Like;
28
import org.jfw.apt.orm.annotation.dao.param.Set;
27
import org.jfw.apt.orm.annotation.dao.param.Set;
29
import org.jfw.apt.orm.core.defaultImpl.LongHandler;
28
import org.jfw.apt.orm.core.defaultImpl.LongHandler;
1092
	public abstract PageQueryResult<Resource> pageQueryProPublish(Connection con,String professorId,int pageSize,int pageNo) throws SQLException;
1091
	public abstract PageQueryResult<Resource> pageQueryProPublish(Connection con,String professorId,int pageSize,int pageNo) throws SQLException;
1093

1092

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

1097

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

1102


+ 3 - 2
src/main/java/com/ekexiu/portal/service/ArticleService.java

54
import java.util.Collections;
54
import java.util.Collections;
55
import java.util.Date;
55
import java.util.Date;
56
import java.util.List;
56
import java.util.List;
57
import java.util.Objects;
57

58

58
@Path("/article")
59
@Path("/article")
59
public class ArticleService {
60
public class ArticleService {
888
	@Get
889
	@Get
889
	@Path("/publish")
890
	@Path("/publish")
890
	public List<Article> proPublish(@JdbcConn Connection con, String category, String owner, @DefaultValue("\"9\"") String publishTime,@DefaultValue("Long.MAX_VALUE")long shareId, int rows)throws SQLException {
891
	public List<Article> proPublish(@JdbcConn Connection con, String category, String owner, @DefaultValue("\"9\"") String publishTime,@DefaultValue("Long.MAX_VALUE")long shareId, int rows)throws SQLException {
891
		if (category == "1") {
892
		if (Objects.equals(category, "1")) {
892
			return this.articleDao.proPublish(con, owner, publishTime,shareId, rows);
893
			return this.articleDao.proPublish(con, owner, publishTime,shareId, rows);
893
		} else if (category == "2") {
894
		} else if (Objects.equals(category, "2")) {
894
			return this.articleDao.orgPublish(con, owner, publishTime,shareId, rows);
895
			return this.articleDao.orgPublish(con, owner, publishTime,shareId, rows);
895
		}
896
		}
896
		return null;
897
		return null;