package com.tzld.piaoquan.growth.common.dao.mapper;

import com.tzld.piaoquan.growth.common.model.po.WeComUser;
import com.tzld.piaoquan.growth.common.model.po.WeComUserExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface WeComUserMapper {
    long countByExample(WeComUserExample example);

    int deleteByExample(WeComUserExample example);

    int deleteByPrimaryKey(Long id);

    int insert(WeComUser record);

    int insertSelective(WeComUser record);

    List<WeComUser> selectByExample(WeComUserExample example);

    WeComUser selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") WeComUser record, @Param("example") WeComUserExample example);

    int updateByExample(@Param("record") WeComUser record, @Param("example") WeComUserExample example);

    int updateByPrimaryKeySelective(WeComUser record);

    int updateByPrimaryKey(WeComUser record);

    Long selectIdByExternalUserId(String externalUserId);

    void insertList(@Param("list") List<WeComUser> list);

    List<WeComUser> selectUserList(@Param("staffId") Long staffId,
                                   @Param("groupMsgDisabled") byte groupMsgDisabled,
                                   @Param("filterTagIdList") List<Long> filterTagIdList,
                                   @Param("pageNum") Integer pageNum,
                                   @Param("pageSize") Integer pageSize);

    List<WeComUser> selectByTagUserList(@Param("tagId") Long tagId);

    List<WeComUser> selectByGenderUserList(@Param("staffId") Long staffId,
                                           @Param("groupMsgDisabled") byte groupMsgDisabled,
                                           @Param("filterTagIdList") List<Long> filterTagIdList,
                                           @Param("gender") Integer gender);

}