forked from kidgrow-microservices-platform

bingbing
2020-07-14 e0bb13f823169282241f5797f7a0cbaabc1d3365
kidgrow-business/kidgrow-code-generator/src/main/resources/template/Mapper.xml.vm
@@ -14,8 +14,8 @@
            is_del=0
            #foreach($column in $columns)
            #if($column.columnName != $pk.columnName || $pk.extra != 'auto_increment')
            <if test="$column.attrname != null and $column.attrname !=''">
                and  $column.columnName =  #{$column.attrname}
            <if test="p.$column.attrname != null and p.$column.attrname !=''">
                and  $column.columnName =  #{p.$column.attrname}
            </if>
            #end
            #end
@@ -28,12 +28,14 @@
        from ${tableName}
        <include refid="where"/>
        order by id desc
        limit 1
    </select>
    <!--定义根据-${className}当作查询条件返回对象集合-->
    <select id="findList" resultType="${package}.${moduleName}.model.${className}">
        select <include refid="Column_List"/>
        from ${tableName}
        <include refid="where"/>
        order by id desc
    </select>
</mapper>