<select id="queryCount" resultType="cn.bnsr.edu_yun.view.FileView"> SELECT sum(download_times) as downloadNum ,sum(click_times) as browseNum FROM file_property <if test="_parameter != null"> WHERE id in <foreac…
<if test="(mac != null and mac != '') or (roomNo != null and roomNo != '') or (bedNo != null and bedNo!= '') or (kinds != null and kinds.size > 0)"> and <trim prefix="(" prefixOverrides="or" suffix=")"&g…
在mybatis中可能会用到的方法 1.模糊查询 <select id="showByIdName" parameterType="User" resultMap="resultmap"> SELECT r.*,u.id,u.age,u.`password`,u.username FROM role r LEFT JOIN user u ON r.role_id=u.role_id <where> <if test=…
public class User { private int id; private String username;// 用户姓名 private String sex;// 性别 private Date birthday;// 生日 private String address;// 地址 public int getId() { return id; } public void setId(int id) { this.id = id; } public String getUsern…