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

import com.heyu.api.data.entity.vv.VvProductDetailEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lz.mybatis.plugin.annotations.OrderBy;
import com.lz.mybatis.plugin.annotations.OrderType;
import com.lz.mybatis.plugin.annotations.Realy;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface VvProductDetailDao extends BaseMapper<VvProductDetailEntity> {


    VvProductDetailEntity selectVvProductDetailById(@Param("id") Long id);


    Long insertVvProductDetail(VvProductDetailEntity vvProductDetail);


    Long insertOrUpdateVvProductDetail(VvProductDetailEntity vvProductDetail);


    int updateVvProductDetailById(VvProductDetailEntity vvProductDetail);


    int updateCoverVvProductDetailById(VvProductDetailEntity vvProductDetail);


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


    @OrderBy(value = {VvProductDetailEntity.default_sort}, type = {OrderType.ASC})
    List<VvProductDetailEntity> selectVvProductDetailByProductId(Long productId);


    @Realy
    int deleteVvProductDetailRealById(@Param("id") Long id);


}