package com.winsun.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.winsun.bean.HhrUser;

import java.util.List;
import java.util.Map;

/**
 * 合伙人用户表的Mapper
 */
@Mapper
@Component
public interface HhrUserMapper extends BaseMapper<HhrUser> {

    /**
     * 统计所有订单数
     * @param userIds
     * @param today
     * @param toWeekStart
     * @param toWeekEnd
     * @param toMonthStart
     * @param toMonthEnd
     * @param isComplete
     * @return
     */
    Map<String, Object> statisticAllOrderNum(@Param("userIds") List<Integer> userIds, @Param("today") String today,
                                             @Param("toWeekStart")String toWeekStart, @Param("toWeekEnd")String toWeekEnd,
                                             @Param("toMonthStart")String toMonthStart, @Param("toMonthEnd")String toMonthEnd,
                                             @Param("isComplete") boolean isComplete);

    /**
     * 根据合伙人获取产品id
     * @param hehuorenId
     * @return
     */
    Map<String, Object> getProductByUserId(@Param("hehuorenId") String hehuorenId);

    /**
     * 查询督导姓名、揽装工号
     * @param hehuorenId
     * @return
     */
    List<Map<String, Object>> selectSupervisor(@Param("hehuorenId") String hehuorenId);

    /**
     * 查询合伙人信息
     * @param hehuorenId
     * @return
     */
    Map<String, Object> selectHehuorenInfo(@Param("hehuorenId") String hehuorenId);
}
