ActivityLotteryCodeMapper.java

    1. /**
    2. * 获取用户抽奖码详情,根据轮次id和用户id
    3. *
    4. * @param activityRoundIds
    5. * @param userId
    6. * @return
    7. */
    8. @Select("<script> SELECT a.activity_id,a.activity_round_id,a.lottery_code,a.lottery_code_status,a.round_num, " +
    9. " a.user_id,a.user_head_image,a.user_nickname,a.acquire_type,a.activity_join_id, " +
    10. " b.id as activity_order_id,b.reward_level_id,b.reward_level,c.winner_lottery_codes,c.draw_status " +
    11. " FROM jmf_activity_lottery_code a " +
    12. " LEFT JOIN jmf_activity_order b ON a.lottery_code = b.lottery_code " +
    13. " LEFT JOIN jmf_activity_round c ON a.activity_round_id = c.id " +
    14. " WHERE a.user_id = #{userId} AND a.activity_round_id " +
    15. " IN <foreach collection='activityRoundIds' item='activityRoundId' open='(' close=')' separator=','>#{activityRoundId}</foreach> " +
    16. "</script>")
    17. List<ActivityLotteryDetailDto> getLotteryDetailsByRoundId(@Param("activityRoundIds") List<Long> activityRoundIds, @Param("userId") Long userId);