package com.panzhihua.service_community.dao; import java.util.List; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.dtos.community.microCommercialStreet.PageMcsGameDTO; import com.panzhihua.common.model.vos.community.microCommercialStreet.McsGameVO; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Mapper; import com.panzhihua.service_community.entity.McsGame; /** * (McsGame)表数据库访问层 * * @author makejava * @since 2021-12-28 14:37:09 */ @Mapper public interface McsGameDAO extends BaseMapper { /** * 批量新增数据(MyBatis原生foreach方法) * * @param entities * List 实例对象列表 * @return 影响行数 */ int insertBatch(@Param("entities") List entities); /** * 批量新增或按主键更新数据(MyBatis原生foreach方法) * * @param entities * List 实例对象列表 * @return 影响行数 * @throws org.springframework.jdbc.BadSqlGrammarException * 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 */ int insertOrUpdateBatch(@Param("entities") List entities); /** * 分页查询戳戳游戏 * @param page * @param pageMcsGameDTO * @return */ IPage pageMcsGame(@Param("page") Page page, @Param("pageMcsGameDTO") PageMcsGameDTO pageMcsGameDTO); /** * 查询商家已发布数 * @param merchantId * @return */ Integer selectPublishCount(@Param("merchantId") Long merchantId); /** * 查询商家下已被领取的卷总数 * @param merchantId * @param type * @return */ Integer selectAppliedCount(@Param("merchantId") Long merchantId, @Param("type") Integer type); /** * 查询商家下已被核销的卷总数 * @param merchantId * @param type * @return */ Integer selectVerifiedCount(@Param("merchantId") Long merchantId, @Param("type") Integer type); /** * 获取热门游戏 * @return */ McsGameVO selectPopularGame(); /** * h5分页游戏查询 * @param page * @param pageMcsGameDTO * @return */ IPage pageH5McsGame(@Param("page") Page page, @Param("pageMcsGameDTO") PageMcsGameDTO pageMcsGameDTO); /** * 游戏详情 * @param gameId * @return */ McsGameVO selectDetailById(@Param("gameId") Long gameId); /** * 通过商家id批量下架戳戳游戏 * @param needDealIds * @return */ Integer setOffByMerchantIds(@Param("needDealIds") List needDealIds); /** * 获取需要处理的到期数据 * @return */ List selectNeedDealExpire(); }