package com.kiisoo.ic.store.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kiisoo.ic.generalize.entity.CompanyStoreDO;
import com.kiisoo.ic.generalize.entity.ShopRegionDO;
import com.kiisoo.ic.store.entity.PoiStore;
import com.kiisoo.ic.system.entity.PrivilageUserDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

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

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


    /**
     * 根据区域找到所有店铺
     *
     * @param regionId 区域id
     * @return
     */
    List<PoiStore> selectRegionShop(@Param("regionId") long regionId);

    PoiStore selectShopByName(@Param("name") String name);

    ShopRegionDO selectShopMsg(Long shopId);

    CompanyStoreDO selectCompanyStore(Long sellerId);

    List<PoiStore> selectShopByCompany(Long orgId);

    List<PrivilageUserDO> selectSellerByShop(Long shopId);

    String selectStoreQrCode(@Param("shopId")Long shopId);
    List<PoiStore> selectShopByNameOrCode (@Param("name") String name);

    List<PoiStore> selectShopByCustomerIds(@Param("customerIds")List<Long> customerIds);
}
