| | |
| | | <sql id="where"> |
| | | <where> |
| | | <!--查询条件自行添加--> |
| | | is_del=0 |
| | | p.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 |
| | |
| | | <select id="findList" resultType="${package}.${moduleName}.model.${className}"> |
| | | select <include refid="Column_List"/> |
| | | from ${tableName} |
| | | <include refid="where"/> |
| | | order by id desc |
| | | </select> |
| | | </mapper> |