package cn.axzo.msg.center.dal.mapper;

import cn.axzo.msg.center.domain.entity.MessageRelation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;

/**
 * 模块与模板的关系表(MessageRelation)表数据库访问层
 *
 * @author zhangran
 * @since 2022-03-28 14:59:16
 */
/*@Mapper*/
public interface MessageRelationMapper extends BaseMapper<MessageRelation>{


  @Insert("insert into message_relation (id, type_id, module_id, template_id) values(#{id}, 0, #{moduleId}, #{templateId})")
  void nativeSql(Long id, Long moduleId, Long templateId);

  MessageRelation getTemplateByCode(Long moduleId,String templateCode);
}

