Spring Security 3 설정 사용


    Spring Security 3 를 사용 하 는 몇 가지 방법 에 대한 개술
    하 나 는 모든 설정 파일 을 이용 하여 사용자,권한,자원(url)을 xml 파일 에 하 드 인 코딩 하여 이 루어 진 것 입 니 다.
    두 번 째 는 사용자 와 권한 이 데이터베이스 로 저장 되 고 자원(url)과 권한 의 대응 은 하 드 인 코딩 설정 을 사용 하여 현재 이러한 방식 이 실현 되 었 습 니 다.
    세 가지 제 가 사용 하 는 것 은 세 번 째 입 니 다.세 번 째 는 역할 과 권한 을 세분 화하 고 사용자,역할,권한 과 자원 을 모두 데이터베이스 로 저장 하 며 필 터 를 사용자 정의 합 니 다.기 존의 FilterSecurity Interceptor 필 터 를 대체 합 니 다.    또한 AccessDecisionManager,Invocation Security MetadataSourceService 와 UserDetailsService 를 각각 실현 하고 설정 파일 에 해당 하 는 설정 을 합 니 다.
    네 가지 네 번 째 방식 을 나 는 해 본 적 이 없다.
 
    비 즈 니스 논리
    권한 코드 action 은 요청 경로 입 니 다.권한 정 보 는 여러 권한 코드 를 가지 고 있 습 니 다.캐릭터 는 여러 권한 정 보 를 가 질 수 있 습 니 다.사용 자 는 사용자 그룹 에 속 하고 사용자 그룹 은 여러 개의 역할 을 가지 고 있 습 니 다.사용자 그룹 은 메뉴 와 같은 권한 코드 action,페이지 메뉴 를 가 져 야 표시 할 수 있 습 니 다.마지막 으로 메뉴 표시 와 요청 경로 권한 검증 을 실현 합 니 다.
  지난 프로젝트 개발 에 사 용 된 기술:자바 1.5+struts 2.1.8+spring 3.0.7+hibenate 3.2.5+spring security 3.1.0+my sql 5.5+tomcat 6.0.
    spring security 만 설명 합 니 다.코드 는 프로젝트 에서 권한 부분 을 추출 하여 설명 합 니 다.    spring security 3.1.0 의 11 개의 jar 가방 은 각각:    spring-security-acl-3.1 .0 .RELEASE.jar     spring-security-config-3.1 .0 .RELEASE.jar     spring-security-core-3.1 .0 .RELEASE.jar     spring-security-taglibs-3.1 .0 .RELEASE.jar     spring-security-web-3.1 .0 .RELEASE.jar
    spring-security-aspects-3.1.0.RELEASE.jar
    spring-security-cas-3.1.0.RELEASE.jar
    spring-security-crypto-3.1.0.RELEASE.jar
    spring-security-ldap-3.1.0.RELEASE.jar
    spring-security-openid-3.1.0.RELEASE.jar
    spring-security-remoting-3.1.0.RELEASE.jar     물론 다른 프로젝트 와 관련 된 jar 가방 도 있어 서 붙 이지 않 습 니 다.
연초 에 spring security 를 설명 한 이전 버 전 Acegi 의 글 xml 설정 이 좀 복잡 합 니 다.spring security 3 설정 이 상대 적 으로 간단 합 니 다.
 
Spring Security 3 설정 사용
1.spring security 3 주요 실현 류.
2.spring security 3 주요 프로필.
3.웹.xml 프로필.
4 실현 절차 설명
5 권한 sql 스 크 립 트
6 첨부 파일 은 전체 프로그램 과 데이터베이스 스 크 립 트 입 니 다.
1.spring security 3 주요 실현 류(4 개의 관건 류 포함):
myFilter
  (1)MySecurityFilter.java 사용자 요청 필터 링
package com.taskmanager.web.security;

import java.io.IOException;
import java.util.Collection;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.access.SecurityMetadataSource;
import org.springframework.security.access.intercept.AbstractSecurityInterceptor;
import org.springframework.security.access.intercept.InterceptorStatusToken;
import org.springframework.security.web.FilterInvocation;
import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource;

public class MySecurityFilter extends AbstractSecurityInterceptor implements
		Filter {
//  applicationContext-security.xml  myFilter   securityMetadataSource  ,
	//        ,   AbstractSecurityInterceptor  
	private FilterInvocationSecurityMetadataSource securityMetadataSource;

	@Override
	public SecurityMetadataSource obtainSecurityMetadataSource() {
		return this.securityMetadataSource;
	}

	public void doFilter(ServletRequest request, ServletResponse response,
			FilterChain chain) throws IOException, ServletException {
		FilterInvocation fi = new FilterInvocation(request, response, chain);
		invoke(fi);
	}

	private void invoke(FilterInvocation fi) throws IOException,
			ServletException {
		// object FilterInvocation  
		// super.beforeInvocation(fi);//  
		// 1.         
		 //   Collection<ConfigAttribute> attributes = 
                        //securityMetadataSource.getAttributes(fi);
		// 2.      
		// this.accessDecisionManager.decide(authenticated, fi, attributes);
		// this.accessDecisionManager.decide(authenticated, fi, attributes);
		InterceptorStatusToken token = super.beforeInvocation(fi);
		try {
			fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
		} finally {
			super.afterInvocation(token, null);
		}
	}

	public FilterInvocationSecurityMetadataSource getSecurityMetadataSource() {
		return securityMetadataSource;
	}

	public void setSecurityMetadataSource(
			FilterInvocationSecurityMetadataSource securityMetadataSource) {
		this.securityMetadataSource = securityMetadataSource;
	}

	public void init(FilterConfig arg0) throws ServletException {
		// TODO Auto-generated method stub
	}

	public void destroy() {
		// TODO Auto-generated method stub

	}

	@Override
	public Class<? extends Object> getSecureObjectClass() {
		//   MyAccessDecisionManager supports      true,           
		return FilterInvocation.class;
	}
}

  핵심 Interceptor StatusToken token=super.beforeInvocation(fi);우리 가 정의 하 는 accessDecision Manager:decide(Object object)와 security MetadataSource 를 호출 합 니 다.
  :getAttributes(Object object)방법.
 
(2)MySecurity MetadataSource.java 시스템 시작 로드 시스템 권한  사용자 로그 인 인증 권한
package com.taskmanager.web.security;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;

import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.access.SecurityConfig;
import org.springframework.security.web.FilterInvocation;
import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource;
import org.springframework.security.web.util.AntPathRequestMatcher;
import org.springframework.security.web.util.RequestMatcher;

import com.taskmanager.exception.SystemRunException;
import com.taskmanager.hibernate.TSysPowerofaction;
import com.taskmanager.hibernate.TSysPowersystem;
import com.taskmanager.service.inter.PowerInter;
//1               

/**
 *              spring   IoC  securityMetadataSource。 
 * securityMetadataSource          MyInvocationSecurityMetadataSourceService。 
 *  MyInvocationSecurityMetadataSourceService               ,   HashMap , 
 *  Spring Security  ,      。 
 * @author sparta 11/3/29 
 */
public class MySecurityMetadataSource implements FilterInvocationSecurityMetadataSource {  
    	// spring    
    	public MySecurityMetadataSource(PowerInter powerService) 
               throws SystemRunException {  
            this.powerService = powerService;  
            loadResourceDefine();  
        }  
      
