package com.cxyxiaomo.epp.shop.dao;

import com.cxyxiaomo.epp.common.pojo.Good;
import com.cxyxiaomo.epp.common.vo.GoodVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface GoodDao {

    List<Good> list(@Param("cateId") Integer cateId, @Param("searchText") String searchText);

    List<Good> listOnSale(@Param("cateId") Integer cateId, @Param("searchText") String searchText);

    Good getById(Long id);

    Good selectById(Long id);

    List<Good> listByIds(List<Long> id);

    Integer insert(Good good);

    Integer update(Good good);

    Integer deleteById(Integer id);


    // Manage
    public boolean addGood(Good good);

    public boolean updateGood(Good good);

    public List<Good> getGoodList(GoodVO goodVO);

    public boolean deleteGoodById(Long goodId);
}
