package com.chenyang.nse.bussiness.dao.table.core.strategy.audit.app;

import com.chenyang.nse.bussiness.dao.BaseDao;
import com.chenyang.nse.bussiness.entity.orm.table.core.strategy.audit.app.AuditAppDataRule;
import com.chenyang.nse.bussiness.entity.vo.strategy.StrategeVO;
import java.util.List;
import org.hibernate.transform.Transformers;
import org.springframework.stereotype.Repository;

@Repository
public class AuditAppDataRuleDao extends BaseDao<AuditAppDataRule, String> {
   public List<StrategeVO> queryAllStrategy() {
      String sql = "select id as id ,name ,remark, type, enablestatus from t_console_audit_appdatarule   union all select id as id ,name ,remark, '1' as type, enablestatus from t_console_masking_appdatarule";
      List<StrategeVO> list = this.getSession().createNativeQuery(sql).setResultTransformer(Transformers.aliasToBean(StrategeVO.class)).getResultList();
      return list;
   }
}
