mirror of
https://gitee.com/best_handsome/mybatis-plus-join
synced 2025-07-11 00:02:22 +08:00
优化
This commit is contained in:
parent
624f9a8896
commit
5834794ac5
@ -85,15 +85,12 @@ public class MPJInterceptor implements Interceptor {
|
|||||||
.cache(ms.getCache())
|
.cache(ms.getCache())
|
||||||
.flushCacheRequired(ms.isFlushCacheRequired())
|
.flushCacheRequired(ms.isFlushCacheRequired())
|
||||||
.useCache(ms.isUseCache());
|
.useCache(ms.isUseCache());
|
||||||
|
|
||||||
if (ms.getKeyProperties() != null && ms.getKeyProperties().length != 0) {
|
if (ms.getKeyProperties() != null && ms.getKeyProperties().length != 0) {
|
||||||
builder.keyProperty(String.join(StringPool.COMMA, ms.getKeyProperties()));
|
builder.keyProperty(String.join(StringPool.COMMA, ms.getKeyProperties()));
|
||||||
}
|
}
|
||||||
|
|
||||||
List<ResultMap> resultMaps = new ArrayList<>();
|
List<ResultMap> resultMaps = new ArrayList<>();
|
||||||
resultMaps.add(new ResultMap.Builder(ms.getConfiguration(), ms.getId(), resultType, EMPTY_RESULT_MAPPING).build());
|
resultMaps.add(new ResultMap.Builder(ms.getConfiguration(), ms.getId(), resultType, EMPTY_RESULT_MAPPING).build());
|
||||||
builder.resultMaps(resultMaps);
|
builder.resultMaps(resultMaps);
|
||||||
|
|
||||||
MappedStatement mappedStatement = builder.build();
|
MappedStatement mappedStatement = builder.build();
|
||||||
MS_CACHE.put(id, mappedStatement);
|
MS_CACHE.put(id, mappedStatement);
|
||||||
return mappedStatement;
|
return mappedStatement;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user