HandHistoryMapper.xml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="org.dromara.business.mapper.HandHistoryMapper">
  6. <select id="selectAllHandHistory" resultType="org.dromara.business.domain.vo.HandHistoryVo">
  7. SELECT
  8. id,
  9. hand_id,
  10. tournament_id,
  11. involved_players,
  12. hand_number,
  13. board_cards,
  14. total_pot,
  15. hand_start_time,
  16. hand_end_time,
  17. hand_details,
  18. created_at
  19. FROM hand_history where tournament_id=#{tournamentId} AND id=#{historyId}
  20. </select>
  21. <select id="selectAllHandZhuoCi" resultType="org.dromara.business.domain.vo.HandHistoryVo">
  22. SELECT hh.table_id
  23. FROM hand_history hh
  24. INNER JOIN player_hand_history phh ON hh.id = phh.hand_history_id
  25. WHERE phh.player_id =#{playerId}
  26. AND hh.tournament_id = #{tournamentId} AND hh.table_id!=0
  27. GROUP BY hh.table_id
  28. ORDER BY hh.table_id ASC
  29. </select>
  30. <select id="selectAllHandNumber" resultType="org.dromara.business.domain.vo.HandHistoryVo">
  31. SELECT
  32. hh.*
  33. FROM
  34. hand_history hh
  35. INNER JOIN player_hand_history phh ON hh.id = phh.hand_history_id
  36. WHERE
  37. phh.player_id = #{playerId}
  38. AND hh.tournament_id = #{tournamentId}
  39. AND hh.table_id != 0
  40. AND hh.table_id = #{tableId}
  41. ORDER BY
  42. hh.hand_number ASC
  43. </select>
  44. </mapper>