为懒人提供无限可能,生命不息,code不止
作者: whooyun发表于: 2017-03-16 01:49
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.xx.xxframework.dao.ArticleManagerDao"> <sql id="table_name">article</sql> <resultMap id="article" type="com.xx.xxframework.model.Article" /> <select id="searchAllArticles" resultMap="article" parameterType="java.util.Map"> SELECT * FROM <include refid="table_name" /> order by createTime desc limit ${begin_num},${end_num} </select> <select id="countArticles" resultType="java.lang.Integer"> SELECT count(sid) FROM <include refid="table_name" /> WHERE 1=1 <!-- <if test="fid != null and fid != ''"> AND fid =${fid} </if> --> </select> </mapper>