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

import com.chenyang.nse.bussiness.dao.BaseDao;
import com.chenyang.nse.bussiness.entity.orm.table.base.TBaseMenuresource;
import java.util.List;
import org.hibernate.query.Query;
import org.springframework.stereotype.Repository;
import org.springframework.util.ObjectUtils;

@Repository
public class TBaseMenuresourceDao extends BaseDao<TBaseMenuresource, String> {
   public List<String> queryResourceIdListByMenuId(List<String> menuid) {
      if (ObjectUtils.isEmpty(menuid)) {
         return null;
      } else {
         String hql = "select resourceid from TBaseMenuresource where menuid in (:menuid)";
         Query query = this.getSession().createQuery(hql).setParameter("menuid", menuid);
         List<String> list = query.list();
         return list;
      }
   }
}
