package com.chenyang.nse.bussiness.dao.table.console.mapping;

import com.chenyang.nse.bussiness.dao.BaseDao;
import com.chenyang.nse.bussiness.entity.orm.table.console.mapping.TConsoleDatamappingInfo;
import com.chenyang.nse.bussiness.tools.xml.XmlTool;
import java.util.List;
import java.util.Map;
import org.hibernate.transform.Transformers;
import org.springframework.stereotype.Repository;

@Repository
public class TConsoleDatamappingInfoDao extends BaseDao<TConsoleDatamappingInfo, String> {
   public List<Map<String, String>> getDatamappingInfo(String sourcesystemtype, String targetsystemtype) {
      String sql = XmlTool.getSql("datamapping", "getDatamappingInfo");
      List<Map<String, String>> list = this.getSession().createNativeQuery(sql).setParameter("sourcesystemtype", sourcesystemtype).setParameter("targetsystemtype", targetsystemtype).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).getResultList();
      return list;
   }
}
