package com.heyu.api.data.dao.vv;
/**
* <p>
* sku详描 服务类
* </p>
*
* @author quyixiao
* @since 2025-08-20
*/

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.heyu.api.data.entity.vv.VvSkuEntity;
import com.lz.mybatis.plugin.annotations.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface VvSkuDao extends BaseMapper<VvSkuEntity> {


	VvSkuEntity selectVvSkuById(@Param("id")Long id);


	Long insertVvSku(VvSkuEntity vvSku);


	Long insertOrUpdateVvSku(VvSkuEntity vvSku);


	int updateVvSkuById(VvSkuEntity vvSku);


	int updateCoverVvSkuById(VvSkuEntity vvSku);


	int deleteVvSkuById(@Param("id")Long id);


    List<VvSkuEntity> selectVvSkuByProductId(Long productId);

	@Realy
	int deleteVvSkuByRealId(Long id);


	List<VvSkuEntity> selectVvSkuBySkuIds(@IN List<Long> id);




	int updateVvSkuStockSaleCountById(@Sub Integer stock, @Plus Integer realSaleCount,@Plus Integer showSaleCount, @By Long id);


	@ExludeColumn({
			VvSkuEntity.real_sale_count,
			VvSkuEntity.origin_price
	})
	List<VvSkuEntity> selectAppSkuByProductId(Long productId);


    @ExludeColumn({VvSkuEntity.real_sale_count,VvSkuEntity.origin_price})
    List<VvSkuEntity> selectVvSkuListByIds(@IN List<Long> id);
}