//用户信息综合查询
public List<UserCustom> findUserList(UserQueryVo userQueryVo) throws Exception;
}
代理文件 UserMapper.xml
<!-- 用户信息综合查询
userCustom 是 UserQueryVo类中的属性 #{userCustom.sex}:取出pojo包装对象中性别值
${userCustom.username}:取出pojo包装对象中用户名称
-->
<select id="findUserList" parameterType="cn.itcast.mybatis.po.UserQueryVo" resultType="cn.itcast.mybatis.po.UserCustom">
select * from user where user.sex = #{userCustom.sex} and user.username LIKE '%${userCustom.username}%'
</select>