package com.zcxk.rmcp.core.dao;

import com.zcxk.rmcp.api.dto.product.ProductVo;
import com.zcxk.rmcp.core.entity.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author linqingwei
 * @date 2021-07-21 9:43
 */
@Mapper
public interface ProductMapper {
    int insertSelective(Product record);

    int updateByPrimaryKeySelective(Product record);

    List<ProductVo> findList(@Param("categoryId") Integer categoryId);

    Product findById(Integer id);

    Product getByName(@Param("productName") String productName, @Param("productModel") String productModel);

    ProductVo findProduct(Integer productId);
}