protected void processKeySql(EntityTable entityTable, EntityColumn entityColumn, KeySql keySql) {
        if (keySql.useGeneratedKeys()) {
            entityColumn.setIdentity(true);
            entityColumn.setGenerator("JDBC");
            entityTable.setKeyProperties(entityColumn.getProperty());
            entityTable.setKeyColumns(entityColumn.getColumn());
        } else if (keySql.dialect() == IdentityDialect.DEFAULT) {
            entityColumn.setIdentity(true);
            entityColumn.setOrder(ORDER.AFTER);
        }  else if (keySql.dialect() != IdentityDialect.NULL) {
            //自动增长
            entityColumn.setIdentity(true);
            entityColumn.setOrder(ORDER.AFTER);
            entityColumn.setGenerator(keySql.dialect().getIdentityRetrievalStatement());
        } else if (StringUtil.isNotEmpty(keySql.sql())){

            entityColumn.setIdentity(true);
            entityColumn.setOrder(keySql.order());
            entityColumn.setGenerator(keySql.sql());
        } else if (keySql.genSql() != GenSql.NULL.class){
            entityColumn.setIdentity(true);
            entityColumn.setOrder(keySql.order());
            try {
                GenSql genSql = keySql.genSql().newInstance();
                entityColumn.setGenerator(genSql.genSql(entityTable, entityColumn));
            } catch (Exception e) {
                log.error("实例化 GenSql 失败: " + e, e);
                throw new MapperException("实例化 GenSql 失败: " + e, e);
            }
        } else if(keySql.genId() != GenId.NULL.class){
            entityColumn.setIdentity(false);
            entityColumn.setGenIdClass(keySql.genId());
        } else {
            throw new MapperException(entityTable.getEntityClass().getCanonicalName()
                    + " 类中的 @KeySql 注解配置无效!");
        }
    }
protected void processKeySql ( EntityTable entityTable , EntityColumn entityColumn , KeySql keySql ) { if ( keySql . useGeneratedKeys ( ) ) { entityColumn . setIdentity ( true ) ; entityColumn . setGenerator ( "JDBC" ) ; entityTable . setKeyProperties ( entityColumn . getProperty ( ) ) ; entityTable . setKeyColumns ( entityColumn . getColumn ( ) ) ; } else if ( keySql . dialect ( ) == IdentityDialect . DEFAULT ) { entityColumn . setIdentity ( true ) ; entityColumn . setOrder ( ORDER . AFTER ) ; } else if ( keySql . dialect ( ) != IdentityDialect . NULL ) { entityColumn . setIdentity ( true ) ; entityColumn . setOrder ( ORDER . AFTER ) ; entityColumn . setGenerator ( keySql . dialect ( ) . getIdentityRetrievalStatement ( ) ) ; } else if ( StringUtil . isNotEmpty ( keySql . sql ( ) ) ) { entityColumn . setIdentity ( true ) ; entityColumn . setOrder ( keySql . order ( ) ) ; entityColumn . setGenerator ( keySql . sql ( ) ) ; } else if ( keySql . genSql ( ) != GenSql . NULL . class ) { entityColumn . setIdentity ( true ) ; entityColumn . setOrder ( keySql . order ( ) ) ; try { GenSql genSql = keySql . genSql ( ) . newInstance ( ) ; entityColumn . setGenerator ( genSql . genSql ( entityTable , entityColumn ) ) ; } catch ( Exception e ) { log . error ( "实例化 GenSql 失败: " + e , e ) ; throw new MapperException ( "实例化 GenSql 失败: " + e , e ) ; } } else if ( keySql . genId ( ) != GenId . NULL . class ) { entityColumn . setIdentity ( false ) ; entityColumn . setGenIdClass ( keySql . genId ( ) ) ; } else { throw new MapperException ( entityTable . getEntityClass ( ) . getCanonicalName ( ) + " 类中的 @KeySql 注解配置无效!" ) ; } }
处理 KeySql 注解

@param entityTable
@param entityColumn
@param keySql