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


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

import java.util.List;

/**
 * 消息路由配置信息(MessageRouter)表数据库访问层
 *
 * @author zhangran
 * @since 2022-03-28 14:59:16
 */
/*@Mapper*/
public interface MessageRouterMapper extends BaseMapper<MessageRouter> {


  @Insert("<script>insert into message_router (id, relation_id, router_type, router_url) values " +
      "  <foreach collection='adds' item='item' separator=',' > " +
      "  (#{item.id}, #{item.relationId}, #{item.routerType}, #{item.routerUrl})" +
      "  </foreach>" +
      "</script>")
  void navtiveBatchSql(List<SyncRouterDataDTO> adds);
}

