package com.ssm.manage.mapper;

import com.ssm.core.mapper.BaseMapper;
import com.ssm.manage.entity.BaseStore;
import com.ssm.manage.entity.BaseStores;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.stream.Stream;

@Component
public interface BaseStoreMapper extends BaseMapper<BaseStore> {
    /**
     * 父查子
     * @param baseStore
     * @return
     */
    List<BaseStores> findAllRecursion(BaseStore baseStore);

    /**
     * 子查父
     * @param baseStore
     * @return
     */
    List<BaseStores> findAllRecursions(BaseStore baseStore);

    //查询数据库中的表明
    List<String> selectTableName1();
    List<String> selectTableName2();
    List<String> selectTableName3();
    List<String> selectTableName4();

    int updateName(String memberName);

    List<BaseStores> selectByStoreName(BaseStore baseStore);

    List<BaseStore> selectChildren(@Param("storeId") Long storeId);

    List<BaseStores> selectStoreS(@Param("storeIds") List<Long> storeIds);

    List<String> selectDescription();

    List<String> selectGroup();

    List<BaseStore> selectByIds(@Param("storeIds") List<Long> storeIds);
}