コード例 #1
0
 private MappedStatement getMappedStatement(
     MappedStatement ms,
     SqlSource sqlSource,
     Object parameterObject,
     String cacheSuffixKey,
     MappingEnum mappingType) {
   String mappedStatementId = ms.getId() + cacheSuffixKey;
   MappedStatement qs = MybatisUtils.getMappedStatement(ms, mappedStatementId);
   if (qs == null) {
     // 创建一个新的MappedStatement
     SqlSource ss =
         getSqlSource(ms, sqlSource, parameterObject, cacheSuffixKey == Const.CACHE_KEY_COUNT);
     qs = MybatisUtils.createMappedStatement(ms, ss, cacheSuffixKey, mappingType);
     MybatisUtils.addMappedStatement(ms.getConfiguration(), ms);
   }
   return qs;
 }