瀏覽代碼

Merge branch 'dev' of http://www.ekexiu.com:3000/jiapeng/portal-web.git
into dev

jiapeng 7 年之前
父節點
當前提交
63cab81ffd

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

@ -120,13 +120,13 @@ public abstract class ArticleDao {
120 120

121 121
	@LimitSelect
122 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 124
	@Where("STATUS = '1'")
125 125
	public abstract List<Article> proPublish(Connection con, String professorId, String publishTime, long shareId, int rows)throws SQLException;
126 126

127 127
	@LimitSelect
128 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 130
	@Where("STATUS = '1'")
131 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,7 +23,6 @@ import org.jfw.apt.orm.annotation.dao.method.operator.Update;
23 23
import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
24 24
import org.jfw.apt.orm.annotation.dao.param.GroupSqlColumn;
25 25
import org.jfw.apt.orm.annotation.dao.param.In;
26
import org.jfw.apt.orm.annotation.dao.param.LessThan;
27 26
import org.jfw.apt.orm.annotation.dao.param.Like;
28 27
import org.jfw.apt.orm.annotation.dao.param.Set;
29 28
import org.jfw.apt.orm.core.defaultImpl.LongHandler;
@ -1101,12 +1100,12 @@ public abstract class ResourceDao {
1101 1100
	public abstract PageQueryResult<Resource> pageQueryProPublish(Connection con,String professorId,int pageSize,int pageNo) throws SQLException;
1102 1101

1103 1102
    @LimitSelect
1104
    @OrderBy(cols = {@LimitColumn(value = "publishTime", asc = false), @LimitColumn(value = "shareId", handlerClass = LongHandler.class)}, value = "")
1103
    @OrderBy(cols = {@LimitColumn(value = "publishTime", asc = false), @LimitColumn(value = "shareId",asc = false,handlerClass = LongHandler.class)}, value = "")
1105 1104
    @Where("STATUS='1'")
1106 1105
    public abstract List<Resource> proPublish(Connection con, String professorId, String publishTime, long shareId, int rows) throws SQLException;
1107 1106

1108 1107
    @LimitSelect
1109
    @OrderBy(cols = {@LimitColumn(value = "publishTime", asc = false), @LimitColumn(value = "shareId", handlerClass = LongHandler.class)}, value = "")
1108
    @OrderBy(cols = {@LimitColumn(value = "publishTime", asc = false), @LimitColumn(value = "shareId",asc = false, handlerClass = LongHandler.class)}, value = "")
1110 1109
    @Where("STATUS='1'")
1111 1110
    public abstract List<Resource> orgPublish(Connection con, String orgId, String publishTime, long shareId, int rows) throws SQLException;
1112 1111


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

@ -54,6 +54,7 @@ import java.text.SimpleDateFormat;
54 54
import java.util.Collections;
55 55
import java.util.Date;
56 56
import java.util.List;
57
import java.util.Objects;
57 58

58 59
@Path("/article")
59 60
public class ArticleService {
@ -888,9 +889,9 @@ public class ArticleService {
888 889
	@Get
889 890
	@Path("/publish")
890 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 893
			return this.articleDao.proPublish(con, owner, publishTime,shareId, rows);
893
		} else if (category == "2") {
894
		} else if (Objects.equals(category, "2")) {
894 895
			return this.articleDao.orgPublish(con, owner, publishTime,shareId, rows);
895 896
		}
896 897
		return null;