|
@@ -1,5 +1,6 @@
|
|
|
package com.x.bbs.assemble.control.jaxrs.subjectinfo;
|
|
package com.x.bbs.assemble.control.jaxrs.subjectinfo;
|
|
|
|
|
|
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -138,7 +139,7 @@ public class ActionSubjectListForPage extends BaseAction {
|
|
|
//查询出所有的置顶贴
|
|
//查询出所有的置顶贴
|
|
|
if ( check && wrapIn != null && wrapIn.getWithTopSubject() != null && wrapIn.getWithTopSubject() ) {
|
|
if ( check && wrapIn != null && wrapIn.getWithTopSubject() != null && wrapIn.getWithTopSubject() ) {
|
|
|
try {
|
|
try {
|
|
|
- subjectInfoList_top = subjectInfoServiceAdv.listAllTopSubject( sectionInfo, wrapIn.getCreatorName(), viewSectionIds );
|
|
|
|
|
|
|
+ subjectInfoList_top = subjectInfoServiceAdv.listAllTopSubject( sectionInfo, wrapIn.getCreatorName(), viewSectionIds ,wrapIn.getStartTime() , wrapIn.getEndTime());
|
|
|
if( subjectInfoList_top != null ){
|
|
if( subjectInfoList_top != null ){
|
|
|
topTotal = subjectInfoList_top.size();
|
|
topTotal = subjectInfoList_top.size();
|
|
|
try {
|
|
try {
|
|
@@ -173,7 +174,8 @@ public class ActionSubjectListForPage extends BaseAction {
|
|
|
selectTopInSection = false; //置顶贴的处理已经在前面处理过了,置顶贴已经放到一个List里,不需要再次查询出来了,后续的查询过滤置顶贴
|
|
selectTopInSection = false; //置顶贴的处理已经在前面处理过了,置顶贴已经放到一个List里,不需要再次查询出来了,后续的查询过滤置顶贴
|
|
|
if( selectTotal > 0 ){
|
|
if( selectTotal > 0 ){
|
|
|
try{
|
|
try{
|
|
|
- total = subjectInfoServiceAdv.countSubjectInSectionForPage( wrapIn.getSearchContent(), wrapIn.getForumId(), wrapIn.getMainSectionId(), wrapIn.getSectionId(), wrapIn.getCreatorName(), wrapIn.getNeedPicture(), selectTopInSection, viewSectionIds ,wrapIn.getStartTime() , wrapIn.getEndTime());
|
|
|
|
|
|
|
+ total = subjectInfoServiceAdv.countSubjectInSectionForPage( wrapIn.getSearchContent(), wrapIn.getForumId(), wrapIn.getMainSectionId(), wrapIn.getSectionId(),
|
|
|
|
|
+ wrapIn.getCreatorName(), wrapIn.getNeedPicture(), selectTopInSection, viewSectionIds ,wrapIn.getStartTime() , wrapIn.getEndTime());
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
check = false;
|
|
check = false;
|
|
|
Exception exception = new ExceptionSubjectFilter( e );
|
|
Exception exception = new ExceptionSubjectFilter( e );
|
|
@@ -378,6 +380,8 @@ public class ActionSubjectListForPage extends BaseAction {
|
|
|
|
|
|
|
|
public String getCacheKey(EffectivePerson effectivePerson, Boolean isBBSManager) {
|
|
public String getCacheKey(EffectivePerson effectivePerson, Boolean isBBSManager) {
|
|
|
StringBuffer sb = new StringBuffer();
|
|
StringBuffer sb = new StringBuffer();
|
|
|
|
|
+ String pattern = "yyyy-MM-dd HH:mm:ss";
|
|
|
|
|
+ SimpleDateFormat formatter = new SimpleDateFormat(pattern);
|
|
|
if( StringUtils.isNotEmpty( effectivePerson.getDistinguishedName() )) {
|
|
if( StringUtils.isNotEmpty( effectivePerson.getDistinguishedName() )) {
|
|
|
sb.append( effectivePerson.getDistinguishedName() );
|
|
sb.append( effectivePerson.getDistinguishedName() );
|
|
|
}
|
|
}
|
|
@@ -413,6 +417,16 @@ public class ActionSubjectListForPage extends BaseAction {
|
|
|
sb.append( "#" );
|
|
sb.append( "#" );
|
|
|
sb.append( creatorName );
|
|
sb.append( creatorName );
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if( startTime != null ) {
|
|
|
|
|
+ sb.append( "#" );
|
|
|
|
|
+ sb.append( formatter.format(startTime));
|
|
|
|
|
+ }
|
|
|
|
|
+ if( endTime != null ) {
|
|
|
|
|
+ sb.append( "#" );
|
|
|
|
|
+ sb.append( formatter.format(endTime));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
sb.append( "#" );
|
|
sb.append( "#" );
|
|
|
sb.append( needPicture );
|
|
sb.append( needPicture );
|
|
|
sb.append( "#" );
|
|
sb.append( "#" );
|