XMTT vor 6 Jahren
Ursprung
Commit
bb645ec710

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

@ -6,6 +6,7 @@ import com.ekexiu.portal.pojo.FindInfo;
6 6
import com.ekexiu.portal.pojo.SelfArticle;
7 7
import org.jfw.apt.annotation.DefaultValue;
8 8
import org.jfw.apt.annotation.Nullable;
9
import org.jfw.apt.orm.annotation.dao.Column;
9 10
import org.jfw.apt.orm.annotation.dao.DAO;
10 11
import org.jfw.apt.orm.annotation.dao.Dynamic;
11 12
import org.jfw.apt.orm.annotation.dao.method.Exclude;
@ -16,6 +17,7 @@ import org.jfw.apt.orm.annotation.dao.method.SetSentence;
16 17
import org.jfw.apt.orm.annotation.dao.method.Where;
17 18
import org.jfw.apt.orm.annotation.dao.method.operator.DeleteWith;
18 19
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
20
import org.jfw.apt.orm.annotation.dao.method.operator.LimitQuery;
19 21
import org.jfw.apt.orm.annotation.dao.method.operator.LimitSelect;
20 22
import org.jfw.apt.orm.annotation.dao.method.operator.PageQuery;
21 23
import org.jfw.apt.orm.annotation.dao.method.operator.PageSelect;
@ -31,7 +33,6 @@ import org.jfw.apt.orm.annotation.dao.param.LessThan;
31 33
import org.jfw.apt.orm.annotation.dao.param.Like;
32 34
import org.jfw.apt.orm.annotation.dao.param.Set;
33 35
import org.jfw.apt.orm.annotation.dao.param.SqlColumn;
34
import org.jfw.apt.orm.annotation.dao.Column;
35 36
import org.jfw.apt.orm.core.defaultImpl.LongHandler;
36 37
import org.jfw.apt.orm.core.defaultImpl.StringHandler;
37 38
import org.jfw.util.PageQueryResult;
@ -178,6 +179,25 @@ public abstract class ArticleDao {
178 179
					"OWNER_ID IN (SELECT ID FROM ORGANIZATION WHERE NAME LIKE ? OR FOR_SHORT LIKE)" }, additional = 1, isAnd = false) String key,
179 180
			int pageSize, int pageNo) throws SQLException;
180 181

182
	@Exclude("articleContent")
183
	@PageSelect
184
	@OrderBy(" ORDER BY PUBLISH_TIME DESC,SHARE_ID ASC")
185
	@Where("STATUS = '1'")
186
	public abstract PageQueryResult<Article> pageQueryPublish(Connection con, String ownerId,String articleType, @Nullable @GroupSqlColumn(handlerClass = StringHandler.class, value = { "OWNER_ID IN (SELECT ID FROM PROFESSOR WHERE NAME LIKE ?)",
187
			"OWNER_ID IN (SELECT ID FROM ORGANIZATION WHERE NAME LIKE ? OR FOR_SHORT LIKE ?)", "ARTICLE_TITLE LIKE ?",
188
			"SUBJECT LIKE ?" }, additional = 1, isAnd = false) String key,int pageSize, int pageNo) throws SQLException;
189

190
	@LimitQuery
191
	@OrderBy(cols = { @LimitColumn(value = "publishTime", column = "PUBLISH_TIME", handlerClass = StringHandler.class, asc = false),
192
			@LimitColumn(value = "articleId", column = "ARTICLE_ID", asc = false, handlerClass = StringHandler.class) }, value = "")
193
	@Where("STATUS = '1'")
194
	@Exclude({ "descp" })
195
	public abstract List<Article> queryPublish(Connection con,String ownerId, String publishTime, String articleId,
196
											  @SqlColumn(handlerClass = StringHandler.class, value = { "STATUS=?" }) String articleType,@Nullable @GroupSqlColumn(handlerClass = StringHandler.class, value = { "OWNER_ID IN (SELECT ID FROM PROFESSOR WHERE NAME LIKE ?)",
197
			"OWNER_ID IN (SELECT ID FROM ORGANIZATION WHERE NAME LIKE ? OR FOR_SHORT LIKE ?)", "ARTICLE_TITLE LIKE ?",
198
			"SUBJECT LIKE ?" }, additional = 1, isAnd = false) String key,
199
											  int rows) throws SQLException;
200

181 201
	@Exclude("articleContent")
182 202
	@SelectList
183 203
	@OrderBy(" ORDER BY MODIFY_TIME DESC ")

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

@ -904,7 +904,19 @@ public class ArticleService {
904 904
	public PageQueryResult<Article> pgPublishNotInPlatform(@JdbcConn Connection con,String pid,@Nullable String key,@DefaultValue("10") int pageSize,@DefaultValue("1") int pageNo)throws SQLException {
905 905
			return this.articleDao.publishInPlatform(con,pid,key,pageSize,pageNo);
906 906
	}
907
	
907

908
	@Get
909
	@Path("/pqPublish")
910
	public PageQueryResult<Article> pageQueryPublish(@JdbcConn Connection con, String ownerId,String articleType,@Nullable String key, @DefaultValue("10") int pageSize,
911
														@DefaultValue("1") int pageNo) throws SQLException {
912
		return this.articleDao.pageQueryPublish(con, ownerId,articleType,key, pageSize, pageNo);
913
	}
914

915
	@Get
916
	@Path("/pqPublish")
917
	public List<Article> queryPublish(@JdbcConn Connection con, String ownerId, @DefaultValue("\"z\"")String publishTime, @DefaultValue("\"z\"") String articleId,String articleType,@Nullable String key, int rows) throws SQLException {
918
		return this.articleDao.queryPublish(con, ownerId, publishTime, articleId, articleType,key, rows);
919
	}
908 920

909 921
	@Get
910 922
	@Path("/qaForDesk")