package com.heyu.api.data.dao.vv;
/**
* <p>
* 评论详情表 服务类
* </p>
*
* @author quyixiao
* @since 2025-08-25
*/
import com.heyu.api.data.entity.vv.VvCommentDetailEntity;
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 VvCommentDetailDao extends BaseMapper<VvCommentDetailEntity> {


	VvCommentDetailEntity selectVvCommentDetailById(@Param("id")Long id);


	Long insertVvCommentDetail(VvCommentDetailEntity vvCommentDetail);


	Long insertOrUpdateVvCommentDetail(VvCommentDetailEntity vvCommentDetail);


	int updateVvCommentDetailById(VvCommentDetailEntity vvCommentDetail);


	int updateCoverVvCommentDetailById(VvCommentDetailEntity vvCommentDetail);


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


	/**
	 *
	 * @param commentId
	 * @return
	 */
	@OrderBy(VvCommentDetailEntity.id_)
    List<VvCommentDetailEntity> selectVvCommentDetailByCommentId(Long commentId);




	@OrderBy(value={VvCommentDetailEntity.id_} , type={OrderType.ASC})
	List<VvCommentDetailEntity> selectVvCommentDetailByProductId(Long productId);
}