<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.micer.easyball.mapper.GamePlayerMapper">

    <select id="selectAllGame" resultType="com.micer.easyball.pojo.GamePlayer">
        SELECT DISTINCT `gp`.*
        FROM
            `game` `g`
                LEFT JOIN
            `game_player` `gp`
                ON
                    `g`.`id` = `gp`.`game_id`
        WHERE
            `g`.`year` = #{year}
                AND
            `g`.`our_team_id` = #{clubId}
                AND
            `gp`.`player_id` = #{playerId};
    </select>
</mapper>