package com.chenyang.nse.bussiness.dao.table.core;

import com.chenyang.nse.bussiness.dao.BaseDao;
import com.chenyang.nse.bussiness.entity.orm.table.core.TCoreDatadis;
import java.util.List;
import org.hibernate.transform.Transformers;
import org.springframework.stereotype.Repository;

@Repository
public class TCoreDatadisDao extends BaseDao<TCoreDatadis, String> {
   public List<TCoreDatadis> queryDatadisByType(String dicttype) {
      String sql = "select u.id as id,u.dictname,u.insname,u.dicttype,u.dictlabel,u.dictvalue  from t_core_data_dis_t u where u.dicttype = :dicttype order by u.order ";
      return this.getSession().createNativeQuery(sql).setParameter("dicttype", dicttype).setResultTransformer(Transformers.aliasToBean(TCoreDatadis.class)).getResultList();
   }
}