        private PowerInter powerService;
        private static Map<String, Collection<ConfigAttribute>> resourceMap = null;  
    	private RequestMatcher pathMatcher;
        public Collection<ConfigAttribute> getAllConfigAttributes() {  
        	return new ArrayList<ConfigAttribute>();
        }  
      
        public boolean supports(Class<?> clazz) {  
            // TODO Auto-generated method stub  
            return true;  
        }  
        //              
        private void loadResourceDefine() throws SystemRunException {  
        	if (resourceMap == null) {
    			resourceMap = new HashMap<String, Collection<ConfigAttribute>>();
    			List<TSysPowersystem> resources = this.powerService
    					.findByTSysPowersystem();
    			 for (TSysPowersystem resource : resources) {
    			Collection<ConfigAttribute> configAttributes =
                                    new ArrayList<ConfigAttribute>();
    			//        Spring security Object  
    			//resource.getRoleName()          role_admin     admin
    			ConfigAttribute configAttribute = 
                                    new SecurityConfig(resource.getRoleName());
    			configAttributes.add(configAttribute);
    			//resource.getInterceptUrl()               
                //        /manager/**/*.jh      /system/manager/**/*.jsp
    			resourceMap.put(resource.getInterceptUrl(), configAttributes);
    			 }
    		}
                      
        }  
      //               
        public Collection<ConfigAttribute> getAttributes(Object object)
                               throws IllegalArgumentException {  
        	Iterator<String> it = resourceMap.keySet().iterator();
    		while (it.hasNext()) {
    			String resURL = it.next();
    			Iterator<String> ite = resourceMap.keySet().iterator();
    			pathMatcher = new AntPathRequestMatcher(resURL);
    		if (pathMatcher.matches(((FilterInvocation) object).getRequest())) {
    				Collection<ConfigAttribute> returnCollection =
                                          resourceMap.get(resURL);
    				return returnCollection;
    			}
    		}
    		return null;
        }  
      
    }  

 이곳 의 resources Dao 는 Dao 디자인 모델 과 Spring 주입 에 익숙 한 친구 들 이 알 아 볼 수 있 을 것 이다.
 
(3)MyUserDetailServiceImpl.java 클릭 하여 로그 인하 고 이동 하여 사용자 권한 저장
package com.taskmanager.web.security;

import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.GrantedAuthorityImpl;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

import com.taskmanager.exception.LoginException;
import com.taskmanager.exception.SystemRunException;
import com.taskmanager.hibernate.TSysCharacter;
import com.taskmanager.hibernate.TSysCharofgroup;
import com.taskmanager.hibernate.TSysPowersystemofchar;
import com.taskmanager.hibernate.TSysUser;
import com.taskmanager.hibernate.TSysUsergroup;
import com.taskmanager.hibernate.TSysUserofusergroup;
import com.taskmanager.service.inter.UserInter;

public class MyUserDetailServiceImpl implements UserDetailsService {

	UserInter userService;
	public UserInter getUserService() {
		return userService;
	}

	public void setUserService(UserInter userService) {
		this.userService = userService;
	}

	//           
	public UserDetails loadUserByUsername(String username)
			throws UsernameNotFoundException {
		System.out.println("username is " + username);
		TSysUser users=null;
		try {
			users = this.userService.findByUsersLogin(username);
		} catch (LoginException e) {
			throw new UsernameNotFoundException(username);
		} catch (SystemRunException e) {
			throw new UsernameNotFoundException(username);
		}
		if (users == null) {
			throw new UsernameNotFoundException(username);
		}else {
			if(!users.getStatus()){
				throw new UsernameNotFoundException("         ");
			}
		}
		Collection<GrantedAuthority> grantedAuths = obtionGrantedAuthorities(users);

		boolean enables = true;
		boolean accountNonExpired = true;
		boolean credentialsNonExpired = true;
		boolean accountNonLocked = true;
		User userdetail = new User(users.getCode(), users.getPassword(),
				enables, accountNonExpired, credentialsNonExpired,
				accountNonLocked, grantedAuths);
		return userdetail;
	}

	//        
	private Set<GrantedAuthority> obtionGrantedAuthorities(TSysUser user) {
		Set<GrantedAuthority> authSet = new HashSet<GrantedAuthority>();
		//       
		Set<TSysUserofusergroup> userGroups = user.getTSysUserofusergroups();
		for(TSysUserofusergroup userGroup : userGroups ){
			//           
			TSysUsergroup usgroup=userGroup.getTSysUsergroup();
			//            
			Set<TSysCharofgroup> charofgroups=usgroup.getTSysCharofgroups();
		for (TSysCharofgroup charofgroup : charofgroups) {
			TSysCharacter character=charofgroup.getTSysCharacter();
			//          
			Set<TSysPowersystemofchar>  powerSystemofchars=
                              character.getTSysPowersystemofchars();
			for(TSysPowersystemofchar powerofchar : powerSystemofchars){
				authSet.add(
   new GrantedAuthorityImpl(powerofchar.getTSysPowersystem().getRoleName()));
			}
		}
		}
		return authSet;
	}
}

 
(4) MyAccessDecisionManager.java  접근 권한 이 있 는 지 확인 하기
package com.taskmanager.web.security;

import java.util.Collection;
import java.util.Iterator;

import org.springframework.security.access.AccessDecisionManager;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.authentication.InsufficientAuthenticationException;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
/** 
 *AccessdecisionManager Spring security      。 
 * 
 *          ,   Authentication         GrantedAuthority     。  
 *           。 GrantedAuthority    AuthenticationManager 
 *    Authentication   ,   AccessDecisionManager   ,      。  
 * 
 *Spring Security        ,             ,       web  。  
 *                ,  AccessDecisionManager   。  
 *   AccessDecisionManager  AbstractSecurityInterceptor  , 
 *             。   AccessDecisionManager        :  
 * 
 void decide(Authentication authentication, Object secureObject, 
    List<ConfigAttributeDefinition> config) throws AccessDeniedException; 
 boolean supports(ConfigAttribute attribute); 
 boolean supports(Class clazz); 
  
             ,AccessDecisionManager            ,             。  
     ,               ,    Object      。  
    ,            MethodInvocation。  
        Customer    MethodInvocation, 
     AccessDecisionManager            ,                 。  
         ,       AccessDeniedException  。 
 
     supports(ConfigAttribute)           
  AbstractSecurityInterceptor  ,   AccessDecisionManager 
          ConfigAttribute。  
  supports(Class)            , 
             AccessDecisionManager         。 
 */  
public class MyAccessDecisionManager implements AccessDecisionManager {  
          
        public void decide(Authentication authentication, Object object,
            Collection<ConfigAttribute> configAttributes) 
           throws AccessDeniedException, InsufficientAuthenticationException {  
            if(configAttributes == null) {  
                return;  
            }  
            //           (         )  
            Iterator<ConfigAttribute> iterator = configAttributes.iterator();  
            while(iterator.hasNext()) {  
                ConfigAttribute configAttribute = iterator.next();  
                //               
                String needPermission = configAttribute.getAttribute();  
                System.out.println("needPermission is " + needPermission); 
                //        authentication  
                for(GrantedAuthority ga : authentication.getAuthorities()) {  
                    if(needPermission.equals(ga.getAuthority())) {  
                        return;  
                    }  
                }  
            }  
            //            login.jsp  
            throw new AccessDeniedException("       ");  
        }  
      
