package com.wzj.soopin.goods.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wzj.soopin.goods.domain.bo.SkuBo;
import com.wzj.soopin.goods.domain.entity.Sku;
import com.wzj.soopin.goods.domain.vo.SkuVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;

import java.time.LocalDateTime;

/**
 * sku信息Mapper接口
 *
 * @author zcc
 */
@Mapper
public interface SkuMapper extends BaseMapperPlus<Sku, SkuVO> {

    int updateStockById(@Param("skuId")Long skuId, @Param("optDate")LocalDateTime optDate, @Param("quantity")Integer quantity);

    IPage<SkuVO> getlist(@Param("page") Page<Sku> page,@Param("query") SkuBo query);


    SkuVO selectSkuByid(@Param("id") Long id);

}
