There is no getter for property named 'user_full_name' in 'class com.book.erp.entity.user.QueryUser
Mybatis 配置错误,XML配置文件有Java对象以及数据库字段,配置时需要小心
user_full_name是数据库字段,不需要有get 和 set方法,显然这里是配置错误
<if test="userName!=null and userName!=''">
And user_name like #{userName}
</if>
<if test="user_full_name!=null and user_full_name!=''">
AND user_full_name like #{userFullname}
</if>
@JsonIgnore 在参数映射时,不是去掉参数,而是自动赋予null
public class QueryUser {
//@JsonIgnore
private String userName;
//@JsonIgnore
private String userFullname;
//@JsonIgnore
private String userTelephone;
//@JsonIgnore
private String userEmail;
}