91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2.45MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-09-14
  • 語言: Java
  • 標(biāo)簽: 權(quán)限管理??java??

資源簡介

簡單的java權(quán)限管理系統(tǒng),適合初學(xué)者練手及學(xué)習(xí),數(shù)據(jù)庫包含。

資源截圖

代碼片段和文件信息

package?com.java1234.dao;

import?java.sql.Connection;
import?java.sql.PreparedStatement;
import?java.sql.ResultSet;

import?net.sf.json.JSONArray;
import?net.sf.json.JSONobject;

import?com.java1234.model.Auth;
import?com.java1234.model.User;
import?com.java1234.util.StringUtil;

public?class?AuthDao?{

public?JSONArray?getAuthByParentId(Connection?conString?parentIdString?authIds)throws?Exception{
JSONArray?jsonArray=new?JSONArray();
String?sql=“select?*?from?t_auth?where?parentId=??and?authId?in?(“+authIds+“)“;
PreparedStatement?pstmt=con.prepareStatement(sql);
pstmt.setString(1?parentId);
ResultSet?rs=pstmt.executeQuery();
while(rs.next()){
JSONobject?jsonobject=new?JSONobject();
jsonobject.put(“id“?rs.getInt(“authId“));
jsonobject.put(“text“?rs.getString(“authName“));
if(!hasChildren(con?rs.getString(“authId“)?authIds)){
jsonobject.put(“state“?“open“);
}else{
jsonobject.put(“state“?rs.getString(“state“));
}
jsonobject.put(“iconCls“?rs.getString(“iconCls“));
JSONobject?attributeobject=new?JSONobject();
attributeobject.put(“authPath“?rs.getString(“authPath“));
jsonobject.put(“attributes“?attributeobject);
jsonArray.add(jsonobject);
}
return?jsonArray;
}

private?boolean?hasChildren(Connection?conString?parentIdString?authIds)throws?Exception{
String?sql=“select?*?from?t_auth?where?parentId=??and?authId?in?(“+authIds+“)“;
PreparedStatement?pstmt=con.prepareStatement(sql);
pstmt.setString(1?parentId);
ResultSet?rs=pstmt.executeQuery();
return?rs.next();
}

public?JSONArray?getAuthsByParentId(Connection?conString?parentIdString?authIds)throws?Exception{
JSONArray?jsonArray=this.getAuthByParentId(con?parentIdauthIds);
for(int?i=0;i JSONobject?jsonobject=jsonArray.getJSONobject(i);
if(“open“.equals(jsonobject.getString(“state“))){
continue;
}else{
jsonobject.put(“children“?getAuthsByParentId(conjsonobject.getString(“id“)authIds));
}
}
return?jsonArray;
}

public?JSONArray?getCheckedAuthByParentId(Connection?conString?parentIdString?authIds)throws?Exception{
JSONArray?jsonArray=new?JSONArray();
String?sql=“select?*?from?t_auth?where?parentId=??“;
PreparedStatement?pstmt=con.prepareStatement(sql);
pstmt.setString(1?parentId);
ResultSet?rs=pstmt.executeQuery();
while(rs.next()){
JSONobject?jsonobject=new?JSONobject();
int?authId=rs.getInt(“authId“);
jsonobject.put(“id“?authId);
jsonobject.put(“text“?rs.getString(“authName“));
jsonobject.put(“state“?rs.getString(“state“));
jsonobject.put(“iconCls“?rs.getString(“iconCls“));
if(StringUtil.existStrArr(authId+““?authIds.split(““))){
jsonobject.put(“checked“?true);
}
JSONobject?attributeobject=new?JSONobject();
attributeobject.put(“authPath“?rs.getString(“authPath“));
jsonobject.put(“attributes“?attributeobject);
js

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-12-14?10:19??基于角色的權(quán)限系統(tǒng)\
?????目錄???????????0??2016-09-08?09:49??基于角色的權(quán)限系統(tǒng)\源碼及文檔\
?????目錄???????????0??2016-09-08?09:49??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\
?????文件?????????725??2013-12-10?07:48??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\.classpath
?????文件????????1037??2013-12-10?07:33??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\.project
?????目錄???????????0??2016-09-08?09:49??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\.settings\
?????文件?????????503??2013-12-10?07:33??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\.settings\.jsdtscope
?????文件?????????364??2013-12-10?07:33??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\.settings\org.eclipse.jdt.core.prefs
?????文件?????????466??2013-12-10?07:33??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\.settings\org.eclipse.wst.common.component
?????文件?????????305??2013-12-10?07:33??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\.settings\org.eclipse.wst.common.project.facet.core.xml
?????文件??????????49??2013-12-10?07:33??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件???????????6??2013-12-10?07:33??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????目錄???????????0??2016-09-08?09:49??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\
?????目錄???????????0??2014-01-09?08:31??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\meta-INF\
?????文件??????????39??2013-12-10?07:33??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\meta-INF\MANIFEST.MF
?????目錄???????????0??2016-09-08?09:49??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\WEB-INF\
?????目錄???????????0??2014-01-09?08:31??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\WEB-INF\lib\
?????文件??????188671??2013-12-10?07:34??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\WEB-INF\lib\commons-beanutils-1.7.0.jar
?????文件??????571259??2013-12-10?07:34??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\WEB-INF\lib\commons-collections-3.2.jar
?????文件??????261809??2013-12-10?07:34??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\WEB-INF\lib\commons-lang-2.4.jar
?????文件???????38015??2013-12-10?07:34??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\WEB-INF\lib\commons-logging-1.0.4.jar
?????文件???????77826??2013-12-10?07:34??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\WEB-INF\lib\ezmorph-1.0.3.jar
?????文件??????148490??2013-12-10?07:34??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\WEB-INF\lib\json-lib-2.2.3-jdk15.jar
?????文件??????446464??2013-12-10?07:34??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\WEB-INF\lib\mysql-connector-java-3.1.12-bin.jar
?????文件????????1226??2013-12-20?08:21??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\WEB-INF\web.xml
?????文件?????????273??2013-12-17?08:00??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\cjlr.html
?????目錄???????????0??2016-09-08?09:49??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\images\
?????文件????????1419??2013-12-10?07:35??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\images\image.jsp
?????目錄???????????0??2016-09-08?09:49??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\images\login\
?????文件???????32256??2013-12-10?07:35??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\images\login\Thumbs.db
?????文件????????1463??2013-12-10?07:35??基于角色的權(quán)限系統(tǒng)\源碼及文檔\Rbps\WebContent\images\login\bg.gif
............此處省略653個文件信息

評論

共有 條評論