浏览代码

项目初始化

tomatozq 5 年之前
当前提交
ea7ec39bad
共有 72 个文件被更改,包括 6236 次插入0 次删除
  1. 29 0
      .gitignore
  2. 29 0
      picc-admin-server/.gitignore
  3. 192 0
      picc-admin-server/pom.xml
  4. 23 0
      picc-admin-server/src/main/java/com/jpsoft/picc/PICCAdminServerApplication.java
  5. 121 0
      picc-admin-server/src/main/java/com/jpsoft/picc/advice/PermissionAdvice.java
  6. 73 0
      picc-admin-server/src/main/java/com/jpsoft/picc/config/SwaggerConfig.java
  7. 60 0
      picc-admin-server/src/main/java/com/jpsoft/picc/config/WebMvcConfig.java
  8. 85 0
      picc-admin-server/src/main/java/com/jpsoft/picc/interceptor/LoginInterceptor.java
  9. 102 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/admin/controller/JwtsUserController.java
  10. 27 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/ApiController.java
  11. 277 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/DataDictionaryController.java
  12. 283 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/MenuController.java
  13. 278 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/PermissionController.java
  14. 376 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/RoleController.java
  15. 282 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/UserController.java
  16. 23 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/DataDictionaryDAO.java
  17. 21 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/MenuDAO.java
  18. 21 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/PermissionDAO.java
  19. 18 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/RoleDAO.java
  20. 22 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/RoleMenuDAO.java
  21. 20 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/RolePermissionDAO.java
  22. 21 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/UserDAO.java
  23. 22 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/UserRoleDAO.java
  24. 24 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dto/RoleRelatedDTO.java
  25. 203 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/DataDictionary.java
  26. 199 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/Menu.java
  27. 142 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/Permission.java
  28. 129 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/Role.java
  29. 129 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/RoleMenu.java
  30. 129 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/RolePermission.java
  31. 160 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/User.java
  32. 129 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/UserRole.java
  33. 21 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/DataDictionaryService.java
  34. 21 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/MenuService.java
  35. 19 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/PermissionService.java
  36. 19 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/RoleMenuService.java
  37. 21 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/RolePermissionService.java
  38. 17 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/RoleService.java
  39. 21 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/UserRoleService.java
  40. 18 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/UserService.java
  41. 84 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/DataDictionaryServiceImpl.java
  42. 83 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/MenuServiceImpl.java
  43. 74 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/PermissionServiceImpl.java
  44. 79 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/RoleMenuServiceImpl.java
  45. 79 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/RolePermissionServiceImpl.java
  46. 69 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/RoleServiceImpl.java
  47. 81 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/UserRoleServiceImpl.java
  48. 74 0
      picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/UserServiceImpl.java
  49. 13 0
      picc-admin-server/src/main/resources/application-dev.yml
  50. 50 0
      picc-admin-server/src/main/resources/application-production.yml
  51. 43 0
      picc-admin-server/src/main/resources/application-test.yml
  52. 99 0
      picc-admin-server/src/main/resources/application.yml
  53. 49 0
      picc-admin-server/src/main/resources/logback-spring.xml
  54. 150 0
      picc-admin-server/src/main/resources/mapper/sys/DataDictionary.xml
  55. 139 0
      picc-admin-server/src/main/resources/mapper/sys/Menu.xml
  56. 108 0
      picc-admin-server/src/main/resources/mapper/sys/Permission.xml
  57. 93 0
      picc-admin-server/src/main/resources/mapper/sys/Role.xml
  58. 97 0
      picc-admin-server/src/main/resources/mapper/sys/RoleMenu.xml
  59. 96 0
      picc-admin-server/src/main/resources/mapper/sys/RolePermission.xml
  60. 102 0
      picc-admin-server/src/main/resources/mapper/sys/User.xml
  61. 100 0
      picc-admin-server/src/main/resources/mapper/sys/UserRole.xml
  62. 29 0
      picc-common/.gitignore
  63. 21 0
      picc-common/pom.xml
  64. 40 0
      picc-common/src/main/java/com/jpsoft/picc/common/dto/MessageResult.java
  65. 32 0
      picc-common/src/main/java/com/jpsoft/picc/common/dto/Sort.java
  66. 21 0
      picc-common/src/main/java/com/jpsoft/picc/common/service/BaseService.java
  67. 273 0
      picc-common/src/main/java/com/jpsoft/picc/common/utils/Base64.java
  68. 76 0
      picc-common/src/main/java/com/jpsoft/picc/common/utils/DES3.java
  69. 69 0
      picc-common/src/main/java/com/jpsoft/picc/common/utils/PojoUtils.java
  70. 29 0
      picc-enterperise-server/.gitignore
  71. 20 0
      picc-enterperise-server/pom.xml
  72. 58 0
      pom.xml

+ 29 - 0
.gitignore

@@ -0,0 +1,29 @@
+HELP.md
+/target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+/build/
+
+### VS Code ###
+.vscode/

+ 29 - 0
picc-admin-server/.gitignore

@@ -0,0 +1,29 @@
+HELP.md
+/target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+/build/
+
+### VS Code ###
+.vscode/

+ 192 - 0
picc-admin-server/pom.xml

