package com.yc.education.mapper;

import com.yc.education.model.Producten;
import com.yc.education.util.MyMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductenMapper extends MyMapper<Producten> {

    //查找出满足pid的商品
    List<Producten> findProductByPid(@Param("cid")Integer cid, @Param("wid")Integer wid, @Param("name")String name, @Param("minDate")String minDate, @Param("maxDate")String maxDate);

    //根据一级id删除商品
    void deleteByCid(@Param("cid")Integer cid);

    //根据二级id删除商品
    void deleteByWid(@Param("wid")Integer wid);

    //得到上一页的产品
    Producten findProductById01(@Param("id")Integer id,@Param("cid")Integer cid,@Param("wid")Integer wid);

    //得到下一页的产品
    Producten findProductById02(@Param("id")Integer id,@Param("cid")Integer cid,@Param("wid")Integer wid);
}
