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