提交 dfae3de2 编写于 作者: NoSubject's avatar NoSubject

Merge branch 'cherry-pick-d170bf08' into 'wrdp'

修复论坛板块分页查询数据重复的问题

See merge request o2oa/o2oa!5477
......@@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletRequest;
import com.x.base.core.project.cache.Cache;
import com.x.base.core.project.cache.CacheManager;
import com.x.base.core.project.tools.ListTools;
import com.x.base.core.project.tools.MD5Tool;
import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonElement;
......@@ -63,7 +64,7 @@ public class ActionSubjectListForBBSIndex extends BaseAction {
}
if( check ) {
Cache.CacheKey cacheKey = new Cache.CacheKey( this.getClass(), effectivePerson.getDistinguishedName(), isBBSManager, count, page);
Cache.CacheKey cacheKey = new Cache.CacheKey( this.getClass(), effectivePerson.getDistinguishedName(), MD5Tool.getMD5Str(gson.toJson(wrapIn)), isBBSManager, count, page);
Optional<?> optional = CacheManager.get(cacheCategory, cacheKey );
if( optional.isPresent() ){
ActionResult<List<Wo>> result_cache = (ActionResult<List<Wo>>) optional.get();
......
......@@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletRequest;
import com.x.base.core.project.cache.Cache;
import com.x.base.core.project.cache.CacheManager;
import com.x.base.core.project.tools.MD5Tool;
import org.apache.commons.lang3.StringUtils;
import com.google.gson.JsonElement;
......@@ -62,7 +63,7 @@ public class ActionSubjectListForPage extends BaseAction {
}
if( check ) {
Cache.CacheKey cacheKey = new Cache.CacheKey( this.getClass(), effectivePerson.getDistinguishedName(),isBBSManager,page,count);
Cache.CacheKey cacheKey = new Cache.CacheKey( this.getClass(), effectivePerson.getDistinguishedName(), MD5Tool.getMD5Str(gson.toJson(wrapIn)), isBBSManager, page, count);
Optional<?> optional = CacheManager.get(cacheCategory, cacheKey );
if( optional.isPresent() ){
ActionResult<List<Wo>> result_cache = (ActionResult<List<Wo>>) optional.get();
......
......@@ -13,6 +13,7 @@ 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.base.core.project.tools.MD5Tool;
import com.x.base.core.project.tools.SortTools;
import com.x.base.core.project.x_bbs_assemble_control;
import com.x.bbs.assemble.control.ThisApplication;
......@@ -65,7 +66,7 @@ public class ActionSubjectListWithSubjectTypeForPage extends BaseAction {
}
if( check ) {
Cache.CacheKey cacheKey = new Cache.CacheKey( this.getClass(), effectivePerson.getDistinguishedName(),isBBSManager,page,count);
Cache.CacheKey cacheKey = new Cache.CacheKey( this.getClass(), effectivePerson.getDistinguishedName(), MD5Tool.getMD5Str(gson.toJson(wrapIn)) ,isBBSManager,page,count);
Optional<?> optional = CacheManager.get(cacheCategory, cacheKey );
if( optional.isPresent() ){
ActionResult<List<Wo>> result_cache = (ActionResult<List<Wo>>) optional.get();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册