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

templates.generator.java.custom2.mapper_xml.vm Maven / Gradle / Ivy

The newest version!




    
    
#foreach(${column} in ${table.columnList})
#if($column.primaryKey)
        
#end
#end
#foreach(${column} in ${table.columnList})
#if(!$column.primaryKey)
        
#end
#end
    

    
#set($temp = 1)
#foreach(${column} in ${table.columnList})
        `${column.name}`#if($temp < $table.columnList.size()),
#set($temp = $temp + 1)#end
#end

    

    
#foreach(${column} in ${table.columnList})
        and `${column.name}` = #{${column.fieldName}}
#end
    

    
        insert into `${table.name}` (
            
        )
        values (
#set($temp = 1)#foreach(${column} in ${table.columnList})
            #{${column.fieldName}}#if($temp < $table.columnList.size()),
#set($temp = $temp + 1)
#end
#end

        )
    

    
        insert into `${table.name}` (
            
        )
        values
        
        (
#set($temp = 1)#foreach(${column} in ${table.columnList})
            #{item.${column.fieldName}}#if($temp < $table.columnList.size()),
#set($temp = $temp + 1)
#end
#end

        )
        
    

    
        insert into `${table.name}`
        
#foreach(${column} in ${table.columnList})
            `${column.name}`, 
#end
        
        
#foreach( ${column} in ${table.columnList} )
            #{${column.fieldName}}, 
#end
        
    

    
        update `${table.name}`
        set
            `updater_id` = #{updaterId},
            `update_time` = NOW(),
            `alive_flag` = 0
        where `alive_flag` = 1
#foreach(${column} in ${table.columnList})
#if($column.primaryKey)
            and `${column.name}` = #{${column.fieldName}}
#end#end
    

    
        update `${table.name}`
        set
            `updater_id` = #{updaterId},
            `update_time` = NOW(),
            `alive_flag` = 0
        where `alive_flag` = 1
#foreach(${column} in ${table.columnList})
#if($column.primaryKey)
            and `${column.name}` in
            
                    #{item}
            
#end#end
    

    
        update `${table.name}`
        set
            `updater_id` = #{updaterId},
            `update_time` = NOW(),
            `alive_flag` = 0
        where `alive_flag` = 1
#foreach(${column} in ${table.columnList})
#if($column.name != "update_user")
            and `${column.name}` = #{${column.fieldName}}
#end
#end
    

    
        update `${table.name}`
        set
#set($temp = 1)#foreach(${column} in ${table.columnList})
            `${column.name}` = #{${column.fieldName}}#if($temp < $table.columnList.size()),
#set($temp = $temp + 1)
#end
#end

        where `alive_flag` = 1
#foreach(${column} in ${table.columnList})
#if($column.primaryKey)
            and `${column.name}` = #{${column.fieldName}}
#end#end
    

    
        update `${table.name}`
        
#foreach(${column} in ${table.columnList})
            `${column.name}` = #{${column.fieldName}}, 
#end
        
        where `alive_flag` = 1
#foreach(${column} in ${table.columnList})
#if($column.primaryKey)
            and `${column.name}` = #{${column.fieldName}}
#end#end
    

    

    

    

    

    
    
    






© 2015 - 2025 Weber Informatics LLC | Privacy Policy