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

import com.chenyang.nse.bussiness.dao.BaseDao;
import com.chenyang.nse.bussiness.entity.orm.table.core.api.ApiInfo;
import com.chenyang.nse.bussiness.tools.xml.XmlTool;
import org.springframework.stereotype.Repository;

@Repository
public class ApiInfoDao extends BaseDao<ApiInfo, String> {
   public int releaseByTreeId(String treeid) {
      String sql = XmlTool.getSql("apiinfo", "releasebytreeId");
      int i = this.getSession().createNativeQuery(sql).setParameter("treeid", treeid).executeUpdate();
      return i;
   }

   public int releaseAll() {
      String sql = XmlTool.getSql("apiinfo", "releaseall");
      int i = this.getSession().createNativeQuery(sql).executeUpdate();
      return i;
   }
}
