package com.kiisoo.ic.store.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kiisoo.ic.store.bean.PoiStoreStaffDTO;
import com.kiisoo.ic.store.entity.PoiStoreStaff;
import com.kiisoo.ic.webappmy.vo.StafferInfoVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 账号  Mapper 接口
 * @author jinchaofan
 * @since 2020-02-19
 */
@Repository
public interface PoiStoreStaffDOMapper extends BaseMapper<PoiStoreStaff> {

    /**
     * 找到所有的店铺id
     * @return 店铺id集合
     */
    List<Long> selectAllShopId(@Param("shopStatus") Integer shopStatus, @Param("storeType") Integer storeType);

    List<Long> selectByUserId(@Param("userId") Long userId);

    /**
     * 根据店铺集合查询导购
     * @param shopId
     * @return
     */
    List<PoiStoreStaffDTO> selectSellersByShopIds(@Param("shopId") List<Long> shopId);

    /**
     * 查询店铺店长
     */
    String selectShopManagerByShop (@Param("shopId") Long shopId);

    /**
     * 根据用户id找到导购信息
     */
    List<StafferInfoVO> selectInfoById(@Param("userId") Long userId);

    Long selectStaffIdByUserId(@Param("userId") Long userId);
}
