jiapeng 7 years ago
parent
commit
11c05fdffb
1 changed files with 6 additions and 4 deletions
  1. 6 4
      src/main/java/com/ekexiu/portal/dao/ArticleDao.java

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

25
import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne;
25
import org.jfw.apt.orm.annotation.dao.method.operator.SelectOne;
26
import org.jfw.apt.orm.annotation.dao.method.operator.Update;
26
import org.jfw.apt.orm.annotation.dao.method.operator.Update;
27
import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
27
import org.jfw.apt.orm.annotation.dao.method.operator.UpdateWith;
28
import org.jfw.apt.orm.annotation.dao.param.GroupSqlColumn;
28
import org.jfw.apt.orm.annotation.dao.param.GtEq;
29
import org.jfw.apt.orm.annotation.dao.param.GtEq;
29
import org.jfw.apt.orm.annotation.dao.param.In;
30
import org.jfw.apt.orm.annotation.dao.param.In;
30
import org.jfw.apt.orm.annotation.dao.param.LessThan;
31
import org.jfw.apt.orm.annotation.dao.param.LessThan;
473
	@Exclude("articleContent")
474
	@Exclude("articleContent")
474
	@PageSelect
475
	@PageSelect
475
	@OrderBy(" ORDER BY SORT_NUM DESC, PUBLISH_TIME DESC")
476
	@OrderBy(" ORDER BY SORT_NUM DESC, PUBLISH_TIME DESC")
477
	@Where("STATUS = '1'")
476
	@Or
478
	@Or
477
	public abstract PageQueryResult<Article> firstPageQuery(Connection con,
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
			int pageSize, int pageNo) throws SQLException;
484
			int pageSize, int pageNo) throws SQLException;
483

485

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