XMTT 6 years ago
parent
commit
a0387904ed

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

@ -165,7 +165,7 @@ public abstract class ArticleDao {
165 165
	public abstract PageQueryResult<Article> publishInPlatform(Connection con,
166 166
			@SqlColumn(handlerClass = StringHandler.class, value = { "ARTICLE_ID IN (SELECT AID FROM REFERENCED_ARTICLE WHERE PID=? )" }) String pid,
167 167
			@Nullable @GroupSqlColumn(handlerClass = StringHandler.class, value = { "ARTICLE_TITLE LIKE ?",
168
					"OWNER_ID IN (SELECT ID FROM ORGANIZATION WHERE NAME LIKE ? OR FOR_SHORT LIKE)" }, additional = 1, isAnd = false) String key,
168
					"OWNER_ID IN (SELECT ID FROM ORGANIZATION WHERE NAME LIKE ? OR FOR_SHORT LIKE ?)" }, additional = 1, isAnd = false) String key,
169 169
			int pageSize, int pageNo) throws SQLException;
170 170

171 171
	@PageSelect
@ -176,7 +176,7 @@ public abstract class ArticleDao {
176 176
			@GroupSqlColumn(handlerClass = StringHandler.class, value = { "ARTICLE_ID NOT IN (SELECT AID FROM REFERENCED_ARTICLE WHERE PID=?)",
177 177
					"ARTICLE_TYPE='2' AND OWNER_ID IN (SELECT OID FROM RESIDENT_ORG WHERE PID=?)" }, isAnd = true) String pid,
178 178
			@Nullable @GroupSqlColumn(handlerClass = StringHandler.class, value = { "ARTICLE_TITLE LIKE ?",
179
					"OWNER_ID IN (SELECT ID FROM ORGANIZATION WHERE NAME LIKE ? OR FOR_SHORT LIKE)" }, additional = 1, isAnd = false) String key,
179
					"OWNER_ID IN (SELECT ID FROM ORGANIZATION WHERE NAME LIKE ? OR FOR_SHORT LIKE ?)" }, additional = 1, isAnd = false) String key,
180 180
			int pageSize, int pageNo) throws SQLException;
181 181

182 182
	@Exclude("articleContent")

+ 2 - 2
src/main/java/com/ekexiu/portal/platform/PlatformService.java

@ -457,14 +457,14 @@ public class PlatformService {
457 457
	@Path("/info/wares")
458 458
	public List<PlatformWare> queryWares(@JdbcConn Connection con, @Nullable String key, @DefaultValue("\"z\"") String time,
459 459
			@DefaultValue("Long.MAX_VALUE") long shareId, String pid, int rows) throws SQLException {
460
		return platformDao.queryWare(con, key, pid, time, shareId, rows);
460
		return platformDao.queryWare(con, key == null ? null : ("%" + key + "%"), pid, time, shareId, rows);
461 461
	}
462 462

463 463
	@Get
464 464
	@Path("/info/resources")
465 465
	public List<PlatformResource> queryResources(@JdbcConn Connection con, @Nullable String key, @DefaultValue("\"z\"") String time,
466 466
			@DefaultValue("Long.MAX_VALUE") long shareId, String pid, int rows) throws SQLException {
467
		return platformDao.queryResource(con, key, pid, time, shareId, rows);
467
		return platformDao.queryResource(con, key == null ? null : ("%" + key + "%"), pid, time, shareId, rows);
468 468
	}
469 469

470 470
	@Get

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

@ -896,13 +896,13 @@ public class ArticleService {
896 896
	@Get
897 897
	@Path("/pgPublishInPlatform")
898 898
	public PageQueryResult<Article> pgPublishInPlatform(@JdbcConn Connection con,String pid,@Nullable String key,@DefaultValue("10") int pageSize,@DefaultValue("1") int pageNo)throws SQLException {
899
			return this.articleDao.publishInPlatform(con,pid,key,pageSize,pageNo);
899
			return this.articleDao.publishInPlatform(con,pid, key == null ? null : ("%" + key + "%"),pageSize,pageNo);
900 900
	}
901 901
	
902 902
	@Get
903 903
	@Path("/pgPublishNotInPlatform")
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
			return this.articleDao.publishNotInPlatform(con,pid,key,pageSize,pageNo);
905
			return this.articleDao.publishNotInPlatform(con,pid, key == null ? null : ("%" + key + "%"), pageSize,pageNo);
906 906
	}
907 907

908 908
	@Get