package com.ho.business.mapper;

import com.ho.business.entity.ElecTemplate;
import com.ho.business.vo.req.elecPriceCurve.ElecPriceTemplateReq;
import com.ho.business.vo.req.elecPriceCurve.ElecPriceTemplateReqVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
* @author yule
* @description 针对表【elec_template】的数据库操作Mapper
* @createDate 2023-04-19 13:58:15
* @Entity com.ho.business.entity.ElecTemplate
*/
@Mapper
public interface ElecTemplateMapper {

    int deleteByPrimaryKey(Integer id);

//    int insert(ElecTemplate record);

    int insertSelective(ElecTemplate record);

    ElecTemplate selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ElecTemplate record);

    ElecTemplate selectByTemplateName(String templateName, Integer stationId);

    List<ElecTemplate> selectByInfo(ElecPriceTemplateReqVO vo);

    void deleteByIds(List<Integer> ids);

    int checkTemplate(ElecPriceTemplateReq elecPriceTemplateReq);

    int updateIsEnabled(ElecTemplate record);

    List<ElecTemplate> queryTemplatesByStationId(ElecTemplate template);

    /**
     * 校验模板名称是否重复(修改模板时校验方法)
     * @param template
     * @return
     */
    Integer checkTemplateName(ElecTemplate template);

}
