package com.cyksj.mapper.corp;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cyksj.model.dto.CorpUserFollowRelationDto;
import com.cyksj.model.entity.CorpUserFollowRelation;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author chan
 * @date 2022/3/15 上午9:49
 */
public interface CorpUserFollowRelationMapper extends BaseMapper<CorpUserFollowRelation> {

	String selectCorpCustomers(@Param("unionid") String unionid, @Param("wxCorpId") Long wxCorpId);

	List<CorpUserFollowRelationDto> selectCorpUserFollowRelationByTagIds(@Param("list") List<String> tagIds, @Param("wxCorpId") Long wxCorpId, @Param("followIds") List<String> followIds, @Param("userScope") Integer userScope, @Param("consumerScope") Integer consumerScope, @Param("joinStartTime") Date joinStartTime, @Param("joinEndTime") Date joinEndTime);

	List<CorpUserFollowRelationDto> selectCorpUserFollowRelation(@Param("wxCorpId") Long wxCorpId, @Param("followIds") List<String> service_follow_ids);

	List<CorpUserFollowRelationDto> selectCorpUserNotUnderTagIds(@Param("list") List<String> tagIds, @Param("wxCorpId") Long wxCorpId, @Param("followIds") List<String> followIds, @Param("userScope") Integer userScope, @Param("consumerScope") Integer consumerScope, @Param("joinStartTime") Date joinStartTime, @Param("joinEndTime") Date joinEndTime);

	CorpUserFollowRelation getCorpUserFollowRelation(@Param("unionId") String unionId, @Param("followId") String followId);

	Integer selectNumOfCorpuserByFollowId(String followId);
}
