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

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

@Repository
public class TcoreDiscoverySensitivecolumnDao extends BaseDao<TcoreDiscoverySensitivecolumn, String> {
   public void saveTcoreDiscoverySensitivecolumn(StringBuilder sql) {
      this.getSession().createNativeQuery(sql.toString()).executeUpdate();
   }

   public List<TcoreDiscoverySensitivecolumn> discoveryDataAreaList(String findtaskId) {
      String sql = "select id as id,regextype from t_core_discovery_sensitivecolumn where checked = '1' and groupid = '" + findtaskId + "' group by regextype order by regextype";
      List<TcoreDiscoverySensitivecolumn> list = this.getSession().createNativeQuery(sql).setResultTransformer(Transformers.aliasToBean(TcoreDiscoverySensitivecolumn.class)).getResultList();
      return list;
   }
}
