<?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.tangguo.mapper.BbsMomentVoteMapper">
	
	<select id="selectVotes" resultType="com.tangguo.domain.vo.BbsVoteVO">
		SELECT
			v.create_time,
			uv.nick_name
		FROM
			bbs_moment_vote v
		LEFT JOIN
			sys_user uv ON uv.user_name = v.user_name
		WHERE
		    v.moment_id = #{momentId} AND v.option_code = #{optionCode}
		ORDER BY
			v.create_time
	</select>
	
</mapper>
