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

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

@Repository
public class TCoreProjectDesensitizationruleDao extends BaseDao<TCoreProjectAllrule, String> {
   public List<Map<String, Object>> getProjectDesensitizationRule() {
      String sql = "SELECT a.id id,a.dataarea_id dataarea_id,b.dataarea dataarea,a.findrule findrule,a.findruledemo findruledemo FROM t_core_dataarea_findrule a,t_core_dataarea b WHERE a.dataarea_id = b.id";
      List<Map<String, Object>> vo = this.getSession().createNativeQuery(sql).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP).getResultList();
      return vo;
   }
}
