jiapeng 7 gadi atpakaļ
vecāks
revīzija
11c05fdffb
1 mainītis faili ar 6 papildinājumiem un 4 dzēšanām
  1. 6 4
      src/main/java/com/ekexiu/portal/dao/ArticleDao.java

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

@ -25,6 +25,7 @@ import org.jfw.apt.orm.annotation.dao.method.operator.SelectList;
25 25
import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne;
26 26
import org.jfw.apt.orm.annotation.dao.method.operator.Update;
27 27
import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
28
import org.jfw.apt.orm.annotation.dao.param.GroupSqlColumn;
28 29
import org.jfw.apt.orm.annotation.dao.param.GtEq;
29 30
import org.jfw.apt.orm.annotation.dao.param.In;
30 31
import org.jfw.apt.orm.annotation.dao.param.LessThan;
@ -473,12 +474,13 @@ public abstract class ArticleDao {
473 474
	@Exclude("articleContent")
474 475
	@PageSelect
475 476
	@OrderBy(" ORDER BY SORT_NUM DESC, PUBLISH_TIME DESC")
477
	@Where("STATUS = '1'")
476 478
	@Or
477 479
	public abstract PageQueryResult<Article> firstPageQuery(Connection con,
478
			@SqlColumn(handlerClass = StringHandler.class, value = { " (PROFESSOR_ID IN (SELECT ID FROM PROFESSOR WHERE NAME LIKE ?) AND STATUS = '1')",
479
					" (ORG_ID IN (SELECT ID FROM ORGANIZATION WHERE NAME LIKE ?) AND STATUS = '1')",
480
					" (ORG_ID IN (SELECT ID FROM ORGANIZATION WHEREFOR_SHORT LIKE ?) AND STATUS = '1')", "(ARTICLE_TITLE LIKE ?  AND STATUS = '1')",
481
					"(SUBJECT LIKE ?  AND STATUS = '1')" }) @Nullable String key,
480
			@GroupSqlColumn(isAnd=false, handlerClass = StringHandler.class, value = { "PROFESSOR_ID IN (SELECT ID FROM PROFESSOR WHERE NAME LIKE ?)",
481
					"ORG_ID IN (SELECT ID FROM ORGANIZATION WHERE NAME LIKE ? OR FOR_SHORT LIKE ?) ",
482
					 "ARTICLE_TITLE LIKE ?",
483
					"SUBJECT LIKE ?" },additional=1) @Nullable String key,
482 484
			int pageSize, int pageNo) throws SQLException;
483 485

484 486
//	public PageQueryResult<Article> firstPageQuery(Connection con, String key, int pageSize, int pageNo) throws SQLException {