<select id="getUserList" resultMap="userList" parameterType="user"> select u.*,r.roleName from smbms_user as u,smbms_role as r where u.userRole=r.id and u.userRole=#{userRole} and u.userName like CONCAT('%',#{userName},'%') </select> <resultMap type="User" id="userList"> ...