package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.InfoUser;
import com.ruoyi.system.domain.MerchantSubaccountStore;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface MerchantSubaccountStoreMapper extends BaseMapper<MerchantSubaccountStore> {

    List<Long> selectStoreIdsBySubaccountUserId(Long subaccountUserId);

    List<InfoUser> selectEligibleSubaccountsByStoreId(Long storeId);

    int deleteBySubaccountUserId(Long subaccountUserId);

    int deleteByStoreId(Long storeId);

    int insertBatch(@Param("relations") List<MerchantSubaccountStore> relations);
}
