package com.gic.haoban.manage.service.dao.mapper;

import java.util.List;
import java.util.Set;

import org.apache.ibatis.annotations.Param;

import com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated;

public interface TabHaobanClerkMainStoreRelatedMapper {

    int insert(TabHaobanClerkMainStoreRelated record);

    int updateByPrimaryKeySelective(TabHaobanClerkMainStoreRelated record);

	TabHaobanClerkMainStoreRelated selectByWxEnterpriseIdAndStoreId(@Param("staffId")String staffId, @Param("wxEnterpriseId")String wxEnterpriseId , @Param("storeIdList") List<String> storeIdList);


    /**
     * 删除主门店
     *
     * @param staffId
     * @param storeId
     * @param wxEnterpriseId
     */
    void delMainStore(@Param("staffId") String staffId, @Param("storeId") String storeId, @Param("wxEnterpriseId") String wxEnterpriseId);
    
    void delStaffMainStore(@Param("staffId") String staffId,  @Param("wxEnterpriseId") String wxEnterpriseId);

    /**
     * 删除门店
     *
     * @param storeIds
     * @return
     */
    int delByStoreIds(@Param("storeIds") Set<String> storeIds);

    /**
     * 无状态列表 最近的数据
     *
     * @param wxEnterpriseId
     * @param staffId
     * @return
     */
    TabHaobanClerkMainStoreRelated getLastNoStatusByStaffId(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("staffId") String staffId);

    List<TabHaobanClerkMainStoreRelated> listByStaffIdList(@Param("list") List<String> staffIdList) ;
}