All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ftl.MapperTemplate.ftl Maven / Gradle / Ivy

The newest version!



    
    <#list fieldList as pro>
        <#if pro.isPk == 1>
        
        <#else>
        
        
    
    

    
        <#list fieldList as pro>
            ${pro.name}<#if pro_has_next>,
        
    

    
        INSERT INTO
    ${tableName}
        (
                <#list fieldList as pro>
                    <#if pro.isIdentity==0>
                        ${pro.name}<#if pro_has_next>,
                    
                
        )
        VALUES
        (
                <#list fieldList as pro>
                    <#if pro.isIdentity==0>
                        <#if pro.name=="gmt_create" || pro.name=="gmt_modify">
                now()<#if pro_has_next>,
                        <#else>
                            ${r'#'}{${pro.proName}}<#if pro_has_next>,
                        
                    
                
        )
    

    
        UPDATE
    ${tableName}
        SET
        <#list fieldList as pro>
            <#if pro.isIdentity==0>
                <#if pro.name=="gmt_modify">
                    ${pro.name} = now()<#if pro_has_next>,
                <#else>
                    ${pro.name} = ${r'#'}{${pro.proName}}<#if pro_has_next>,
                
            
        
        WHERE
    ${fieldPk.name}=${r'#'}{${fieldPk.proName}}
    

    
        DELETE FROM ${tableName} WHERE ${fieldPk.name}=${r'#'}{${fieldPk.proName}}
    

    






© 2015 - 2025 Weber Informatics LLC | Privacy Policy