package com.sckw.goods.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sckw.goods.entity.KwBusinessGoods;
import com.sckw.goods.entity.req.GoodsFindListParam;
import com.sckw.goods.entity.req.GoodsInsertParam;
import com.sckw.goods.entity.req.GoodsPageParam;
import com.sckw.goods.entity.res.GoodsDetailByIdRes;
import com.sckw.goods.entity.res.GoodsFindListRes;
import com.sckw.goods.entity.res.GoodsFindPageRes;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
@DS("goods")
public interface GoodsMapper extends BaseMapper<KwBusinessGoods> {

    List<GoodsFindPageRes> findPage(GoodsPageParam params);

    List<GoodsFindListRes> findList(GoodsFindListParam kwBusinessGoods);

    GoodsDetailByIdRes findById(Long id);

    int insert(GoodsInsertParam goodsInsertParam);

    int delete(Long id);
}
