package com.qs.mp.user.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.qs.mp.admin.domain.vo.MarketingUserCodeListVO;
import com.qs.mp.user.domain.MarketingUserCode;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @auther quanshu
 * @create 2022-05-16 14:28:52
 * @describe 营销活动用户参与码关系表mapper类
 */
public interface MarketingUserCodeMapper extends BaseMapper<MarketingUserCode> {

    /**
     * 根据参数查询参与码相关信息
     * @param queryWrapper
     * @return
     */
    List<MarketingUserCodeListVO> listMarketingUserCodeByQueryWrapper(@Param(Constants.WRAPPER) QueryWrapper<MarketingUserCode> queryWrapper);

    /**
     * 获取活动参与的真实用户
     * @param marketingId
     * @return
     */
    int countRealUserNumByMarketingId(@Param("marketingId") Long marketingId);
}
