package com.cool.store.mapper;

import com.cool.store.dto.label.LabelListDTO;
import com.cool.store.entity.HyPartnerLabelDO;
import com.cool.store.vo.LabelListVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Fun Li
 * @date 2023-08-10
 */
public interface HyPartnerLabelMapper {
    int deleteByPrimaryKey(Long id);

    int insert(HyPartnerLabelDO record);

    int insertSelective(HyPartnerLabelDO record);

    HyPartnerLabelDO selectByPrimaryKey(Long id);

    List<HyPartnerLabelDO> selectSelective(HyPartnerLabelDO labelDO);

    int updateByPrimaryKeySelective(HyPartnerLabelDO record);

    int updateByPrimaryKey(HyPartnerLabelDO record);

    List<LabelListVo> getLabelList(LabelListDTO dto);

    /**
     * 某个标签组内是否有未删除的标签
     * @param labelGroupId 标签组 id
     */
    Boolean whetherGroupInUse(@Param("labelGroupId") Long labelGroupId);

    List<HyPartnerLabelDO> getLabelListByIds(@Param("labelIds") List<Long> labelIds);
}