protected void insertSelect(IMapping mapping, TableId tableId, boolean withPk, MapperSql sql, List<Map> maps, List<FieldMapping> nonFields) {
        List<String> columns = new ArrayList<>();
        if (!withPk && tableId != null) {
            columns.add(tableId.column);
        }
        nonFields.stream().map(f -> f.column).forEach(columns::add);
        sql.INSERT_COLUMNS(mapping, columns);

        sql.APPEND("SELECT");
        if (!withPk && tableId != null) {
            String seq = isBlank(tableId.seqName) ? mapping.db().feature.getSeq() : tableId.seqName;
            sql.APPEND(getSeq(seq) + ",");
        }
        sql.APPEND("TMP.* FROM (");
        for (int index = 0; index < maps.size(); index++) {
            if (index > 0) {
                sql.APPEND(" UNION ALL ");
            }
            sql.APPEND("(SELECT");
            boolean first = true;
            for (FieldMapping f : nonFields) {
                if (f.isPrimary() && !withPk) {
                    continue;
                }
                if (!first) {
                    sql.APPEND(COMMA_SPACE);
                } else {
                    first = false;
                }
                Object value = maps.get(index).get(f.column);
                if (value == null && notBlank(f.insert)) {
                    sql.APPEND(f.insert);
                } else {
                    String el = el("list[" + index + "].", f, value, EMPTY);
                    sql.APPEND(isBlank(el) ? f.column : el);
                }
            }
            sql.APPEND(" FROM DUAL)");
        }
        sql.APPEND(") TMP");
    }
https://blog.csdn.net/w_y_t_/article/details/51416201
<p>
https://www.cnblogs.com/xunux/p/4882761.html
<p>
https://blog.csdn.net/weixin_41175479/article/details/80608512
fluent-mybatis/src/main/java/cn/org/atool/fluent/mybatis/base/provider/CommonSqlKit.java