package com.shinsoft.sto.mapper.main;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shinsoft.sto.model.main.Price;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

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

public interface PriceMapper extends BaseMapper<Price> {

    /**
     * 分页查询价格信息
     */
    Page<Price> selectPricePage(Page<Price> page, @Param("params") Map<String, Object> params);

    /**
     * 根据客户ID查询价格信息
     */
    @Select("SELECT * FROM T_MAIN_PRICE WHERE cancel_flag = '0' AND customer_id = #{customerId}")
    List<Price> selectByCustomerId(String customerId);
}