Explorar o código

Merge branch 'fix/BBS.searchSubjectWithKey' into 'develop'

Merge of fix/BBS.searchSubjectWithKey[企业社区]修复了主贴查询服务无法通过关键词过滤标题的问题

See merge request o2oa/o2oa!185
李义 %!s(int64=5) %!d(string=hai) anos
pai
achega
e652377ac1

+ 18 - 4
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/factory/BBSSubjectInfoFactory.java

@@ -262,12 +262,13 @@ public class BBSSubjectInfoFactory extends AbstractFactory {
 	}
 	
 	//@MethodDescribe( "根据版块ID, 主版块ID,版块ID,创建者姓名查询符合要求所有主题列表,不包括子版块内的主题数量" )
-	public Long countSubjectInSectionForPage( String forumId, String mainSectionId, String sectionId, String creatorName, Boolean needPicture, Boolean isTopSubject, List<String> viewSectionIds ) throws Exception {
+	public Long countSubjectInSectionForPage( String searchTitle, String forumId, String mainSectionId, String sectionId, String creatorName, Boolean needPicture, Boolean isTopSubject, List<String> viewSectionIds ) throws Exception {
 		EntityManager em = this.entityManagerContainer().get(BBSSubjectInfo.class);
 		CriteriaBuilder cb = em.getCriteriaBuilder();
 		CriteriaQuery<Long> cq = cb.createQuery(Long.class);
 		Root<BBSSubjectInfo> root = cq.from(BBSSubjectInfo.class);
 		Predicate p = cb.isNotNull( root.get(BBSSubjectInfo_.id ) );
+
 		if( StringUtils.isNotEmpty( forumId ) ){
 			p = cb.and( p, cb.equal( root.get( BBSSubjectInfo_.forumId ), forumId));
 		}
@@ -293,12 +294,16 @@ public class BBSSubjectInfoFactory extends AbstractFactory {
 				p = cb.and( p, cb.isFalse( root.get( BBSSubjectInfo_.isTopSubject ) ) );
 			}
 		}
+		if( StringUtils.isNotEmpty( searchTitle ) ){
+			p = cb.and( p, cb.like( root.get( BBSSubjectInfo_.title ), searchTitle ) );
+		}
 		cq.select( cb.count( root ) );
+		//SELECT COUNT(b) FROM BBSSubjectInfo b WHERE ((b.id IS NOT NULL AND b.sectionId IN ('1c1d9dfc-0034-4d9a-adc7-bb4b3925bbd5')) AND b.title LIKE 'Count')
 		return em.createQuery(cq.where(p)).getSingleResult();
 	}
 	
 	//@MethodDescribe( "根据版块ID, 主版块ID,版块ID,创建者姓名查询符合要求所有主题列表,不包括子版块内的主题" )
-	public List<BBSSubjectInfo> listSubjectInSectionForPage( String forumId, String mainSectionId, String sectionId, String creatorName, Boolean needPicture, Boolean isTopSubject, Integer maxRecordCount, List<String> viewSectionIds ) throws Exception {
+	public List<BBSSubjectInfo> listSubjectInSectionForPage( String searchTitle, String forumId, String mainSectionId, String sectionId, String creatorName, Boolean needPicture, Boolean isTopSubject, Integer maxRecordCount, List<String> viewSectionIds ) throws Exception {
 		if( maxRecordCount == null ){
 			throw new Exception( "maxRecordCount is null." );
 		}
@@ -332,6 +337,9 @@ public class BBSSubjectInfoFactory extends AbstractFactory {
 				p = cb.and( p, cb.isFalse( root.get( BBSSubjectInfo_.isTopSubject ) ) );
 			}
 		}
+		if( StringUtils.isNotEmpty( searchTitle ) ){
+			p = cb.and( p, cb.like( root.get( BBSSubjectInfo_.title ), searchTitle ) );
+		}
 		cq.orderBy( cb.desc( root.get( BBSSubjectInfo_.latestReplyTime ) ) );
 		return em.createQuery(cq.where(p)).setMaxResults( maxRecordCount ).getResultList();
 	}	