@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>picc</artifactId>
+        <groupId>com.jpsoft</groupId>
+        <version>1.0.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>picc-admin-server</artifactId>
+    <description>PICC投保管理系统-管理端</description>
+    <properties>
+        <swagger2.version>2.7.0</swagger2.version>
+        <jwts.version>0.10.5</jwts.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.jpsoft</groupId>
+            <artifactId>picc-common</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-tomcat</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.junit.vintage</groupId>
+                    <artifactId>junit-vintage-engine</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-aop</artifactId>
+        </dependency>
+
+        <!-- swagger ui begin-->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>${swagger2.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>${swagger2.version}</version>
+        </dependency>
+        <!-- swagger ui end-->
+
+        <!--jwt start-->
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt-api</artifactId>
+            <version>${jwts.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt-impl</artifactId>
+            <version>${jwts.version}</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt-jackson</artifactId>
+            <version>${jwts.version}</version>
+            <scope>runtime</scope>
+        </dependency>
+        <!--jwt end-->
+
+        <!--logging start-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-logging</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.lazyluke</groupId>
+            <artifactId>log4jdbc-remix</artifactId>
+            <version>0.2.7</version>
+        </dependency>
+        <!--logging end-->
+
+        <!-- 数据库相关 start-->
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>2.0.1</version>
+        </dependency>
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+            <version>LATEST</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+            <version>1.1.10</version>
+        </dependency>
+        <!-- 数据库相关 end-->
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <fork>true</fork>
+                    <addResources>true</addResources>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.16</version>
+                <configuration>
+                    <includes>
+                        <include>**/*TestForPack.java</include>
+                    </includes>
+                    <argLine>-Xmx256M</argLine>
+                </configuration>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.maven.surefire</groupId>
+                        <artifactId>surefire-junit47</artifactId>
+                        <version>2.16</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+    </build>
+    <profiles>
+        <profile>
+            <id>dev</id>
+            <dependencies>
+                <dependency>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-tomcat</artifactId>
+                </dependency>
+            </dependencies>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <properties>
+                <active.profile>dev</active.profile>
+            </properties>
+        </profile>
+        <profile>
+            <id>test</id>
+            <dependencies>
+                <dependency>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-tomcat</artifactId>
+                    <scope>provided</scope>
+                </dependency>
+            </dependencies>
+            <properties>
+                <active.profile>test</active.profile>
+            </properties>
+        </profile>
+        <profile>
+            <id>production</id>
+            <properties>
+                <active.profile>production</active.profile>
+            </properties>
+            <dependencies>
+                <dependency>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-tomcat</artifactId>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
+</project>

+ 23 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/PICCAdminServerApplication.java

@@ -0,0 +1,23 @@
+package com.jpsoft.picc;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.CommandLineRunner;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+@SpringBootApplication
+@EnableTransactionManagement
+@EnableScheduling
+@MapperScan("com.jpsoft.picc.**.dao")
+public class PICCAdminServerApplication implements CommandLineRunner {
+	public static void main(String[] args) {
+		SpringApplication.run(PICCAdminServerApplication.class, args);
+	}
+
+	@Override
+	public void run(String... args) throws Exception {
+
+	}
+}

+ 121 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/advice/PermissionAdvice.java

@@ -0,0 +1,121 @@
+package com.jpsoft.picc.advice;
+
+import com.jpsoft.picc.common.dto.MessageResult;
+import com.jpsoft.picc.modules.sys.service.PermissionService;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import java.lang.reflect.Method;
+
+@Aspect
+@Component
+public class PermissionAdvice {
+    private  Logger logger= LoggerFactory.getLogger("root");
+
+    @Autowired
+    private PermissionService permissionService;
+
+    @Pointcut("(execution(public * com.jpsoft.picc..controller.*.*(..)))")
+    public void pointcut(){
+
+    }
+
+    @Around("pointcut()")
+    public Object around(ProceedingJoinPoint point) throws Throwable {
+        long start = System.currentTimeMillis();
+
+        String classType = point.getTarget().getClass().getName();
+        Class<?> clazz = Class.forName(classType);
+        String clazzName = clazz.getName();
+        String clazzSimpleName = clazz.getSimpleName();
+        String methodName = point.getSignature().getName();
+
+        // 通过正则表达式判断当前url是否符合
+        //PathMatcher matcher = new AntPathMatcher();
+
+        StringBuilder pathBuilder = new StringBuilder();
+
+        //查询类的RequestMapping注解
+        RequestMapping classMapping = clazz.getAnnotation(RequestMapping.class);
+
+        if(classMapping != null && classMapping.value().length>0){
+            pathBuilder.append(classMapping.value()[0]);
+        }
+
+        //查询方法的RequestMapping注解
+        MethodSignature methodSignature = (MethodSignature)point.getSignature();
+        Method method = methodSignature.getMethod();
+
+        RequestMapping methodMapping = method.getAnnotation(RequestMapping.class);
+
+        if(methodMapping != null && methodMapping.value().length>0){
+            String subPath = methodMapping.value()[0];
+
+            if(!subPath.startsWith("/")){
+                pathBuilder.append("/");
+            }
+
+            pathBuilder.append(subPath);
+        }
+
+        ServletRequestAttributes requestAttrs = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+
+        Object obj = null;
+
+        if(requestAttrs!=null) {
+            HttpServletRequest request = requestAttrs.getRequest();
+            logger.warn("访问地址:" + request.getRequestURL().toString());
+
+            logger.warn("path=" + pathBuilder.toString());
+
+            String userId = (String)request.getAttribute("subject");
+
+            boolean existed = permissionService.exist(pathBuilder.toString(), request.getMethod());
+
+            // 查询该url是否加入到权限控制中,如果是则查询当前用户是否能访问该url
+            if (existed) {
+                logger.warn(pathBuilder.toString() + "已加入权限控制");
+
+                boolean permitted = permissionService.hasPermitted(userId, pathBuilder.toString(), request.getMethod());
+                logger.warn("是否许可当前用户访问:" + permitted);
+
+                if(permitted){
+                    // 执行切入方法
+                    obj = point.proceed();
+                }
+                else{
+                    MessageResult<String> msgResult = new MessageResult<>();
+                    msgResult.setCode(401);
+                    msgResult.setResult(false);
+                    msgResult.setMessage(pathBuilder.toString() + "未授权当前用户访问!");
+
+                    obj = msgResult;
+                }
+            }
+            else{
+                logger.warn(pathBuilder.toString() + "未加入权限控制");
+
+                // 执行切入方法
+                obj = point.proceed();
+            }
+        }
+
+        long elapse = System.currentTimeMillis() - start;
+
+        System.out.println(classType);
+        logger.warn(String.format("调用类%s方法%s耗时%s毫秒",clazzSimpleName,methodName,elapse));
+
+        return obj;
+    }
+}

+ 73 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/config/SwaggerConfig.java

@@ -0,0 +1,73 @@
+package com.jpsoft.picc.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.*;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spi.service.contexts.SecurityContext;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Configuration
+@EnableSwagger2
+public class SwaggerConfig {
+    @Bean
+    public Docket createRestApi() {
+        return new Docket(DocumentationType.SWAGGER_2)
+                .apiInfo(apiInfo())
+                .select()
+                .apis(RequestHandlerSelectors.withClassAnnotation(RestController.class))
+                .paths(PathSelectors.any())
+                .build()
+                //添加登录认证
+                .securitySchemes(securitySchemes())
+                .securityContexts(securityContexts());
+    }
+
+    private List<ApiKey> securitySchemes() {
+        //设置请求头信息
+        List<ApiKey> result = new ArrayList<>();
+        ApiKey apiKey = new ApiKey("Authorization", "Authorization", "header");
+        result.add(apiKey);
+        return result;
+    }
+
+    private List<SecurityContext> securityContexts() {
+        //设置需要登录认证的路径
+        List<SecurityContext> result = new ArrayList<>();
+        result.add(getContextByPath("/*"));
+        return result;
+    }
+
+    private SecurityContext getContextByPath(String pathRegex){
+        return SecurityContext.builder()
+                .securityReferences(defaultAuth())
+                .forPaths(PathSelectors.regex(pathRegex))
+                .build();
+    }
+
+    private List<SecurityReference> defaultAuth() {
+        List<SecurityReference> result = new ArrayList<>();
+        AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
+        AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
+        authorizationScopes[0] = authorizationScope;
+        result.add(new SecurityReference("Authorization", authorizationScopes));
+        return result;
+    }
+
+    private ApiInfo apiInfo() {
+        return new ApiInfoBuilder()
+                .title("后台接口文档")
+                .description("")
+                .termsOfServiceUrl("")
+                .version("1.0")
+                .build();
+    }
+}

+ 60 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/config/WebMvcConfig.java

@@ -0,0 +1,60 @@
+package com.jpsoft.picc.config;
+
+import com.jpsoft.picc.interceptor.LoginInterceptor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.*;
+
+@Configuration
+public class WebMvcConfig implements WebMvcConfigurer {
+	@Autowired
+	private LoginInterceptor loginInterceptor;
+
+	@Override
+	public void addCorsMappings(CorsRegistry registry) {
+		registry.addMapping("/**")
+				.allowedOrigins("*")
+				.allowedHeaders("*")
+				.allowedMethods("*")
+				.allowCredentials(false)
+				.exposedHeaders("access-control-allow-headers",
+						"access-control-allow-methods",
+						"access-control-allow-origin",
+						"access-control-max-age",
+						"X-Frame-Options",
+						"token-status")
+				.maxAge(3600);
+	}
+
+	@Override
+	public void addResourceHandlers(ResourceHandlerRegistry registry) {
+		registry.addResourceHandler("swagger-ui.html")
+				.addResourceLocations("classpath:/META-INF/resources/");
+
+		registry.addResourceHandler("/webjars/**")
+				.addResourceLocations("classpath:/META-INF/resources/webjars/");
+	}
+
+	@Override
+	public void addViewControllers(ViewControllerRegistry registry) {
+		// registry.addViewController("/login").setViewName("login");
+	}
+
+	@Override
+	public void addInterceptors(InterceptorRegistry registry) {
+		registry.addInterceptor(loginInterceptor)
+				.addPathPatterns("/**")
+                .excludePathPatterns("/login",
+                        "/swagger-resources/**",
+                        "/webjars/**",
+                        "/swagger-ui.html",
+                        "/v2/**",
+                        "/mobileApi/**")
+				.excludePathPatterns("/wxPay/webPay")
+				.excludePathPatterns("/aliPay/tradePrecreatePay")
+				.excludePathPatterns("/aliPay/payNotify")
+				.excludePathPatterns("/wxPay/payNotify");
+
+
+	}
+}

+ 85 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/interceptor/LoginInterceptor.java

@@ -0,0 +1,85 @@
+package com.jpsoft.picc.interceptor;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.jpsoft.picc.common.dto.MessageResult;
+import io.jsonwebtoken.Claims;
+import io.jsonwebtoken.Jwts;
+import io.jsonwebtoken.security.Keys;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+import org.springframework.util.StringUtils;
+import org.springframework.web.servlet.HandlerInterceptor;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.security.Key;
+import java.util.Base64;
+
+@Component
+public class LoginInterceptor implements HandlerInterceptor {
+    @Value("${jwt.secret}")
+    private String jwtSecret;
+
+    @Override
+    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
+        if (request.getMethod().equals("OPTIONS")){
+            return true;
+        }
+
+        String token = request.getHeader("Authorization");
+
+        if (StringUtils.isEmpty(token)){
+            token = (String)request.getSession().getAttribute("token");
+        }
+
+        if (StringUtils.isEmpty(token)) {
+            token = request.getParameter("token");
+        }
+
+        boolean result = false;
+
+        try {
+            String prefix = "Bearer ";
+
+            if (token==null || token.length() < prefix.length()){
+                throw new Exception("未传递令牌或未带前缀Bearer!");
+            }
+
+            token = token.substring(prefix.length());
+
+            byte[] privateKey = Base64.getDecoder().decode(jwtSecret);
+
+            Key key = Keys.hmacShaKeyFor(privateKey);
+
+            Claims claims = Jwts.parser()
+                            .setSigningKey(key)
+                            .parseClaimsJws(token)
+                            .getBody();
+
+            String userId = claims.getSubject();
+
+            request.setAttribute("subject",userId);
+
+            result = true;
+        }
+        catch(Exception ex){
+            MessageResult<String> msgResult = new MessageResult<>();
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+            msgResult.setCode(415);
+
+            ObjectMapper mapper = new ObjectMapper();
+            String json = mapper.writeValueAsString(msgResult);
+
+            response.setContentType("application/json");
+            response.setCharacterEncoding("UTF-8");
+            response.setHeader("access-control-allow-origin","*");
+            response.getWriter().print(json);
+
+            result = false;
+        }
+
+        return result;
+    }
+}

+ 102 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/admin/controller/JwtsUserController.java

@@ -0,0 +1,102 @@
+package com.jpsoft.picc.modules.admin.controller;
+
+import com.jpsoft.picc.common.dto.MessageResult;
+import com.jpsoft.picc.common.utils.DES3;
+import com.jpsoft.picc.modules.sys.entity.User;
+import com.jpsoft.picc.modules.sys.service.UserService;
+import io.jsonwebtoken.Jwts;
+import io.jsonwebtoken.security.Keys;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestAttribute;
+import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.servlet.http.HttpSession;
+import java.security.Key;
+import java.util.Base64;
+import java.util.Date;
+
+@RestController
+public class JwtsUserController {
+    @Value("${jwt.secret}")
+    private String jwtSecret;
+
+    @Autowired
+    private UserService userService;
+
+    @PostMapping("/login")
+    @ApiOperation(value="登录获取token,在swagger ui中获取token时将写入session,调用其它接口时不用再设置header")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name="userName", paramType="query", required=true, value="用户名"),
+            @ApiImplicitParam(name="password", paramType="query", required=true, value="密码")
+    })
+    public MessageResult<String> login(String userName, String password, @ApiIgnore HttpSession session){
+        MessageResult<String> messageResult = new MessageResult<>();
+
+        try {
+            User user = userService.findByUserName(userName);
+
+            DES3 des3 = new DES3();
+
+            String passwordEnc = des3.encrypt(jwtSecret,password);
+
+            if(user!=null && passwordEnc.equals(user.getPassword())){
+                //生成token
+                Date now = new Date();
+                long expiration = now.getTime() + 3600 * 6000; //6个小时后,该客户端的token过期
+
+                byte[] privateKey = Base64.getDecoder().decode(jwtSecret);
+
+                Key key = Keys.hmacShaKeyFor(privateKey);
+
+                String token = Jwts.builder()
+                        .setSubject(user.getId())
+                        //设置自定义claims后,setSubject值将失效
+//               .setClaims(extraInfo)
+                        .signWith(key)
+                        .setExpiration(new Date(expiration))
+                        .compact();
+
+                session.setAttribute("token","Bearer " + token);
+
+                messageResult.setResult(true);
+                messageResult.setData("Bearer " + token);
+            }
+            else{
+                messageResult.setResult(false);
+                messageResult.setMessage("用户不存在或密码错误!");
+            }
+
+        }
+        catch(Exception ex){
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+
+    @GetMapping("/userInfo")
+    public MessageResult<User> userInfo(@RequestAttribute String subject){
+        MessageResult<User> messageResult = new MessageResult<>();
+
+        try {
+            User user = userService.get(subject);
+
+            messageResult.setResult(true);
+            messageResult.setData(user);
+        }
+        catch(Exception ex){
+            messageResult.setResult(false);
+            messageResult.setMessage(ex.getMessage());
+        }
+
+        return messageResult;
+    }
+}

+ 27 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/ApiController.java

@@ -0,0 +1,27 @@
+package com.jpsoft.picc.modules.sys.controller;
+
+import io.swagger.annotations.ApiOperation;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.client.RestTemplate;
+
+import javax.servlet.http.HttpServletRequest;
+
+@RestController
+@RequestMapping("/sys/api")
+public class ApiController {
+    @ApiOperation("获取后端api列表")
+    @GetMapping("selectAll")
+    public ResponseEntity<String> selectAll(HttpServletRequest request){
+        RestTemplate restTemplate = new RestTemplate();
+
+        String path = request.getContextPath();
+        String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
+
+        ResponseEntity<String> entity = restTemplate.getForEntity(basePath + "v2/api-docs",String.class);
+
+        return entity;
+    }
+}

+ 277 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/DataDictionaryController.java

@@ -0,0 +1,277 @@
+package com.jpsoft.picc.modules.sys.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.MessageResult;
+import com.jpsoft.picc.common.dto.Sort;
+import com.jpsoft.picc.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.sys.entity.DataDictionary;
+import com.jpsoft.picc.modules.sys.service.DataDictionaryService;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/sys/dataDictionary")
+public class DataDictionaryController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private DataDictionaryService dataDictionaryService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<DataDictionary> create(){
+        MessageResult<DataDictionary> msgResult = new MessageResult<>();
+
+        DataDictionary dataDictionary = new DataDictionary();
+
+        msgResult.setData(dataDictionary);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<DataDictionary> add(@RequestBody DataDictionary dataDictionary,@RequestAttribute String subject){
+        MessageResult<DataDictionary> msgResult = new MessageResult<>();
+
+        try {
+            dataDictionary.setId(UUID.randomUUID().toString());
+            dataDictionary.setDelFlag(false);
+            dataDictionary.setCreateBy(subject);
+            dataDictionary.setCreateDate(new Date());
+            
+            int affectCount = dataDictionaryService.insert(dataDictionary);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(dataDictionary);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage("添加失败");
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<DataDictionary> edit(@PathVariable("id") String id){
+        MessageResult<DataDictionary> msgResult = new MessageResult<>();
+
+        try {
+            DataDictionary dataDictionary = dataDictionaryService.get(id);
+
+            if (dataDictionary != null) {
+                msgResult.setResult(true);
+                msgResult.setData(dataDictionary);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<DataDictionary> update(@RequestBody DataDictionary dataDictionary,@RequestAttribute String subject){
+        MessageResult<DataDictionary> msgResult = new MessageResult<>();
+
+        try {
+            dataDictionary.setUpdateBy(subject);
+            dataDictionary.setUpdateDate(new Date());
+            
+            int affectCount = dataDictionaryService.update(dataDictionary);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(dataDictionary);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage("更新失败");
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            DataDictionary dataDictionary = dataDictionaryService.get(id);
+            dataDictionary.setDelFlag(true);
+            dataDictionary.setUpdateBy(subject);
+            dataDictionary.setUpdateDate(new Date());
+
+            int affectCount = dataDictionaryService.update(dataDictionary);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                DataDictionary dataDictionary = dataDictionaryService.get(id);
+                //dataDictionary.setDelFlag(true);
+                dataDictionary.setUpdateBy(subject);
+                dataDictionary.setUpdateDate(new Date());
+
+                affectCount += dataDictionaryService.update(dataDictionary);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String id,
+            String name,
+            @RequestParam(name="pageIndex",defaultValue = "1") int pageIndex,
+            @RequestParam(name="pageSize",defaultValue = "10") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("sort_no","asc"));
+
+        if (StringUtils.isNotEmpty(id)) {
+            searchParams.put("id",id);
+        }
+
+        if (StringUtils.isNotEmpty(name)) {
+            searchParams.put("name","%" + name + "%");
+        }
+
+        Page<DataDictionary> page = dataDictionaryService.pageSearch(searchParams,pageIndex, pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+    @ApiOperation(value = "查询")
+    @RequestMapping(value = "query", method = RequestMethod.POST)
+    public MessageResult<List> query(
+            String keywords,
+            String excludeId,
+            @RequestParam(value = "dataType", defaultValue = "null") String dataType,
+            @RequestParam(value = "length", defaultValue = "20") int limit,
+            @RequestAttribute String subject) {
+        MessageResult<List> msgResult = new MessageResult<>();
+
+        Map<String, Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("a.sort_no", "asc"));
+
+        if (StringUtils.isNotEmpty(keywords)) {
+            searchParams.put("name", "%" + keywords + "%");
+        }
+
+        if (StringUtils.isNotEmpty(excludeId)) {
+            searchParams.put("excludeId", excludeId);
+        }
+
+        if (StringUtils.isNotEmpty(dataType)) {
+            //1查目录-2查值
+            searchParams.put("dataType", dataType);
+        }
+
+
+        Page<DataDictionary> page = dataDictionaryService.pageSearch(searchParams,0, limit,sortList);
+        List<DataDictionary> dataDictionaryList = page.getResult();
+        msgResult.setResult(true);
+        msgResult.setData(dataDictionaryList);
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value = "查询字典")
+    @RequestMapping(value = "queryChildren", method = RequestMethod.POST)
+    public MessageResult<List> queryChildren(
+            @RequestParam(value = "parentId", defaultValue = "") String parentId,
+            @RequestAttribute String subject) {
+        MessageResult<List> msgResult = new MessageResult<>();
+
+        List<Map<String, Object>> dataDictionaryList = dataDictionaryService.queryChildren(parentId);
+        msgResult.setResult(true);
+        msgResult.setData(dataDictionaryList);
+        return msgResult;
+    }
+}

+ 283 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/MenuController.java

@@ -0,0 +1,283 @@
+package com.jpsoft.picc.modules.sys.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+import com.jpsoft.picc.common.dto.MessageResult;
+import com.jpsoft.picc.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.sys.entity.Menu;
+import com.jpsoft.picc.modules.sys.service.MenuService;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/sys/menu")
+public class MenuController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private MenuService menuService;
+
+    @ApiOperation(value = "创建空记录")
+    @GetMapping("create")
+    public MessageResult<Menu> create() {
+        MessageResult<Menu> msgResult = new MessageResult<>();
+
+        Menu menu = new Menu();
+
+        msgResult.setData(menu);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+
+    @ApiOperation(value = "添加信息")
+    @PostMapping("add")
+    public MessageResult<Menu> add(@RequestBody Menu menu, @RequestAttribute String subject) {
+        MessageResult<Menu> msgResult = new MessageResult<>();
+
+        try {
+            menu.setId(UUID.randomUUID().toString());
+            menu.setDelFlag(false);
+            menu.setCreateBy(subject);
+            menu.setCreateTime(new Date());
+
+            int affectCount = menuService.insert(menu);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(menu);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        } catch (Exception ex) {
+            logger.error(ex.getMessage(), ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value = "获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<Menu> edit(@PathVariable("id") String id) {
+        MessageResult<Menu> msgResult = new MessageResult<>();
+
+        try {
+            Menu menu = menuService.get(id);
+
+            if (menu != null) {
+                msgResult.setResult(true);
+                msgResult.setData(menu);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        } catch (Exception ex) {
+            logger.error(ex.getMessage(), ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value = "更新用户")
+    @PostMapping("update")
+    public MessageResult<Menu> update(@RequestBody Menu menu, @RequestAttribute String subject) {
+        MessageResult<Menu> msgResult = new MessageResult<>();
+
+        try {
+            menu.setUpdateBy(subject);
+            menu.setUpdateTime(new Date());
+
+            int affectCount = menuService.update(menu);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(menu);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        } catch (Exception ex) {
+            logger.error(ex.getMessage(), ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value = "删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id, @RequestAttribute String subject) {
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            Menu menu = menuService.get(id);
+            menu.setDelFlag(true);
+            menu.setUpdateBy(subject);
+            menu.setUpdateTime(new Date());
+
+            int affectCount = menuService.update(menu);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        } catch (Exception ex) {
+            logger.error(ex.getMessage(), ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value = "批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList, @RequestAttribute String subject) {
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                Menu menu = menuService.get(id);
+                menu.setDelFlag(true);
+                menu.setUpdateBy(subject);
+                menu.setUpdateTime(new Date());
+
+                affectCount += menuService.update(menu);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        } catch (Exception ex) {
+            logger.error(ex.getMessage(), ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value = "查询")
+    @RequestMapping(value = "query", method = RequestMethod.POST)
+    public MessageResult<List> query(
+            String keywords,
+            String excludeId,
+            @RequestParam(value = "length", defaultValue = "20") int limit,
+            @RequestAttribute String subject) {
+        MessageResult<List> msgResult = new MessageResult<>();
+
+        Map<String, Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("a.create_time", "asc"));
+
+        if (StringUtils.isNotEmpty(keywords)) {
+            searchParams.put("menuName", "%" + keywords + "%");
+        }
+
+        if (StringUtils.isNotEmpty(excludeId)) {
+            searchParams.put("excludeId", excludeId);
+        }
+
+        List<Menu> menuList = menuService.query(searchParams, limit, sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(menuList);
+
+        return msgResult;
+    }
+
+    @ApiOperation(value = "列表")
+    @RequestMapping(value = "pageList", method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String menuName,
+            String menuType,
+            String parentId,
+            @RequestParam(name="pageIndex",defaultValue = "1") int pageIndex,
+            @RequestParam(name="pageSize",defaultValue = "10") int pageSize,
+            @RequestAttribute String subject) {
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String, Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("sort_no", "asc"));
+
+        if (StringUtils.isNotEmpty(menuName)) {
+            searchParams.put("menuName", "%" + menuName + "%");
+        }
+
+        if (StringUtils.isNotEmpty(menuType)) {
+            searchParams.put("menuType", menuType);
+        }
+
+        if (StringUtils.isNotEmpty(parentId)) {
+            searchParams.put("parentId", parentId);
+        }
+
+        Page<Menu> page = menuService.pageSearch(searchParams, pageIndex, pageSize, sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+    @ApiOperation(value = "获取授权菜单")
+    @GetMapping("tree")
+    public MessageResult<List> tree(@RequestAttribute("subject") String subject) {
+        MessageResult<List> msgResult = new MessageResult<>();
+
+        List<Menu> list = menuService.findAllocMenu(subject,null);
+
+        findChildrenLoop(list,subject,0,5);
+
+        msgResult.setData(list);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+
+    private void findChildrenLoop(List<Menu> list, String subject,int deep,int max) {
+        if (deep<max) {
+            for (Menu menu : list) {
+                List<Menu> children = menuService.findAllocMenu(subject,menu.getId());
+
+                menu.setChildren(children);
+
+                findChildrenLoop(children,subject,deep+1,max);
+            }
+        }
+    }
+}

+ 278 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/PermissionController.java

@@ -0,0 +1,278 @@
+package com.jpsoft.picc.modules.sys.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+import com.jpsoft.picc.common.dto.MessageResult;
+import com.jpsoft.picc.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.sys.entity.Permission;
+import com.jpsoft.picc.modules.sys.service.PermissionService;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+
+@RestController
+@RequestMapping("/sys/permission")
+public class PermissionController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private PermissionService permissionService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<Permission> create(){
+        MessageResult<Permission> msgResult = new MessageResult<>();
+
+        Permission permission = new Permission();
+
+        msgResult.setData(permission);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="批量导入")
+    @PostMapping("batchImport")
+    public MessageResult<Integer> batchImport(@RequestBody List<Permission> permList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (Permission permission : permList) {
+                if(!permissionService.exist(permission.getPath(),permission.getMethod())){
+                    permission.setId(UUID.randomUUID().toString());
+                    permission.setDelFlag(false);
+                    permission.setCreateBy(subject);
+                    permission.setCreateTime(new Date());
+
+                    affectCount += permissionService.insert(permission);
+                }
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("未导入新记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<Permission> add(@RequestBody Permission permission,@RequestAttribute String subject){
+        MessageResult<Permission> msgResult = new MessageResult<>();
+
+        try {
+            permission.setId(UUID.randomUUID().toString());
+            permission.setDelFlag(false);
+            permission.setCreateBy(subject);
+            permission.setCreateTime(new Date());
+            
+            int affectCount = permissionService.insert(permission);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(permission);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<Permission> edit(@PathVariable("id") String id){
+        MessageResult<Permission> msgResult = new MessageResult<>();
+
+        try {
+            Permission permission = permissionService.get(id);
+
+            if (permission != null) {
+                msgResult.setResult(true);
+                msgResult.setData(permission);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<Permission> update(@RequestBody Permission permission,@RequestAttribute String subject){
+        MessageResult<Permission> msgResult = new MessageResult<>();
+
+        try {
+            permission.setUpdateBy(subject);
+            permission.setUpdateTime(new Date());
+            
+            int affectCount = permissionService.update(permission);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(permission);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            Permission permission = permissionService.get(id);
+            permission.setDelFlag(true);
+            permission.setUpdateBy(subject);
+            permission.setUpdateTime(new Date());
+
+            int affectCount = permissionService.update(permission);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取所有权限")
+    @GetMapping(value = "selectAll")
+    public MessageResult<List> selectAll(){
+        MessageResult<List> msgResult = new MessageResult<>();
+
+        try {
+            List<Permission> perms = permissionService.list();
+
+            msgResult.setResult(true);
+            msgResult.setData(perms);
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                Permission permission = permissionService.get(id);
+                permission.setDelFlag(true);
+                permission.setUpdateBy(subject);
+                permission.setUpdateTime(new Date());
+
+                affectCount += permissionService.update(permission);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String path,
+            @RequestParam(name="pageIndex",defaultValue = "1") int pageIndex,
+            @RequestParam(name="pageSize",defaultValue = "10") int pageSize,
+            @RequestAttribute String subject){
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("path_","asc"));
+
+        if (StringUtils.isNotEmpty(path)) {
+            searchParams.put("path","%" + path + "%");
+        }
+
+        Page<Permission> page = permissionService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}

+ 376 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/RoleController.java

@@ -0,0 +1,376 @@
+package com.jpsoft.picc.modules.sys.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+import com.jpsoft.picc.common.dto.MessageResult;
+import com.jpsoft.picc.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.sys.dto.RoleRelatedDTO;
+import com.jpsoft.picc.modules.sys.entity.Role;
+import com.jpsoft.picc.modules.sys.entity.RoleMenu;
+import com.jpsoft.picc.modules.sys.entity.RolePermission;
+import com.jpsoft.picc.modules.sys.service.RoleMenuService;
+import com.jpsoft.picc.modules.sys.service.RolePermissionService;
+import com.jpsoft.picc.modules.sys.service.RoleService;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletRequest;
+import java.util.*;
+
+@RestController
+@RequestMapping("/sys/role")
+public class RoleController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private RoleService roleService;
+
+    @Autowired
+    private RoleMenuService roleMenuService;
+
+    @Autowired
+    private RolePermissionService rolePermissionService;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<Role> create(){
+        MessageResult<Role> msgResult = new MessageResult<>();
+
+        Role role = new Role();
+
+        msgResult.setData(role);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+    
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<Role> add(@RequestBody Role role,@RequestAttribute String subject){
+        MessageResult<Role> msgResult = new MessageResult<>();
+
+            try {
+            role.setId(UUID.randomUUID().toString());
+            role.setDelFlag(false);
+            role.setCreateBy(subject);
+            role.setCreateTime(new Date());
+            
+            int affectCount = roleService.insert(role);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(role);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<Role> edit(@PathVariable("id") String id){
+        MessageResult<Role> msgResult = new MessageResult<>();
+
+        try {
+            Role role = roleService.get(id);
+
+            if (role != null) {
+                msgResult.setResult(true);
+                msgResult.setData(role);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    public MessageResult<Role> update(@RequestBody Role role,@RequestAttribute String subject){
+        MessageResult<Role> msgResult = new MessageResult<>();
+
+        try {
+            role.setUpdateBy(subject);
+            role.setUpdateTime(new Date());
+            
+            int affectCount = roleService.update(role);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(role);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+	@ApiOperation(value="删除")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            Role role = roleService.get(id);
+            role.setDelFlag(true);
+            role.setUpdateBy(subject);
+            role.setUpdateTime(new Date());
+
+            int affectCount = roleService.update(role);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                Role role = roleService.get(id);
+                role.setDelFlag(true);
+                role.setUpdateBy(subject);
+                role.setUpdateTime(new Date());
+
+                affectCount += roleService.update(role);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取所有角色")
+    @GetMapping(value = "selectAll")
+    public MessageResult<List> selectAll(){
+        MessageResult<List> msgResult = new MessageResult<>();
+
+        try {
+            List<Role> roles = roleService.list();
+
+            msgResult.setResult(true);
+            msgResult.setData(roles);
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String roleName,
+            String roleDesc,
+            @RequestParam(name="pageIndex",defaultValue = "1") int pageIndex,
+            @RequestParam(name="pageSize",defaultValue = "10") int pageSize,
+            @RequestParam(value="field",defaultValue="create_time") String field,
+            @RequestParam(value="direction",defaultValue="asc") String direction,
+            HttpServletRequest request){
+        String subject = (String)request.getAttribute("subject");
+
+        //当前用户ID
+        System.out.println(subject);
+
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParams = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort(field,direction));
+
+        if (StringUtils.isNotEmpty(roleName)) {
+            searchParams.put("roleName","%" + roleName + "%");
+        }
+
+        if (StringUtils.isNotEmpty(roleDesc)) {
+            searchParams.put("roleDesc","%" + roleDesc + "%");
+        }
+
+        Page<Role> page = roleService.pageSearch(searchParams,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取已分配菜单列表")
+    @GetMapping(value = "queryRelatedMenuList")
+    public MessageResult<List> queryRelatedMenuList(String roleId){
+        MessageResult<List> msgResult = new MessageResult<>();
+
+        try {
+            List<RoleMenu> list = roleMenuService.findByRoleId(roleId);
+
+            msgResult.setResult(true);
+            msgResult.setData(list);
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="保存关联菜单")
+    @PostMapping(value = "saveRelatedMenu")
+    @Transactional(rollbackFor = Exception.class)
+    public MessageResult<Integer> saveRelatedMenu(@RequestBody RoleRelatedDTO dto,String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            roleMenuService.deleteByRoleId(dto.getRoleId());
+
+            int affectCount = 0;
+
+            for (String menuId : dto.getRelatedList()) {
+                RoleMenu rm = new RoleMenu();
+                rm.setId(UUID.randomUUID().toString());
+                rm.setRoleId(dto.getRoleId());
+                rm.setMenuId(menuId);
+                rm.setDelFlag(false);
+                rm.setCreateBy(subject);
+                rm.setCreateTime(new Date());
+
+                affectCount+= roleMenuService.insert(rm);
+            }
+
+            msgResult.setResult(true);
+            msgResult.setData(affectCount);
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取已分配接口权限列表")
+    @GetMapping(value = "queryRelatedPerms")
+    @Transactional(rollbackFor = Exception.class)
+    public MessageResult<List> queryRelatedPerms(String roleId){
+        MessageResult<List> msgResult = new MessageResult<>();
+
+        try {
+            List<RolePermission> list = rolePermissionService.findByRoleId(roleId);
+
+            msgResult.setResult(true);
+            msgResult.setData(list);
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="保存关联接口权限")
+    @PostMapping(value = "saveRelatedPermission")
+    public MessageResult<Integer> saveRelatedPermission(@RequestBody RoleRelatedDTO dto,String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            rolePermissionService.deleteByRoleId(dto.getRoleId());
+
+            int affectCount = 0;
+
+            for (String permissionId : dto.getRelatedList()) {
+                RolePermission rp = new RolePermission();
+                rp.setId(UUID.randomUUID().toString());
+                rp.setRoleId(dto.getRoleId());
+                rp.setPermId(permissionId);
+                rp.setDelFlag(false);
+                rp.setCreateBy(subject);
+                rp.setCreateTime(new Date());
+
+                affectCount+= rolePermissionService.insert(rp);
+            }
+
+            msgResult.setResult(true);
+            msgResult.setData(affectCount);
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+}

+ 282 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/controller/UserController.java

@@ -0,0 +1,282 @@
+package com.jpsoft.picc.modules.sys.controller;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+import com.jpsoft.picc.common.utils.DES3;
+import com.jpsoft.picc.common.dto.MessageResult;
+import com.jpsoft.picc.common.utils.PojoUtils;
+import com.jpsoft.picc.modules.sys.entity.Role;
+import com.jpsoft.picc.modules.sys.entity.User;
+import com.jpsoft.picc.modules.sys.entity.UserRole;
+import com.jpsoft.picc.modules.sys.service.UserRoleService;
+import com.jpsoft.picc.modules.sys.service.UserService;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+@RestController
+@RequestMapping("/sys/user")
+public class UserController {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private UserService userService;
+
+    @Autowired
+    private UserRoleService userRoleService;
+
+    @Value("${jwt.secret}")
+    private String jwtSecret;
+
+    @ApiOperation(value="创建空记录")
+    @GetMapping("create")
+    public MessageResult<User> create(){
+        MessageResult<User> msgResult = new MessageResult<>();
+
+        User user = new User();
+
+        msgResult.setData(user);
+        msgResult.setResult(true);
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="添加信息")
+    @PostMapping("add")
+    public MessageResult<User> add(@RequestBody User user, @RequestAttribute  String subject){
+        MessageResult<User> msgResult = new MessageResult<>();
+
+        try {
+            if(StringUtils.isEmpty(user.getUserName())){
+                throw new Exception("用户名不能为空!");
+            }
+
+            if(StringUtils.isEmpty(user.getPassword())){
+                throw new Exception("密码不能为空!");
+            }
+
+            user.setId(UUID.randomUUID().toString());
+            DES3 des3 = new DES3();
+            user.setPassword(des3.encrypt(jwtSecret,user.getPassword()));
+            user.setCreateBy(subject);
+            user.setCreateTime(new Date());
+            user.setDelFlag(false);
+
+            int affectCount = userService.insert(user);
+
+            if (affectCount > 0) {
+                if(user.getRoles()!=null){
+                    for (String roleId : user.getRoles()) {
+                        UserRole ur = new UserRole();
+
+                        ur.setId(UUID.randomUUID().toString());
+                        ur.setUserId(user.getId());
+                        ur.setRoleId(roleId);
+                        ur.setCreateBy(subject);
+                        ur.setCreateTime(new Date());
+                        ur.setDelFlag(false);
+
+                        userRoleService.insert(ur);
+                    }
+                }
+
+                msgResult.setResult(true);
+                msgResult.setData(user);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库添加失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("edit/{id}")
+    public MessageResult<User> edit(@PathVariable("id") String id){
+        MessageResult<User> msgResult = new MessageResult<>();
+
+        try {
+            User user = userService.get(id);
+
+            if (user != null) {
+                List<Role> roles = userRoleService.findRoleByUserId(user.getId());
+
+                user.setRoles(roles.stream().map((role)->role.getId()).collect(Collectors.toList()));
+
+                msgResult.setResult(true);
+                msgResult.setData(user);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="更新用户")
+    @PostMapping("update")
+    @Transactional(rollbackFor = Exception.class)
+    public MessageResult<User> update(@RequestBody User user,@RequestAttribute String subject){
+        MessageResult<User> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = userService.update(user);
+
+            user.setUpdateBy(subject);
+            user.setUpdateTime(new Date());
+
+            if(user.getRoles()!=null){
+                affectCount = userRoleService.deleteByUserId(user.getId());
+
+                for (String roleId : user.getRoles()) {
+                    UserRole ur = new UserRole();
+
+                    ur.setId(UUID.randomUUID().toString());
+                    ur.setUserId(user.getId());
+                    ur.setRoleId(roleId);
+                    ur.setCreateBy(subject);
+                    ur.setCreateTime(new Date());
+                    ur.setDelFlag(false);
+
+                    affectCount += userRoleService.insert(ur);
+                }
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(user);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库更新失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="删除用户")
+    @PostMapping("delete/{id}")
+    public MessageResult<Integer> delete(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            User user = userService.get(id);
+            user.setDelFlag(true);
+            user.setUpdateBy(subject);
+            user.setUpdateTime(new Date());
+
+            int affectCount = userService.update(user);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+
+    @ApiOperation(value="批量删除")
+    @PostMapping("batchDelete")
+    public MessageResult<Integer> batchDelete(@RequestBody List<String> idList,@RequestAttribute String subject){
+        MessageResult<Integer> msgResult = new MessageResult<>();
+
+        try {
+            int affectCount = 0;
+
+            for (String id : idList) {
+                User user = userService.get(id);
+                user.setDelFlag(true);
+                user.setUpdateBy(subject);
+                user.setUpdateTime(new Date());
+
+                affectCount += userService.update(user);
+            }
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+                msgResult.setData(affectCount);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("删除失败");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
+
+    @ApiOperation(value="列表")
+    @RequestMapping(value = "pageList",method = RequestMethod.POST)
+    public MessageResult<Map> pageList(
+            String userName,String realName,
+            @RequestParam(name="pageIndex",defaultValue = "1") int pageIndex,
+            @RequestParam(name="pageSize",defaultValue = "10") int pageSize,
+            @RequestAttribute String subject){
+        MessageResult<Map> msgResult = new MessageResult<>();
+
+        Map<String,Object> searchParms = new HashMap<>();
+
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("create_time","asc"));
+
+        if (StringUtils.isNotEmpty(userName)) {
+            searchParms.put("userName","%" + userName + "%");
+        }
+
+        if (StringUtils.isNotEmpty(realName)) {
+            searchParms.put("realName","%" + realName + "%");
+        }
+
+        Page<User> page = userService.pageSearch(searchParms,pageIndex,pageSize,sortList);
+
+        msgResult.setResult(true);
+
+        msgResult.setData(PojoUtils.pageWrapper(page));
+
+        return msgResult;
+    }
+}

+ 23 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/DataDictionaryDAO.java

@@ -0,0 +1,23 @@
+package com.jpsoft.picc.modules.sys.dao;
+
+import com.jpsoft.picc.common.dto.Sort;
+import com.jpsoft.picc.modules.sys.entity.DataDictionary;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+@Repository
+public interface DataDictionaryDAO {
+	int insert(DataDictionary entity);
+	int update(DataDictionary entity);
+	int exist(String id);
+	DataDictionary get(String id);
+	int delete(String id);
+	String getName(String id);
+	String getValue(String id);
+	List<DataDictionary> list();
+	List<Map<String, Object>> queryChildren(String parentId);
+	List<DataDictionary> search(Map<String, Object> searchParams, List<Sort> sortList);
+}

+ 21 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/MenuDAO.java

@@ -0,0 +1,21 @@
+package com.jpsoft.picc.modules.sys.dao;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.sys.entity.Menu;
+import java.util.Map;
+import com.jpsoft.picc.common.dto.Sort;
+
+@Repository
+public interface MenuDAO {
+	int insert(Menu entity);
+	int update(Menu entity);
+	int exist(String id);
+	Menu get(String id);
+	int delete(String id);
+	List<Menu> list();
+	List<Menu> search(Map<String,Object> searchParams,List<Sort> sortList);
+    List<Menu> findAllocMenu(@Param("userId") String userId,@Param("parentId") String parentId);
+}

+ 21 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/PermissionDAO.java

@@ -0,0 +1,21 @@
+package com.jpsoft.picc.modules.sys.dao;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.sys.entity.Permission;
+import java.util.Map;
+import com.jpsoft.picc.common.dto.Sort;
+
+@Repository
+public interface PermissionDAO {
+	int insert(Permission entity);
+	int update(Permission entity);
+	int exist(@Param("path") String path,@Param("method") String method);
+	Permission get(String id);
+	int delete(String id);
+	List<Permission> list();
+	List<Permission> search(Map<String,Object> searchParams,List<Sort> sortList);
+    int hasPermitted(@Param("userId") String userId,@Param("path") String path,@Param("method") String method);
+}

+ 18 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/RoleDAO.java

@@ -0,0 +1,18 @@
+package com.jpsoft.picc.modules.sys.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.sys.entity.Role;
+import java.util.Map;
+import com.jpsoft.picc.common.dto.Sort;
+
+@Repository
+public interface RoleDAO {
+	int insert(Role entity);
+	int update(Role entity);
+	int exist(String id);
+	Role get(String id);
+	int delete(String id);
+	List<Role> list();
+	List<Role> search(Map<String,Object> searchParams,List<Sort> sortList);
+}

+ 22 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/RoleMenuDAO.java

@@ -0,0 +1,22 @@
+package com.jpsoft.picc.modules.sys.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.sys.entity.RoleMenu;
+import java.util.Map;
+import com.jpsoft.picc.common.dto.Sort;
+
+@Repository
+public interface RoleMenuDAO {
+	int insert(RoleMenu entity);
+	int update(RoleMenu entity);
+	int exist(String id);
+	RoleMenu get(String id);
+	int delete(String id);
+	List<RoleMenu> list();
+	List<RoleMenu> search(Map<String,Object> searchParams,List<Sort> sortList);
+
+	List<RoleMenu> findByRoleId(String roleId);
+
+	int deleteByRoleId(String roleId);
+}

+ 20 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/RolePermissionDAO.java

@@ -0,0 +1,20 @@
+package com.jpsoft.picc.modules.sys.dao;
+
+import java.util.List;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.sys.entity.RolePermission;
+import java.util.Map;
+import com.jpsoft.picc.common.dto.Sort;
+
+@Repository
+public interface RolePermissionDAO {
+	int insert(RolePermission entity);
+	int update(RolePermission entity);
+	int exist(String id);
+	RolePermission get(String id);
+	int delete(String id);
+	List<RolePermission> list();
+	List<RolePermission> search(Map<String,Object> searchParams,List<Sort> sortList);
+    List<RolePermission> findByRoleId(String roleId);
+	int deleteByRoleId(String roleId);
+}

+ 21 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/UserDAO.java

@@ -0,0 +1,21 @@
+package com.jpsoft.picc.modules.sys.dao;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.sys.entity.User;
+import java.util.Map;
+import com.jpsoft.picc.common.dto.Sort;
+
+@Repository
+public interface UserDAO {
+	int insert(User entity);
+	int update(User entity);
+	int exist(String id);
+	User get(String id);
+	int delete(String id);
+	List<User> list();
+	List<User> search(Map<String,Object> searchParams,List<Sort> sortList);
+	User findByUserName(@Param("userName") String userName);
+}

+ 22 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dao/UserRoleDAO.java

@@ -0,0 +1,22 @@
+package com.jpsoft.picc.modules.sys.dao;
+
+import java.util.List;
+
+import com.jpsoft.picc.modules.sys.entity.Role;
+import org.springframework.stereotype.Repository;
+import com.jpsoft.picc.modules.sys.entity.UserRole;
+import java.util.Map;
+import com.jpsoft.picc.common.dto.Sort;
+
+@Repository
+public interface UserRoleDAO {
+	int insert(UserRole entity);
+	int update(UserRole entity);
+	int exist(String id);
+	UserRole get(String id);
+	int delete(String id);
+	List<UserRole> list();
+	List<UserRole> search(Map<String,Object> searchParams,List<Sort> sortList);
+    List<Role> findRoleByUserId(String userId);
+	int deleteByUserId(String userId);
+}

+ 24 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/dto/RoleRelatedDTO.java

@@ -0,0 +1,24 @@
+package com.jpsoft.picc.modules.sys.dto;
+
+import java.util.List;
+
+public class RoleRelatedDTO {
+    private String roleId;
+    private List<String> relatedList;
+
+    public String getRoleId() {
+        return roleId;
+    }
+
+    public void setRoleId(String roleId) {
+        this.roleId = roleId;
+    }
+
+    public List<String> getRelatedList() {
+        return relatedList;
+    }
+
+    public void setRelatedList(List<String> relatedList) {
+        this.relatedList = relatedList;
+    }
+}

+ 203 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/DataDictionary.java

@@ -0,0 +1,203 @@
+package com.jpsoft.picc.modules.sys.entity;
+
+import java.util.Date;
+
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+  描述:sys_data_dictionary的实体类
+ */
+public class DataDictionary {
+	private String id;
+	private String name;
+	private String value;
+	private Integer sortNo;
+	private String parentName;
+	private String parentId;
+	private String dataType;
+	private String createBy;
+	private Date createDate;
+	private String updateBy;
+	private Date updateDate;
+	private Boolean activated;
+	private Boolean delFlag;
+	/*private List<DataDictionary> children;*/
+		/**
+	 *获取编号
+	 */
+	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置编号
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+		/**
+	 *获取名称
+	 */
+	public String getName(){
+		return name;
+	}
+	
+	/**
+	 *设置名称
+	 */
+	public void setName(String name){
+		this.name = name;
+	}
+		/**
+	 *获取数值
+	 */
+	public String getValue(){
+		return value;
+	}
+	
+	/**
+	 *设置数值
+	 */
+	public void setValue(String value){
+		this.value = value;
+	}
+		/**
+	 *获取显示序号
+	 */
+	public Integer getSortNo(){
+		return sortNo;
+	}
+	
+	/**
+	 *设置显示序号
+	 */
+	public void setSortNo(Integer sortNo){
+		this.sortNo = sortNo;
+	}
+		/**
+	 *获取所属目录
+	 */
+	public String getParentId(){
+		return parentId;
+	}
+	
+	/**
+	 *设置所属目录
+	 */
+	public void setParentId(String parentId){
+		this.parentId = parentId;
+	}
+		/**
+	 *获取1-字典目录,2-数据
+	 */
+	public String getDataType(){
+		return dataType;
+	}
+	
+	/**
+	 *设置1-字典目录,2-数据
+	 */
+	public void setDataType(String dataType){
+		this.dataType = dataType;
+	}
+		/**
+	 *获取
+	 */
+	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取
+	 */
+	public Date getCreateDate(){
+		return createDate;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setCreateDate(Date createDate){
+		this.createDate = createDate;
+	}
+		/**
+	 *获取
+	 */
+	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取
+	 */
+	public Date getUpdateDate(){
+		return updateDate;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setUpdateDate(Date updateDate){
+		this.updateDate = updateDate;
+	}
+		/**
+	 *获取
+	 */
+	public Boolean getActivated(){
+		return activated;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setActivated(Boolean activated){
+		this.activated = activated;
+	}
+
+	/**
+	 *获取
+	 */
+	public Boolean getDelFlag(){
+		return delFlag;
+	}
+
+	/**
+	 *设置
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+
+	/*public List<DataDictionary> getChildren() {
+		return children;
+	}
+
+	public void setChildren(List<DataDictionary> children) {
+		this.children = children;
+	}*/
+
+	public String getParentName() {
+		return parentName;
+	}
+
+	public void setParentName(String parentName) {
+		this.parentName = parentName;
+	}
+}

+ 199 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/Menu.java

@@ -0,0 +1,199 @@
+package com.jpsoft.picc.modules.sys.entity;
+
+import java.util.Date;
+import java.util.List;
+
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+  描述:sys_menu的实体类
+ */
+public class Menu {
+	private String id;
+	private String menuName;
+	private String parentId;
+	private Integer sortNo;
+	private String menuUrl;
+	private String menuType;
+	private Date createTime;
+	private String createBy;
+	private Date updateTime;
+	private String updateBy;
+	private Boolean delFlag;
+	private String parentName;
+	private List<Menu> children;
+	private String icon;
+
+		/**
+	 *获取菜单编号
+	 */
+	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置菜单编号
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+		/**
+	 *获取菜单名称
+	 */
+	public String getMenuName(){
+		return menuName;
+	}
+	
+	/**
+	 *设置菜单名称
+	 */
+	public void setMenuName(String menuName){
+		this.menuName = menuName;
+	}
+		/**
+	 *获取上级菜单
+	 */
+	public String getParentId(){
+		return parentId;
+	}
+	
+	/**
+	 *设置上级菜单
+	 */
+	public void setParentId(String parentId){
+		this.parentId = parentId;
+	}
+		/**
+	 *获取排序号
+	 */
+	public Integer getSortNo(){
+		return sortNo;
+	}
+	
+	/**
+	 *设置排序号
+	 */
+	public void setSortNo(Integer sortNo){
+		this.sortNo = sortNo;
+	}
+		/**
+	 *获取菜单地址
+	 */
+	public String getMenuUrl(){
+		return menuUrl;
+	}
+	
+	/**
+	 *设置菜单地址
+	 */
+	public void setMenuUrl(String menuUrl){
+		this.menuUrl = menuUrl;
+	}
+		/**
+	 *获取菜单类型(1-后端、2-前端)
+	 */
+	public String getMenuType(){
+		return menuType;
+	}
+	
+	/**
+	 *设置菜单类型(1-后端、2-前端)
+	 */
+	public void setMenuType(String menuType){
+		this.menuType = menuType;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取
+	 */
+	public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+		/**
+	 *获取
+	 */
+	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取
+	 */
+	public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+		/**
+	 *获取
+	 */
+	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+		/**
+	 *获取
+	 */
+	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+
+	public String getParentName() {
+		return parentName;
+	}
+
+	public void setParentName(String parentName) {
+		this.parentName = parentName;
+	}
+
+	public List<Menu> getChildren() {
+		return children;
+	}
+
+	public void setChildren(List<Menu> children) {
+		this.children = children;
+	}
+
+	public String getIcon() {
+		return icon;
+	}
+
+	public void setIcon(String icon) {
+		this.icon = icon;
+	}
+}

+ 142 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/Permission.java

@@ -0,0 +1,142 @@
+package com.jpsoft.picc.modules.sys.entity;
+
+import java.util.Date;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+ 描述:sys_permission的实体类
+ */
+public class Permission {
+	private String id;
+	private String path;
+	private String method;
+	private String summary;
+	private Boolean delFlag;
+	private String createBy;
+	private String updateBy;
+	private Date createTime;
+	private Date updateTime;
+
+	/**
+	 *获取主键
+	 */
+	public String getId(){
+		return id;
+	}
+
+	/**
+	 *设置主键
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+	/**
+	 *获取访问路径
+	 */
+	public String getPath(){
+		return path;
+	}
+
+	/**
+	 *设置访问路径
+	 */
+	public void setPath(String path){
+		this.path = path;
+	}
+	/**
+	 *获取访问方式
+	 */
+	public String getMethod(){
+		return method;
+	}
+
+	/**
+	 *设置访问方式
+	 */
+	public void setMethod(String method){
+		this.method = method;
+	}
+	/**
+	 *获取简介
+	 */
+	public String getSummary(){
+		return summary;
+	}
+
+	/**
+	 *设置简介
+	 */
+	public void setSummary(String summary){
+		this.summary = summary;
+	}
+	/**
+	 *获取是否删除
+	 */
+	public Boolean getDelFlag(){
+		return delFlag;
+	}
+
+	/**
+	 *设置是否删除
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+	/**
+	 *获取创建人
+	 */
+	public String getCreateBy(){
+		return createBy;
+	}
+
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+	/**
+	 *获取更新人
+	 */
+	public String getUpdateBy(){
+		return updateBy;
+	}
+
+	/**
+	 *设置更新人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	/**
+	 *获取创建时间
+	 */
+	public Date getCreateTime(){
+		return createTime;
+	}
+
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	/**
+	 *获取更新时间
+	 */
+	public Date getUpdateTime(){
+		return updateTime;
+	}
+
+	/**
+	 *设置更新时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+}

+ 129 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/Role.java

@@ -0,0 +1,129 @@
+package com.jpsoft.picc.modules.sys.entity;
+
+import java.util.Date;
+
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+  描述:sys_role的实体类
+ */
+public class Role {
+	private String id;
+	private String name;
+	private String description;
+	private Date createTime;
+	private Date updateTime;
+	private Boolean delFlag;
+	private String createBy;
+	private String updateBy;
+	
+		/**
+	 *获取角色编号
+	 */
+	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置角色编号
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+		/**
+	 *获取角色名称
+	 */
+	public String getName(){
+		return name;
+	}
+	
+	/**
+	 *设置角色名称
+	 */
+	public void setName(String name){
+		this.name = name;
+	}
+		/**
+	 *获取角色描述
+	 */
+	public String getDescription(){
+		return description;
+	}
+	
+	/**
+	 *设置角色描述
+	 */
+	public void setDescription(String description){
+		this.description = description;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取创建时间
+	 */
+	public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取更新时间
+	 */
+	public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置更新时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+		/**
+	 *获取删除标示
+	 */
+	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置删除标示
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+		/**
+	 *获取创建人
+	 */
+	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+		/**
+	 *获取更新人
+	 */
+	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置更新人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+}

+ 129 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/RoleMenu.java

@@ -0,0 +1,129 @@
+package com.jpsoft.picc.modules.sys.entity;
+
+import java.util.Date;
+
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+  描述:sys_role_menu的实体类
+ */
+public class RoleMenu {
+	private String id;
+	private String roleId;
+	private String menuId;
+	private Boolean delFlag;
+	private String createBy;
+	private Date createTime;
+	private String updateBy;
+	private Date updateTime;
+	
+		/**
+	 *获取
+	 */
+	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+		/**
+	 *获取
+	 */
+	public String getRoleId(){
+		return roleId;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setRoleId(String roleId){
+		this.roleId = roleId;
+	}
+		/**
+	 *获取
+	 */
+	public String getMenuId(){
+		return menuId;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setMenuId(String menuId){
+		this.menuId = menuId;
+	}
+		/**
+	 *获取是否删除
+	 */
+	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置是否删除
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+		/**
+	 *获取创建人
+	 */
+	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取创建时间
+	 */
+	public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+		/**
+	 *获取更新人
+	 */
+	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置更新人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取更新时间
+	 */
+	public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置更新时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+}

+ 129 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/RolePermission.java

@@ -0,0 +1,129 @@
+package com.jpsoft.picc.modules.sys.entity;
+
+import java.util.Date;
+
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+  描述:sys_role_permission的实体类
+ */
+public class RolePermission {
+	private String id;
+	private String permId;
+	private String roleId;
+	private Boolean delFlag;
+	private String createBy;
+	private String updateBy;
+	private Date createTime;
+	private Date updateTime;
+	
+		/**
+	 *获取
+	 */
+	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+		/**
+	 *获取
+	 */
+	public String getPermId(){
+		return permId;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setPermId(String permId){
+		this.permId = permId;
+	}
+		/**
+	 *获取
+	 */
+	public String getRoleId(){
+		return roleId;
+	}
+	
+	/**
+	 *设置
+	 */
+	public void setRoleId(String roleId){
+		this.roleId = roleId;
+	}
+		/**
+	 *获取是否删除
+	 */
+	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置是否删除
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+		/**
+	 *获取创建人
+	 */
+	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+		/**
+	 *获取更新人
+	 */
+	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置更新人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取创建时间
+	 */
+	public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取更新时间
+	 */
+	public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置更新时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+}

+ 160 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/User.java

@@ -0,0 +1,160 @@
+package com.jpsoft.picc.modules.sys.entity;
+
+import java.util.Date;
+import java.util.List;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+  描述:sys_user的实体类
+ */
+@ApiModel(value = "系统用户")
+public class User {
+	private String id;
+	private String userName;
+	private String password;
+	private String realName;
+	private Date createTime;
+	private Date updateTime;
+	private Boolean delFlag;
+	private String createBy;
+	private String updateBy;
+	private List<String> roles;
+	/**
+	 *获取用户编号
+	 */
+	@ApiModelProperty(value="用户编号")
+	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置用户编号
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+		/**
+	 *获取用户名
+	 */
+	@ApiModelProperty(value="用户名")
+	public String getUserName(){
+		return userName;
+	}
+	
+	/**
+	 *设置用户名
+	 */
+	public void setUserName(String userName){
+		this.userName = userName;
+	}
+		/**
+	 *获取密码
+	 */
+	@ApiModelProperty(value="密码")
+	public String getPassword(){
+		return password;
+	}
+	
+	/**
+	 *设置密码
+	 */
+	public void setPassword(String password){
+		this.password = password;
+	}
+		/**
+	 *获取真实名称
+	 */
+	@ApiModelProperty(value="真实名称")
+	public String getRealName(){
+		return realName;
+	}
+	
+	/**
+	 *设置真实名称
+	 */
+	public void setRealName(String realName){
+		this.realName = realName;
+	}
+
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+	/**
+	 *获取创建时间
+	 */
+	public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取更新时间
+	 */
+	public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置更新时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+		/**
+	 *获取删除标示
+	 */
+	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置删除标示
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+		/**
+	 *获取创建人
+	 */
+	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+		/**
+	 *获取更新人
+	 */
+	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置更新人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+
+	public List<String> getRoles() {
+		return roles;
+	}
+
+	public void setRoles(List<String> roles) {
+		this.roles = roles;
+	}
+}

+ 129 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/entity/UserRole.java

@@ -0,0 +1,129 @@
+package com.jpsoft.picc.modules.sys.entity;
+
+import java.util.Date;
+
+import org.springframework.format.annotation.DateTimeFormat;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+/**
+  描述:sys_user_role的实体类
+ */
+public class UserRole {
+	private String id;
+	private String roleId;
+	private String userId;
+	private Boolean delFlag;
+	private String createBy;
+	private String updateBy;
+	private Date createTime;
+	private Date updateTime;
+	
+		/**
+	 *获取用户角色关联编号
+	 */
+	public String getId(){
+		return id;
+	}
+	
+	/**
+	 *设置用户角色关联编号
+	 */
+	public void setId(String id){
+		this.id = id;
+	}
+		/**
+	 *获取角色编号
+	 */
+	public String getRoleId(){
+		return roleId;
+	}
+	
+	/**
+	 *设置角色编号
+	 */
+	public void setRoleId(String roleId){
+		this.roleId = roleId;
+	}
+		/**
+	 *获取用户编号
+	 */
+	public String getUserId(){
+		return userId;
+	}
+	
+	/**
+	 *设置用户编号
+	 */
+	public void setUserId(String userId){
+		this.userId = userId;
+	}
+		/**
+	 *获取是否删除
+	 */
+	public Boolean getDelFlag(){
+		return delFlag;
+	}
+	
+	/**
+	 *设置是否删除
+	 */
+	public void setDelFlag(Boolean delFlag){
+		this.delFlag = delFlag;
+	}
+		/**
+	 *获取创建人
+	 */
+	public String getCreateBy(){
+		return createBy;
+	}
+	
+	/**
+	 *设置创建人
+	 */
+	public void setCreateBy(String createBy){
+		this.createBy = createBy;
+	}
+		/**
+	 *获取更新人
+	 */
+	public String getUpdateBy(){
+		return updateBy;
+	}
+	
+	/**
+	 *设置更新人
+	 */
+	public void setUpdateBy(String updateBy){
+		this.updateBy = updateBy;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取创建时间
+	 */
+	public Date getCreateTime(){
+		return createTime;
+	}
+	
+	/**
+	 *设置创建时间
+	 */
+	public void setCreateTime(Date createTime){
+		this.createTime = createTime;
+	}
+		@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
+		/**
+	 *获取更新时间
+	 */
+	public Date getUpdateTime(){
+		return updateTime;
+	}
+	
+	/**
+	 *设置更新时间
+	 */
+	public void setUpdateTime(Date updateTime){
+		this.updateTime = updateTime;
+	}
+}

+ 21 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/DataDictionaryService.java

@@ -0,0 +1,21 @@
+package com.jpsoft.picc.modules.sys.service;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+import com.jpsoft.picc.modules.sys.entity.DataDictionary;
+
+import java.util.List;
+import java.util.Map;
+
+public interface DataDictionaryService {
+	DataDictionary get(String id);
+	boolean exist(String id);
+	int insert(DataDictionary model);
+	int update(DataDictionary model);
+	int delete(String id);
+	String getName(String id);
+	String getValue(String id);
+	List<DataDictionary> list();
+	List<Map<String, Object>> queryChildren(String parentId);
+	Page<DataDictionary> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, List<Sort> sortList);
+}

+ 21 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/MenuService.java

@@ -0,0 +1,21 @@
+package com.jpsoft.picc.modules.sys.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.picc.modules.sys.entity.Menu;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+
+public interface MenuService {
+	Menu get(String id);
+	boolean exist(String id);
+	int insert(Menu model);
+	int update(Menu model);
+	int delete(String id);
+	List<Menu> list();
+	Page<Menu> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,List<Sort> sortList);
+
+    List<Menu> query(Map<String, Object> searchParams, int limit, List<Sort> sortList);
+
+    List<Menu> findAllocMenu(String subject, String parentId);
+}

+ 19 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/PermissionService.java

@@ -0,0 +1,19 @@
+package com.jpsoft.picc.modules.sys.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.picc.modules.sys.entity.Permission;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+
+public interface PermissionService {
+	Permission get(String id);
+	boolean exist(String path, String method);
+	int insert(Permission model);
+	int update(Permission model);
+	int delete(String id);
+	List<Permission> list();
+	Page<Permission> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,List<Sort> sortList);
+
+    boolean hasPermitted(String userId, String path, String method);
+}

+ 19 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/RoleMenuService.java

@@ -0,0 +1,19 @@
+package com.jpsoft.picc.modules.sys.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.picc.modules.sys.entity.RoleMenu;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+
+public interface RoleMenuService {
+	RoleMenu get(String id);
+	boolean exist(String id);
+	int insert(RoleMenu model);
+	int update(RoleMenu model);
+	int delete(String id);
+	List<RoleMenu> list();
+	Page<RoleMenu> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,List<Sort> sortList);
+    List<RoleMenu> findByRoleId(String roleId);
+	int deleteByRoleId(String roleId);
+}

+ 21 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/RolePermissionService.java

@@ -0,0 +1,21 @@
+package com.jpsoft.picc.modules.sys.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.picc.modules.sys.entity.RolePermission;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+
+public interface RolePermissionService {
+	RolePermission get(String id);
+	boolean exist(String id);
+	int insert(RolePermission model);
+	int update(RolePermission model);
+	int delete(String id);
+	List<RolePermission> list();
+	Page<RolePermission> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,List<Sort> sortList);
+
+    List<RolePermission> findByRoleId(String roleId);
+
+	int deleteByRoleId(String roleId);
+}

+ 17 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/RoleService.java

@@ -0,0 +1,17 @@
+package com.jpsoft.picc.modules.sys.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.picc.modules.sys.entity.Role;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+
+public interface RoleService {
+	Role get(String id);
+	boolean exist(String id);
+	int insert(Role model);
+	int update(Role model);
+	int delete(String id);
+	List<Role> list();
+	Page<Role> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,List<Sort> sortList);
+}

+ 21 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/UserRoleService.java

@@ -0,0 +1,21 @@
+package com.jpsoft.picc.modules.sys.service;
+
+import java.util.List;
+import java.util.Map;
+
+import com.jpsoft.picc.modules.sys.entity.Role;
+import com.jpsoft.picc.modules.sys.entity.UserRole;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+
+public interface UserRoleService {
+	UserRole get(String id);
+	boolean exist(String id);
+	int insert(UserRole model);
+	int update(UserRole model);
+	int delete(String id);
+	List<UserRole> list();
+	Page<UserRole> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,List<Sort> sortList);
+    List<Role> findRoleByUserId(String userId);
+	int deleteByUserId(String userId);
+}

+ 18 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/UserService.java

@@ -0,0 +1,18 @@
+package com.jpsoft.picc.modules.sys.service;
+
+import java.util.List;
+import java.util.Map;
+import com.jpsoft.picc.modules.sys.entity.User;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+
+public interface UserService {
+	User get(String id);
+	boolean exist(String id);
+	int insert(User model);
+	int update(User model);
+	int delete(String id);
+	List<User> list();
+	Page<User> pageSearch(Map<String, Object> searchParams,int pageNum,int pageSize,List<Sort> sortList);
+	User findByUserName(String userName);
+}

+ 84 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/DataDictionaryServiceImpl.java

@@ -0,0 +1,84 @@
+package com.jpsoft.picc.modules.sys.service.impl;
+
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+import com.jpsoft.picc.common.dto.Sort;
+import com.jpsoft.picc.modules.sys.dao.DataDictionaryDAO;
+import com.jpsoft.picc.modules.sys.entity.DataDictionary;
+import com.jpsoft.picc.modules.sys.service.DataDictionaryService;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+@Transactional
+@Component(value="dataDictionaryService")
+public class DataDictionaryServiceImpl implements DataDictionaryService {
+	@Resource(name="dataDictionaryDAO")
+	private DataDictionaryDAO dataDictionaryDAO;
+
+	@Override
+	public DataDictionary get(String id) {
+		// TODO Auto-generated method stub
+		return dataDictionaryDAO.get(id);
+	}
+
+	@Override
+	public int insert(DataDictionary model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return dataDictionaryDAO.insert(model);
+	}
+
+	@Override
+	public int update(DataDictionary model) {
+		// TODO Auto-generated method stub
+		return dataDictionaryDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return dataDictionaryDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = dataDictionaryDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+
+	@Override
+	public String getName(String id){
+		return dataDictionaryDAO.getName(id);
+	}
+	@Override
+	public String getValue(String id){
+		return dataDictionaryDAO.getValue(id);
+	}
+	
+	@Override
+	public List<DataDictionary> list() {
+		// TODO Auto-generated method stub
+		return dataDictionaryDAO.list();
+	}
+
+	@Override
+	public List<Map<String, Object>> queryChildren(String parentId){
+		return dataDictionaryDAO.queryChildren(parentId);
+	}
+		
+	@Override
+	public Page<DataDictionary> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,List<Sort> sortList) {
+        Page<DataDictionary> page = PageHelper.startPage(pageNumber,pageSize).doSelectPage(()->{
+            dataDictionaryDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+}

+ 83 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/MenuServiceImpl.java

@@ -0,0 +1,83 @@
+package com.jpsoft.picc.modules.sys.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.picc.modules.sys.dao.MenuDAO;
+import com.jpsoft.picc.modules.sys.entity.Menu;
+import com.jpsoft.picc.modules.sys.service.MenuService;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="menuService")
+public class MenuServiceImpl implements MenuService {
+	@Resource(name="menuDAO")
+	private MenuDAO menuDAO;
+
+	@Override
+	public Menu get(String id) {
+		// TODO Auto-generated method stub
+		return menuDAO.get(id);
+	}
+
+	@Override
+	public int insert(Menu model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return menuDAO.insert(model);
+	}
+
+	@Override
+	public int update(Menu model) {
+		// TODO Auto-generated method stub
+		return menuDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return menuDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = menuDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<Menu> list() {
+		// TODO Auto-generated method stub
+		return menuDAO.list();
+	}
+		
+	@Override
+	public Page<Menu> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,List<Sort> sortList) {
+        Page<Menu> page = PageHelper.startPage(pageNumber,pageSize).doSelectPage(()->{
+            menuDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+
+	@Override
+	public List<Menu> query(Map<String, Object> searchParams, int limit, List<Sort> sortList) {
+		Page<Menu> page = PageHelper.startPage(1,limit,false).doSelectPage(()->{
+			menuDAO.search(searchParams,sortList);
+		});
+
+		return page.getResult();
+	}
+
+	@Override
+	public List<Menu> findAllocMenu(String subject, String parentId) {
+		return menuDAO.findAllocMenu(subject, parentId);
+	}
+}

+ 74 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/PermissionServiceImpl.java

@@ -0,0 +1,74 @@
+package com.jpsoft.picc.modules.sys.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.picc.modules.sys.dao.PermissionDAO;
+import com.jpsoft.picc.modules.sys.entity.Permission;
+import com.jpsoft.picc.modules.sys.service.PermissionService;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="permissionService")
+public class PermissionServiceImpl implements PermissionService {
+	@Resource(name="permissionDAO")
+	private PermissionDAO permissionDAO;
+
+	@Override
+	public Permission get(String id) {
+		// TODO Auto-generated method stub
+		return permissionDAO.get(id);
+	}
+
+	@Override
+	public int insert(Permission model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return permissionDAO.insert(model);
+	}
+
+	@Override
+	public int update(Permission model) {
+		// TODO Auto-generated method stub
+		return permissionDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return permissionDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String path, String method) {
+		// TODO Auto-generated method stub
+		int count = permissionDAO.exist(path,method);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<Permission> list() {
+		// TODO Auto-generated method stub
+		return permissionDAO.list();
+	}
+		
+	@Override
+	public Page<Permission> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,List<Sort> sortList) {
+        Page<Permission> page = PageHelper.startPage(pageNumber,pageSize).doSelectPage(()->{
+            permissionDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+
+	@Override
+	public boolean hasPermitted(String userId, String path, String method) {
+		return permissionDAO.hasPermitted(userId,path,method)>0 ? true : false;
+	}
+}

+ 79 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/RoleMenuServiceImpl.java

@@ -0,0 +1,79 @@
+package com.jpsoft.picc.modules.sys.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.picc.modules.sys.dao.RoleMenuDAO;
+import com.jpsoft.picc.modules.sys.entity.RoleMenu;
+import com.jpsoft.picc.modules.sys.service.RoleMenuService;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="roleMenuService")
+public class RoleMenuServiceImpl implements RoleMenuService {
+	@Resource(name="roleMenuDAO")
+	private RoleMenuDAO roleMenuDAO;
+
+	@Override
+	public RoleMenu get(String id) {
+		// TODO Auto-generated method stub
+		return roleMenuDAO.get(id);
+	}
+
+	@Override
+	public int insert(RoleMenu model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return roleMenuDAO.insert(model);
+	}
+
+	@Override
+	public int update(RoleMenu model) {
+		// TODO Auto-generated method stub
+		return roleMenuDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return roleMenuDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = roleMenuDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<RoleMenu> list() {
+		// TODO Auto-generated method stub
+		return roleMenuDAO.list();
+	}
+		
+	@Override
+	public Page<RoleMenu> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,List<Sort> sortList) {
+        Page<RoleMenu> page = PageHelper.startPage(pageNumber,pageSize).doSelectPage(()->{
+            roleMenuDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+
+	@Override
+	public List<RoleMenu> findByRoleId(String roleId) {
+		return roleMenuDAO.findByRoleId(roleId);
+	}
+
+	@Override
+	public int deleteByRoleId(String roleId) {
+		return roleMenuDAO.deleteByRoleId(roleId);
+	}
+}

+ 79 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/RolePermissionServiceImpl.java

@@ -0,0 +1,79 @@
+package com.jpsoft.picc.modules.sys.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.picc.modules.sys.dao.RolePermissionDAO;
+import com.jpsoft.picc.modules.sys.entity.RolePermission;
+import com.jpsoft.picc.modules.sys.service.RolePermissionService;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="rolePermissionService")
+public class RolePermissionServiceImpl implements RolePermissionService {
+	@Resource(name="rolePermissionDAO")
+	private RolePermissionDAO rolePermissionDAO;
+
+	@Override
+	public RolePermission get(String id) {
+		// TODO Auto-generated method stub
+		return rolePermissionDAO.get(id);
+	}
+
+	@Override
+	public int insert(RolePermission model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return rolePermissionDAO.insert(model);
+	}
+
+	@Override
+	public int update(RolePermission model) {
+		// TODO Auto-generated method stub
+		return rolePermissionDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return rolePermissionDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = rolePermissionDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<RolePermission> list() {
+		// TODO Auto-generated method stub
+		return rolePermissionDAO.list();
+	}
+		
+	@Override
+	public Page<RolePermission> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,List<Sort> sortList) {
+        Page<RolePermission> page = PageHelper.startPage(pageNumber,pageSize).doSelectPage(()->{
+            rolePermissionDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+
+	@Override
+	public List<RolePermission> findByRoleId(String roleId) {
+		return rolePermissionDAO.findByRoleId(roleId);
+	}
+
+	@Override
+	public int deleteByRoleId(String roleId) {
+		return rolePermissionDAO.deleteByRoleId(roleId);
+	}
+}

+ 69 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/RoleServiceImpl.java

@@ -0,0 +1,69 @@
+package com.jpsoft.picc.modules.sys.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.picc.modules.sys.dao.RoleDAO;
+import com.jpsoft.picc.modules.sys.entity.Role;
+import com.jpsoft.picc.modules.sys.service.RoleService;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="roleService")
+public class RoleServiceImpl implements RoleService {
+	@Resource(name="roleDAO")
+	private RoleDAO roleDAO;
+
+	@Override
+	public Role get(String id) {
+		// TODO Auto-generated method stub
+		return roleDAO.get(id);
+	}
+
+	@Override
+	public int insert(Role model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return roleDAO.insert(model);
+	}
+
+	@Override
+	public int update(Role model) {
+		// TODO Auto-generated method stub
+		return roleDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return roleDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = roleDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<Role> list() {
+		// TODO Auto-generated method stub
+		return roleDAO.list();
+	}
+		
+	@Override
+	public Page<Role> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,List<Sort> sortList) {
+        Page<Role> page = PageHelper.startPage(pageNumber,pageSize).doSelectPage(()->{
+            roleDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+}

+ 81 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/UserRoleServiceImpl.java

@@ -0,0 +1,81 @@
+package com.jpsoft.picc.modules.sys.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Resource;
+
+import com.jpsoft.picc.modules.sys.entity.Role;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.picc.modules.sys.dao.UserRoleDAO;
+import com.jpsoft.picc.modules.sys.entity.UserRole;
+import com.jpsoft.picc.modules.sys.service.UserRoleService;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="userRoleService")
+public class UserRoleServiceImpl implements UserRoleService {
+	@Resource(name="userRoleDAO")
+	private UserRoleDAO userRoleDAO;
+
+	@Override
+	public UserRole get(String id) {
+		// TODO Auto-generated method stub
+		return userRoleDAO.get(id);
+	}
+
+	@Override
+	public int insert(UserRole model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return userRoleDAO.insert(model);
+	}
+
+	@Override
+	public int update(UserRole model) {
+		// TODO Auto-generated method stub
+		return userRoleDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return userRoleDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = userRoleDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<UserRole> list() {
+		// TODO Auto-generated method stub
+		return userRoleDAO.list();
+	}
+		
+	@Override
+	public Page<UserRole> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,List<Sort> sortList) {
+        Page<UserRole> page = PageHelper.startPage(pageNumber,pageSize).doSelectPage(()->{
+            userRoleDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+
+	@Override
+	public List<Role> findRoleByUserId(String userId) {
+		return userRoleDAO.findRoleByUserId(userId);
+	}
+
+	@Override
+	public int deleteByUserId(String userId) {
+		return userRoleDAO.deleteByUserId(userId);
+	}
+}

+ 74 - 0
picc-admin-server/src/main/java/com/jpsoft/picc/modules/sys/service/impl/UserServiceImpl.java

@@ -0,0 +1,74 @@
+package com.jpsoft.picc.modules.sys.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import com.jpsoft.picc.modules.sys.dao.UserDAO;
+import com.jpsoft.picc.modules.sys.entity.User;
+import com.jpsoft.picc.modules.sys.service.UserService;
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+import com.github.pagehelper.PageHelper;
+
+@Transactional
+@Component(value="userService")
+public class UserServiceImpl implements UserService {
+	@Resource(name="userDAO")
+	private UserDAO userDAO;
+
+	@Override
+	public User get(String id) {
+		// TODO Auto-generated method stub
+		return userDAO.get(id);
+	}
+
+	@Override
+	public int insert(User model) {
+		// TODO Auto-generated method stub
+		//model.setId(UUID.randomUUID().toString());
+		
+		return userDAO.insert(model);
+	}
+
+	@Override
+	public int update(User model) {
+		// TODO Auto-generated method stub
+		return userDAO.update(model);		
+	}
+
+	@Override
+	public int delete(String id) {
+		// TODO Auto-generated method stub
+		return userDAO.delete(id);
+	}
+
+	@Override
+	public boolean exist(String id) {
+		// TODO Auto-generated method stub
+		int count = userDAO.exist(id);
+		
+		return count > 0 ? true : false;
+	}
+	
+	@Override
+	public List<User> list() {
+		// TODO Auto-generated method stub
+		return userDAO.list();
+	}
+		
+	@Override
+	public Page<User> pageSearch(Map<String, Object> searchParams, int pageNumber, int pageSize,List<Sort> sortList) {
+        Page<User> page = PageHelper.startPage(pageNumber,pageSize).doSelectPage(()->{
+            userDAO.search(searchParams,sortList);
+        });
+        
+        return page;
+	}
+
+	@Override
+	public User findByUserName(String userName) {
+		return userDAO.findByUserName(userName);
+	}
+}

+ 13 - 0
picc-admin-server/src/main/resources/application-dev.yml

@@ -0,0 +1,13 @@
+spring:
+  datasource:
+    url: jdbc:log4jdbc:mysql://127.0.0.1:3306/picc?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+    username: root
+    password: root
+  devtools:
+    add-properties: false
+    restart:
+      enabled: true
+
+logger:
+  level: WARN
+  dir: H:\\projects\\picc\\logs\\picc-admin-server\\

+ 50 - 0
picc-admin-server/src/main/resources/application-production.yml

@@ -0,0 +1,50 @@
+spring:
+  datasource:
+    url: jdbc:log4jdbc:mysql://10.10.0.2:3306/electricity-payment?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+    username: picc
+    password: picc
+  devtools:
+    restart:
+      enabled: true
+  redis:
+    # Redis数据库索引(默认为0)
+    database: 5
+    # Redis服务器地址
+    host: 127.0.0.1
+    # Redis服务器连接端口
+    port: 6379
+
+logger:
+  level: WARN
+  dir: E:\\picc\\logs
+
+netty:
+  port: 9966    #监听端口
+
+springfox:
+  documentation:
+    swagger:
+      v2:
+        host: www.wzgh.org
+
+wx:
+  pay:
+    appId: wxe598c699aa68cffe
+    appSecret: ea20d2e9a36aace26b4f7654218129af
+    mchId: 1500160622
+    subMchId: 1505070291
+    mchKey: jpsoft11111111111111111111111111
+    notifyUrl: http://www.wzgh.org/picc-server/wxPay/payNotify
+    ip: 122.228.31.242
+
+alipay:
+  serviceUrl: https://openapi.alipaydev.com/gateway.do
+  appId: 2016080600180410
+  publicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzMBfmTqqpt4dMcuz8DpyrEtruu/G7+Gvkd0j99QX4mzcRLx4Wg9IicOIiZGSdgzLMKIxBmk0eKiqqbuBjOsrS/XU+SvsTNlT1O/ZY0w30HEWrb/pvmo58HSY76cevWqLqW19+fUax7HG811mF4lq4YkHNAWArqByEjoFYbKHbtqS0ReXFJ9SE5TaqZSVOieiu3bYPkw5HEGmnYZMhWH3Gvt6tK2peLSM8mEMY5qp3zlGew3sq1KtcDkvO2UCuAmEkAnCDZ1zoYYt45cvcmwaHozGKHGOtOe0EAitpZyLZW3dP5/yBFfWk+MdaA1kZe5gNr8ePY5ht+Sd+DizMEINiQIDAQAB
+  privateKey: MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDMwF+ZOqqm3h0xy7PwOnKsS2u678bv4a+R3SP31BfibNxEvHhaD0iJw4iJkZJ2DMswojEGaTR4qKqpu4GM6ytL9dT5K+xM2VPU79ljTDfQcRatv+m+ajnwdJjvpx69aoupbX359RrHscbzXWYXiWrhiQc0BYCuoHISOgVhsodu2pLRF5cUn1ITlNqplJU6J6K7dtg+TDkcQaadhkyFYfca+3q0ral4tIzyYQxjmqnfOUZ7DeyrUq1wOS87ZQK4CYSQCcINnXOhhi3jly9ybBoejMYocY6057QQCK2lnItlbd0/n/IEV9aT4x1oDWRl7mA2vx49jmG35J34OLMwQg2JAgMBAAECggEBALpSXSxdPKn4+ew0iJwVNAEh6PkF9ayZXWGJMY/2y31avt81+vdJbSMgcoFtnTAb2FN7ZM2Gsx8RrawjW3LXFmFbZeERXUlZg3YEhXhdBXWDU7XtLFIA7JSqJfn/xHNuH4Wgg8EQkLwkRP11gs/sVvzB63Ilh8Jhcyyu6/LJuYDfeXu/50sgkQn0xXjjJdwiez9iX//wraYYcWsSCCbwM3QZ0MRc3TCP04QfZsF+fnPM83/g2yzun8fmvB5zDtYhlHwau52CiZpTHOxCCkZx0tubVyPG9jmLJ8eg+/hIfOKzHi2HiNsOQlOgLj8inUkM2qW3JlU7VcHduB7MWjkDIAECgYEA6HLVEDDT61xQNIUbnBWQ0FpHBQjsG/388Uy/xKfchUkOfzA0kNId+Nrd3hhLtl3i7ta6KNu2vDNS5iEbg7SCVsgqBZ0enLLIrymyJ94pHbUeFTAqgP4pnoWglx3ttMsERCKcqt55NJY3gfLtVjBTgGgY1Kfxh9SYFC6CQ4v4V4kCgYEA4X8kv8vVg4ivoXk/gEsKXPYdXG6O3sClq7pf/kaecV0caV89rARXkDP324nLUMxvGKY0sNa373VhAFav4Hv3kGqrJ0NfEd/XiXXT3Zq3njN5V5xqjZZRsySimyFoBetYMTjN2dtPxTC/65OvQPC8BdHaSZDMQQQSFznKG9y4hgECgYEAieTFXIt6zB7BPcbQ8DEi7VcA1o3Kc3ii+wqKoMDr4u3J+c3BAUCEo0JDaCOFlrPvkbw0R1S//Ll9riNpzSHiSFUKCLaCmHa+8pqLo3b5cTQmmm8uZ8NfMTkYYU1R3HSrHThjNEIyKO4ME7zm6sBUaNJYGJ9gezG03hQRFr0MH/ECgYAKAXZD/Gtw9rO0WojyzGGdVl5fJ5i3UZ0ITbDMu510Mkl8c3ltFJQ+FdA9sZOP9kJHubhE0IJA4dh4B2CueVG22sTVbSvewyvxMYVBJAhZwLb1qD8iITVm2Y1NjOHswVCcfoTD0fNsMImTjm4MV6JAL9ubwA0QJXoYBbxuGBEoAQKBgDj0LpamjOv/gRDo96C8AKqACqWoHtVWvYaOrgsFVJWRsmkcrQu2nMHNyFlyJ1DcXbVkulILrUDth8+2jmbxrkmW+9Y8aX5vaKEmrNOOWiSgau3VxeJU+VedDYJl1IVpfs4k4ymMkkAGa1ZlMYHgeP20krHMzAn/NNeVvHUEXcR4
+  zfbPublicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlU5CIAwwMmDnDPUHQaxiqZh2y6VE11DFTYVZygLEUbZuSCATO2fGkY8hv3fhLj8Wj+QT4kRfJrK+/v1QKcZ7a5UaoaASOPOGEf8X9p+lfuA863luUPiD+k4W6QMjOXoPdY4G4JC9lFe5FT05NqVYHXGIIqXTWSIqLyWDlv7elj8D1HS06H+ArzAjbSyR47IaKJCMnpqLGHJ6ZQGM+6DEcOpdZAULjhguZ891eTtawVndDOaYToCDK4MpW9mEifpKRB8JZptqr2zQhFBm7iADyMsIM1xwko2N6mKJYyYZJ9QzhTindSQBGw0Pbt1480iqeoQOHo+z0HPmikIsuiu65QIDAQAB
+  inputCharset: UTF-8
+  mchId: 2088102170202580
+  # appAuthToken: 201906BBbc7d6558596f4bbc9f056c01b8aebX48
+  signType: RSA2
+  notifyUrl: http://www.wzgh.org/picc-server/aliPay/payNotify

+ 43 - 0
picc-admin-server/src/main/resources/application-test.yml

@@ -0,0 +1,43 @@
+spring:
+  datasource:
+    url: jdbc:log4jdbc:mysql://192.168.33.20:3306/electricity-payment?autoReconnect=true&characterEncoding=utf8&serverTimezone=GMT%2B8
+    username: picc
+    password: picc
+  devtools:
+    restart:
+      enabled: true
+
+logger:
+  level: WARN
+  dir: F:\\picc\\logs
+
+netty:
+  port: 9966    #监听端口
+
+springfox:
+  documentation:
+    swagger:
+      v2:
+        host: zldb.xiaoxinda.com:8088
+
+#沙箱环境
+alipay:
+  serviceUrl: https://openapi.alipaydev.com/gateway.do
+  appId: 2016091800539045
+  privateKey: MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCZqJjnubeHgd6MVyCa+X/1Jxbxr60S3Avl6cR+x6rCQpnOEVNH6UsVm31cGp2W/rPlfJd7Kil9a0WAS2mdFhW9XDouo2jp6s+1hbtW52kwbQWjszq4WebIs97IWHxmkM3vEO3lVUd6y/Wo23sfL1d0ahEPLqkahM36zSBXaEmGzgX+8hgV25zk1tsyzwu/BAnQvOtCDYW+fP/ozz63mJ7/ScQn4Ucm3UwX92d3w+zqjUD0BjvNVQcOZwJm7FKrdsib1UVglyykaGG6M1KZj08q2ANYq+M+o//jX71JDXTpd+Uo6D+heUAKMDECXH2QzmQ2ZfSqR+eQ6t6sgH+69o2LAgMBAAECggEAWjynpxXqkNqUrkgQbtJs8bRGBiML+dJd7mQtL+LkBfcEyf5ksQtxO7w3j1pWB7GGRhO4Be2JtgzEIQaofEbW94Bs7qyqVQy/dDOYA/4cSQMNV8hOiKrLHDx9bZyBWd5aAbYobxB4zMVwe/yAvpyXuFb9s7PMPTWWnV3PS2WEIHR5jC1G9yqkaSTHkPCpd+S9spaHkCJdrwmGuscbElBS6C44QqDZK1aqtjq6JlHTibOLiN+WYKePPxgQkJLJwN7RWIFf3PTFH5aT3joRPP3ymOLv0cRRU0tUDqzF+o1rxMHjitVWWfXEw2p4b+NbYCEKx/3HyNmAQC23bskMP4X8kQKBgQDxvO2ob57gnWQahyDsElD66w87XF7QFqcMVcrKQmSBYxqluywSyq0uNKAogacSNsufg7kJOwTmtpGKMl//8tJ88u+T8x5BmLcbEhT1eWpCF9SJ951DzVHAIgAH/w2yH+PcJBQvDX9WV93Amoim4JRqvx6t8v3nShdys7eVlzA/eQKBgQCiuV47UzAiLSPR7vI9cYaD4h5MMSbmBEWG4prXhGt4AjLhdrlzGMMGCT7OMlEEXvRhd61nkeGNBOm51sc6PS8xWAkfqY8DpBG6Ty/rv6syUVJ6I66SujY3hUqGbtwL3FTWH2ixhlU/bzZnUS4gKlO5MPsJgPhg8JaP7wRffXTgIwKBgDoitoEIfwwDrfxXPQqpCQKfHyWmfELM/9WOmFt2Bhe7zr/GuL24MlfnXhD/xT8zIFs3YXufzvjxNSUoIkA6lHZqMkXBdShPYtHG0nWKgoxskLexbgfNS/jJ9Hn308JfuvvJTXVXaKVKMlFMmMqRPgBCAE3TH07NWcBDCkaWeor5AoGAArLuZC+CCd8TzASZkflTENbsR7k8+u2xNYaGqPJyUeA/dcvhUY5klbILj6H4BAmLJh61CpW51vvw4Hs2fLnNEZVzOUo3rAjJnnx3wAJC1afRpWL4H0jlY1BbpxUpoyy5X3/P3bnrqgyvK1GGYVQyZUzxrPutovX6mVKOkQLksF8CgYB7LBZyzLBWWmVt51DHELXkvIiXzftqpe6TFcEJ0gfkS/CU0rgMDlOoI5gJW39mEvObVTvCdG98lF2QqLfVxJ5o2pNQOHtGDTPDp30OOjRdz26Bk8o+D7Brr6V0weF6MLV2Vsa+Yr0FGeObHbTC94SJzEWobkvAqVR2luhdtagBYg==
+  zfbPublicKey: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx+8b2IWa7X+crooIYaT9ZEhyZYuhlaGlpxBXjmchWIrtRIp2sOGlm7nH8oY5CAgVmZ9x8ETz5Sd+p6Z7BhPNu+uc4CmrNOEzgfUDmWp8xriNfQR1Jw+J9AhGfjgQGT2/z9aD/BdKed40VM8P3iAtg++6TnBAEKBNbWuk4tOtP3aZ2XDZyIo1K3rW+KEufQBgZvo1j5x5asj2m+/5xBLdTLxsKb5agUM4HlTaQKuoF7Z+jPnHFzQEsITzgAyc0nd26QRTfWo+bCnFKG8GHjdZrJ1wjcXdw056+jUOUyRfDE/Set72FGlVTswhETo6ayAdNRRUX/3x0EI9dx3PxkC27QIDAQAB
+  inputCharset: UTF-8
+  mchId: 2088102176166099
+  # appAuthToken: 201906BBbc7d6558596f4bbc9f056c01b8aebX48
+  signType: RSA2
+  notifyUrl: http://zldb.xiaoxinda.com:8088/picc-server/aliPay/payNotify
+
+wx:
+  pay:
+    appId: wxe598c699aa68cffe
+    appSecret: ea20d2e9a36aace26b4f7654218129af
+    mchId: 1500160622
+    subMchId: 1505070291
+    mchKey: jpsoft11111111111111111111111111
+    notifyUrl: http://zldb.xiaoxinda.com:8088/picc-server/wxPay/payNotify
+    ip: 58.54.251.155

+ 99 - 0
picc-admin-server/src/main/resources/application.yml

@@ -0,0 +1,99 @@
+server:
+  port: 8080
+  servlet:
+    context-path: /picc-admin-server
+
+spring:
+  http:
+    multipart:
+      max-request-size: 20MB
+      max-file-size: 20MB
+  datasource:
+    driver-class-name: net.sf.log4jdbc.DriverSpy
+    type: com.alibaba.druid.pool.DruidDataSource
+    druid:
+      # 连接池的配置信息
+      # 初始化大小,最小,最大
+      initial-size: 5
+      min-idle: 5
+      maxActive: 20
+      # 配置获取连接等待超时的时间
+      maxWait: 60000
+      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      timeBetweenEvictionRunsMillis: 60000
+      # 配置一个连接在池中最小生存的时间,单位是毫秒
+      minEvictableIdleTimeMillis: 300000
+      validationQuery: SELECT 1
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      # 打开PSCache,并且指定每个连接上PSCache的大小
+      poolPreparedStatements: true
+      maxPoolPreparedStatementPerConnectionSize: 20
+      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+      filters: stat,wall
+      # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
+      connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
+      # 配置DruidStatFilter
+      web-stat-filter:
+        enabled: true
+        url-pattern: "/*"
+        exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*"
+      # 配置DruidStatViewServlet
+      stat-view-servlet:
+        url-pattern: "/druid/*"
+        # IP白名单(没有配置或者为空,则允许所有访问)
+        allow:
+        # IP黑名单 (存在共同时,deny优先于allow)
+        deny:
+        #  禁用HTML页面上的“Reset All”功能
+        reset-enable: false
+        # 登录名
+        login-username: admin
+        # 登录密码
+        login-password: jpsoft
+  devtools:
+    restart:
+      enabled: true
+  profiles:
+    active: @active.profile@
+  redis:
+    # Redis数据库索引(默认为0)
+    database: 1
+    # Redis服务器地址
+    host: 192.168.33.21
+    # Redis服务器连接端口
+    port: 6379
+    # Redis服务器连接密码(默认为空)
+    password:
+    # 连接池最大连接数(使用负值表示没有限制)
+    pool:
+      max-active: 8
+      # 连接池最大阻塞等待时间(使用负值表示没有限制)
+      max-wait: -1
+      # 连接池中的最大空闲连接
+      max-idle: 8
+      # 连接池中的最小空闲连接
+      min-idle: 0
+      # 连接超时时间(毫秒)
+      timeout: 0
+
+jwt:
+  secret: WJgLLiAktNj/vCNEoz6mfAmE0btwluCTk/TnJiZOIkQ=
+  header: Authorization
+
+mybatis:
+  typeAliasesPackage: com.jpsoft.picc.**.entity
+  mapperLocations: classpath:mapper/**/*.xml
+  configuration:
+    default-statement-timeout: 60
+
+pagehelper:
+  helperDialect: mysql
+  reasonable: true
+  supportMethodsArguments: true
+  params: count=countSql
+
+
+
+

+ 49 - 0
picc-admin-server/src/main/resources/logback-spring.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <include resource="org/springframework/boot/logging/logback/base.xml"/>
+    <!--
+    官方文档指明,需要使用<springProperty>,才可使用application.properties(或application.yml)中的值
+    -->
+    <springProperty scope="context" name="loggerLevel" source="logger.level"/>
+    <springProperty scope="context" name="loggerPath" source="logger.dir"/>
+    <property name="pattern" value="%date %level [%thread] %logger{36} [%file : %line] %msg%n"></property>
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>${pattern}</pattern>
+        </encoder>
+    </appender>
+    <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <file>${loggerPath}/logfile.log</file>
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${loggerPath}/logfile.%d{yyyy-MM-dd}.log</fileNamePattern>
+            <MaxHistory>30</MaxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${pattern}</pattern>
+        </encoder>
+    </appender>
+    <!--
+    直接用maven的变量是@...@,用spring的变量是${...}
+    -->
+    <springProfile name="dev">
+        <!--root的level不能用变量-->
+        <logger name="jdbc" additivity="false" level="WARN">
+            <appender-ref ref="STDOUT" />
+        </logger>
+        <logger name="jdbc.sqltiming" additivity="false" level="ON">
+            <appender-ref ref="STDOUT" />
+        </logger>
+    </springProfile>
+    <springProfile name="test">
+        <root level="WARN">
+            <appender-ref ref="STDOUT" />
+            <appender-ref ref="FILE" />
+        </root>
+    </springProfile>
+    <springProfile name="production">
+        <root level="WARN">
+            <appender-ref ref="STDOUT" />
+            <appender-ref ref="FILE" />
+        </root>
+    </springProfile>
+</configuration>

+ 150 - 0
picc-admin-server/src/main/resources/mapper/sys/DataDictionary.xml

@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.picc.modules.sys.dao.DataDictionaryDAO">
+	<resultMap id="DataDictionaryMap" type="DataDictionary">
+		<id property="id" column="id_" />
+			<result property="name" column="name_" />
+			<result property="value" column="value_" />
+			<result property="sortNo" column="sort_no" />
+			<result property="parentId" column="parent_id" />
+			<result property="parentName" column="parent_name"/>
+			<result property="dataType" column="data_type" />
+			<result property="createBy" column="create_by" />
+			<result property="createDate" column="create_date" />
+			<result property="updateBy" column="update_by" />
+			<result property="updateDate" column="update_date" />
+			<result property="activated" column="activated_" />
+			<result property="delFlag" column="del_flag"/>
+			</resultMap>
+	<insert id="insert" parameterType="DataDictionary">
+	<!--
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+		select sys_guid() from dual
+	</selectKey>
+	-->
+	<![CDATA[
+		insert into sys_data_dictionary
+	    (id_,name_,value_,sort_no,parent_id,data_type,create_by,create_date,update_by,update_date,activated_,del_flag)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{name,jdbcType=VARCHAR}
+,#{value,jdbcType=VARCHAR}
+,#{sortNo,jdbcType= NUMERIC }
+,#{parentId,jdbcType=VARCHAR}
+,#{dataType,jdbcType= NUMERIC }
+,#{createBy,jdbcType=VARCHAR}
+,#{createDate,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+,#{updateDate,jdbcType= TIMESTAMP }
+,#{activated,jdbcType= NUMERIC }
+,#{delFlag,jdbcType= NUMERIC }
+		)
+	]]>
+	</insert>
+	<delete id="delete" parameterType="string">
+		delete from sys_data_dictionary where id_=#{id,jdbcType=VARCHAR}
+	</delete>
+	<update id="update" parameterType="DataDictionary">
+		update sys_data_dictionary
+		<set>
+				<if test="name!=null">
+		name_=#{name,jdbcType=VARCHAR},
+		</if>
+				<if test="value!=null">
+		value_=#{value,jdbcType=VARCHAR},
+		</if>
+				<if test="sortNo!=null">
+		sort_no=#{sortNo,jdbcType= NUMERIC },
+		</if>
+				<if test="parentId!=null">
+		parent_id=#{parentId,jdbcType=VARCHAR},
+		</if>
+			<if test="dataType!=null">
+				data_type=#{dataType,jdbcType= NUMERIC },
+			</if>
+			<if test="createBy!=null">
+				create_by=#{createBy,jdbcType=VARCHAR},
+			</if>
+			<if test="createDate!=null">
+				create_date=#{createDate,jdbcType= TIMESTAMP },
+			</if>
+			<if test="updateBy!=null">
+				update_by=#{updateBy,jdbcType=VARCHAR},
+			</if>
+			<if test="updateDate!=null">
+				update_date=#{updateDate,jdbcType= TIMESTAMP },
+			</if>
+			<if test="activated!=null">
+				activated_=#{activated,jdbcType= NUMERIC },
+			</if>
+			<if test="delFlag!=null">
+				del_flag=#{delFlag,jdbcType= NUMERIC },
+			</if>
+		</set>
+	where id_=#{id}
+	</update>
+	<select id="get" parameterType="string" resultMap="DataDictionaryMap">
+		select a.*,b.name_ as parent_name
+		from sys_data_dictionary a left join sys_data_dictionary b on a.parent_id = b.id_
+		where a.id_=#{0} and a.del_flag = 0
+	</select>
+	<select id="exist" parameterType="string" resultType="int">
+		select count(*) from sys_data_dictionary where id_=#{0} and del_flag = 0
+	</select>
+	<select id="list" resultMap="DataDictionaryMap">
+		select * from sys_data_dictionary where del_flag = 0
+	</select>
+	<select id="search" parameterType="hashmap" resultMap="DataDictionaryMap">
+		<![CDATA[
+			SELECT
+				a.*,b.name_ AS parent_name
+			FROM
+				sys_data_dictionary a
+			LEFT JOIN sys_data_dictionary b ON a.parent_id = b.id_
+		]]>
+		<where>
+				a.del_flag = 0
+			<if test="searchParams.id != null">
+				and a.ID_ like #{searchParams.id}
+			</if>
+			<if test="searchParams.name != null">
+				and a.name_ like #{searchParams.name}
+			</if>
+			<if test="searchParams.excludeId != null">
+				<![CDATA[
+				and a.ID_ <> #{searchParams.excludeId}
+				]]>
+			</if>
+			<if test="searchParams.dataType != null">
+				and a.data_type = #{searchParams.dataType}
+			</if>
+
+		</where>
+		<foreach item="sort" collection="sortList"  open="order by" separator=",">
+	        ${sort.name} ${sort.order}
+	 	</foreach>
+	</select>
+
+	<select id="queryChildren" resultType="java.util.HashMap" parameterType="string" >
+		SELECT
+		a.id_ as id,a.name_ as name,a.value_ as value
+		FROM
+		sys_data_dictionary a where a.del_flag = 0
+		and data_type = 2
+		and a.parent_id = #{0}
+	</select>
+
+	<select id="getName" parameterType="string" resultType="string">
+		select a.name_ as name
+		from sys_data_dictionary a
+		where a.id_=#{0} and a.del_flag = 0
+	</select>
+	<select id="getValue" parameterType="string" resultType="string">
+		select a.value_ as value
+		from sys_data_dictionary a
+		where a.id_=#{0} and a.del_flag = 0
+	</select>
+</mapper>

+ 139 - 0
picc-admin-server/src/main/resources/mapper/sys/Menu.xml

@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.picc.modules.sys.dao.MenuDAO">
+    <resultMap id="MenuMap" type="Menu">
+        <id property="id" column="id_"/>
+        <result property="menuName" column="menu_name"/>
+        <result property="parentId" column="parent_id"/>
+        <result property="parentName" column="parent_name"/>
+        <result property="sortNo" column="sort_no"/>
+        <result property="menuUrl" column="menu_url"/>
+        <result property="icon" column="icon_"/>
+        <result property="menuType" column="menu_type"/>
+        <result property="createTime" column="create_time"/>
+        <result property="createBy" column="create_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="delFlag" column="del_flag"/>
+    </resultMap>
+    <insert id="insert" parameterType="Menu">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into sys_menu
+	    (id_,menu_name,parent_id,sort_no,menu_url,menu_type,create_time,create_by,update_time,update_by,del_flag,icon_)
+		values
+		(
+            #{id,jdbcType=VARCHAR}
+            ,#{menuName,jdbcType=VARCHAR}
+            ,#{parentId,jdbcType=VARCHAR}
+            ,#{sortNo,jdbcType= NUMERIC }
+            ,#{menuUrl,jdbcType=VARCHAR}
+            ,#{menuType,jdbcType=VARCHAR}
+            ,#{createTime,jdbcType= TIMESTAMP }
+            ,#{createBy,jdbcType=VARCHAR}
+            ,#{updateTime,jdbcType= TIMESTAMP }
+            ,#{updateBy,jdbcType=VARCHAR}
+            ,#{delFlag,jdbcType= NUMERIC }
+            ,#{icon,jdbcType=VARCHAR}
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from sys_menu where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="Menu">
+        update sys_menu
+        <set>
+            <if test="menuName!=null">
+                menu_name=#{menuName,jdbcType=VARCHAR},
+            </if>
+            <if test="parentId!=null">
+                parent_id=#{parentId,jdbcType=VARCHAR},
+            </if>
+            <if test="sortNo!=null">
+                sort_no=#{sortNo,jdbcType= NUMERIC },
+            </if>
+            <if test="menuUrl!=null">
+                menu_url=#{menuUrl,jdbcType=VARCHAR},
+            </if>
+            <if test="menuType!=null">
+                menu_type=#{menuType,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+            <if test="icon!=null">
+                icon_=#{icon,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="MenuMap">
+        select a.*,b.menu_name as parent_name
+        from sys_menu a left join sys_menu b on a.parent_id = b.id_
+        where a.id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from sys_menu where id_=#{0}
+    </select>
+    <select id="list" resultMap="MenuMap">
+        select * from sys_menu
+    </select>
+    <select id="search" parameterType="hashmap" resultMap="MenuMap">
+        <![CDATA[
+			select a.*,b.menu_name as parent_name
+			from sys_menu a left join sys_menu b on a.parent_id = b.id_
+		]]>
+        where a.del_flag=0
+        <if test="searchParams.menuName != null">
+            and a.menu_name like #{searchParams.menuName}
+        </if>
+        <if test="searchParams.menuType != null">
+            and a.menu_type = #{searchParams.menuType}
+        </if>
+        <if test="searchParams.parentId != null">
+            and a.parent_id = #{searchParams.parentId}
+        </if>
+        <if test="searchParams.excludeId != null">
+            <![CDATA[
+                and a.id_ <> #{searchParams.excludeId}
+            ]]>
+        </if>
+        <foreach item="sort" collection="sortList" open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+    <select id="findAllocMenu"  parameterType="string" resultMap="MenuMap">
+        select * from sys_menu m,sys_role_menu rm,sys_user_role ur
+        where ur.user_id=#{userId}
+        and ur.role_id = rm.role_id
+        and rm.menu_id = m.id_
+        and m.menu_type = 2
+        and m.del_flag=0
+        <if test="parentId==null">
+            and m.parent_id is null
+        </if>
+        <if test="parentId!=null">
+            and m.parent_id = #{parentId}
+        </if>
+        order by m.sort_no asc
+    </select>
+</mapper>

+ 108 - 0
picc-admin-server/src/main/resources/mapper/sys/Permission.xml

@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.picc.modules.sys.dao.PermissionDAO">
+    <resultMap id="PermissionMap" type="Permission">
+        <id property="id" column="id_"/>
+        <result property="path" column="path_"/>
+        <result property="method" column="method_"/>
+        <result property="summary" column="summary_"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="createBy" column="create_by"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+    <insert id="insert" parameterType="Permission">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into sys_permission
+	    (id_,path_,method_,summary_,del_flag,create_by,update_by,create_time,update_time)
+		values
+		(
+            #{id,jdbcType=VARCHAR}
+            ,#{path,jdbcType=VARCHAR}
+            ,#{method,jdbcType=VARCHAR}
+            ,#{summary,jdbcType=VARCHAR}
+            ,#{delFlag,jdbcType= NUMERIC }
+            ,#{createBy,jdbcType=VARCHAR}
+            ,#{updateBy,jdbcType=VARCHAR}
+            ,#{createTime,jdbcType= TIMESTAMP }
+            ,#{updateTime,jdbcType= TIMESTAMP }
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from sys_permission where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="Permission">
+        update sys_permission
+        <set>
+            <if test="path!=null">
+                path_=#{path,jdbcType=VARCHAR},
+            </if>
+            <if test="method!=null">
+                method_=#{method,jdbcType=VARCHAR},
+            </if>
+            <if test="summary!=null">
+                summary_=#{summary,jdbcType=VARCHAR},
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="PermissionMap">
+        select
+        id_,path_,method_,summary_,del_flag,create_by,update_by,create_time,update_time from sys_permission where
+        id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from sys_permission where path_=#{path} and method_=#{method} and del_flag=0
+    </select>
+    <select id="list" resultMap="PermissionMap">
+        select * from sys_permission where del_flag=0
+    </select>
+    <select id="search" parameterType="hashmap" resultMap="PermissionMap">
+        <![CDATA[
+			select * from sys_permission
+		]]>
+        where del_flag=0
+        <if test="searchParams.path != null">
+            and path_ like #{searchParams.path}
+        </if>
+        <foreach item="sort" collection="sortList" open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+    <select id="hasPermitted" parameterType="string" resultType="int">
+        <![CDATA[
+            select count(*) from
+            sys_user u,sys_user_role ur,sys_role_permission rp,sys_permission p
+            where u.id_=#{userId}
+            and u.id_=ur.user_id
+            and ur.role_id = rp.role_id
+            and rp.perm_id = p.id_
+            and p.path_ = #{path}
+            and p.method_ = #{method}
+        ]]>
+    </select>
+</mapper>

+ 93 - 0
picc-admin-server/src/main/resources/mapper/sys/Role.xml

@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.picc.modules.sys.dao.RoleDAO">
+    <resultMap id="RoleMap" type="Role">
+        <id property="id" column="id_"/>
+        <result property="name" column="name_"/>
+        <result property="description" column="description_"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="createBy" column="create_by"/>
+        <result property="updateBy" column="update_by"/>
+    </resultMap>
+    <insert id="insert" parameterType="Role">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into sys_role
+	    (id_,name_,description_,create_time,update_time,del_flag,create_by,update_by)
+		values
+		(
+            #{id,jdbcType=VARCHAR}
+            ,#{name,jdbcType=VARCHAR}
+            ,#{description,jdbcType=VARCHAR}
+            ,#{createTime,jdbcType= TIMESTAMP }
+            ,#{updateTime,jdbcType= TIMESTAMP }
+            ,#{delFlag,jdbcType= NUMERIC }
+            ,#{createBy,jdbcType=VARCHAR}
+            ,#{updateBy,jdbcType=VARCHAR}
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from sys_role where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="Role">
+        update sys_role
+        <set>
+            <if test="name!=null">
+                name_=#{name,jdbcType=VARCHAR},
+            </if>
+            <if test="description!=null">
+                description_=#{description,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="RoleMap">
+        select
+        id_,name_,description_,create_time,update_time,del_flag,create_by,update_by from sys_role where id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from sys_role where id_=#{0}
+    </select>
+    <select id="list" resultMap="RoleMap">
+        select * from sys_role  where del_flag=0 order by create_time asc
+    </select>
+    <select id="search" parameterType="hashmap" resultMap="RoleMap">
+        <![CDATA[
+			select * from sys_role
+		]]>
+            where del_flag=0
+            <if test="searchParams.roleName != null">
+                and name_ like #{searchParams.roleName}
+            </if>
+            <if test="searchParams.roleDesc != null">
+                and description_ like #{searchParams.roleDesc}
+            </if>
+        <foreach item="sort" collection="sortList" open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+</mapper>

+ 97 - 0
picc-admin-server/src/main/resources/mapper/sys/RoleMenu.xml

@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.picc.modules.sys.dao.RoleMenuDAO">
+	<resultMap id="RoleMenuMap" type="RoleMenu">
+		<id property="id" column="id_" />
+			<result property="roleId" column="role_id" />
+			<result property="menuId" column="menu_id" />
+			<result property="delFlag" column="del_flag" />
+			<result property="createBy" column="create_by" />
+			<result property="createTime" column="create_time" />
+			<result property="updateBy" column="update_by" />
+			<result property="updateTime" column="update_time" />
+			</resultMap>
+	<insert id="insert" parameterType="RoleMenu">
+	<!--
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+		select sys_guid() from dual
+	</selectKey>
+	-->
+	<![CDATA[
+		insert into sys_role_menu
+	    (id_,role_id,menu_id,del_flag,create_by,create_time,update_by,update_time)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{roleId,jdbcType=VARCHAR}
+,#{menuId,jdbcType=VARCHAR}
+,#{delFlag,jdbcType= NUMERIC }
+,#{createBy,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{updateBy,jdbcType=VARCHAR}
+,#{updateTime,jdbcType= TIMESTAMP }
+		)
+	]]>
+	</insert>
+	<delete id="delete" parameterType="string">
+		delete from sys_role_menu where id_=#{id,jdbcType=VARCHAR}
+	</delete>
+	<delete id="deleteByRoleId" parameterType="string">
+		delete from sys_role_menu where role_id=#{0}
+	</delete>
+	<update id="update" parameterType="RoleMenu">
+		update sys_role_menu
+		<set>
+				<if test="roleId!=null">
+		role_id=#{roleId,jdbcType=VARCHAR},
+		</if>
+				<if test="menuId!=null">
+		menu_id=#{menuId,jdbcType=VARCHAR},
+		</if>
+				<if test="delFlag!=null">
+		del_flag=#{delFlag,jdbcType= NUMERIC },
+		</if>
+				<if test="createBy!=null">
+		create_by=#{createBy,jdbcType=VARCHAR},
+		</if>
+				<if test="createTime!=null">
+		create_time=#{createTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="updateBy!=null">
+		update_by=#{updateBy,jdbcType=VARCHAR},
+		</if>
+				<if test="updateTime!=null">
+		update_time=#{updateTime,jdbcType= TIMESTAMP },
+		</if>
+		</set>
+	where id_=#{id}
+	</update>
+	<select id="get" parameterType="string" resultMap="RoleMenuMap">
+		select 
+id_,role_id,menu_id,del_flag,create_by,create_time,update_by,update_time		from sys_role_menu where id_=#{0}
+	</select>
+	<select id="exist" parameterType="string" resultType="int">
+		select count(*) from sys_role_menu where id_=#{0}
+	</select>
+	<select id="list" resultMap="RoleMenuMap">
+		select * from sys_role_menu
+	</select>
+	<select id="search" parameterType="hashmap" resultMap="RoleMenuMap">
+		<![CDATA[
+			select * from sys_role_menu
+		]]>
+		<where>
+			<if test="searchParams.id != null">
+				and ID_ like #{searchParams.id}
+			</if>
+		</where>
+		<foreach item="sort" collection="sortList"  open="order by" separator=",">
+	        ${sort.name} ${sort.order}
+	 	</foreach>
+	</select>
+	<select id="findByRoleId" parameterType="string" resultMap="RoleMenuMap">
+		select * from sys_role_menu where role_id=#{0}
+	</select>
+</mapper>

+ 96 - 0
picc-admin-server/src/main/resources/mapper/sys/RolePermission.xml

@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.picc.modules.sys.dao.RolePermissionDAO">
+	<resultMap id="RolePermissionMap" type="RolePermission">
+		<id property="id" column="id_" />
+			<result property="permId" column="perm_id" />
+			<result property="roleId" column="role_id" />
+			<result property="delFlag" column="del_flag" />
+			<result property="createBy" column="create_by" />
+			<result property="updateBy" column="update_by" />
+			<result property="createTime" column="create_time" />
+			<result property="updateTime" column="update_time" />
+			</resultMap>
+	<insert id="insert" parameterType="RolePermission">
+	<!--
+	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+		select sys_guid() from dual
+	</selectKey>
+	-->
+	<![CDATA[
+		insert into sys_role_permission
+	    (id_,perm_id,role_id,del_flag,create_by,update_by,create_time,update_time)
+		values
+		(
+#{id,jdbcType=VARCHAR}
+,#{permId,jdbcType=VARCHAR}
+,#{roleId,jdbcType=VARCHAR}
+,#{delFlag,jdbcType= NUMERIC }
+,#{createBy,jdbcType=VARCHAR}
+,#{updateBy,jdbcType=VARCHAR}
+,#{createTime,jdbcType= TIMESTAMP }
+,#{updateTime,jdbcType= TIMESTAMP }
+		)
+	]]>
+	</insert>
+	<delete id="delete" parameterType="string">
+		delete from sys_role_permission where id_=#{id,jdbcType=VARCHAR}
+	</delete>
+	<delete id="deleteByRoleId" parameterType="string">
+		delete from sys_role_permission where role_id=#{0}
+	</delete>
+	<update id="update" parameterType="RolePermission">
+		update sys_role_permission
+		<set>
+				<if test="permId!=null">
+		perm_id=#{permId,jdbcType=VARCHAR},
+		</if>
+				<if test="roleId!=null">
+		role_id=#{roleId,jdbcType=VARCHAR},
+		</if>
+				<if test="delFlag!=null">
+		del_flag=#{delFlag,jdbcType= NUMERIC },
+		</if>
+				<if test="createBy!=null">
+		create_by=#{createBy,jdbcType=VARCHAR},
+		</if>
+				<if test="updateBy!=null">
+		update_by=#{updateBy,jdbcType=VARCHAR},
+		</if>
+				<if test="createTime!=null">
+		create_time=#{createTime,jdbcType= TIMESTAMP },
+		</if>
+				<if test="updateTime!=null">
+		update_time=#{updateTime,jdbcType= TIMESTAMP },
+		</if>
+		</set>
+	where id_=#{id}
+	</update>
+	<select id="get" parameterType="string" resultMap="RolePermissionMap">
+		select * from sys_role_permission where id_=#{0}
+	</select>
+	<select id="exist" parameterType="string" resultType="int">
+		select count(*) from sys_role_permission where id_=#{0}
+	</select>
+	<select id="list" resultMap="RolePermissionMap">
+		select * from sys_role_permission
+	</select>
+	<select id="search" parameterType="hashmap" resultMap="RolePermissionMap">
+		<![CDATA[
+			select * from sys_role_permission
+		]]>
+		<where>
+			<if test="searchParams.id != null">
+				and ID_ like #{searchParams.id}
+			</if>
+		</where>
+		<foreach item="sort" collection="sortList"  open="order by" separator=",">
+	        ${sort.name} ${sort.order}
+	 	</foreach>
+	</select>
+	<select id="findByRoleId" parameterType="string" resultMap="RolePermissionMap">
+		select * from sys_role_permission where role_id=#{0}
+	</select>
+</mapper>

+ 102 - 0
picc-admin-server/src/main/resources/mapper/sys/User.xml

@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.picc.modules.sys.dao.UserDAO">
+    <resultMap id="UserMap" type="User">
+        <id property="id" column="id_"/>
+        <result property="userName" column="user_name"/>
+        <result property="password" column="password_"/>
+        <result property="realName" column="real_name"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="createBy" column="create_by"/>
+        <result property="updateBy" column="update_by"/>
+    </resultMap>
+    <insert id="insert" parameterType="User">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into sys_user
+	    (id_,user_name,password_,real_name,create_time,update_time,del_flag,create_by,update_by)
+		values
+		(
+            #{id,jdbcType=VARCHAR}
+            ,#{userName,jdbcType=VARCHAR}
+            ,#{password,jdbcType=VARCHAR}
+            ,#{realName,jdbcType=VARCHAR}
+            ,#{createTime,jdbcType= TIMESTAMP }
+            ,#{updateTime,jdbcType= TIMESTAMP }
+            ,#{delFlag,jdbcType= NUMERIC }
+            ,#{createBy,jdbcType=VARCHAR}
+            ,#{updateBy,jdbcType=VARCHAR}
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from sys_user where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <update id="update" parameterType="User">
+        update sys_user
+        <set>
+            <if test="userName!=null">
+                user_name=#{userName,jdbcType=VARCHAR},
+            </if>
+            <if test="password!=null">
+                password_=#{password,jdbcType=VARCHAR},
+            </if>
+            <if test="realName!=null">
+                real_name=#{realName,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="UserMap">
+        select
+        id_,user_name,password_,real_name,create_time,update_time,del_flag,create_by,update_by from sys_user where
+        id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from sys_user where id_=#{0}
+    </select>
+    <select id="list" resultMap="UserMap">
+        select * from sys_user
+    </select>
+    <select id="findByUserName" parameterType="string" resultMap="UserMap">
+        select * from sys_user where user_name=#{userName} and del_flag=0 limit 1
+    </select>
+    <select id="search" parameterType="hashmap" resultMap="UserMap">
+        <![CDATA[
+			select * from sys_user
+			where del_flag=0
+		]]>
+        <if test="searchParams.userName != null">
+            and user_name like #{searchParams.userName}
+        </if>
+        <if test="searchParams.realName != null">
+            and real_name like #{searchParams.realName}
+        </if>
+        <foreach item="sort" collection="sortList" open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+</mapper>

+ 100 - 0
picc-admin-server/src/main/resources/mapper/sys/UserRole.xml

@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<!-- namespace必须指向DAO接口 -->
+<mapper namespace="com.jpsoft.picc.modules.sys.dao.UserRoleDAO">
+    <resultMap id="UserRoleMap" type="UserRole">
+        <id property="id" column="id_"/>
+        <result property="roleId" column="role_id"/>
+        <result property="userId" column="user_id"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="createBy" column="create_by"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+    <insert id="insert" parameterType="UserRole">
+        <!--
+        <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
+            select sys_guid() from dual
+        </selectKey>
+        -->
+        <![CDATA[
+		insert into sys_user_role
+	    (id_,role_id,user_id,del_flag,create_by,update_by,create_time,update_time)
+		values
+		(
+            #{id,jdbcType=VARCHAR}
+            ,#{roleId,jdbcType=VARCHAR}
+            ,#{userId,jdbcType=VARCHAR}
+            ,#{delFlag,jdbcType= NUMERIC }
+            ,#{createBy,jdbcType=VARCHAR}
+            ,#{updateBy,jdbcType=VARCHAR}
+            ,#{createTime,jdbcType= TIMESTAMP }
+            ,#{updateTime,jdbcType= TIMESTAMP }
+		)
+	]]>
+    </insert>
+    <delete id="delete" parameterType="string">
+        delete from sys_user_role where id_=#{id,jdbcType=VARCHAR}
+    </delete>
+    <delete id="deleteByUserId" parameterType="string">
+        delete from sys_user_role where user_id=#{0}
+    </delete>
+    <update id="update" parameterType="UserRole">
+        update sys_user_role
+        <set>
+            <if test="roleId!=null">
+                role_id=#{roleId,jdbcType=VARCHAR},
+            </if>
+            <if test="userId!=null">
+                user_id=#{userId,jdbcType=VARCHAR},
+            </if>
+            <if test="delFlag!=null">
+                del_flag=#{delFlag,jdbcType= NUMERIC },
+            </if>
+            <if test="createBy!=null">
+                create_by=#{createBy,jdbcType=VARCHAR},
+            </if>
+            <if test="updateBy!=null">
+                update_by=#{updateBy,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime!=null">
+                create_time=#{createTime,jdbcType= TIMESTAMP },
+            </if>
+            <if test="updateTime!=null">
+                update_time=#{updateTime,jdbcType= TIMESTAMP },
+            </if>
+        </set>
+        where id_=#{id}
+    </update>
+    <select id="get" parameterType="string" resultMap="UserRoleMap">
+        select
+        id_,role_id,user_id,del_flag,create_by,update_by,create_time,update_time from sys_user_role where id_=#{0}
+    </select>
+    <select id="exist" parameterType="string" resultType="int">
+        select count(*) from sys_user_role where id_=#{0}
+    </select>
+    <select id="list" resultMap="UserRoleMap">
+        select * from sys_user_role
+    </select>
+    <select id="findRoleByUserId" parameterType="string" resultMap="com.jpsoft.picc.modules.sys.dao.RoleDAO.RoleMap">
+        select r.* from sys_user_role ur,sys_role r
+        where ur.role_id = r.id_
+        and ur.user_id = #{0}
+        order by ur.create_time asc
+    </select>
+    <select id="search" parameterType="hashmap" resultMap="UserRoleMap">
+        <![CDATA[
+			select * from sys_user_role
+		]]>
+        <where>
+            <if test="searchParams.id != null">
+                and ID_ like #{searchParams.id}
+            </if>
+        </where>
+        <foreach item="sort" collection="sortList" open="order by" separator=",">
+            ${sort.name} ${sort.order}
+        </foreach>
+    </select>
+</mapper>

+ 29 - 0
picc-common/.gitignore

@@ -0,0 +1,29 @@
+HELP.md
+/target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+/build/
+
+### VS Code ###
+.vscode/

+ 21 - 0
picc-common/pom.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>picc</artifactId>
+        <groupId>com.jpsoft</groupId>
+        <version>1.0.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>picc-common</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+            <version>LATEST</version>
+        </dependency>
+    </dependencies>
+</project>

+ 40 - 0
picc-common/src/main/java/com/jpsoft/picc/common/dto/MessageResult.java

@@ -0,0 +1,40 @@
+package com.jpsoft.picc.common.dto;
+
+public class MessageResult<T> {
+	private boolean result;
+	private String message;
+	private T data;
+	private int code = 200;
+
+	public boolean isResult() {
+		return result;
+	}
+
+	public void setResult(boolean result) {
+		this.result = result;
+	}
+
+	public String getMessage() {
+		return message;
+	}
+
+	public void setMessage(String message) {
+		this.message = message;
+	}
+
+	public T getData() {
+		return data;
+	}
+
+	public void setData(T data) {
+		this.data = data;
+	}
+
+	public int getCode() {
+		return code;
+	}
+
+	public void setCode(int code) {
+		this.code = code;
+	}
+}

+ 32 - 0
picc-common/src/main/java/com/jpsoft/picc/common/dto/Sort.java

@@ -0,0 +1,32 @@
+package com.jpsoft.picc.common.dto;
+
+import java.io.Serializable;
+
+public class Sort implements Serializable {
+    private String name;
+    private String order;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getOrder() {
+        return order;
+    }
+
+    public void setOrder(String order) {
+        this.order = order;
+    }
+
+    public Sort() {
+    }
+
+    public Sort(String name, String order) {
+        this.name = name;
+        this.order = order;
+    }
+}

+ 21 - 0
picc-common/src/main/java/com/jpsoft/picc/common/service/BaseService.java

@@ -0,0 +1,21 @@
+package com.jpsoft.picc.common.service;
+
+import com.github.pagehelper.Page;
+import com.jpsoft.picc.common.dto.Sort;
+
+import java.util.List;
+import java.util.Map;
+
+public interface BaseService<T> {
+    List<T> selectAll();
+
+    Page<T> pageList(int pageIndex, int pageSize, Map<String, Object> searchParams, List<Sort> orderList);
+
+    T get(String id);
+
+    int insert(T record);
+
+    int update(T record);
+
+    int delete(String id);
+}

+ 273 - 0
picc-common/src/main/java/com/jpsoft/picc/common/utils/Base64.java

@@ -0,0 +1,273 @@
+package com.jpsoft.picc.common.utils;
+
+public final class Base64 {
+
+    static private final int     BASELENGTH           = 128;
+    static private final int     LOOKUPLENGTH         = 64;
+    static private final int     TWENTYFOURBITGROUP   = 24;
+    static private final int     EIGHTBIT             = 8;
+    static private final int     SIXTEENBIT           = 16;
+    static private final int     FOURBYTE             = 4;
+    static private final int     SIGN                 = -128;
+    static private final char    PAD                  = '=';
+    static private final boolean fDebug               = false;
+    static final private byte[]  base64Alphabet       = new byte[BASELENGTH];
+    static final private char[]  lookUpBase64Alphabet = new char[LOOKUPLENGTH];
+
+    static {
+        for (int i = 0; i < BASELENGTH; ++i) {
+            base64Alphabet[i] = -1;
+        }
+        for (int i = 'Z'; i >= 'A'; i--) {
+            base64Alphabet[i] = (byte) (i - 'A');
+        }
+        for (int i = 'z'; i >= 'a'; i--) {
+            base64Alphabet[i] = (byte) (i - 'a' + 26);
+        }
+
+        for (int i = '9'; i >= '0'; i--) {
+            base64Alphabet[i] = (byte) (i - '0' + 52);
+        }
+
+        base64Alphabet['+'] = 62;
+        base64Alphabet['/'] = 63;
+
+        for (int i = 0; i <= 25; i++) {
+            lookUpBase64Alphabet[i] = (char) ('A' + i);
+        }
+
+        for (int i = 26, j = 0; i <= 51; i++, j++) {
+            lookUpBase64Alphabet[i] = (char) ('a' + j);
+        }
+
+        for (int i = 52, j = 0; i <= 61; i++, j++) {
+            lookUpBase64Alphabet[i] = (char) ('0' + j);
+        }
+        lookUpBase64Alphabet[62] = (char) '+';
+        lookUpBase64Alphabet[63] = (char) '/';
+
+    }
+
+    private static boolean isWhiteSpace(char octect) {
+        return (octect == 0x20 || octect == 0xd || octect == 0xa || octect == 0x9);
+    }
+
+    private static boolean isPad(char octect) {
+        return (octect == PAD);
+    }
+
+    private static boolean isData(char octect) {
+        return (octect < BASELENGTH && base64Alphabet[octect] != -1);
+    }
+
+    /**
+     * Encodes hex octects into Base64
+     *
+     * @param binaryData Array containing binaryData
+     * @return Encoded Base64 array
+     */
+    public static String encode(byte[] binaryData) {
+
+        if (binaryData == null) {
+            return null;
+        }
+
+        int lengthDataBits = binaryData.length * EIGHTBIT;
+        if (lengthDataBits == 0) {
+            return "";
+        }
+
+        int fewerThan24bits = lengthDataBits % TWENTYFOURBITGROUP;
+        int numberTriplets = lengthDataBits / TWENTYFOURBITGROUP;
+        int numberQuartet = fewerThan24bits != 0 ? numberTriplets + 1 : numberTriplets;
+        char encodedData[] = null;
+
+        encodedData = new char[numberQuartet * 4];
+
+        byte k = 0, l = 0, b1 = 0, b2 = 0, b3 = 0;
+
+        int encodedIndex = 0;
+        int dataIndex = 0;
+        if (fDebug) {
+            System.out.println("number of triplets = " + numberTriplets);
+        }
+
+        for (int i = 0; i < numberTriplets; i++) {
+            b1 = binaryData[dataIndex++];
+            b2 = binaryData[dataIndex++];
+            b3 = binaryData[dataIndex++];
+
+            if (fDebug) {
+                System.out.println("b1= " + b1 + ", b2= " + b2 + ", b3= " + b3);
+            }
+
+            l = (byte) (b2 & 0x0f);
+            k = (byte) (b1 & 0x03);
+
+            byte val1 = ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0);
+            byte val2 = ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0);
+            byte val3 = ((b3 & SIGN) == 0) ? (byte) (b3 >> 6) : (byte) ((b3) >> 6 ^ 0xfc);
+
+            if (fDebug) {
+                System.out.println("val2 = " + val2);
+                System.out.println("k4   = " + (k << 4));
+                System.out.println("vak  = " + (val2 | (k << 4)));
+            }
+
+            encodedData[encodedIndex++] = lookUpBase64Alphabet[val1];
+            encodedData[encodedIndex++] = lookUpBase64Alphabet[val2 | (k << 4)];
+            encodedData[encodedIndex++] = lookUpBase64Alphabet[(l << 2) | val3];
+            encodedData[encodedIndex++] = lookUpBase64Alphabet[b3 & 0x3f];
+        }
+
+        // form integral number of 6-bit groups
+        if (fewerThan24bits == EIGHTBIT) {
+            b1 = binaryData[dataIndex];
+            k = (byte) (b1 & 0x03);
+            if (fDebug) {
+                System.out.println("b1=" + b1);
+                System.out.println("b1<<2 = " + (b1 >> 2));
+            }
+            byte val1 = ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0);
+            encodedData[encodedIndex++] = lookUpBase64Alphabet[val1];
+            encodedData[encodedIndex++] = lookUpBase64Alphabet[k << 4];
+            encodedData[encodedIndex++] = PAD;
+            encodedData[encodedIndex++] = PAD;
+        } else if (fewerThan24bits == SIXTEENBIT) {
+            b1 = binaryData[dataIndex];
+            b2 = binaryData[dataIndex + 1];
+            l = (byte) (b2 & 0x0f);
+            k = (byte) (b1 & 0x03);
+
+            byte val1 = ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0);
+            byte val2 = ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0);
+
+            encodedData[encodedIndex++] = lookUpBase64Alphabet[val1];
+            encodedData[encodedIndex++] = lookUpBase64Alphabet[val2 | (k << 4)];
+            encodedData[encodedIndex++] = lookUpBase64Alphabet[l << 2];
+            encodedData[encodedIndex++] = PAD;
+        }
+
+        return new String(encodedData);
+    }
+
+    /**
+     * Decodes Base64 data into octects
+     *
+     * @param encoded string containing Base64 data
+     * @return Array containind decoded data.
+     */
+    public static byte[] decode(String encoded) {
+
+        if (encoded == null) {
+            return null;
+        }
+
+        char[] base64Data = encoded.toCharArray();
+        // remove white spaces
+        int len = removeWhiteSpace(base64Data);
+
+        if (len % FOURBYTE != 0) {
+            return null;//should be divisible by four
+        }
+
+        int numberQuadruple = (len / FOURBYTE);
+
+        if (numberQuadruple == 0) {
+            return new byte[0];
+        }
+
+        byte decodedData[] = null;
+        byte b1 = 0, b2 = 0, b3 = 0, b4 = 0;
+        char d1 = 0, d2 = 0, d3 = 0, d4 = 0;
+
+        int i = 0;
+        int encodedIndex = 0;
+        int dataIndex = 0;
+        decodedData = new byte[(numberQuadruple) * 3];
+
+        for (; i < numberQuadruple - 1; i++) {
+
+            if (!isData((d1 = base64Data[dataIndex++])) || !isData((d2 = base64Data[dataIndex++]))
+                    || !isData((d3 = base64Data[dataIndex++]))
+                    || !isData((d4 = base64Data[dataIndex++]))) {
+                return null;
+            }//if found "no data" just return null
+
+            b1 = base64Alphabet[d1];
+            b2 = base64Alphabet[d2];
+            b3 = base64Alphabet[d3];
+            b4 = base64Alphabet[d4];
+
+            decodedData[encodedIndex++] = (byte) (b1 << 2 | b2 >> 4);
+            decodedData[encodedIndex++] = (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf));
+            decodedData[encodedIndex++] = (byte) (b3 << 6 | b4);
+        }
+
+        if (!isData((d1 = base64Data[dataIndex++])) || !isData((d2 = base64Data[dataIndex++]))) {
+            return null;//if found "no data" just return null
+        }
+
+        b1 = base64Alphabet[d1];
+        b2 = base64Alphabet[d2];
+
+        d3 = base64Data[dataIndex++];
+        d4 = base64Data[dataIndex++];
+        if (!isData((d3)) || !isData((d4))) {//Check if they are PAD characters
+            if (isPad(d3) && isPad(d4)) {
+                if ((b2 & 0xf) != 0)//last 4 bits should be zero
+                {
+                    return null;
+                }
+                byte[] tmp = new byte[i * 3 + 1];
+                System.arraycopy(decodedData, 0, tmp, 0, i * 3);
+                tmp[encodedIndex] = (byte) (b1 << 2 | b2 >> 4);
+                return tmp;
+            } else if (!isPad(d3) && isPad(d4)) {
+                b3 = base64Alphabet[d3];
+                if ((b3 & 0x3) != 0)//last 2 bits should be zero
+                {
+                    return null;
+                }
+                byte[] tmp = new byte[i * 3 + 2];
+                System.arraycopy(decodedData, 0, tmp, 0, i * 3);
+                tmp[encodedIndex++] = (byte) (b1 << 2 | b2 >> 4);
+                tmp[encodedIndex] = (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf));
+                return tmp;
+            } else {
+                return null;
+            }
+        } else { //No PAD e.g 3cQl
+            b3 = base64Alphabet[d3];
+            b4 = base64Alphabet[d4];
+            decodedData[encodedIndex++] = (byte) (b1 << 2 | b2 >> 4);
+            decodedData[encodedIndex++] = (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf));
+            decodedData[encodedIndex++] = (byte) (b3 << 6 | b4);
+
+        }
+
+        return decodedData;
+    }
+
+    /**
+     * remove WhiteSpace from MIME containing encoded Base64 data.
+     *
+     * @param data  the byte array of base64 data (with WS)
+     * @return      the new length
+     */
+    private static int removeWhiteSpace(char[] data) {
+        if (data == null) {
+            return 0;
+        }
+
+        // count characters that's not whitespace
+        int newSize = 0;
+        int len = data.length;
+        for (int i = 0; i < len; i++) {
+            if (!isWhiteSpace(data[i])) {
+                data[newSize++] = data[i];
+            }
+        }
+        return newSize;
+    }
+}

+ 76 - 0
picc-common/src/main/java/com/jpsoft/picc/common/utils/DES3.java

@@ -0,0 +1,76 @@
+package com.jpsoft.picc.common.utils;
+
+import javax.crypto.Cipher;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.spec.DESedeKeySpec;
+import java.io.UnsupportedEncodingException;
+import java.security.Key;
+
+public class DES3 {
+	public String encrypt(byte[] key, byte[] data)  throws Exception {
+
+        Key deskey = null;
+        DESedeKeySpec spec = new DESedeKeySpec(key);
+        SecretKeyFactory keyfactory = SecretKeyFactory.getInstance("desede");
+        deskey = keyfactory.generateSecret(spec);
+        Cipher cipher = Cipher.getInstance("desede" + "/ECB/PKCS5Padding");
+        cipher.init(Cipher.ENCRYPT_MODE, deskey);
+        byte[] bOut = cipher.doFinal(data);
+
+        return Base64.encode(bOut);
+    }
+    
+    public String encrypt(String key, String data)  throws Exception {
+    	return encrypt(getKeyByte(key),data.getBytes("UTF-8"));
+    }
+
+    public String decrypt(byte[] key, byte[] data) throws Exception {
+        Key deskey = null;
+        DESedeKeySpec spec = new DESedeKeySpec(key);
+        SecretKeyFactory keyfactory = SecretKeyFactory.getInstance("desede");
+        deskey = keyfactory.generateSecret(spec);
+
+        Cipher cipher = Cipher.getInstance("desede" + "/ECB/PKCS5Padding");
+
+        cipher.init(Cipher.DECRYPT_MODE, deskey);
+
+        byte[] bOut = cipher.doFinal(data);
+
+        return new String(bOut, "UTF-8");
+    }
+    
+    public String decrypt(String key, String data)  throws Exception {
+    	return decrypt(getKeyByte(key), Base64.decode(data));
+    }
+
+    public byte[] getKeyByte(String key) throws UnsupportedEncodingException {
+        if (key == null) {
+            return new byte[0];
+        }
+
+        int length = key.length();
+        if (length >= 24) {
+            return key.substring(0, 24).getBytes("UTF-8");
+        } else {
+            for (int i = 0; i < (24 - length); i++) {
+                key += "0";
+            }
+            
+            return key.getBytes("UTF-8");
+        }
+    }
+    
+    public static void main(String[] args) {
+    	DES3 des3 = new DES3();
+		String appKey = "8ZZAHLlTMeNRCP6X";
+		
+		try {
+			System.out.println(des3.encrypt(appKey, "ac5c629f-068d-4b8d-8700-3c3d362337f0"));
+
+			System.out.println(des3.decrypt(appKey, "Xkb9FDXbmw8tEybl2ItjvomEK0QrL+pn6wt9yO7/vA7G9jIUiDhFLg=="));
+		} catch (Exception e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+}

+ 69 - 0
picc-common/src/main/java/com/jpsoft/picc/common/utils/PojoUtils.java

@@ -0,0 +1,69 @@
+package com.jpsoft.picc.common.utils;
+
+import com.github.dozermapper.core.DozerBeanMapperBuilder;
+import com.github.dozermapper.core.Mapper;
+import com.github.pagehelper.Page;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.beans.BeanInfo;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
+import java.util.HashMap;
+import java.util.Map;
+
+public class PojoUtils {
+    private static Logger logger = LoggerFactory.getLogger("root");
+    private static Mapper MAPPER = DozerBeanMapperBuilder.buildDefault();
+
+    public static <T> T map(Object source, Class<T> destinationClass) {
+        if (source == null) {
+            return null;
+        }
+        return MAPPER.map(source, destinationClass);
+    }
+
+    public static void map(Object source, Object destination) {
+        MAPPER.map(source, destination);
+    }
+
+    public static <T> Map<String, Object> pojo2map(T t) {
+        // TODO Auto-generated method stub
+        Map<String,Object> map = new HashMap<String,Object>();
+
+        try{
+            BeanInfo beanInfo  = Introspector.getBeanInfo(t.getClass());
+            PropertyDescriptor[] props = beanInfo.getPropertyDescriptors();
+
+            for (PropertyDescriptor pd : props) {
+                if (pd.getReadMethod()!=null) {
+                    try {
+                        Object srcValue = pd.getReadMethod().invoke(t);
+                        map.put(pd.getName(), srcValue);
+                    }
+                    catch (Exception ex){
+                        logger.error(ex.getMessage(),ex);
+                    }
+                }
+            }
+        }
+        catch(Exception ex){
+            ex.printStackTrace();
+        }
+
+        return map;
+    }
+
+    public static Map pageWrapper(Page page){
+        Map<String,Object> pageMap = new HashMap<>();
+
+        pageMap.put("recordsTotal",page.getTotal());
+        pageMap.put("recordsFiltered",page.getTotal());
+        pageMap.put("totalPage",page.getPages());
+        pageMap.put("pageNumber",page.getPageNum());
+        pageMap.put("pageSize",page.getPageSize());
+        pageMap.put("data", page.getResult());
+
+        return pageMap;
+    }
+}

+ 29 - 0
picc-enterperise-server/.gitignore

@@ -0,0 +1,29 @@
+HELP.md
+/target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+/build/
+
+### VS Code ###
+.vscode/

+ 20 - 0
picc-enterperise-server/pom.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>picc</artifactId>
+        <groupId>com.jpsoft</groupId>
+        <version>1.0.0</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>picc-enterperise-server</artifactId>
+    <description>PICC投保管理系统-企业端</description>
+    <dependencies>
+        <dependency>
+            <groupId>com.jpsoft</groupId>
+            <artifactId>picc-common</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+    </dependencies>
+</project>

+ 58 - 0
pom.xml

@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.jpsoft</groupId>
+    <artifactId>picc</artifactId>
+    <packaging>pom</packaging>
+    <version>1.0.0</version>
+
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.2.1.RELEASE</version>
+        <relativePath/> <!-- lookup parent from repository -->
+    </parent>
+
+    <modules>
+        <module>picc-admin-server</module>
+        <module>picc-common</module>
+        <module>picc-enterperise-server</module>
+    </modules>
+
+    <properties>
+        <java.version>1.8</java.version>
+        <lombok.version>1.16.12</lombok.version>
+        <hutool.version>5.0.6</hutool.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+            <scope>runtime</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>${hutool.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.dozermapper</groupId>
+            <artifactId>dozer-core</artifactId>
+            <version>6.4.1</version>
+        </dependency>
+    </dependencies>
+</project>