package com.energy.manage.service.mappers.analysis;

import com.energy.manage.common.mapper.MyMapper;
import com.energy.manage.common.po.analysis.AnalysisCommentTypeRelationPo;
import com.energy.manage.service.domain.dto.analysis.AnalysisCommentTypeRelationDto;
import com.energy.manage.service.domain.vo.analysis.AnalysisCommentTypeRelationVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author chy
 * @date 2024/5/23 13:05
 * @desc
 */
@Repository
public interface AnalysisCommentTypeRelationMapper extends MyMapper<AnalysisCommentTypeRelationPo> {

    /**
     * 根据批次号与分析类型查询
     * @param batchCode
     * @param analysisTypeCode
     * @return
     */
    List<AnalysisCommentTypeRelationVo> selectByAnalysisTypeCode(@Param("batchCode") String batchCode,
                                                                 @Param("analysisTypeCode") String analysisTypeCode);

    /**
     * 根据typeCode 查询信息
     * @param commentTypeCode
     * @return
     */
    AnalysisCommentTypeRelationVo selectByTypeCode(@Param("commentTypeCode") String commentTypeCode);

    /**
     * 新增富文本类型
     * @param analysisCommentTypeRelationDto
     * @return
     */
    int insertPoSelective(AnalysisCommentTypeRelationDto analysisCommentTypeRelationDto);


    /**
     * 删除自定义评论类型
     * @param commentTypeCode
     * @return
     */
    int deleteByTypeCode(String commentTypeCode);

}