        public boolean supports(ConfigAttribute attribute) {  
            // TODO Auto-generated method stub  
            return true;  
        }  
      
        public boolean supports(Class<?> clazz) {  
            // TODO Auto-generated method stub  
            return true;  
        }  
          
    }  

 
2.spring security 3 주요 프로필.
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security"
	xmlns:beans="http://www.springframework.org/schema/beans" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd  
http://www.springframework.org/schema/security 
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
	<global-method-security pre-post-annotations="enabled">
	</global-method-security>
	<!--             -->
	<http pattern="/include/js/**" security="none" />
	<http pattern="/include/css/**" security="none" />
	<http pattern="/include/scripts/**" security="none" />
	<http pattern="/include/jsp/**" security="none" />
	<http pattern="/images/**" security="none" />
	<http pattern="/login.jsp" security="none" />
	<!--auto-config = true    from-login.              http-basic(  session).-->
	<!-- lowercase-comparisons:  URL        。-->
        <!-- path-type:    Apache Ant     。-->
	<!--access-denied-page:          。-->
	<!-- access-decision-manager-ref:              。-->
	
	<http use-expressions="true" auto-config="true"
		access-denied-page="/include/jsp/timeout.jsp">
<!--login-page:      。  -->
<!--	login-processing-url:              Sign In         URL。-->
		<!--	authentication-failure-url:                。-->
		<!--	default-target-url:                         。-->
<!--	always-use-default-target:                  default-target-url     URL。
-->
		
<form-login login-page="/login.jsp" default-target-url='/system/default.jsp'
		always-use-default-target="true" authentication-failure-url="/login.jsp?login_error=1" />
<!--logout-url:              URL。     :/j_spring_security_logout。-->
		<!--	logout-success-url:        URL。-->
		<!--	invalidate-session:             Session。-->
		<logout invalidate-session="true" logout-success-url="/login.jsp"
			logout-url="/j_spring_security_logout" />
		<!--         -->
		<remember-me />

		<!--	max-sessions:           。            。-->
<!--     :        ,            。-->
 <!--	exception-if-maximum-exceeded:   false,-->
<!--	 exception-if-maximum-exceeded="true"           。-->

		<session-management invalid-session-url="/login.jsp"
			session-fixation-protection="none">
			<concurrency-control max-sessions="1"
				error-if-maximum-exceeded="false" />
		</session-management>
		<custom-filter ref="myFilter" before="FILTER_SECURITY_INTERCEPTOR" />
		<session-management
			session-authentication-strategy-ref="sas" />

	</http>
<beans:bean id="sas"
class="org.springframework.security.web.authentication.session.ConcurrentSessionControlStrategy">
		<beans:constructor-arg name="sessionRegistry"
			ref="sessionRegistry" />
		<beans:property name="maximumSessions" value="1" />
		<!--   session   -->
		<beans:property name="alwaysCreateSession" value="true" />
		<beans:property name="migrateSessionAttributes" value="false" />
		<!--                  -->
		<beans:property name="exceptionIfMaximumExceeded"
			value="false" />
	</beans:bean>
	<beans:bean id="sessionRegistry"
		class="org.springframework.security.core.session.SessionRegistryImpl" />
	<!--
    :   ApplicationListener    ,  AuthenticationCredentialsNotFoundEvent   ,-->
	<!--	AuthorizationFailureEvent  ,AuthorizedEvent  , PublicInvocationEvent  -->
	<beans:bean
		class="org.springframework.security.authentication.event.LoggerListener" />
	<!--                -->
	<beans:bean id="messageSource"
class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
		<beans:property name="basenames" value="classpath:message_zh_CN">
</beans:property>
	</beans:bean>
	<!--       -->
	<beans:bean id="myFilter"
		class="com.taskmanager.web.security.MySecurityFilter">
	<!--         -->
	<beans:property name="authenticationManager" ref="myAuthenticationManager" />
	<!--                -->
	<beans:property name="accessDecisionManager" ref="myAccessDecisionManager" />
	<!--           -->
	<beans:property name="securityMetadataSource" ref="mySecurityMetadataSource" />
	</beans:bean>
	<!--    UserDetailsService Bean -->
	<authentication-manager alias="myAuthenticationManager">
		<authentication-provider user-service-ref="myUserDetailServiceImpl">
			<!--          MD5   -->
			<password-encoder hash="md5" ref="passwordEncoder">
			</password-encoder>
		</authentication-provider>
	</authentication-manager>
	<!--                  -->
	<beans:bean id="myAccessDecisionManager"
		class="com.taskmanager.web.security.MyAccessDecisionManager">
	</beans:bean>
	<!--                                 -->
	<beans:bean id="mySecurityMetadataSource"
		class="com.taskmanager.web.security.MySecurityMetadataSource">
		<beans:constructor-arg name="powerService" ref="powerService">
</beans:constructor-arg>
	</beans:bean>
	<!--            -->
	<beans:bean id="myUserDetailServiceImpl"
		class="com.taskmanager.web.security.MyUserDetailServiceImpl">
		<beans:property name="userService" ref="userService"></beans:property>
	</beans:bean>

	<!--            -->
	<beans:bean id="passwordEncoder"
class="org.springframework.security.authentication.encoding.Md5PasswordEncoder" />
</beans:beans>  

 
3.웹.xml 프로필.
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
	http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
	<context-param>
		<description>Spring applicationContext</description>
		<param-name>contextConfigLocation</param-name>
		<param-value>
			/WEB-INF/spring/application*.xml
		</param-value>
	</context-param>
<listener>
		<description>SpringContextLoaderListener</description>
		<display-name>SpringContextLoaderListener</display-name>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>
<!-- spring scurity     -->
	<filter>
		<filter-name>springSecurityFilterChain</filter-name>
		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>springSecurityFilterChain</filter-name>
		<url-pattern>*.jh</url-pattern>
		<url-pattern>*.jsp</url-pattern>
		<url-pattern>/j_spring_security_check</url-pattern>
		<url-pattern>/j_spring_security_logout</url-pattern>
	</filter-mapping>
 
4.절차
 1)용기 시작(MySecurity MetadataSource:loadResourceDefine 로 딩 시스템 자원 과 권한 목록) 2)사용자 요청 3)필터 차단(MySecurity Filter:doFilter) 4)요청 자원 에 필요 한 권한 가 져 오기(MySecurityMetadataSource:getAttributes) 5)사용자 에 게 권한 과 요청 권한(MyAccessDecisionManager:decide)이 있 습 니 다.사용자 에 게 권한 이 없 으 면,
     6 단 계 를 실행 하지 않 으 면 7 단 계 를 실행 합 니 다. 6)로그 인 7)인증 및 권한 부여(MyUserDetailServiceImpl:loadUserByUsername)
 
5.권한 sql 스 크 립 트
/*
Navicat MySQL Data Transfer

Source Server         : mysql
Source Server Version : 50015
Source Host           : localhost:8036
Source Database       : taskmanager

Target Server Type    : MYSQL
Target Server Version : 50015
File Encoding         : 65001

Date: 2012-12-26 17:26:38
*/

SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `s_dict`
-- ----------------------------
DROP TABLE IF EXISTS `s_dict`;
CREATE TABLE `s_dict` (
  `ID` int(50) NOT NULL auto_increment,
  `DictType` varchar(10) NOT NULL,
  `Code` varchar(20) NOT NULL,
  `Name` varchar(50) NOT NULL,
  `ParentID` varchar(20) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;



-- ----------------------------
-- Table structure for `t_sys_character`
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_character`;
CREATE TABLE `t_sys_character` (
  `ID` varchar(50) NOT NULL COMMENT '  ID',
  `NAME` varchar(30) NOT NULL COMMENT '    ',
  `DESCRIPT` varchar(200) default NULL COMMENT '    ',
  `STATUS` decimal(1,0) NOT NULL default '1' COMMENT '    ',
  `MODPERSON` varchar(50) default NULL COMMENT '     ',
  `MODTIME` timestamp NULL default NULL COMMENT '      ',
  `REMARK` varchar(100) default NULL COMMENT '  ',
  `SEQID` decimal(12,0) default NULL COMMENT '   ',
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk COMMENT='   ';

-- ----------------------------
-- Records of t_sys_character
-- ----------------------------
INSERT INTO t_sys_character VALUES ('297ef0cb3915b16a013915c7eb112312', '     ', '     1', '1', '999999999999999', '2012-09-03 14:03:25', '', null);
INSERT INTO t_sys_character VALUES ('8a8a9691396b237101396b44825a0001', '    ', '    ', '1', '999999999999999', '2012-09-02 15:55:12', '', null);
INSERT INTO t_sys_character VALUES ('8a8a9691396b237101396b44aa060002', '    ', '    ', '1', '999999999999999', '2012-09-02 15:55:39', '', null);
INSERT INTO t_sys_character VALUES ('8a8a9691396b237101396b55f45b0017', '    ', '    ', '1', '999999999999999', '2012-09-02 15:55:57', '', null);
INSERT INTO t_sys_character VALUES ('8a8a9691398b2dc201398b2f0c400001', '  ', '  ', '1', '999999999999999', '2012-09-03 16:11:19', null, null);

-- ----------------------------
-- Table structure for `t_sys_charofgroup`
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_charofgroup`;
CREATE TABLE `t_sys_charofgroup` (
  `ID` varchar(50) NOT NULL COMMENT 'ID',
  `GROUPID` varchar(50) NOT NULL COMMENT '   ID',
  `CHARID` varchar(50) NOT NULL COMMENT '  ID',
  `STATUS` decimal(1,0) NOT NULL default '1' COMMENT '    ',
  `MODPERSON` varchar(50) default NULL COMMENT '     ',
  `MODTIME` timestamp NULL default NULL COMMENT '      ',
  `REMARK` varchar(100) default NULL COMMENT '  ',
  PRIMARY KEY  (`ID`),
  KEY `t_sys_charofgroup_groupid` (`GROUPID`),
  KEY `t_sys_charofgroup_charid` (`CHARID`),
  CONSTRAINT `t_sys_charofgroup_charid` FOREIGN KEY (`CHARID`) REFERENCES `t_sys_character` (`ID`) ON DELETE CASCADE,
  CONSTRAINT `t_sys_charofgroup_groupid` FOREIGN KEY (`GROUPID`) REFERENCES `t_sys_usergroup` (`ID`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=gbk COMMENT='      ';

-- ----------------------------
-- Records of t_sys_charofgroup
-- ----------------------------
INSERT INTO t_sys_charofgroup VALUES ('8a8a9691396b237101396b4bd0c6000a', '8a8a9691396b237101396b4b98be0009', '8a8a9691396b237101396b44aa060002', '1', '999999999999999', '2012-08-28 11:34:54', null);
INSERT INTO t_sys_charofgroup VALUES ('8a8a9691396b237101396b4bebb0000b', '8a8a9691396b237101396b4b819c0008', '8a8a9691396b237101396b44825a0001', '1', '999999999999999', '2012-08-28 11:35:01', null);
INSERT INTO t_sys_charofgroup VALUES ('8a8a9691396b237101396b594d2a001e', '1234567890', '297ef0cb3915b16a013915c7eb112312', '1', '999999999999999', '2012-08-28 11:49:38', null);
INSERT INTO t_sys_charofgroup VALUES ('8a8a9691396b237101396b5ec80f0022', '8a8a9691396b237101396b5ea8230021', '8a8a9691396b237101396b55f45b0017', '1', '999999999999999', '2012-08-28 11:55:37', null);

-- ----------------------------
-- Table structure for `t_sys_department`
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_department`;
CREATE TABLE `t_sys_department` (
  `ID` varchar(50) NOT NULL COMMENT 'ID',
  `ZJJGDM` varchar(9) default NULL COMMENT '        ',
  `CODE` varchar(20) NOT NULL COMMENT '    ',
  `ABBRNAME` varchar(30) NOT NULL COMMENT '    ',
  `NAME` varchar(60) NOT NULL COMMENT '    ',
  `CHIEF` varchar(50) default NULL COMMENT '       ',
  `INNET` decimal(1,0) default '1' COMMENT '    ',
  `ORDERNO` decimal(6,0) default NULL COMMENT '    ',
  `STATUS` decimal(1,0) default '1' COMMENT '    ',
  `MODPERSON` varchar(50) default NULL COMMENT '     ',
  `MODTIME` timestamp NULL default NULL COMMENT '      ',
  `OTHERS` varchar(50) default NULL COMMENT '  ',
  `ISENFOREORG` decimal(1,0) default '1' COMMENT '        ',
  `WEBSITENAME` varchar(100) default NULL COMMENT '      ',
  `WEBSITEADDR` varchar(200) default NULL COMMENT '      ',
  `XZQHID` varchar(20) default NULL COMMENT '    ID',
  `JGGXSBM` varchar(4) default NULL COMMENT '       ',
  `layer` int(11) NOT NULL default '1',
  `PARENTID` varchar(50) default NULL COMMENT '    ID',
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk COMMENT='     ';

-- ----------------------------
-- Records of t_sys_department
-- ----------------------------
INSERT INTO t_sys_department VALUES ('297ef0cb391b4ce301391b4e3d8e0001', null, '123', ' ', '123', '999999999999999', '1', '123', '0', '999999999999999', '2012-10-08 17:45:08', null, null, null, '123', null, null, '2', '297ef0cb391b4ce301391b4e3d8e6530');
INSERT INTO t_sys_department VALUES ('297ef0cb391b4ce301391b4e3d8e6530', null, 'gly', ' ', '     ', '8a8a9691396b237101396b5f73ef0023', '1', '99', '1', '999999999999999', '2012-09-24 14:04:11', null, null, null, '', null, null, '1', '');

-- ----------------------------
-- Table structure for `t_sys_duty`
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_duty`;
CREATE TABLE `t_sys_duty` (
  `id` varchar(50) NOT NULL COMMENT '    ',
  `name` varchar(20) NOT NULL COMMENT '    ',
  `ORDERNO` int(3) default NULL COMMENT '   ',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

-- ----------------------------
-- Records of t_sys_duty
-- ----------------------------
INSERT INTO t_sys_duty VALUES ('0001', '   ', '1');
INSERT INTO t_sys_duty VALUES ('0002', '  ', '15');
INSERT INTO t_sys_duty VALUES ('0003', '  ', '16');

-- ----------------------------
-- Table structure for `t_sys_menu`
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_menu`;
CREATE TABLE `t_sys_menu` (
  `ID` varchar(50) NOT NULL COMMENT 'ID',
  `NAME` varchar(30) NOT NULL COMMENT '    ',
  `DESCRIPT` varchar(200) default NULL COMMENT '  ',
  `LAYER` int(1) NOT NULL default '1' COMMENT '  ,   1、2、3、4、5'';',
  `PARENTID` varchar(50) default NULL COMMENT '   ID',
  `ACTIONNAME` varchar(100) default NULL COMMENT '      ACTION ,               ',
  `ORDERNO` decimal(3,0) NOT NULL default '0' COMMENT '    ',
  `STATUS` decimal(1,0) NOT NULL default '1' COMMENT '    ',
  `MODPERSON` varchar(50) default NULL COMMENT '     ',
  `MODTIME` timestamp NULL default NULL COMMENT '      ',
  `REMARK` varchar(100) default NULL COMMENT '  ',
  `SYSTEM` decimal(1,0) NOT NULL default '0' COMMENT '      ',
  `PARAMETER` varchar(50) default NULL COMMENT '        ',
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk COMMENT='   ';

-- ----------------------------
-- Records of t_sys_menu
-- ----------------------------
INSERT INTO t_sys_menu VALUES ('20050909150915816077', '      ', '', '2', '2006062709371100003', '/manager/power/list.jh', '2', '1', '999999999999999', '2012-08-18 17:47:53', '', '0', '');
INSERT INTO t_sys_menu VALUES ('20050909150953452259', '    ', '    ', '1', '', '', '0', '0', '999999999999999', '2012-08-17 16:38:14', '', '0', '');
INSERT INTO t_sys_menu VALUES ('20050909679021123458', '      ', '', '2', '2006062709371100003', '/manager/user/list.jh', '6', '1', '999999999999999', '2012-08-18 17:48:01', '', '0', '');
INSERT INTO t_sys_menu VALUES ('20050916100910655954', '       ', '', '2', '2006062709371100003', '/manager/usergroup/list.jh', '5', '1', '999999999999999', '2012-08-18 17:48:10', '', '0', '');
INSERT INTO t_sys_menu VALUES ('2006042709371511122', '      ', '      ', '2', '2006062709371100003', '/manager/character/list.jh', '4', '1', '999999999999999', '2012-08-18 17:48:20', '', '0', '');
INSERT INTO t_sys_menu VALUES ('2006051180061800000', '    ', '    ', '1', '', '', '15', '1', '999999999999999', '2012-08-14 21:50:03', '', '0', '');
INSERT INTO t_sys_menu VALUES ('2006051180061800090', '    ', '    ', '2', '2006051180061800000', '/manager/user/pass.jh', '7', '1', '999999999999999', '2012-08-18 17:48:45', '', '0', '');
INSERT INTO t_sys_menu VALUES ('2006061909095300001', '      ', '      ', '2', '2006062709371100003', '/manager/menu/list.jh', '3', '1', '999999999999999', '2012-08-18 17:48:52', '', '0', '');
INSERT INTO t_sys_menu VALUES ('2006062709371100003', '    ', '    ', '1', '', '', '1', '1', '999999999999999', '2012-08-17 16:21:38', '    ', '0', '');
INSERT INTO t_sys_menu VALUES ('297ef0cb3913a1ff013913ac623d0001', '    ', '    ', '2', '2006062709371100003', '/manager/department/list.jh', '13', '1', '999999999999999', '2012-08-18 17:49:04', '    ', '0', '');
INSERT INTO t_sys_menu VALUES ('402880013956bf7e01395707b2050001', '  ', '    ', '2', '8a8a96913933a87f013933b0be1f0001', '/case/auditList.jh', '18', '1', '999999999999999', '2012-08-24 13:12:00', '', '0', '');
INSERT INTO t_sys_menu VALUES ('402880013956bf7e01395707ef1e0002', '  ', '    ', '2', '8a8a96913933a87f013933b0be1f0001', '/case/fulfilList.jh', '19', '0', '999999999999999', '2012-09-24 17:01:04', '', '0', '');
INSERT INTO t_sys_menu VALUES ('40288001397655b80139765885070001', '  ', '    ', '2', '8a8a96913933a87f013933b0be1f0001', '/case/queryList.jh', '20', '1', '999999999999999', '2012-08-30 15:09:04', '', '0', '');
INSERT INTO t_sys_menu VALUES ('40288001397655b80139765921080002', '  ', '    ', '2', '8a8a96913933a87f013933b0be1f0001', '/case/statisticsList.jh', '21', '1', '999999999999999', '2012-08-30 15:11:54', '', '0', '');
INSERT INTO t_sys_menu VALUES ('8a8a9691390a5c7001390a6703e70003', '    ', '    ', '2', '2006051180061800000', '/j_spring_security_logout', '11', '1', '999999999999999', '2012-08-09 16:01:27', '', '0', '');
INSERT INTO t_sys_menu VALUES ('8a8a96913933a87f013933b0be1f0001', '    ', '    ', '1', '', '', '0', '1', '999999999999999', '2012-08-17 16:38:27', '    ', '0', '');
INSERT INTO t_sys_menu VALUES ('8a8a96913933a87f013933b4c32d0002', '  ', '    ', '2', '8a8a96913933a87f013933b0be1f0001', '/case/createCase.jh', '15', '0', '999999999999999', '2012-09-21 22:45:17', '     ', '0', '');
INSERT INTO t_sys_menu VALUES ('8a8a96913933a87f013933bdd022000b', '  ', '    ', '2', '8a8a96913933a87f013933b0be1f0001', '/case/receiveCase.jh', '16', '1', '999999999999999', '2012-08-18 17:49:30', '', '0', '');
INSERT INTO t_sys_menu VALUES ('8a8a9691394d77c001394da115300005', '  ', '    ', '2', '8a8a96913933a87f013933b0be1f0001', '/case/distributionCase.jh', '17', '1', '999999999999999', '2012-08-22 17:20:48', '    ', '0', '');
INSERT INTO t_sys_menu VALUES ('8a8a9691398ad08401398ad2adf20001', '      ', '      ', '2', '2006062709371100003', '/manager/powerSystem/list.jh', '4', '1', '999999999999999', '2012-09-03 14:30:26', '', '0', '');

-- ----------------------------
-- Table structure for `t_sys_power`
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_power`;
CREATE TABLE `t_sys_power` (
  `ID` varchar(50) NOT NULL COMMENT '  ID',
  `NAME` varchar(30) NOT NULL COMMENT '    ',
  `DESCRIPT` varchar(200) default NULL COMMENT '  ',
  `STATUS` decimal(1,0) NOT NULL default '1' COMMENT '    ',
  `ISPUBLIC` decimal(1,0) default '0' COMMENT '      ',
  `MODPERSON` varchar(50) default NULL COMMENT '     ',
  `MODTIME` timestamp NULL default NULL COMMENT '      ',
  `REMARK` varchar(100) default NULL COMMENT '  ',
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk COMMENT='     ';

-- ----------------------------
-- Records of t_sys_power
-- ----------------------------
INSERT INTO t_sys_power VALUES ('200512012106555', '          ', '          ', '1', '1', '999999999999999', '2012-08-14 21:02:38', '');
INSERT INTO t_sys_power VALUES ('8a8a96913933a87f013933b6c0f10003', '     ', '        ', '1', '1', '999999999999999', '2012-08-17 16:32:58', null);
INSERT INTO t_sys_power VALUES ('8a8a96913933a87f013933b768ba0004', '    ', '        ', '1', '1', '999999999999999', '2012-08-17 16:33:41', null);
INSERT INTO t_sys_power VALUES ('8a8a9691396b237101396b45cf5c0003', '     ', '     ', '1', '1', '999999999999999', '2012-08-28 11:28:20', null);
INSERT INTO t_sys_power VALUES ('8a8a9691396b237101396b523c350012', '    ', '', '1', '1', '999999999999999', '2012-08-28 11:41:55', null);

-- ----------------------------
-- Table structure for `t_sys_powerofaction`
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_powerofaction`;
CREATE TABLE `t_sys_powerofaction` (
  `ID` varchar(50) NOT NULL COMMENT 'ID',
  `POWERID` varchar(50) NOT NULL COMMENT '  ID',
  `ACTIONNAME` varchar(100) NOT NULL COMMENT '     ACTION  ',
  `DESCRIPT` varchar(200) default NULL COMMENT '  ',
  `STATUS` decimal(1,0) NOT NULL default '1' COMMENT '    ',
  `MODPERSON` varchar(50) default NULL COMMENT '     ',
  `MODTIME` timestamp NULL default NULL COMMENT '      ',
  `REMARK` varchar(100) default NULL COMMENT '  ',
  PRIMARY KEY  (`ID`),
  KEY `t_sys_powerofaction_id` (`POWERID`),
  KEY `t_sys_powerofaction_prid` (`POWERID`),
  CONSTRAINT `t_sys_powerofaction_prid` FOREIGN KEY (`POWERID`) REFERENCES `t_sys_power` (`ID`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=gbk COMMENT='    ACTION ';

-- ----------------------------
-- Records of t_sys_powerofaction
-- ----------------------------
INSERT INTO t_sys_powerofaction VALUES ('200512012102112', '200512012106555', '/manager/power/list.jh', '      ', '1', '999999999999999', '2012-08-18 17:46:27', null);
INSERT INTO t_sys_powerofaction VALUES ('200512012197343', '200512012106555', '/manager/menu/list.jh', '    ', '1', '999999999999999', '2012-08-18 17:50:23', null);
INSERT INTO t_sys_powerofaction VALUES ('200512012197349', '200512012106555', '/manager/character/list.jh', '      ', '1', '999999999999999', '2012-08-18 17:50:34', null);
INSERT INTO t_sys_powerofaction VALUES ('200512012412244', '200512012106555', '/manager/user/list.jh', '      ', '1', '999999999999999', '2012-08-18 17:50:40', null);
INSERT INTO t_sys_powerofaction VALUES ('200512012435444', '200512012106555', '/manager/usergroup/list.jh', '       ', '1', '999999999999999', '2012-08-18 17:50:47', null);
INSERT INTO t_sys_powerofaction VALUES ('297ef0cb3913a1ff013913ad56520002', '200512012106555', '/manager/department/list.jh', '    ', '1', '999999999999999', '2012-08-18 17:50:56', null);
INSERT INTO t_sys_powerofaction VALUES ('40288001397655b80139765d3f990003', '8a8a96913933a87f013933b768ba0004', '/case/queryList.jh', '    ', '1', '999999999999999', '2012-08-30 15:09:46', null);
INSERT INTO t_sys_powerofaction VALUES ('40288001397655b80139765ea8ce0004', '8a8a96913933a87f013933b768ba0004', '/case/statisticsList.jh', '    ', '1', '999999999999999', '2012-08-30 15:11:18', null);
INSERT INTO t_sys_powerofaction VALUES ('8a8a96913933a87f013933b8268c0005', '8a8a96913933a87f013933b768ba0004', '/system/default.jsp', '      ', '1', '999999999999999', '2012-08-20 13:09:49', null);
INSERT INTO t_sys_powerofaction VALUES ('8a8a96913933a87f013933b8b05d0006', '8a8a96913933a87f013933b768ba0004', '/manager/user/pass.jh', '    ', '1', '999999999999999', '2012-08-18 17:52:09', null);
INSERT INTO t_sys_powerofaction VALUES ('8a8a96913933a87f013933b91adf0007', '8a8a96913933a87f013933b6c0f10003', '/case/createCase.jh', '    ', '1', '999999999999999', '2012-08-18 17:51:19', null);
INSERT INTO t_sys_powerofaction VALUES ('8a8a9691394d77c001394da301500006', '8a8a96913933a87f013933b6c0f10003', '/case/distributionCase.jh', '    ', '1', '999999999999999', '2012-08-22 17:21:31', null);
INSERT INTO t_sys_powerofaction VALUES ('8a8a9691396b237101396b469b660004', '8a8a9691396b237101396b45cf5c0003', '/case/receiveCase.jh', '    ', '1', '999999999999999', '2012-08-28 11:29:13', null);
INSERT INTO t_sys_powerofaction VALUES ('8a8a9691396b237101396b47605c0005', '8a8a9691396b237101396b45cf5c0003', '/case/fulfilList.jh', '    ', '1', '999999999999999', '2012-08-28 11:30:03', null);
INSERT INTO t_sys_powerofaction VALUES ('8a8a9691396b237101396b52745c0013', '8a8a9691396b237101396b523c350012', '/case/auditList.jh', '    ', '1', '999999999999999', '2012-08-28 11:42:09', null);
INSERT INTO t_sys_powerofaction VALUES ('8a8a9691398ad08401398ad3798f0002', '200512012106555', '/manager/powerSystem/list.jh', '      ', '1', '999999999999999', '2012-09-03 14:31:18', null);

-- ----------------------------
-- Table structure for `t_sys_powerofchar`
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_powerofchar`;
CREATE TABLE `t_sys_powerofchar` (
  `ID` varchar(50) NOT NULL COMMENT 'ID',
  `CHARID` varchar(50) NOT NULL COMMENT '  ID',
  `POWERID` varchar(50) NOT NULL COMMENT '  ID',
  `STATUS` decimal(1,0) NOT NULL default '1' COMMENT '    ',
  `MODPERSON` varchar(50) default NULL COMMENT '     ',
  `MODTIME` timestamp NULL default NULL COMMENT '      ',
  `REMARK` varchar(100) default NULL COMMENT '  ',
  PRIMARY KEY  (`ID`),
  KEY `t_sys_powerofchar_powerid` (`POWERID`),
  KEY `t_sys_powerofchar_cid` (`CHARID`),
  KEY `t_sys_powerofchar_chid` (`CHARID`),
  KEY `t_sys_powerof_prid` (`POWERID`),
  CONSTRAINT `t_sys_powerofchar_chid` FOREIGN KEY (`CHARID`) REFERENCES `t_sys_character` (`ID`) ON DELETE CASCADE,
  CONSTRAINT `t_sys_powerof_prid` FOREIGN KEY (`POWERID`) REFERENCES `t_sys_power` (`ID`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=gbk COMMENT='     ';

-- ----------------------------
-- Records of t_sys_powerofchar
-- ----------------------------
INSERT INTO t_sys_powerofchar VALUES ('8a8a9691396b237101396b4edd4a000e', '8a8a9691396b237101396b44825a0001', '8a8a96913933a87f013933b6c0f10003', '1', '999999999999999', '2012-08-28 11:38:14', null);
INSERT INTO t_sys_powerofchar VALUES ('8a8a9691396b237101396b4edd4a000f', '8a8a9691396b237101396b44825a0001', '8a8a96913933a87f013933b768ba0004', '1', '999999999999999', '2012-08-28 11:38:14', null);
INSERT INTO t_sys_powerofchar VALUES ('8a8a9691396b237101396b4ef14f0010', '8a8a9691396b237101396b44aa060002', '8a8a96913933a87f013933b768ba0004', '1', '999999999999999', '2012-08-28 11:38:19', null);
INSERT INTO t_sys_powerofchar VALUES ('8a8a9691396b237101396b4ef14f0011', '8a8a9691396b237101396b44aa060002', '8a8a9691396b237101396b45cf5c0003', '1', '999999999999999', '2012-08-28 11:38:19', null);
INSERT INTO t_sys_powerofchar VALUES ('8a8a9691396b237101396b5924b30019', '297ef0cb3915b16a013915c7eb112312', '200512012106555', '1', '999999999999999', '2012-08-28 11:49:27', null);
INSERT INTO t_sys_powerofchar VALUES ('8a8a9691396b237101396b5924b3001a', '297ef0cb3915b16a013915c7eb112312', '8a8a96913933a87f013933b6c0f10003', '1', '999999999999999', '2012-08-28 11:49:27', null);
INSERT INTO t_sys_powerofchar VALUES ('8a8a9691396b237101396b5924c3001b', '297ef0cb3915b16a013915c7eb112312', '8a8a96913933a87f013933b768ba0004', '1', '999999999999999', '2012-08-28 11:49:27', null);
INSERT INTO t_sys_powerofchar VALUES ('8a8a9691396b237101396b5924c3001c', '297ef0cb3915b16a013915c7eb112312', '8a8a9691396b237101396b45cf5c0003', '1', '999999999999999', '2012-08-28 11:49:27', null);
INSERT INTO t_sys_powerofchar VALUES ('8a8a9691396b237101396b5924d2001d', '297ef0cb3915b16a013915c7eb112312', '8a8a9691396b237101396b523c350012', '1', '999999999999999', '2012-08-28 11:49:27', null);
INSERT INTO t_sys_powerofchar VALUES ('8a8a9691396b237101396b5e28c2001f', '8a8a9691396b237101396b55f45b0017', '8a8a96913933a87f013933b768ba0004', '1', '999999999999999', '2012-08-28 11:54:56', null);
INSERT INTO t_sys_powerofchar VALUES ('8a8a9691396b237101396b5e28c20020', '8a8a9691396b237101396b55f45b0017', '8a8a9691396b237101396b523c350012', '1', '999999999999999', '2012-08-28 11:54:56', null);
INSERT INTO t_sys_powerofchar VALUES ('8a8a9691398b2dc201398b3232090010', '297ef0cb3915b16a013915c7eb112312', '200512012106555', '1', '999999999999999', '2012-09-03 16:14:46', null);
INSERT INTO t_sys_powerofchar VALUES ('8a8a9691398b2dc201398b3232090011', '297ef0cb3915b16a013915c7eb112312', '8a8a96913933a87f013933b6c0f10003', '1', '999999999999999', '2012-09-03 16:14:46', null);
INSERT INTO t_sys_powerofchar VALUES ('8a8a9691398b2dc201398b3232090012', '297ef0cb3915b16a013915c7eb112312', '8a8a96913933a87f013933b768ba0004', '1', '999999999999999', '2012-09-03 16:14:46', null);
INSERT INTO t_sys_powerofchar VALUES ('8a8a9691398b2dc201398b3232090013', '297ef0cb3915b16a013915c7eb112312', '8a8a9691396b237101396b45cf5c0003', '1', '999999999999999', '2012-09-03 16:14:46', null);
INSERT INTO t_sys_powerofchar VALUES ('8a8a9691398b2dc201398b3232090014', '297ef0cb3915b16a013915c7eb112312', '8a8a9691396b237101396b523c350012', '1', '999999999999999', '2012-09-03 16:14:46', null);

-- ----------------------------
-- Table structure for `t_sys_powersystem`
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_powersystem`;
CREATE TABLE `t_sys_powersystem` (
  `ID` varchar(20) NOT NULL,
  `role_name` varchar(20) NOT NULL,
  `intercept_url` varchar(50) NOT NULL,
  `STATUS` decimal(11,0) NOT NULL default '1',
  `MODPERSON` varchar(20) default NULL,
  `MODTIME` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `REMARK` varchar(100) default NULL,
  `DESCRIPT` varchar(50) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

-- ----------------------------
-- Records of t_sys_powersystem
-- ----------------------------
INSERT INTO t_sys_powersystem VALUES ('9201209031534081000', 'role_admin', '/manager/**/*.jh', '1', '999999999999999', '2012-09-03 15:34:08', '   ', null);
INSERT INTO t_sys_powersystem VALUES ('9201209031534551001', 'role_admin', '/system/manager/**/*.jsp', '1', '999999999999999', '2012-09-03 15:34:55', '   ', null);

-- ----------------------------
-- Table structure for `t_sys_powersystemofchar`
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_powersystemofchar`;
CREATE TABLE `t_sys_powersystemofchar` (
  `ID` varchar(20) NOT NULL,
  `CHARID` varchar(50) default NULL,
  `POWERsystemID` varchar(50) default NULL,
  `STATUS` decimal(11,0) NOT NULL default '1',
  `MODPERSON` varchar(20) default NULL,
  `MODTIME` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `REMARK` varchar(100) default NULL,
  PRIMARY KEY  (`ID`),
  KEY `t_sys_powersystemofchar_CHARID` (`CHARID`),
  KEY `t_sys_powersystemofchar_POWERsystemID` (`POWERsystemID`),
  CONSTRAINT `t_sys_powersystemofchar_CHARID` FOREIGN KEY (`CHARID`) REFERENCES `t_sys_character` (`ID`),
  CONSTRAINT `t_sys_powersystemofchar_POWERsystemID` FOREIGN KEY (`POWERsystemID`) REFERENCES `t_sys_powersystem` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk;

-- ----------------------------
-- Records of t_sys_powersystemofchar
-- ----------------------------
INSERT INTO t_sys_powersystemofchar VALUES ('9201209031608531000', '297ef0cb3915b16a013915c7eb112312', '9201209031534081000', '1', '999999999999999', '2012-09-03 16:08:53', null);
INSERT INTO t_sys_powersystemofchar VALUES ('9201209031608531001', '297ef0cb3915b16a013915c7eb112312', '9201209031534551001', '1', '999999999999999', '2012-09-03 16:08:53', null);



-- ----------------------------
-- Table structure for `t_sys_user`
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_user`;
CREATE TABLE `t_sys_user` (
  `ID` varchar(50) NOT NULL COMMENT '  ID',
  `CODE` varchar(20) NOT NULL COMMENT '      ',
  `NAME` varchar(40) NOT NULL COMMENT '      ',
  `PASSWORD` varchar(60) NOT NULL COMMENT '      ',
  `DUTYID` varchar(6) NOT NULL COMMENT '  ',
  `LOGINTYPE` decimal(1,0) default '0' COMMENT '    ',
  `SEX` decimal(1,0) default '1' COMMENT '  ',
  `MOBILE` varchar(50) default NULL COMMENT '  ',
  `EMAIL` varchar(120) default NULL COMMENT '  ',
  `CAID` varchar(128) default NULL COMMENT '  CA   ID',
  `ORDERNO` varchar(6) default NULL COMMENT '    ',
  `STATUS` decimal(1,0) NOT NULL default '1' COMMENT '    ',
  `MODPERSON` varchar(50) default NULL COMMENT '     ',
  `MODTIME` timestamp NULL default NULL COMMENT '      ',
  `REMARK` varchar(100) default NULL COMMENT '  ',
  `departmentID` varchar(59) NOT NULL,
  PRIMARY KEY  (`ID`),
  UNIQUE KEY `CODE_UNIQUE` (`CODE`),
  KEY `t_sys_userdepartmentID` (`departmentID`),
  KEY `t_sys_userdutyID` (`DUTYID`),
  CONSTRAINT `t_sys_userdepartmentID` FOREIGN KEY (`departmentID`) REFERENCES `t_sys_department` (`ID`) ON DELETE NO ACTION,
  CONSTRAINT `t_sys_userdutyID` FOREIGN KEY (`DUTYID`) REFERENCES `t_sys_duty` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk COMMENT='   ';

-- ----------------------------
-- Records of t_sys_user
-- ----------------------------
INSERT INTO t_sys_user VALUES ('8a8a9691396b237101396b4e0624000c', '123456', '    ', 'e10adc3949ba59abbe56e057f20f883e', '0001', null, '1', '', '', null, '', '1', '999999999999999', '2012-08-28 11:37:19', '', '297ef0cb391b4ce301391b4e3d8e6530');
INSERT INTO t_sys_user VALUES ('8a8a9691396b237101396b5f73ef0023', '666666', '    ', 'f379eaf3c831b04de153469d1bec345e', '0003', null, '1', '', '', null, '', '1', '999999999999999', '2012-08-28 11:56:21', '', '297ef0cb391b4ce301391b4e3d8e6530');
INSERT INTO t_sys_user VALUES ('999999999999999', 'admin', '     ', '21232f297a57a5a743894a0e4a801fc3', '0022', null, '1', '', '[email protected]', null, '20', '1', '999999999999999', '2012-09-14 11:17:18', '123', '297ef0cb391b4ce301391b4e3d8e6530');

-- ----------------------------
-- Table structure for `t_sys_usergroup`
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_usergroup`;
CREATE TABLE `t_sys_usergroup` (
  `ID` varchar(50) NOT NULL COMMENT '   ID',
  `NAME` varchar(30) NOT NULL COMMENT '     ',
  `DESCRIPT` varchar(200) default NULL COMMENT '  ',
  `DEPARTID` varchar(20) default NULL COMMENT '  ID',
  `STATUS` decimal(1,0) NOT NULL default '1' COMMENT '    ',
  `MODPERSON` varchar(50) default NULL COMMENT '     ',
  `MODTIME` timestamp NULL default NULL COMMENT '      ',
  `REMARK` varchar(100) default NULL COMMENT '  ',
  `PARENT` varchar(20) default NULL,
  `XZQHID` varchar(20) default NULL COMMENT '       ID',
  `LAYER` decimal(2,0) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk COMMENT='    ';

-- ----------------------------
-- Records of t_sys_usergroup
-- ----------------------------
INSERT INTO t_sys_usergroup VALUES ('1234567890', '      ', '     ', null, '1', '999999999999999', '2012-08-18 18:11:52', null, null, null, null);
INSERT INTO t_sys_usergroup VALUES ('8a8a9691396b237101396b4b819c0008', '    ', '    ', null, '1', '999999999999999', '2012-08-28 11:34:34', null, null, null, null);
INSERT INTO t_sys_usergroup VALUES ('8a8a9691396b237101396b4b98be0009', '    ', '    ', null, '1', '999999999999999', '2012-08-28 11:34:40', null, null, null, null);
INSERT INTO t_sys_usergroup VALUES ('8a8a9691396b237101396b5ea8230021', '    ', '    ', null, '1', '999999999999999', '2012-08-28 11:55:29', null, null, null, null);

-- ----------------------------
-- Table structure for `t_sys_userofusergroup`
-- ----------------------------
DROP TABLE IF EXISTS `t_sys_userofusergroup`;
CREATE TABLE `t_sys_userofusergroup` (
  `ID` varchar(50) NOT NULL,
  `USERID` varchar(50) NOT NULL COMMENT '  ID',
  `USERGROUPID` varchar(50) NOT NULL COMMENT '   ID',
  `STATUS` decimal(1,0) NOT NULL default '1' COMMENT '    ',
  `MODPERSON` varchar(50) default NULL COMMENT '     ',
  `MODTIME` timestamp NULL default NULL COMMENT '      ',
  `REMARK` varchar(100) default NULL COMMENT '  ',
  PRIMARY KEY  (`ID`),
  KEY `t_sys_userofusergroup_userid` (`USERID`),
  KEY `t_sys_userofusergroup_usergroupid` (`USERGROUPID`),
  CONSTRAINT `t_sys_userofusergroup_usergroupid` FOREIGN KEY (`USERGROUPID`) REFERENCES `t_sys_usergroup` (`ID`) ON DELETE CASCADE,
  CONSTRAINT `t_sys_userofusergroup_userid` FOREIGN KEY (`USERID`) REFERENCES `t_sys_user` (`ID`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=gbk COMMENT='          ';

-- ----------------------------
-- Records of t_sys_userofusergroup
-- ----------------------------
INSERT INTO t_sys_userofusergroup VALUES ('297ef0cb3919d144013919e873fd0008', '999999999999999', '1234567890', '1', '999999999999999', '2012-08-13 09:48:56', null);
INSERT INTO t_sys_userofusergroup VALUES ('8a8a9691396b237101396b4e0634000d', '8a8a9691396b237101396b4e0624000c', '8a8a9691396b237101396b4b819c0008', '1', '8a8a9691396b237101396b4e0624000c', '2012-08-28 11:37:19', null);
INSERT INTO t_sys_userofusergroup VALUES ('8a8a9691396b237101396b5f73ff0024', '8a8a9691396b237101396b5f73ef0023', '8a8a9691396b237101396b4b98be0009', '1', '8a8a9691396b237101396b5f73ef0023', '2012-08-28 11:56:21', null);

 
6.첨부 파일 은 전체 프로그램 과 데이터베이스 스 크 립 트 입 니 다.sql 스 크 립 트 를 가 져 올 때 도구 의 차별 화 에 주의 하 십시오.제 가 사용 하 는 도 구 는 Navicat Lite 입 니 다.
 
링크 ux

좋은 웹페이지 즐겨찾기