@@ -393,7 +401,7 @@ public class BBSSubjectInfoFactory extends AbstractFactory {
 	}
 
 	//@MethodDescribe( "根据论坛ID,主版块ID,版块ID查询指定用户发表的主题数量" )
-	public Long countUserSubjectForPage( String forumId, String mainSectionId, String sectionId, Boolean needPicture, Boolean withTopSubject, String creatorName ) throws Exception {
+	public Long countUserSubjectForPage( String searchTitle, String forumId, String mainSectionId, String sectionId, Boolean needPicture, Boolean withTopSubject, String creatorName ) throws Exception {
 		if( creatorName == null || creatorName.isEmpty() ){
 			throw new Exception( "creatorName can not null." );
 		}
@@ -421,12 +429,15 @@ public class BBSSubjectInfoFactory extends AbstractFactory {
 		if( needPicture != null && needPicture ){
 			p = cb.and( p, cb.isNotNull( root.get( BBSSubjectInfo_.picId ) ),  cb.notEqual( root.get( BBSSubjectInfo_.picId ), ""));
 		}
+		if( StringUtils.isNotEmpty( searchTitle ) ){
+			p = cb.and( p, cb.like( root.get( BBSSubjectInfo_.title ), searchTitle ) );
+		}
 		cq.select( cb.count( root ) );		
 		return em.createQuery(cq.where(p)).getSingleResult();
 	}
 
 	//@MethodDescribe( "根据论坛ID,主版块ID,版块ID查询指定用户发表的主题列表, 分页" )
-	public List<BBSSubjectInfo> listUserSubjectForPage( String forumId, String mainSectionId, String sectionId, Boolean needPicture, Boolean withTopSubject, Integer maxRecordCount, String creatorName ) throws Exception {
+	public List<BBSSubjectInfo> listUserSubjectForPage( String searchTitle, String forumId, String mainSectionId, String sectionId, Boolean needPicture, Boolean withTopSubject, Integer maxRecordCount, String creatorName ) throws Exception {
 		if( creatorName == null || creatorName.isEmpty() ){
 			throw new Exception( "creatorName can not null." );
 		}
@@ -457,6 +468,9 @@ public class BBSSubjectInfoFactory extends AbstractFactory {
 		if( needPicture != null && needPicture ){
 			p = cb.and( p, cb.isNotNull( root.get( BBSSubjectInfo_.picId ) ),  cb.notEqual( root.get( BBSSubjectInfo_.picId ), ""));
 		}
+		if( StringUtils.isNotEmpty( searchTitle ) ){
+			p = cb.and( p, cb.like( root.get( BBSSubjectInfo_.title ), searchTitle ) );
+		}
 		cq.orderBy( cb.desc( root.get( BBSSubjectInfo_.createTime ) ) );
 		return em.createQuery(cq.where(p)).setMaxResults( maxRecordCount ).getResultList();
 	}

+ 6 - 3
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/jaxrs/subjectinfo/ActionSubjectListForBBSIndex.java

@@ -134,7 +134,7 @@ public class ActionSubjectListForBBSIndex extends BaseAction {
 		if( check ){
 			if( selectTotal > 0 ){
 				try{
-					total = subjectInfoServiceAdv.countSubjectInSectionForPage( wrapIn.getForumId(), wrapIn.getMainSectionId(), wrapIn.getSectionId(), wrapIn.getCreatorName(), wrapIn.getNeedPicture(), null, viewSectionIds );
+					total = subjectInfoServiceAdv.countSubjectInSectionForPage( wrapIn.getSearchContent(), wrapIn.getForumId(), wrapIn.getMainSectionId(), wrapIn.getSectionId(), wrapIn.getCreatorName(), wrapIn.getNeedPicture(), null, viewSectionIds );
 				} catch (Exception e) {
 					check = false;
 					Exception exception = new ExceptionSubjectFilter( e );
@@ -147,7 +147,7 @@ public class ActionSubjectListForBBSIndex extends BaseAction {
 		if( check ){
 			if( selectTotal > 0 && total > 0 ){
 				try{
-					subjectInfoList = subjectInfoServiceAdv.listSubjectInSectionForPage( wrapIn.getForumId(), wrapIn.getMainSectionId(), wrapIn.getSectionId(), wrapIn.getCreatorName(), wrapIn.getNeedPicture(), null, selectTotal, viewSectionIds );
+					subjectInfoList = subjectInfoServiceAdv.listSubjectInSectionForPage( wrapIn.getSearchContent(), wrapIn.getForumId(), wrapIn.getMainSectionId(), wrapIn.getSectionId(), wrapIn.getCreatorName(), wrapIn.getNeedPicture(), null, selectTotal, viewSectionIds );
 					if( subjectInfoList != null ){
 						try {
 							wraps_out = Wo.copier.copy( subjectInfoList );
@@ -207,7 +207,7 @@ public class ActionSubjectListForBBSIndex extends BaseAction {
 		@FieldDescribe( "贴子所属版块ID." )
 		private String sectionId = null;
 		
-		@FieldDescribe( "搜索内容." )
+		@FieldDescribe( "标题模糊搜索关键词" )
 		private String searchContent = null;
 		
 		@FieldDescribe( "创建者名称." )
@@ -253,6 +253,9 @@ public class ActionSubjectListForBBSIndex extends BaseAction {
 			this.withTopSubject = withTopSubject;
 		}
 		public String getSearchContent() {
+			if( StringUtils.isNotEmpty( this.searchContent ) && this.searchContent.indexOf( "%" ) < 0 ){
+				return "%" + searchContent + "%";
+			}
 			return searchContent;
 		}
 		public void setSearchContent( String searchContent ) {

+ 8 - 5
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/jaxrs/subjectinfo/ActionSubjectListForPage.java

@@ -58,7 +58,7 @@ public class ActionSubjectListForPage extends BaseAction {
 		
 		if( check ) {
 			String cacheKey = wrapIn.getCacheKey( effectivePerson, isBBSManager );
-			cacheKey += "#" + page + "#" + count;
+			cacheKey += "#" + page + "#" + count + "#ActionSubjectListForPage";
 			Element element = cache.get( cacheKey );
 			
 			if ((null != element) && (null != element.getObjectValue())) {
@@ -172,7 +172,7 @@ public class ActionSubjectListForPage extends BaseAction {
 			selectTopInSection = false; //置顶贴的处理已经在前面处理过了,置顶贴已经放到一个List里,不需要再次查询出来了,后续的查询过滤置顶贴
 			if( selectTotal > 0 ){
 				try{
-					total = subjectInfoServiceAdv.countSubjectInSectionForPage( wrapIn.getForumId(), wrapIn.getMainSectionId(), wrapIn.getSectionId(), wrapIn.getCreatorName(), wrapIn.getNeedPicture(), selectTopInSection, viewSectionIds );
+					total = subjectInfoServiceAdv.countSubjectInSectionForPage( wrapIn.getSearchContent(), wrapIn.getForumId(), wrapIn.getMainSectionId(), wrapIn.getSectionId(), wrapIn.getCreatorName(), wrapIn.getNeedPicture(), selectTopInSection, viewSectionIds );
 				} catch (Exception e) {
 					check = false;
 					Exception exception = new ExceptionSubjectFilter( e );
@@ -185,7 +185,7 @@ public class ActionSubjectListForPage extends BaseAction {
 		if( check ){
 			if( selectTotal > 0 && total > 0 ){
 				try{
-					subjectInfoList = subjectInfoServiceAdv.listSubjectInSectionForPage( wrapIn.getForumId(), wrapIn.getMainSectionId(), wrapIn.getSectionId(), wrapIn.getCreatorName(), wrapIn.getNeedPicture(), selectTopInSection, selectTotal, viewSectionIds );
+					subjectInfoList = subjectInfoServiceAdv.listSubjectInSectionForPage( wrapIn.getSearchContent(), wrapIn.getForumId(), wrapIn.getMainSectionId(), wrapIn.getSectionId(), wrapIn.getCreatorName(), wrapIn.getNeedPicture(), selectTopInSection, selectTotal, viewSectionIds );
 					if( subjectInfoList != null ){
 						try {
 							wraps_nonTop = Wo.copier.copy( subjectInfoList );
@@ -295,8 +295,8 @@ public class ActionSubjectListForPage extends BaseAction {
 		
 		@FieldDescribe( "贴子所属版块ID." )
 		private String sectionId = null;
-		
-		@FieldDescribe( "搜索内容." )
+
+		@FieldDescribe( "标题模糊搜索关键词" )
 		private String searchContent = null;
 		
 		@FieldDescribe( "创建者名称." )
@@ -342,6 +342,9 @@ public class ActionSubjectListForPage extends BaseAction {
 			this.withTopSubject = withTopSubject;
 		}
 		public String getSearchContent() {
+			if( StringUtils.isNotEmpty( this.searchContent ) && this.searchContent.indexOf( "%" ) < 0 ){
+				return "%" + searchContent + "%";
+			}
 			return searchContent;
 		}
 		public void setSearchContent( String searchContent ) {

+ 94 - 3
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/jaxrs/subjectinfo/ActionSubjectListMyForPage.java

@@ -17,7 +17,6 @@ import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
 import com.x.base.core.project.tools.ListTools;
-import com.x.bbs.assemble.control.jaxrs.subjectinfo.ActionSubjectListForPage.Wi;
 import com.x.bbs.assemble.control.jaxrs.subjectinfo.exception.ExceptionSubjectFilter;
 import com.x.bbs.assemble.control.jaxrs.subjectinfo.exception.ExceptionSubjectWrapOut;
 import com.x.bbs.assemble.control.jaxrs.subjectinfo.exception.ExceptionWrapInConvert;
@@ -61,7 +60,7 @@ public class ActionSubjectListMyForPage extends BaseAction {
 		}
 		if (check) {
 			try {
-				total = subjectInfoServiceAdv.countUserSubjectForPage(wrapIn.getForumId(), wrapIn.getMainSectionId(),
+				total = subjectInfoServiceAdv.countUserSubjectForPage( wrapIn.getSearchContent(), wrapIn.getForumId(), wrapIn.getMainSectionId(),
 						wrapIn.getSectionId(), wrapIn.getNeedPicture(), wrapIn.getWithTopSubject(),
 						effectivePerson.getDistinguishedName());
 			} catch (Exception e) {
@@ -74,7 +73,7 @@ public class ActionSubjectListMyForPage extends BaseAction {
 		if (check) {
 			if (total > 0) {
 				try {
-					subjectInfoList = subjectInfoServiceAdv.listUserSubjectForPage(wrapIn.getForumId(),
+					subjectInfoList = subjectInfoServiceAdv.listUserSubjectForPage( wrapIn.getSearchContent(), wrapIn.getForumId(),
 							wrapIn.getMainSectionId(), wrapIn.getSectionId(), wrapIn.getNeedPicture(),
 							wrapIn.getWithTopSubject(), page * count, effectivePerson.getDistinguishedName());
 				} catch (Exception e) {
@@ -155,6 +154,98 @@ public class ActionSubjectListMyForPage extends BaseAction {
 		}
 	}
 
+	public static class Wi{
+
+		@FieldDescribe( "贴子ID." )
+		private String subjectId = null;
+
+		@FieldDescribe( "投标选项ID." )
+		private String voteOptionId = null;
+
+		@FieldDescribe( "贴子所属论坛ID." )
+		private String forumId = null;
+
+		@FieldDescribe( "贴子所属主版块ID." )
+		private String mainSectionId = null;
+
+		@FieldDescribe( "贴子所属版块ID." )
+		private String sectionId = null;
+
+		@FieldDescribe( "标题模糊搜索关键词" )
+		private String searchContent = null;
+
+		@FieldDescribe( "创建者名称." )
+		private String creatorName = null;
+
+		@FieldDescribe( "是否只查询有大图的贴子." )
+		private Boolean needPicture = false;
+
+		@FieldDescribe( "是否包含置顶贴." )
+		private Boolean withTopSubject = false; // 是否包含置顶贴
+
+		public static List<String> Excludes = new ArrayList<String>( JpaObject.FieldsUnmodify );
+
+
+		public String getForumId() {
+			return forumId;
+		}
+		public void setForumId(String forumId) {
+			this.forumId = forumId;
+		}
+		public String getSectionId() {
+			return sectionId;
+		}
+		public void setSectionId(String sectionId) {
+			this.sectionId = sectionId;
+		}
+		public String getMainSectionId() {
+			return mainSectionId;
+		}
+		public void setMainSectionId(String mainSectionId) {
+			this.mainSectionId = mainSectionId;
+		}
+		public Boolean getNeedPicture() {
+			return needPicture;
+		}
+		public void setNeedPicture(Boolean needPicture) {
+			this.needPicture = needPicture;
+		}
+		public Boolean getWithTopSubject() {
+			return withTopSubject;
+		}
+		public void setWithTopSubject(Boolean withTopSubject) {
+			this.withTopSubject = withTopSubject;
+		}
+		public String getSearchContent() {
+			if( StringUtils.isNotEmpty( this.searchContent ) && this.searchContent.indexOf( "%" ) < 0 ){
+				return "%" + searchContent + "%";
+			}
+			return searchContent;
+		}
+		public void setSearchContent( String searchContent ) {
+			this.searchContent = searchContent;
+		}
+		public String getCreatorName() {
+			return creatorName;
+		}
+		public void setCreatorName(String creatorName) {
+			this.creatorName = creatorName;
+		}
+		public String getSubjectId() {
+			return subjectId;
+		}
+		public void setSubjectId(String subjectId) {
+			this.subjectId = subjectId;
+		}
+		public String getVoteOptionId() {
+			return voteOptionId;
+		}
+		public void setVoteOptionId(String voteOptionId) {
+			this.voteOptionId = voteOptionId;
+		}
+
+	}
+
 	public static class Wo extends BBSSubjectInfo {
 
 		private static final long serialVersionUID = -5076990764713538973L;

+ 9 - 9
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/service/BBSSubjectInfoService.java

@@ -641,7 +641,7 @@ public class BBSSubjectInfoService {
 		return business.subjectAttachmentFactory().list( attachmentList );
 	}
 
-	public List<BBSSubjectInfo> listSubjectInSectionForPage( String forumId, String mainSectionId, String sectionId, String creatorName, Boolean needPicture, Boolean isTopSubject, Integer maxRecordCount, List<String> viewSectionIds ) throws Exception {
+	public List<BBSSubjectInfo> listSubjectInSectionForPage( String searchTitle, String forumId, String mainSectionId, String sectionId, String creatorName, Boolean needPicture, Boolean isTopSubject, Integer maxRecordCount, List<String> viewSectionIds ) throws Exception {
 		if( viewSectionIds == null || viewSectionIds.isEmpty() ){
 			return null;
 		}
@@ -651,20 +651,20 @@ public class BBSSubjectInfoService {
 		Business business = null;
 		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
 			business = new Business(emc);
-			return business.subjectInfoFactory().listSubjectInSectionForPage( forumId, mainSectionId, sectionId, creatorName, needPicture, isTopSubject, maxRecordCount, viewSectionIds );
+			return business.subjectInfoFactory().listSubjectInSectionForPage( searchTitle, forumId, mainSectionId, sectionId, creatorName, needPicture, isTopSubject, maxRecordCount, viewSectionIds );
 		}catch( Exception e ){
 			throw e;
 		}
 	}
 	
-	public Long countSubjectInSectionForPage( String forumId, String mainSectionId, String sectionId, String creatorName, Boolean needPicture, Boolean isTopSubject, List<String> viewSectionIds ) throws Exception {
+	public Long countSubjectInSectionForPage( String searchTitle, String forumId, String mainSectionId, String sectionId, String creatorName, Boolean needPicture, Boolean isTopSubject, List<String> viewSectionIds ) throws Exception {
 		if( viewSectionIds == null || viewSectionIds.isEmpty() ){
 			return 0L;
 		}
 		Business business = null;
 		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
 			business = new Business(emc);
-			return business.subjectInfoFactory().countSubjectInSectionForPage( forumId, mainSectionId, sectionId, creatorName, needPicture, isTopSubject, viewSectionIds );
+			return business.subjectInfoFactory().countSubjectInSectionForPage( searchTitle, forumId, mainSectionId, sectionId, creatorName, needPicture, isTopSubject, viewSectionIds );
 		}catch( Exception e ){
 			throw e;
 		}
@@ -754,20 +754,20 @@ public class BBSSubjectInfoService {
 		}
 	}
 
-	public Long countUserSubjectForPage( String forumId, String mainSectionId, String sectionId, Boolean needPicture, Boolean withTopSubject, String name) throws Exception {
+	public Long countUserSubjectForPage( String searchTitle, String forumId, String mainSectionId, String sectionId, Boolean needPicture, Boolean withTopSubject, String name) throws Exception {
 		if( name == null || name.isEmpty() ){
 			throw new Exception( "name can not null." );
 		}
 		Business business = null;
 		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
 			business = new Business(emc);
-			return business.subjectInfoFactory().countUserSubjectForPage( forumId, mainSectionId, sectionId, needPicture, withTopSubject, name );
+			return business.subjectInfoFactory().countUserSubjectForPage( searchTitle, forumId, mainSectionId, sectionId, needPicture, withTopSubject, name );
 		}catch( Exception e ){
 			throw e;
 		}
 	}
 
-	public List<BBSSubjectInfo> listUserSubjectForPage(String forumId, String mainSectionId, String sectionId, Boolean needPicture, Boolean withTopSubject, Integer maxRecordCount, String name ) throws Exception {
+	public List<BBSSubjectInfo> listUserSubjectForPage( String searchTitle, String forumId, String mainSectionId, String sectionId, Boolean needPicture, Boolean withTopSubject, Integer maxRecordCount, String name ) throws Exception {
 		if( name == null || name.isEmpty() ){
 			throw new Exception( "name can not null." );
 		}
@@ -777,7 +777,7 @@ public class BBSSubjectInfoService {
 		Business business = null;
 		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
 			business = new Business(emc);
-			return business.subjectInfoFactory().listUserSubjectForPage( forumId, mainSectionId, sectionId, needPicture, withTopSubject, maxRecordCount, name );
+			return business.subjectInfoFactory().listUserSubjectForPage( searchTitle, forumId, mainSectionId, sectionId, needPicture, withTopSubject, maxRecordCount, name );
 		}catch( Exception e ){
 			throw e;
 		}
@@ -790,7 +790,7 @@ public class BBSSubjectInfoService {
 		Business business = null;
 		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
 			business = new Business(emc);
-			return business.subjectInfoFactory().countUserSubjectForPage( null, null, null, null, null, userName );
+			return business.subjectInfoFactory().countUserSubjectForPage( null, null, null, null, null, null, userName );
 		}catch( Exception e ){
 			throw e;
 		}

+ 15 - 12
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/service/BBSSubjectInfoServiceAdv.java

@@ -87,10 +87,13 @@ public class BBSSubjectInfoServiceAdv {
 			throw e;
 		}
 	}
-	
+
 	/**
 	 * 向数据库保存BBSSubjectInfo对象
-	 * @param wrapIn
+	 * @param _bBSSubjectInfo
+	 * @param content
+	 * @return
+	 * @throws Exception
 	 */
 	public BBSSubjectInfo save( BBSSubjectInfo _bBSSubjectInfo, String content ) throws Exception {
 		if( _bBSSubjectInfo  == null ){
@@ -261,7 +264,7 @@ public class BBSSubjectInfoServiceAdv {
 	/**
 	 * 版块置顶设置
 	 * @param subjectId
-	 * @param topToForum
+	 * @param topToSection
 	 * @param name
 	 * @return
 	 * @throws Exception
@@ -326,7 +329,7 @@ public class BBSSubjectInfoServiceAdv {
 		}
 	}
 
-	public List<BBSSubjectInfo> listSubjectInSectionForPage( String forumId, String mainSectionId, String sectionId, String creatorName, Boolean needPicture, Boolean isTopSubject, Integer maxRecordCount, List<String> viewSectionIds ) throws Exception {
+	public List<BBSSubjectInfo> listSubjectInSectionForPage( String searchTitle, String forumId, String mainSectionId, String sectionId, String creatorName, Boolean needPicture, Boolean isTopSubject, Integer maxRecordCount, List<String> viewSectionIds ) throws Exception {
 		if( viewSectionIds == null || viewSectionIds.isEmpty() ){
 			return null;
 		}
@@ -336,13 +339,13 @@ public class BBSSubjectInfoServiceAdv {
 		Business business = null;
 		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
 			business = new Business(emc);
-			return business.subjectInfoFactory().listSubjectInSectionForPage( forumId, mainSectionId, sectionId, creatorName, needPicture, isTopSubject, maxRecordCount, viewSectionIds );
+			return business.subjectInfoFactory().listSubjectInSectionForPage( searchTitle, forumId, mainSectionId, sectionId, creatorName, needPicture, isTopSubject, maxRecordCount, viewSectionIds );
 		}catch( Exception e ){
 			throw e;
 		}
 	}
 	
-	public Long countSubjectInSectionForPage( 
+	public Long countSubjectInSectionForPage( String searchTitle,
 			String forumId, String mainSectionId, String sectionId, String creatorName, Boolean needPicture, Boolean isTopSubject, 
 			List<String> viewSectionIds ) throws Exception {
 		if( viewSectionIds == null || viewSectionIds.isEmpty() ){
@@ -351,7 +354,7 @@ public class BBSSubjectInfoServiceAdv {
 		Business business = null;
 		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
 			business = new Business(emc);
-			return business.subjectInfoFactory().countSubjectInSectionForPage( 
+			return business.subjectInfoFactory().countSubjectInSectionForPage( searchTitle,
 					forumId, mainSectionId, sectionId, creatorName, needPicture, isTopSubject, viewSectionIds );
 		}catch( Exception e ){
 			throw e;
@@ -442,20 +445,20 @@ public class BBSSubjectInfoServiceAdv {
 		}
 	}
 
-	public Long countUserSubjectForPage( String forumId, String mainSectionId, String sectionId, Boolean needPicture, Boolean withTopSubject, String name) throws Exception {
+	public Long countUserSubjectForPage( String searchTitle, String forumId, String mainSectionId, String sectionId, Boolean needPicture, Boolean withTopSubject, String name) throws Exception {
 		if( name == null || name.isEmpty() ){
 			throw new Exception( "name can not null." );
 		}
 		Business business = null;
 		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
 			business = new Business(emc);
-			return business.subjectInfoFactory().countUserSubjectForPage( forumId, mainSectionId, sectionId, needPicture, withTopSubject, name );
+			return business.subjectInfoFactory().countUserSubjectForPage( searchTitle, forumId, mainSectionId, sectionId, needPicture, withTopSubject, name );
 		}catch( Exception e ){
 			throw e;
 		}
 	}
 
-	public List<BBSSubjectInfo> listUserSubjectForPage(String forumId, String mainSectionId, String sectionId, Boolean needPicture, Boolean withTopSubject, Integer maxRecordCount, String name ) throws Exception {
+	public List<BBSSubjectInfo> listUserSubjectForPage( String searchTitle, String forumId, String mainSectionId, String sectionId, Boolean needPicture, Boolean withTopSubject, Integer maxRecordCount, String name ) throws Exception {
 		if( name == null || name.isEmpty() ){
 			throw new Exception( "name can not null." );
 		}
@@ -465,7 +468,7 @@ public class BBSSubjectInfoServiceAdv {
 		Business business = null;
 		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
 			business = new Business(emc);
-			return business.subjectInfoFactory().listUserSubjectForPage( forumId, mainSectionId, sectionId, needPicture, withTopSubject, maxRecordCount, name );
+			return business.subjectInfoFactory().listUserSubjectForPage( searchTitle, forumId, mainSectionId, sectionId, needPicture, withTopSubject, maxRecordCount, name );
 		}catch( Exception e ){
 			throw e;
 		}
@@ -478,7 +481,7 @@ public class BBSSubjectInfoServiceAdv {
 		Business business = null;
 		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
 			business = new Business(emc);
-			return business.subjectInfoFactory().countUserSubjectForPage( null, null, null, null, null, userName );
+			return business.subjectInfoFactory().countUserSubjectForPage( null, null, null, null, null, null, userName );
 		}catch( Exception e ){
 			throw e;
 		}