| | |
| | | <sql id="where"> |
| | | <where> |
| | | <!--查询条件自行添加--> |
| | | p.is_del=0 |
| | | is_del=0 |
| | | #foreach($column in $columns) |
| | | #if($column.columnName != $pk.columnName || $pk.extra != 'auto_increment') |
| | | <if test="p.$column.attrname != null and p.$column.attrname !=''"> |
| | |
| | | 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> |