package com.bonus.core.merchant.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bonus.core.merchant.entity.MercMerchantInSystem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MercMerchantInSystemMapper extends BaseMapper<MercMerchantInSystem> {
   @Select({"select tenant_id from merc_merchant where status = #{status}"})
   List<Long> selectAllMerchantId(@Param("status") Integer status);

   @Select({"select tenant_id, merchant_name from merc_merchant ${ew.customSqlSegment}"})
   List<MercMerchantInSystem> selectMerchantIdAndNameListByWrapper(@Param("ew") Wrapper<MercMerchantInSystem> wrapper);
}
