| | |
| | | package com.panzhihua.service_community.dao; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActDiscussOptionUserVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.service_community.model.dos.ComActDiscussOptionUserDO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | |
| | | @Select("select count(id) from com_act_discuss_option_user where discuss_option_id = #{discussOptionId} and user_id = #{userId}") |
| | | int selectHaveVotes(@Param("discussOptionId") Long discussOptionId, @Param("userId") Long userId); |
| | | |
| | | /** |
| | | * 查询用户当天当前投票栏目下已投次数 |
| | | * @param discussId 一起议主键id |
| | | * @param userId 用户id |
| | | * @return 总数 |
| | | */ |
| | | int selectVotedVotesInToday(@Param("discussId") Long discussId, @Param("userId") Long userId); |
| | | |
| | | /** |
| | | * 查询当前投票主题下的记录 最多6条用于展示 |
| | | * @param discussId 一起议主键id |
| | | * @return |
| | | */ |
| | | List<ComActDiscussOptionUserVO> selectVotedRecords(@Param("discussId") Long discussId); |
| | | |
| | | /** |
| | | * 查询当前投票主题参与人数 |
| | | * @param discussId 一起议主键id |
| | | * @return |
| | | */ |
| | | int selectVotedPersonNum(@Param("discussId") Long discussId); |
| | | |
| | | /** |
| | | * 批量插入投票记录 |
| | | * @param comActDiscussOptionUserDOList |
| | | * @return |
| | | */ |
| | | int batchInsert(@Param("comActDiscussOptionUserDOList") List<ComActDiscussOptionUserDO> comActDiscussOptionUserDOList); |
| | | } |