标签:parameter stat 标签 auth ble mybatis ges current span
where标签用于简化sql的书写,if标签用于判断。大概的使用如下
<select id="getCountByPageInfo" parameterType="com.dabai.mytwo.entity.PageInfo"> select count(*) from forum <where> <if test="institutionid!=null"> institution_id=#{institution_id} </if> <if test="userid!=null"> author_id=#{userid} </if> </where> </select>
其中pageInfo类如下
public class PageInfo implements Serializable {
private static final long serialVersionUID = 1L;
private Integer totalcount;
private Integer currentpage;
private Integer totalpage;
private Integer pagesize;
private Long institutionid;
private Long forumid;
private String userid;
private String ids;
private String code;
//get set方法
}
标签:parameter stat 标签 auth ble mybatis ges current span
原文地址:https://www.cnblogs.com/notably/p/10661974.html