Commit 38a450a6 by fukai

修复Query模式下的key计算

parent 8122ae89
...@@ -2,6 +2,7 @@ package org.sss.presentation.noui.cache; ...@@ -2,6 +2,7 @@ package org.sss.presentation.noui.cache;
import org.hibernate.Criteria; import org.hibernate.Criteria;
import org.hibernate.Query; import org.hibernate.Query;
import org.hibernate.internal.QueryImpl;
import org.sss.common.model.CacheController; import org.sss.common.model.CacheController;
import org.sss.common.model.IModuleList; import org.sss.common.model.IModuleList;
import org.sss.presentation.noui.common.Constants; import org.sss.presentation.noui.common.Constants;
...@@ -60,6 +61,24 @@ public abstract class AbstractCache implements CacheController { ...@@ -60,6 +61,24 @@ public abstract class AbstractCache implements CacheController {
sb.append(SPLIT.intern()); sb.append(SPLIT.intern());
sb.append(offset); sb.append(offset);
} }
//添加数据计算key
if(o instanceof QueryImpl)
{
Object[] values = ((QueryImpl)o).valueArray();
if(values != null)
{
for (Object val:values) {
if(val == null)
{
sb.append("null");
}
else
sb.append(val.toString());
sb.append(',');
}
}
}
return sb.toString(); return sb.toString();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment