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

import com.chenyang.nse.bussiness.dao.BaseDao;
import com.chenyang.nse.bussiness.dao.PageInfo;
import com.chenyang.nse.bussiness.entity.vo.maskingrule.MaskingInfoRuleVO;
import com.chenyang.nse.bussiness.tools.xml.XmlTool;
import java.util.List;
import org.hibernate.transform.Transformers;
import org.springframework.stereotype.Repository;

@Repository
public class MaskingRuleDao extends BaseDao<Object, String> {
   public List<MaskingInfoRuleVO> queryInfoRule(PageInfo pageInfo) {
      String sql = XmlTool.getSql("maskingrule", "queryInfoRule");
      List<MaskingInfoRuleVO> vo = this.getSession().createNativeQuery(sql).setFirstResult(pageInfo.getOffset()).setMaxResults(pageInfo.getPagesize()).setResultTransformer(Transformers.aliasToBean(MaskingInfoRuleVO.class)).getResultList();
      return vo;
   }
}
