package com.cyksj.mapper.corp;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cyksj.model.entity.CorpUserTag;
import com.cyksj.model.excel.CorpUserTagExcelData;
import com.cyksj.model.views.CorpUserIntentionView;
import com.cyksj.model.views.CorpUserView;
import com.cyksj.model.views.UserIntentionPieView;
import com.cyksj.model.views.UserOrderDetailView;
import org.apache.ibatis.annotations.Param;

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


/**
 * @author chan
 * @date 2022/3/15 上午11:20
 */
public interface CorpUserTagMapper extends BaseMapper<CorpUserTag> {
	Page<CorpUserView> selectCorpUserDetailByCondition(@Param("page") Page<CorpUserView> page, @Param("groupId") String groupId, @Param("tagId") String tagId, @Param("wxCorpId") Long wxCorpId);

	List<CorpUserTagExcelData> exportUserTagDetail(@Param("tagIds") String[] tagIds, @Param("groupIds") String[] groupIds, @Param("wxCorpId") Long wxCorpId);

	Integer getDelCorpUserNum(@Param("tagIdStr") String tagIdStr, @Param("startTime") String startTime, @Param("endTime") String endTime);

	List<Long> getTagIdByCorpUserId(Long corpUserId);

	List<UserIntentionPieView> getUserIntentionPie(@Param("tagIdStr") String tagId, @Param("thisDate") String date);

	Page<CorpUserIntentionView> getCorpUserIntentionView(@Param("page") Page<CorpUserIntentionView> page, @Param("userId") Long userId, @Param("nickname") String nickname, @Param("tagIdStr") String tagId, @Param("thisDate") String date, @Param("intention") Integer intention);

	List<CorpUserTag> selectIntentionUserTag(@Param("externalUserId") String externalUserId, @Param("groupName") String groupName);

	UserOrderDetailView getFansUserToMonthOrdersDetai(@Param("tagIdStr") String tagIdStr, @Param("thisDate") String thisDate, @Param("st") Date st, @Param("et") Date et);
}