lidongze 3 лет назад
Сommit
c953c5cea3
100 измененных файлов с 6725 добавлено и 0 удалено
  1. 36 0
      .gitignore
  2. 114 0
      .mvn/wrapper/MavenWrapperDownloader.java
  3. BIN
      .mvn/wrapper/maven-wrapper.jar
  4. 1 0
      .mvn/wrapper/maven-wrapper.properties
  5. 431 0
      awesome_admin_v2.sql
  6. 7 0
      build.sh
  7. 16 0
      install-jar.sh
  8. BIN
      lib/mozjpeg4j-1.1.jar
  9. BIN
      lib/pngquant4j-1.0.jar
  10. BIN
      libs/org/libjpegturbo/mozjpeg4j/1.1/mozjpeg4j-1.1.jar
  11. 9 0
      libs/org/libjpegturbo/mozjpeg4j/1.1/mozjpeg4j-1.1.pom
  12. 12 0
      libs/org/libjpegturbo/mozjpeg4j/maven-metadata-local.xml
  13. BIN
      libs/org/pngquant/pngquant4j/1.0/pngquant4j-1.0.jar
  14. 9 0
      libs/org/pngquant/pngquant4j/1.0/pngquant4j-1.0.pom
  15. 12 0
      libs/org/pngquant/pngquant4j/maven-metadata-local.xml
  16. 286 0
      mvnw
  17. 161 0
      mvnw.cmd
  18. 298 0
      pom.xml
  19. 21 0
      src/main/java/com/izouma/zhirongip/Application.java
  20. 45 0
      src/main/java/com/izouma/zhirongip/annotations/EnumFormat.java
  21. 14 0
      src/main/java/com/izouma/zhirongip/annotations/OperLog.java
  22. 12 0
      src/main/java/com/izouma/zhirongip/annotations/Searchable.java
  23. 12 0
      src/main/java/com/izouma/zhirongip/annotations/SearchableOne.java
  24. 188 0
      src/main/java/com/izouma/zhirongip/aspect/OperLogAspect.java
  25. 17 0
      src/main/java/com/izouma/zhirongip/config/CacheConfig.java
  26. 17 0
      src/main/java/com/izouma/zhirongip/config/Constants.java
  27. 148 0
      src/main/java/com/izouma/zhirongip/config/DateConfig.java
  28. 36 0
      src/main/java/com/izouma/zhirongip/config/LocalDateTimeSerializerConfig.java
  29. 24 0
      src/main/java/com/izouma/zhirongip/config/SpringSecurityAuditorAware.java
  30. 76 0
      src/main/java/com/izouma/zhirongip/config/WebMvcConfig.java
  31. 30 0
      src/main/java/com/izouma/zhirongip/config/WxMaConfiguration.java
  32. 14 0
      src/main/java/com/izouma/zhirongip/config/WxMaProperties.java
  33. 74 0
      src/main/java/com/izouma/zhirongip/config/WxMpConfiguration.java
  34. 13 0
      src/main/java/com/izouma/zhirongip/config/WxMpProperties.java
  35. 47 0
      src/main/java/com/izouma/zhirongip/config/WxPayConfiguration.java
  36. 97 0
      src/main/java/com/izouma/zhirongip/config/WxPayProperties.java
  37. 24 0
      src/main/java/com/izouma/zhirongip/converter/FileObjectConverter.java
  38. 25 0
      src/main/java/com/izouma/zhirongip/converter/FileObjectListConverter.java
  39. 28 0
      src/main/java/com/izouma/zhirongip/converter/JSONObjectConverter.java
  40. 26 0
      src/main/java/com/izouma/zhirongip/converter/LongArrayConverter.java
  41. 25 0
      src/main/java/com/izouma/zhirongip/converter/NumOfIpListConverter.java
  42. 25 0
      src/main/java/com/izouma/zhirongip/converter/StringArrayConverter.java
  43. 24 0
      src/main/java/com/izouma/zhirongip/converter/StringToMapConverter.java
  44. 83 0
      src/main/java/com/izouma/zhirongip/domain/AuditedEntity.java
  45. 40 0
      src/main/java/com/izouma/zhirongip/domain/Banner.java
  46. 100 0
      src/main/java/com/izouma/zhirongip/domain/BaseEntity.java
  47. 49 0
      src/main/java/com/izouma/zhirongip/domain/District.java
  48. 71 0
      src/main/java/com/izouma/zhirongip/domain/ExceptionLog.java
  49. 10 0
      src/main/java/com/izouma/zhirongip/domain/FileObject.java
  50. 33 0
      src/main/java/com/izouma/zhirongip/domain/Information.java
  51. 60 0
      src/main/java/com/izouma/zhirongip/domain/Institution.java
  52. 71 0
      src/main/java/com/izouma/zhirongip/domain/Menu.java
  53. 73 0
      src/main/java/com/izouma/zhirongip/domain/Message.java
  54. 49 0
      src/main/java/com/izouma/zhirongip/domain/Navigation.java
  55. 63 0
      src/main/java/com/izouma/zhirongip/domain/OperationLog.java
  56. 29 0
      src/main/java/com/izouma/zhirongip/domain/Partner.java
  57. 42 0
      src/main/java/com/izouma/zhirongip/domain/Personal.java
  58. 35 0
      src/main/java/com/izouma/zhirongip/domain/ServiceDetail.java
  59. 35 0
      src/main/java/com/izouma/zhirongip/domain/Setting.java
  60. 32 0
      src/main/java/com/izouma/zhirongip/domain/SmsRecord.java
  61. 25 0
      src/main/java/com/izouma/zhirongip/domain/Statistic.java
  62. 57 0
      src/main/java/com/izouma/zhirongip/domain/SuperUser.java
  63. 41 0
      src/main/java/com/izouma/zhirongip/domain/SysConfig.java
  64. 17 0
      src/main/java/com/izouma/zhirongip/domain/TestClass.java
  65. 71 0
      src/main/java/com/izouma/zhirongip/domain/User.java
  66. 103 0
      src/main/java/com/izouma/zhirongip/domain/demand/CopyrightDemand.java
  67. 70 0
      src/main/java/com/izouma/zhirongip/domain/demand/Funding.java
  68. 89 0
      src/main/java/com/izouma/zhirongip/domain/demand/LogoDemand.java
  69. 110 0
      src/main/java/com/izouma/zhirongip/domain/demand/PatentDemand.java
  70. 103 0
      src/main/java/com/izouma/zhirongip/domain/demand/TechProductDemand.java
  71. 132 0
      src/main/java/com/izouma/zhirongip/domain/resource/Company.java
  72. 86 0
      src/main/java/com/izouma/zhirongip/domain/resource/Digital.java
  73. 117 0
      src/main/java/com/izouma/zhirongip/domain/resource/Expert.java
  74. 146 0
      src/main/java/com/izouma/zhirongip/domain/resource/IntellectualProperty.java
  75. 18 0
      src/main/java/com/izouma/zhirongip/domain/resource/NumOfIp.java
  76. 93 0
      src/main/java/com/izouma/zhirongip/domain/resource/PolicyLaw.java
  77. 89 0
      src/main/java/com/izouma/zhirongip/domain/resource/Purchase.java
  78. 104 0
      src/main/java/com/izouma/zhirongip/domain/resource/SuccessCase.java
  79. 125 0
      src/main/java/com/izouma/zhirongip/domain/supply/Copyright.java
  80. 124 0
      src/main/java/com/izouma/zhirongip/domain/supply/Logo.java
  81. 162 0
      src/main/java/com/izouma/zhirongip/domain/supply/Patent.java
  82. 80 0
      src/main/java/com/izouma/zhirongip/domain/supply/ServiceProvider.java
  83. 100 0
      src/main/java/com/izouma/zhirongip/domain/supply/TechnicalManager.java
  84. 140 0
      src/main/java/com/izouma/zhirongip/domain/supply/TechnologyProduct.java
  85. 11 0
      src/main/java/com/izouma/zhirongip/dto/Captcha.java
  86. 105 0
      src/main/java/com/izouma/zhirongip/dto/CompanyDTO.java
  87. 16 0
      src/main/java/com/izouma/zhirongip/dto/DemandDTO.java
  88. 63 0
      src/main/java/com/izouma/zhirongip/dto/ExpertDTO.java
  89. 89 0
      src/main/java/com/izouma/zhirongip/dto/InstitutionDTO.java
  90. 97 0
      src/main/java/com/izouma/zhirongip/dto/IntellectualPropertyDTO.java
  91. 23 0
      src/main/java/com/izouma/zhirongip/dto/MenuDTO.java
  92. 15 0
      src/main/java/com/izouma/zhirongip/dto/PageQuery.java
  93. 74 0
      src/main/java/com/izouma/zhirongip/dto/PersonalDTO.java
  94. 41 0
      src/main/java/com/izouma/zhirongip/dto/ProductDTO.java
  95. 16 0
      src/main/java/com/izouma/zhirongip/dto/SearchDTO.java
  96. 35 0
      src/main/java/com/izouma/zhirongip/dto/TechnologyDTO.java
  97. 37 0
      src/main/java/com/izouma/zhirongip/dto/UserRegister.java
  98. 354 0
      src/main/java/com/izouma/zhirongip/dto/gen/GenCode.java
  99. 55 0
      src/main/java/com/izouma/zhirongip/dto/gen/Subtable.java
  100. 163 0
      src/main/java/com/izouma/zhirongip/dto/gen/TableField.java

+ 36 - 0
.gitignore

@@ -0,0 +1,36 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**
+!**/src/test/**
+
+### 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/
+
+.DS_Store
+
+**/src/main/**/*.lock
+**/node_modules/**

+ 114 - 0
.mvn/wrapper/MavenWrapperDownloader.java

@@ -0,0 +1,114 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.nio.channels.Channels;
+import java.nio.channels.ReadableByteChannel;
+import java.util.Properties;
+
+public class MavenWrapperDownloader {
+
+    /**
+     * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
+     */
+    private static final String DEFAULT_DOWNLOAD_URL =
+            "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar";
+
+    /**
+     * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
+     * use instead of the default one.
+     */
+    private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
+            ".mvn/wrapper/maven-wrapper.properties";
+
+    /**
+     * Path where the maven-wrapper.jar will be saved to.
+     */
+    private static final String MAVEN_WRAPPER_JAR_PATH =
+            ".mvn/wrapper/maven-wrapper.jar";
+
+    /**
+     * Name of the property which should be used to override the default download url for the wrapper.
+     */
+    private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
+
+    public static void main(String args[]) {
+        System.out.println("- Downloader started");
+        File baseDirectory = new File(args[0]);
+        System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
+
+        // If the maven-wrapper.properties exists, read it and check if it contains a custom
+        // wrapperUrl parameter.
+        File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
+        String url = DEFAULT_DOWNLOAD_URL;
+        if (mavenWrapperPropertyFile.exists()) {
+            FileInputStream mavenWrapperPropertyFileInputStream = null;
+            try {
+                mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
+                Properties mavenWrapperProperties = new Properties();
+                mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
+                url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
+            } catch (IOException e) {
+                System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
+            } finally {
+                try {
+                    if (mavenWrapperPropertyFileInputStream != null) {
+                        mavenWrapperPropertyFileInputStream.close();
+                    }
+                } catch (IOException e) {
+                    // Ignore ...
+                }
+            }
+        }
+        System.out.println("- Downloading from: : " + url);
+
+        File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
+        if (!outputFile.getParentFile().exists()) {
+            if (!outputFile.getParentFile().mkdirs()) {
+                System.out.println(
+                        "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'");
+            }
+        }
+        System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
+        try {
+            downloadFileFromURL(url, outputFile);
+            System.out.println("Done");
+            System.exit(0);
+        } catch (Throwable e) {
+            System.out.println("- Error downloading");
+            e.printStackTrace();
+            System.exit(1);
+        }
+    }
+
+    private static void downloadFileFromURL(String urlString, File destination) throws Exception {
+        URL website = new URL(urlString);
+        ReadableByteChannel rbc;
+        rbc = Channels.newChannel(website.openStream());
+        FileOutputStream fos = new FileOutputStream(destination);
+        fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
+        fos.close();
+        rbc.close();
+    }
+
+}

BIN
.mvn/wrapper/maven-wrapper.jar


+ 1 - 0
.mvn/wrapper/maven-wrapper.properties

@@ -0,0 +1 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip

+ 431 - 0
awesome_admin_v2.sql

@@ -0,0 +1,431 @@
+/*
+ Navicat Premium Data Transfer
+
+ Source Server         : 微球
+ Source Server Type    : MySQL
+ Source Server Version : 50616
+ Source Host           : rdsave1o67m1ido6gwp6public.mysql.rds.aliyuncs.com:3306
+ Source Schema         : awesome_admin_v2
+
+ Target Server Type    : MySQL
+ Target Server Version : 50616
+ File Encoding         : 65001
+
+ Date: 07/08/2020 17:51:04
+*/
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- Table structure for authority
+-- ----------------------------
+DROP TABLE IF EXISTS `authority`;
+CREATE TABLE `authority` (
+  `name` varchar(50) NOT NULL,
+  `description` varchar(50) NOT NULL,
+  PRIMARY KEY (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of authority
+-- ----------------------------
+BEGIN;
+INSERT INTO `authority` VALUES ('ROLE_ADMIN', '管理员');
+INSERT INTO `authority` VALUES ('ROLE_DEV', '开发者');
+INSERT INTO `authority` VALUES ('ROLE_USER', '普通用户');
+COMMIT;
+
+-- ----------------------------
+-- Table structure for child
+-- ----------------------------
+DROP TABLE IF EXISTS `child`;
+CREATE TABLE `child` (
+  `id` bigint(20) NOT NULL,
+  `created_at` datetime DEFAULT NULL,
+  `created_by` varchar(255) DEFAULT NULL,
+  `modified_at` datetime DEFAULT NULL,
+  `modified_by` varchar(255) DEFAULT NULL,
+  `child_name` varchar(255) DEFAULT NULL,
+  `parent_id` bigint(20) DEFAULT NULL,
+  PRIMARY KEY (`id`),
+  KEY `FK7dag1cncltpyhoc2mbwka356h` (`parent_id`),
+  CONSTRAINT `FK7dag1cncltpyhoc2mbwka356h` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of child
+-- ----------------------------
+BEGIN;
+INSERT INTO `child` VALUES (3, '2019-12-25 11:17:02', 'system', '2019-12-25 11:17:02', 'system', '222', 2);
+INSERT INTO `child` VALUES (5, '2019-12-25 11:18:19', 'system', '2019-12-25 11:18:19', 'system', '222', 4);
+INSERT INTO `child` VALUES (7, '2019-12-25 14:50:50', 'system', '2019-12-25 14:50:50', 'system', '222', 6);
+COMMIT;
+
+-- ----------------------------
+-- Table structure for city
+-- ----------------------------
+DROP TABLE IF EXISTS `city`;
+CREATE TABLE `city` (
+  `id` bigint(20) NOT NULL,
+  `created_at` datetime DEFAULT NULL,
+  `created_by` varchar(255) DEFAULT NULL,
+  `modified_at` datetime DEFAULT NULL,
+  `modified_by` varchar(255) DEFAULT NULL,
+  `name` varchar(255) DEFAULT NULL,
+  `remark` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Table structure for district
+-- ----------------------------
+DROP TABLE IF EXISTS `district`;
+CREATE TABLE `district` (
+  `id` bigint(20) NOT NULL,
+  `created_at` datetime DEFAULT NULL,
+  `created_by` varchar(255) DEFAULT NULL,
+  `modified_at` datetime DEFAULT NULL,
+  `modified_by` varchar(255) DEFAULT NULL,
+  `full_name` varchar(255) DEFAULT NULL,
+  `lat` double NOT NULL,
+  `leaf` bit(1) NOT NULL,
+  `level` int(11) NOT NULL,
+  `lng` double NOT NULL,
+  `name` varchar(255) DEFAULT NULL,
+  `parent` bigint(20) DEFAULT NULL,
+  `pinyin` varchar(255) DEFAULT NULL,
+  `child_count` int(11) NOT NULL,
+  `city_code` varchar(10) DEFAULT NULL,
+  `city_count` int(11) NOT NULL,
+  `district_count` int(11) NOT NULL,
+  `street_count` int(11) NOT NULL,
+  `del` bit(1) NOT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Table structure for guid_package
+-- ----------------------------
+DROP TABLE IF EXISTS `guid_package`;
+CREATE TABLE `guid_package` (
+  `id` bigint(20) NOT NULL,
+  `created_at` datetime DEFAULT NULL,
+  `created_by` varchar(255) DEFAULT NULL,
+  `modified_at` datetime DEFAULT NULL,
+  `modified_by` varchar(255) DEFAULT NULL,
+  `name` varchar(255) DEFAULT NULL,
+  `price` decimal(10,2) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Table structure for guide
+-- ----------------------------
+DROP TABLE IF EXISTS `guide`;
+CREATE TABLE `guide` (
+  `id` bigint(20) NOT NULL,
+  `created_at` datetime DEFAULT NULL,
+  `created_by` varchar(255) DEFAULT NULL,
+  `modified_at` datetime DEFAULT NULL,
+  `modified_by` varchar(255) DEFAULT NULL,
+  `pic` varchar(255) DEFAULT NULL,
+  `sort` int(11) NOT NULL,
+  `text` text,
+  `type` varchar(255) DEFAULT NULL,
+  `video` varchar(255) DEFAULT NULL,
+  `voice` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Table structure for hibernate_sequence
+-- ----------------------------
+DROP TABLE IF EXISTS `hibernate_sequence`;
+CREATE TABLE `hibernate_sequence` (
+  `next_val` bigint(20) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of hibernate_sequence
+-- ----------------------------
+BEGIN;
+INSERT INTO `hibernate_sequence` VALUES (15);
+INSERT INTO `hibernate_sequence` VALUES (15);
+INSERT INTO `hibernate_sequence` VALUES (15);
+COMMIT;
+
+-- ----------------------------
+-- Table structure for menu
+-- ----------------------------
+DROP TABLE IF EXISTS `menu`;
+CREATE TABLE `menu` (
+  `id` bigint(20) NOT NULL,
+  `created_at` datetime DEFAULT NULL,
+  `created_by` varchar(255) DEFAULT NULL,
+  `modified_at` datetime DEFAULT NULL,
+  `modified_by` varchar(255) DEFAULT NULL,
+  `active` bit(1) DEFAULT NULL,
+  `enabled` bit(1) DEFAULT NULL,
+  `icon` varchar(255) DEFAULT NULL,
+  `name` varchar(255) DEFAULT NULL,
+  `parent` bigint(20) DEFAULT NULL,
+  `path` varchar(255) DEFAULT NULL,
+  `root` bit(1) DEFAULT NULL,
+  `sort` int(11) DEFAULT NULL,
+  `category` varchar(255) DEFAULT NULL,
+  `del` bit(1) NOT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of menu
+-- ----------------------------
+BEGIN;
+INSERT INTO `menu` VALUES (3, NULL, NULL, '2020-07-31 14:31:40', '管理员(1)', b'1', b'1', 'fas fa-desktop', '开发', 2, '', b'1', 4, '开发', b'0');
+INSERT INTO `menu` VALUES (4, NULL, NULL, '2020-07-31 14:31:51', '管理员(1)', b'1', b'1', 'fas fa-code', '代码生成', 3, '/genCodeList', b'0', 5, '开发', b'0');
+INSERT INTO `menu` VALUES (5, NULL, NULL, '2020-07-31 14:31:56', '管理员(1)', b'1', b'1', 'fas fa-bug', '接口调试', 3, '/api', b'0', 6, '开发', b'0');
+INSERT INTO `menu` VALUES (6, NULL, NULL, '2020-07-09 15:01:05', '管理员(1)', b'1', b'1', 'fas fa-user', '用户管理', 2, '/userList', b'1', 2, '用户', b'0');
+INSERT INTO `menu` VALUES (8, '2020-07-09 15:01:40', NULL, '2020-07-09 15:01:45', '管理员(1)', b'1', b'1', '', '菜单权限', 9, '/menuAuthority', b'0', 8, NULL, b'0');
+INSERT INTO `menu` VALUES (9, NULL, NULL, '2020-07-09 15:01:10', '管理员(1)', b'1', b'1', 'fas fa-cog', '配置', 2, '', b'1', 3, '系统', b'0');
+INSERT INTO `menu` VALUES (10, NULL, NULL, '2020-07-29 16:54:21', '管理员(1)', b'1', b'1', '', '菜单配置', 9, '/menus', b'0', 7, '系统', b'0');
+INSERT INTO `menu` VALUES (14, NULL, NULL, '2020-07-09 15:01:45', '管理员(1)', b'1', b'1', '', '参数配置', 9, '/sysConfigList', b'0', 9, '系统', b'0');
+COMMIT;
+
+-- ----------------------------
+-- Table structure for menu_authority
+-- ----------------------------
+DROP TABLE IF EXISTS `menu_authority`;
+CREATE TABLE `menu_authority` (
+  `menu_id` bigint(20) NOT NULL,
+  `authority` varchar(50) NOT NULL,
+  PRIMARY KEY (`menu_id`,`authority`),
+  KEY `FKlj7sftrck7uk1kcjsy0doo56` (`authority`),
+  CONSTRAINT `FK4hopjqfvkhdagmk110y1jk17q` FOREIGN KEY (`menu_id`) REFERENCES `menu` (`id`),
+  CONSTRAINT `FKlj7sftrck7uk1kcjsy0doo56` FOREIGN KEY (`authority`) REFERENCES `authority` (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of menu_authority
+-- ----------------------------
+BEGIN;
+INSERT INTO `menu_authority` VALUES (6, 'ROLE_ADMIN');
+INSERT INTO `menu_authority` VALUES (8, 'ROLE_ADMIN');
+INSERT INTO `menu_authority` VALUES (9, 'ROLE_ADMIN');
+INSERT INTO `menu_authority` VALUES (10, 'ROLE_ADMIN');
+INSERT INTO `menu_authority` VALUES (14, 'ROLE_ADMIN');
+INSERT INTO `menu_authority` VALUES (3, 'ROLE_DEV');
+INSERT INTO `menu_authority` VALUES (4, 'ROLE_DEV');
+INSERT INTO `menu_authority` VALUES (5, 'ROLE_DEV');
+COMMIT;
+
+-- ----------------------------
+-- Table structure for parent
+-- ----------------------------
+DROP TABLE IF EXISTS `parent`;
+CREATE TABLE `parent` (
+  `id` bigint(20) NOT NULL,
+  `created_at` datetime DEFAULT NULL,
+  `created_by` varchar(255) DEFAULT NULL,
+  `modified_at` datetime DEFAULT NULL,
+  `modified_by` varchar(255) DEFAULT NULL,
+  `parent_name` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of parent
+-- ----------------------------
+BEGIN;
+INSERT INTO `parent` VALUES (2, '2019-12-25 11:17:02', 'system', '2019-12-25 11:17:02', 'system', '111');
+INSERT INTO `parent` VALUES (4, '2019-12-25 11:18:19', 'system', '2019-12-25 11:18:19', 'system', '111');
+INSERT INTO `parent` VALUES (6, '2019-12-25 14:50:49', 'system', '2019-12-25 14:50:49', 'system', '111');
+COMMIT;
+
+-- ----------------------------
+-- Table structure for scenic
+-- ----------------------------
+DROP TABLE IF EXISTS `scenic`;
+CREATE TABLE `scenic` (
+  `id` bigint(20) NOT NULL,
+  `created_at` datetime DEFAULT NULL,
+  `created_by` varchar(255) DEFAULT NULL,
+  `modified_at` datetime DEFAULT NULL,
+  `modified_by` varchar(255) DEFAULT NULL,
+  `city_id` bigint(20) DEFAULT NULL,
+  `name` varchar(255) DEFAULT NULL,
+  `pic` varchar(255) DEFAULT NULL,
+  `remark` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Table structure for scenic_spot
+-- ----------------------------
+DROP TABLE IF EXISTS `scenic_spot`;
+CREATE TABLE `scenic_spot` (
+  `id` bigint(20) NOT NULL,
+  `created_at` datetime DEFAULT NULL,
+  `created_by` varchar(255) DEFAULT NULL,
+  `modified_at` datetime DEFAULT NULL,
+  `modified_by` varchar(255) DEFAULT NULL,
+  `city_id` bigint(20) DEFAULT NULL,
+  `name` varchar(255) DEFAULT NULL,
+  `pic` varchar(255) DEFAULT NULL,
+  `remark` varchar(255) DEFAULT NULL,
+  `scenic_id` bigint(20) DEFAULT NULL,
+  `x` int(11) NOT NULL,
+  `y` int(11) NOT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Table structure for sms_record
+-- ----------------------------
+DROP TABLE IF EXISTS `sms_record`;
+CREATE TABLE `sms_record` (
+  `id` bigint(20) NOT NULL,
+  `created_at` datetime DEFAULT NULL,
+  `created_by` varchar(255) DEFAULT NULL,
+  `modified_at` datetime DEFAULT NULL,
+  `modified_by` varchar(255) DEFAULT NULL,
+  `code` varchar(255) DEFAULT NULL,
+  `expired` bit(1) DEFAULT NULL,
+  `expires_at` datetime DEFAULT NULL,
+  `phone` varchar(255) DEFAULT NULL,
+  `scope` varchar(255) DEFAULT NULL,
+  `session_id` varchar(255) DEFAULT NULL,
+  `del` bit(1) NOT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Table structure for spot
+-- ----------------------------
+DROP TABLE IF EXISTS `spot`;
+CREATE TABLE `spot` (
+  `user_id` bigint(20) NOT NULL,
+  `authority_name` varchar(50) NOT NULL,
+  PRIMARY KEY (`user_id`,`authority_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Table structure for spot_guid
+-- ----------------------------
+DROP TABLE IF EXISTS `spot_guid`;
+CREATE TABLE `spot_guid` (
+  `spot_id` bigint(20) NOT NULL,
+  `guid_id` bigint(20) NOT NULL,
+  PRIMARY KEY (`spot_id`,`guid_id`),
+  KEY `FKbftxye4brw7vfq05d7rv0mtca` (`guid_id`),
+  CONSTRAINT `FK5xnrr1sk76u0xy3j15p6r96q9` FOREIGN KEY (`spot_id`) REFERENCES `scenic_spot` (`id`),
+  CONSTRAINT `FKbftxye4brw7vfq05d7rv0mtca` FOREIGN KEY (`guid_id`) REFERENCES `guide` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Table structure for super_user
+-- ----------------------------
+DROP TABLE IF EXISTS `super_user`;
+CREATE TABLE `super_user` (
+  `id` bigint(20) NOT NULL,
+  `created_at` datetime DEFAULT NULL,
+  `created_by` varchar(255) DEFAULT NULL,
+  `modified_at` datetime DEFAULT NULL,
+  `modified_by` varchar(255) DEFAULT NULL,
+  `avatar` varchar(255) DEFAULT NULL,
+  `enabled` bit(1) NOT NULL,
+  `nickname` varchar(255) DEFAULT NULL,
+  `password` varchar(255) DEFAULT NULL,
+  `phone` varchar(255) DEFAULT NULL,
+  `username` varchar(50) NOT NULL,
+  `del` bit(1) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `UK_jfokkpxg19r117eil158ooo9d` (`username`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Table structure for super_user_authority
+-- ----------------------------
+DROP TABLE IF EXISTS `super_user_authority`;
+CREATE TABLE `super_user_authority` (
+  `user_id` bigint(20) NOT NULL,
+  `authority_name` varchar(50) NOT NULL,
+  PRIMARY KEY (`user_id`,`authority_name`),
+  KEY `FKxjxyodse6n0n00ewvoq8xv8` (`authority_name`),
+  CONSTRAINT `FK7p0vq0b1vy9f0sqvgrdqw1q70` FOREIGN KEY (`user_id`) REFERENCES `super_user` (`id`),
+  CONSTRAINT `FKxjxyodse6n0n00ewvoq8xv8` FOREIGN KEY (`authority_name`) REFERENCES `authority` (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Table structure for sys_config
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_config`;
+CREATE TABLE `sys_config` (
+  `name` varchar(25) NOT NULL,
+  `created_at` datetime DEFAULT NULL,
+  `created_by` varchar(255) DEFAULT NULL,
+  `modified_at` datetime DEFAULT NULL,
+  `modified_by` varchar(255) DEFAULT NULL,
+  `description` varchar(255) DEFAULT NULL,
+  `type` varchar(255) DEFAULT NULL,
+  `value` varchar(255) DEFAULT NULL,
+  `del` bit(1) NOT NULL,
+  PRIMARY KEY (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Table structure for user
+-- ----------------------------
+DROP TABLE IF EXISTS `user`;
+CREATE TABLE `user` (
+  `id` bigint(20) NOT NULL,
+  `created_at` datetime DEFAULT NULL,
+  `created_by` varchar(255) DEFAULT NULL,
+  `modified_at` datetime DEFAULT NULL,
+  `modified_by` varchar(255) DEFAULT NULL,
+  `avatar` varchar(255) DEFAULT NULL,
+  `city` varchar(255) DEFAULT NULL,
+  `country` varchar(255) DEFAULT NULL,
+  `email` varchar(255) DEFAULT NULL,
+  `language` varchar(255) DEFAULT NULL,
+  `nickname` varchar(255) DEFAULT NULL,
+  `open_id` varchar(255) DEFAULT NULL,
+  `password` varchar(255) DEFAULT NULL,
+  `phone` varchar(255) DEFAULT NULL,
+  `province` varchar(255) DEFAULT NULL,
+  `sex` varchar(255) DEFAULT NULL,
+  `username` varchar(50) NOT NULL,
+  `del` bit(1) NOT NULL,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `UK_sb8bbouer5wak8vyiiy4pf2bx` (`username`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of user
+-- ----------------------------
+BEGIN;
+INSERT INTO `user` VALUES (1, '2020-03-07 18:34:36', NULL, '2020-07-31 14:32:10', '管理员(1)', 'https://zhumj.oss-cn-hangzhou.aliyuncs.com/image/user.jpg', NULL, NULL, NULL, NULL, '管理员', NULL, '$2a$10$ztJSpmth7fPgDK0I5stwnO59e5ht2copnDL8lyt2xif6lXBzk/ZdO', NULL, NULL, NULL, 'root', b'0');
+COMMIT;
+
+-- ----------------------------
+-- Table structure for user_authority
+-- ----------------------------
+DROP TABLE IF EXISTS `user_authority`;
+CREATE TABLE `user_authority` (
+  `user_id` bigint(20) NOT NULL,
+  `authority_name` varchar(50) NOT NULL,
+  PRIMARY KEY (`user_id`,`authority_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+
+-- ----------------------------
+-- Records of user_authority
+-- ----------------------------
+BEGIN;
+INSERT INTO `user_authority` VALUES (1, 'ROLE_ADMIN');
+INSERT INTO `user_authority` VALUES (1, 'ROLE_DEV');
+INSERT INTO `user_authority` VALUES (1, 'ROLE_USER');
+INSERT INTO `user_authority` VALUES (11, 'ROLE_USER');
+INSERT INTO `user_authority` VALUES (14, 'ROLE_ADMIN');
+COMMIT;
+
+SET FOREIGN_KEY_CHECKS = 1;

+ 7 - 0
build.sh

@@ -0,0 +1,7 @@
+git checkout
+git pull
+#(cd src/main/vue && npm run build)
+mvn clean package
+systemctl stop zmj
+cp target/zhumj-0.0.1-SNAPSHOT.jar /var/www/zmj/zhumj-0.0.1-SNAPSHOT.jar
+systemctl start zmj

+ 16 - 0
install-jar.sh

@@ -0,0 +1,16 @@
+
+mvn org.apache.maven.plugins:maven-install-plugin:2.5.1:install-file \
+-DgroupId=org.libjpegturbo \
+-DartifactId=mozjpeg4j \
+-Dpackaging=jar \
+-Dversion=1.1 \
+-Dfile=lib/mozjpeg4j-1.1.jar \
+-DlocalRepositoryPath=libs
+
+mvn org.apache.maven.plugins:maven-install-plugin:2.5.1:install-file \
+-DgroupId=org.pngquant \
+-DartifactId=pngquant4j \
+-Dpackaging=jar \
+-Dversion=1.0 \
+-Dfile=lib/pngquant4j-1.0.jar \
+-DlocalRepositoryPath=libs

BIN
lib/mozjpeg4j-1.1.jar


BIN
lib/pngquant4j-1.0.jar


BIN
libs/org/libjpegturbo/mozjpeg4j/1.1/mozjpeg4j-1.1.jar


+ 9 - 0
libs/org/libjpegturbo/mozjpeg4j/1.1/mozjpeg4j-1.1.pom

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.libjpegturbo</groupId>
+  <artifactId>mozjpeg4j</artifactId>
+  <version>1.1</version>
+  <description>POM was created from install:install-file</description>
+</project>

+ 12 - 0
libs/org/libjpegturbo/mozjpeg4j/maven-metadata-local.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+  <groupId>org.libjpegturbo</groupId>
+  <artifactId>mozjpeg4j</artifactId>
+  <versioning>
+    <release>1.1</release>
+    <versions>
+      <version>1.1</version>
+    </versions>
+    <lastUpdated>20210319095742</lastUpdated>
+  </versioning>
+</metadata>

BIN
libs/org/pngquant/pngquant4j/1.0/pngquant4j-1.0.jar


+ 9 - 0
libs/org/pngquant/pngquant4j/1.0/pngquant4j-1.0.pom

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.pngquant</groupId>
+  <artifactId>pngquant4j</artifactId>
+  <version>1.0</version>
+  <description>POM was created from install:install-file</description>
+</project>

+ 12 - 0
libs/org/pngquant/pngquant4j/maven-metadata-local.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+  <groupId>org.pngquant</groupId>
+  <artifactId>pngquant4j</artifactId>
+  <versioning>
+    <release>1.0</release>
+    <versions>
+      <version>1.0</version>
+    </versions>
+    <lastUpdated>20210319095744</lastUpdated>
+  </versioning>
+</metadata>

+ 286 - 0
mvnw

@@ -0,0 +1,286 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven2 Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+#   JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+#   M2_HOME - location of maven2's installed home dir
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
+#     e.g. to debug Maven itself, use
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+  if [ -f /etc/mavenrc ] ; then
+    . /etc/mavenrc
+  fi
+
+  if [ -f "$HOME/.mavenrc" ] ; then
+    . "$HOME/.mavenrc"
+  fi
+
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+    if [ -z "$JAVA_HOME" ]; then
+      if [ -x "/usr/libexec/java_home" ]; then
+        export JAVA_HOME="`/usr/libexec/java_home`"
+      else
+        export JAVA_HOME="/Library/Java/Home"
+      fi
+    fi
+    ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=`java-config --jre-home`
+  fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+  ## resolve links - $0 may be a link to maven's home
+  PRG="$0"
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      PRG="$link"
+    else
+      PRG="`dirname "$PRG"`/$link"
+    fi
+  done
+
+  saveddir=`pwd`
+
+  M2_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  M2_HOME=`cd "$M2_HOME" && pwd`
+
+  cd "$saveddir"
+  # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+  # TODO classpath?
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+  javaExecutable="`which javac`"
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+    # readlink(1) is not available as standard on Solaris 10.
+    readLink=`which readlink`
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+      if $darwin ; then
+        javaHome="`dirname \"$javaExecutable\"`"
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+      else
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
+      fi
+      javaHome="`dirname \"$javaExecutable\"`"
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+      JAVA_HOME="$javaHome"
+      export JAVA_HOME
+    fi
+  fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD="`which java`"
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly." >&2
+  echo "  We cannot execute $JAVACMD" >&2
+  exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+  echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+  if [ -z "$1" ]
+  then
+    echo "Path not specified to find_maven_basedir"
+    return 1
+  fi
+
+  basedir="$1"
+  wdir="$1"
+  while [ "$wdir" != '/' ] ; do
+    if [ -d "$wdir"/.mvn ] ; then
+      basedir=$wdir
+      break
+    fi
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+    if [ -d "${wdir}" ]; then
+      wdir=`cd "$wdir/.."; pwd`
+    fi
+    # end of workaround
+  done
+  echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+  if [ -f "$1" ]; then
+    echo "$(tr -s '\n' ' ' < "$1")"
+  fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+  exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Found .mvn/wrapper/maven-wrapper.jar"
+    fi
+else
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+    fi
+    jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
+    while IFS="=" read key value; do
+      case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+      esac
+    done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Downloading from: $jarUrl"
+    fi
+    wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+
+    if command -v wget > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found wget ... using wget"
+        fi
+        wget "$jarUrl" -O "$wrapperJarPath"
+    elif command -v curl > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found curl ... using curl"
+        fi
+        curl -o "$wrapperJarPath" "$jarUrl"
+    else
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Falling back to using Java to download"
+        fi
+        javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+        if [ -e "$javaClass" ]; then
+            if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Compiling MavenWrapperDownloader.java ..."
+                fi
+                # Compiling the Java class
+                ("$JAVA_HOME/bin/javac" "$javaClass")
+            fi
+            if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                # Running the downloader
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Running MavenWrapperDownloader.java ..."
+                fi
+                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+            fi
+        fi
+    fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+  $MAVEN_OPTS \
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 161 - 0
mvnw.cmd

@@ -0,0 +1,161 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements.  See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership.  The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License.  You may obtain a copy of the License at
+@REM
+@REM    https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied.  See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven2 Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM     e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
+FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO (
+	IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B 
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+    echo Found %WRAPPER_JAR%
+) else (
+    echo Couldn't find %WRAPPER_JAR%, downloading it ...
+	echo Downloading from: %DOWNLOAD_URL%
+    powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"
+    echo Finished downloading %WRAPPER_JAR%
+)
+@REM End of extension
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%

+ 298 - 0
pom.xml

@@ -0,0 +1,298 @@
+<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.3.2.RELEASE</version>
+        <relativePath/> <!-- lookup parent from repository -->
+    </parent>
+    <groupId>com.izouma</groupId>
+    <artifactId>zhirongip</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <name>zhirong-ip</name>
+    <description>zhirong-ip</description>
+
+    <repositories>
+        <repository>
+            <id>nexus-aliyun</id>
+            <url>https://maven.aliyun.com/repository/central</url>
+        </repository>
+        <repository>
+            <id>Local repository</id>
+            <url>file://${basedir}/libs</url>
+        </repository>
+        <repository>
+            <id>jitpack.io</id>
+            <url>https://jitpack.io</url>
+        </repository>
+    </repositories>
+
+    <properties>
+        <java.version>1.8</java.version>
+        <skipTests>true</skipTests>
+        <poi.verion>3.17</poi.verion>
+        <javawx.version>3.5.0</javawx.version>
+        <aliyun.oss.version>2.8.3</aliyun.oss.version>
+        <aliyun.core.version>4.1.0</aliyun.core.version>
+    </properties>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.security</groupId>
+            <artifactId>spring-security-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-jpa</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-security</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-cache</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-aop</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.ben-manes.caffeine</groupId>
+            <artifactId>caffeine</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-envers</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-configuration-processor</artifactId>
+            <optional>true</optional>
+        </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-pool2</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-beanutils</groupId>
+            <artifactId>commons-beanutils</artifactId>
+            <version>1.9.4</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-text</artifactId>
+            <version>1.3</version>
+        </dependency>
+
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt</artifactId>
+            <version>0.9.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.code.findbugs</groupId>
+            <artifactId>annotations</artifactId>
+            <version>3.0.1</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.binarywang</groupId>
+            <artifactId>weixin-java-mp</artifactId>
+            <version>${javawx.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.binarywang</groupId>
+            <artifactId>weixin-java-miniapp</artifactId>
+            <version>${javawx.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.binarywang</groupId>
+            <artifactId>weixin-java-pay</artifactId>
+            <version>${javawx.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.binarywang</groupId>
+            <artifactId>weixin-java-open</artifactId>
+            <version>${javawx.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.aliyun.oss</groupId>
+            <artifactId>aliyun-sdk-oss</artifactId>
+            <version>${aliyun.oss.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-core</artifactId>
+            <version>${aliyun.core.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.kevinsawicki</groupId>
+            <artifactId>http-request</artifactId>
+            <version>6.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi</artifactId>
+            <version>${poi.verion}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml</artifactId>
+            <version>${poi.verion}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>cglib</groupId>
+            <artifactId>cglib</artifactId>
+            <version>3.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel</artifactId>
+            <version>2.2.6</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.reflections</groupId>
+            <artifactId>reflections</artifactId>
+            <version>0.9.11</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity</artifactId>
+            <version>1.7</version>
+        </dependency>
+
+
+        <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity-tools</artifactId>
+            <version>2.0</version>
+        </dependency>
+
+        <!-- https://mvnrepository.com/artifact/com.belerweb/pinyin4j -->
+        <dependency>
+            <groupId>com.belerweb</groupId>
+            <artifactId>pinyin4j</artifactId>
+            <version>2.5.1</version>
+        </dependency>
+        <!-- swagger -->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>2.9.1</version>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>2.9.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-freemarker</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.37</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.ning</groupId>
+            <artifactId>async-http-client</artifactId>
+            <version>1.9.32</version>
+        </dependency>
+        <!-- 钉钉 -->
+
+        <dependency>
+            <groupId>com.github.whvcse</groupId>
+            <artifactId>easy-captcha</artifactId>
+            <version>1.6.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.libjpegturbo</groupId>
+            <artifactId>mozjpeg4j</artifactId>
+            <version>1.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.pngquant</groupId>
+            <artifactId>pngquant4j</artifactId>
+            <version>1.0</version>
+        </dependency>
+
+        <!-- hutool -->
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>5.3.8</version>
+        </dependency>
+    </dependencies>
+
+</project>

+ 21 - 0
src/main/java/com/izouma/zhirongip/Application.java

@@ -0,0 +1,21 @@
+package com.izouma.zhirongip;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+@SpringBootApplication
+@EnableJpaAuditing
+@EnableSwagger2
+@EnableCaching
+@EnableScheduling
+public class Application {
+
+    public static void main(String[] args) {
+        SpringApplication.run(Application.class, args);
+    }
+
+}

+ 45 - 0
src/main/java/com/izouma/zhirongip/annotations/EnumFormat.java

@@ -0,0 +1,45 @@
+package com.izouma.zhirongip.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <pre>
+ * '@EnumFormat 注解 :
+ *  作用 : 用于自定义excel单元格中的内容,转换成对应的枚举值
+ *  属性 :
+ *      value : 要转换的枚举类型
+ *      fromExcel : 指定excel中用户输入的枚举值,可以与toJavaEnum中指定的枚举值一一对应
+ *                  例如 : excel 单元格中输入
+ *                         '待支付' -> OrderStatusEnum.UNPAY
+ *                         '已支付' -> OrderStatusEnum.PAYED
+ *      toJavaEnum : 如上所述
+ *  注意 : toJavaEnum 与 fromExcel 必须搭配使用
+ * </pre>
+ */
+@Target({ElementType.FIELD})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface EnumFormat {
+    /**
+     * 要转换的枚举类型
+     *
+     * @return enum class
+     */
+    Class value();
+
+    /**
+     * 要转换枚举的全部变量名数组集
+     *
+     * @return String[]
+     */
+    String[] toJavaEnum() default {};
+
+    /**
+     * 枚举导出excel时所展示的内容
+     *
+     * @return String[]
+     */
+    String[] fromExcel() default {};
+}

+ 14 - 0
src/main/java/com/izouma/zhirongip/annotations/OperLog.java

@@ -0,0 +1,14 @@
+package com.izouma.zhirongip.annotations;
+
+import java.lang.annotation.*;
+
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface OperLog {
+    String value() default "";
+
+    String type() default "";
+
+    String desc() default "";
+}

+ 12 - 0
src/main/java/com/izouma/zhirongip/annotations/Searchable.java

@@ -0,0 +1,12 @@
+package com.izouma.zhirongip.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Searchable {
+    boolean value() default true;
+}

+ 12 - 0
src/main/java/com/izouma/zhirongip/annotations/SearchableOne.java

@@ -0,0 +1,12 @@
+package com.izouma.zhirongip.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface SearchableOne {
+    boolean value() default true;
+}

+ 188 - 0
src/main/java/com/izouma/zhirongip/aspect/OperLogAspect.java

@@ -0,0 +1,188 @@
+package com.izouma.zhirongip.aspect;
+
+import com.alibaba.fastjson.JSON;
+import com.izouma.zhirongip.annotations.OperLog;
+import com.izouma.zhirongip.domain.ExceptionLog;
+import com.izouma.zhirongip.domain.OperationLog;
+import com.izouma.zhirongip.domain.User;
+import com.izouma.zhirongip.repo.ExceptionLogRepo;
+import com.izouma.zhirongip.repo.OperationLogRepo;
+import com.izouma.zhirongip.utils.IPUtils;
+import com.izouma.zhirongip.utils.SecurityUtils;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.annotation.AfterReturning;
+import org.aspectj.lang.annotation.AfterThrowing;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.context.request.RequestAttributes;
+import org.springframework.web.context.request.RequestContextHolder;
+
+import javax.servlet.http.HttpServletRequest;
+import java.lang.reflect.Method;
+import java.time.LocalDateTime;
+import java.util.HashMap;
+import java.util.Map;
+
+@Aspect
+@Component
+public class OperLogAspect {
+
+    @Autowired
+    private OperationLogRepo operationLogRepo;
+
+    @Autowired
+    private ExceptionLogRepo exceptionLogRepo;
+
+    /**
+     * 设置操作日志切入点 记录操作日志 在注解的位置切入代码
+     */
+    @Pointcut("@annotation(com.izouma.zhirongip.annotations.OperLog)")
+    public void operLogPointCut() {
+    }
+
+    /**
+     * 设置操作异常切入点记录异常日志 扫描所有controller包下操作
+     */
+    @Pointcut("execution(* com.izouma.zhirongip.web..*.*(..))")
+    public void operExceptionLogPointCut() {
+    }
+
+    /**
+     * 正常返回通知,拦截用户操作日志,连接点正常执行完成后执行, 如果连接点抛出异常,则不会执行
+     *
+     * @param joinPoint 切入点
+     * @param keys      返回结果
+     */
+    @AfterReturning(value = "operLogPointCut()", returning = "keys")
+    public void saveOperLog(JoinPoint joinPoint, Object keys) {
+        // 获取RequestAttributes
+        RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
+        // 从获取RequestAttributes中获取HttpServletRequest的信息
+        HttpServletRequest request = (HttpServletRequest) requestAttributes
+                .resolveReference(RequestAttributes.REFERENCE_REQUEST);
+
+        OperationLog operationLog = new OperationLog();
+        try {
+            // 从切面织入点处通过反射机制获取织入点处的方法
+            MethodSignature signature = (MethodSignature) joinPoint.getSignature();
+            // 获取切入点所在的方法
+            Method method = signature.getMethod();
+            // 获取操作
+            OperLog operLog = method.getAnnotation(OperLog.class);
+            if (operLog != null) {
+                operationLog.setName(operLog.value()); // 操作模块
+                operationLog.setType(operLog.type()); // 操作类型
+                operationLog.setDesc(operLog.desc()); // 操作描述
+            }
+            // 获取请求的类名
+            String className = joinPoint.getTarget().getClass().getName();
+            // 获取请求的方法名
+            String methodName = method.getName();
+            methodName = className + "." + methodName;
+
+            operationLog.setReqMethod(methodName);
+
+            // 请求的参数
+            Map<String, String> rtnMap = null;
+            String params = null;
+            if (request != null) {
+                rtnMap = convertMap(request.getParameterMap());
+                params = JSON.toJSONString(rtnMap);
+            }
+
+            operationLog.setReqParams(params);
+            operationLog.setResp(JSON.toJSONString(keys));
+
+            User user = SecurityUtils.getAuthenticatedUser();
+            if (user != null) {
+                operationLog.setUserId(String.valueOf(user.getId()));
+                operationLog.setUsername(user.getUsername());
+            }
+            operationLog.setReqIp(IPUtils.getIpAddr(request));
+            operationLog.setReqUrl(request != null ? request.getRequestURI() : null);
+            operationLog.setTime(LocalDateTime.now());
+            operationLogRepo.save(operationLog);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 异常返回通知,用于拦截异常日志信息 连接点抛出异常后执行
+     *
+     * @param joinPoint 切入点
+     * @param e         异常信息
+     */
+    @AfterThrowing(pointcut = "operExceptionLogPointCut()", throwing = "e")
+    public void saveExceptionLog(JoinPoint joinPoint, Throwable e) {
+        // 获取RequestAttributes
+        RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
+        // 从获取RequestAttributes中获取HttpServletRequest的信息
+        HttpServletRequest request = (HttpServletRequest) requestAttributes
+                .resolveReference(RequestAttributes.REFERENCE_REQUEST);
+
+        ExceptionLog exceptionLog = new ExceptionLog();
+        try {
+            MethodSignature signature = (MethodSignature) joinPoint.getSignature();
+            Method method = signature.getMethod();
+            String className = joinPoint.getTarget().getClass().getName();
+            String methodName = method.getName();
+            methodName = className + "." + methodName;
+            exceptionLog.setReqMethod(methodName);
+
+            Map<String, String> rtnMap = convertMap(request.getParameterMap());
+            String params = JSON.toJSONString(rtnMap);
+            exceptionLog.setReqParams(params);
+
+            exceptionLog.setName(e.getClass().getName());
+            exceptionLog.setMessage(stackTraceToString(e.getClass().getName(), e.getMessage(), e
+                    .getStackTrace()));
+            User user = SecurityUtils.getAuthenticatedUser();
+            if (user != null) {
+                exceptionLog.setUserId(String.valueOf(user.getId()));
+                exceptionLog.setUsername(user.getUsername());
+            }
+
+            exceptionLog.setReqUrl(request.getRequestURI());
+            exceptionLog.setReqIp(IPUtils.getIpAddr(request));
+            exceptionLog.setTime(LocalDateTime.now());
+
+            exceptionLogRepo.save(exceptionLog);
+
+        } catch (Exception e2) {
+            e2.printStackTrace();
+        }
+
+    }
+
+    /**
+     * 转换request 请求参数
+     *
+     * @param paramMap request获取的参数数组
+     */
+    public Map<String, String> convertMap(Map<String, String[]> paramMap) {
+        Map<String, String> rtnMap = new HashMap<>();
+        for (String key : paramMap.keySet()) {
+            rtnMap.put(key, paramMap.get(key)[0]);
+        }
+        return rtnMap;
+    }
+
+    /**
+     * 转换异常信息为字符串
+     *
+     * @param exceptionName    异常名称
+     * @param exceptionMessage 异常信息
+     * @param elements         堆栈信息
+     */
+    public String stackTraceToString(String exceptionName, String exceptionMessage, StackTraceElement[] elements) {
+        StringBuilder strBuff = new StringBuilder();
+        for (StackTraceElement stet : elements) {
+            strBuff.append(stet).append("\n");
+        }
+        return exceptionName + ":" + exceptionMessage + "\n\t" + strBuff;
+    }
+}

+ 17 - 0
src/main/java/com/izouma/zhirongip/config/CacheConfig.java

@@ -0,0 +1,17 @@
+package com.izouma.zhirongip.config;
+
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.cache.support.SimpleCacheManager;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@EnableCaching
+@Configuration
+public class CacheConfig {
+    @Bean
+    public CacheManager cacheManager() {
+        SimpleCacheManager manager = new SimpleCacheManager();
+        return manager;
+    }
+}

+ 17 - 0
src/main/java/com/izouma/zhirongip/config/Constants.java

@@ -0,0 +1,17 @@
+package com.izouma.zhirongip.config;
+
+public interface Constants {
+
+    public interface Regex {
+        String PHONE    = "^1[3-9]\\d{9}$";
+        String USERNAME = "^[_.@A-Za-z0-9-]*$";
+        String CHINESE  = "^[\\u4e00-\\u9fa5]+$";
+        String ID_NO    = "^[1-9]\\d{7}((0\\d)|(1[0-2]))(([0-2]\\d)|3[0-1])\\d{3}$|^[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0-2]\\d)|3[0-1])\\d{3}[0-9xX]$";
+    }
+
+    String DEFAULT_AVATAR = "https://zhumj.oss-cn-hangzhou.aliyuncs.com/image/user.jpg";
+
+    String SMS_SIGN_NAME = "走马信息";
+
+    String SMS_TEMPLATE_CODE_GENERIC = "SMS_175485688";
+}

+ 148 - 0
src/main/java/com/izouma/zhirongip/config/DateConfig.java

@@ -0,0 +1,148 @@
+package com.izouma.zhirongip.config;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.*;
+import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
+import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
+import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
+import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer;
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.convert.converter.Converter;
+
+import java.io.IOException;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.format.DateTimeFormatter;
+import java.util.Date;
+
+@Configuration
+public class DateConfig {
+
+    /**
+     * 默认日期时间格式
+     */
+    public static final String DEFAULT_DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
+    /**
+     * 默认日期格式
+     */
+    public static final String DEFAULT_DATE_FORMAT      = "yyyy-MM-dd";
+    /**
+     * 默认时间格式
+     */
+    public static final String DEFAULT_TIME_FORMAT      = "HH:mm:ss";
+
+    /**
+     * LocalDate转换器,用于转换RequestParam和PathVariable参数
+     */
+    @Bean
+    public Converter<String, LocalDate> localDateConverter() {
+        return new Converter<String, LocalDate>() {
+            @Override
+            public LocalDate convert(String source) {
+                return LocalDate.parse(source, DateTimeFormatter.ofPattern(DEFAULT_DATE_FORMAT));
+            }
+        };
+    }
+
+    /**
+     * LocalDateTime转换器,用于转换RequestParam和PathVariable参数
+     */
+    @Bean
+    public Converter<String, LocalDateTime> localDateTimeConverter() {
+        return new Converter<String, LocalDateTime>() {
+            @Override
+            public LocalDateTime convert(String source) {
+                return LocalDateTime.parse(source, DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMAT));
+            }
+        };
+    }
+
+    /**
+     * LocalTime转换器,用于转换RequestParam和PathVariable参数
+     */
+    @Bean
+    public Converter<String, LocalTime> localTimeConverter() {
+        return new Converter<String, LocalTime>() {
+            @Override
+            public LocalTime convert(String source) {
+                return LocalTime.parse(source, DateTimeFormatter.ofPattern(DEFAULT_TIME_FORMAT));
+            }
+        };
+    }
+
+    /**
+     * Date转换器,用于转换RequestParam和PathVariable参数
+     */
+    @Bean
+    public Converter<String, Date> dateConverter() {
+        return new Converter<String, Date>() {
+            @Override
+            public Date convert(String source) {
+                SimpleDateFormat format = new SimpleDateFormat(DEFAULT_DATE_TIME_FORMAT);
+                try {
+                    return format.parse(source);
+                } catch (ParseException e) {
+                    throw new RuntimeException(e);
+                }
+            }
+        };
+    }
+
+
+    /**
+     * Json序列化和反序列化转换器,用于转换Post请求体中的json以及将我们的对象序列化为返回响应的json
+     */
+    @Bean
+    public ObjectMapper objectMapper() {
+        ObjectMapper objectMapper = new ObjectMapper();
+        objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
+        objectMapper.disable(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE);
+
+        //LocalDateTime系列序列化和反序列化模块,继承自jsr310,我们在这里修改了日期格式
+        JavaTimeModule javaTimeModule = new JavaTimeModule();
+        javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMAT)));
+        javaTimeModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_FORMAT)));
+        javaTimeModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern(DEFAULT_TIME_FORMAT)));
+        javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMAT)));
+        javaTimeModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_FORMAT)));
+        javaTimeModule.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern(DEFAULT_TIME_FORMAT)));
+
+
+        //Date序列化和反序列化
+        javaTimeModule.addSerializer(Date.class, new JsonSerializer<Date>() {
+            @Override
+            public void serialize(Date date, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
+                SimpleDateFormat formatter = new SimpleDateFormat(DEFAULT_DATE_TIME_FORMAT);
+                String formattedDate = formatter.format(date);
+                jsonGenerator.writeString(formattedDate);
+            }
+        });
+        javaTimeModule.addDeserializer(Date.class, new JsonDeserializer<Date>() {
+            @Override
+            public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
+                SimpleDateFormat format = new SimpleDateFormat(DEFAULT_DATE_TIME_FORMAT);
+                String date = jsonParser.getText();
+                try {
+                    return format.parse(date);
+                } catch (ParseException e) {
+                    throw new RuntimeException(e);
+                }
+            }
+        });
+
+        objectMapper.registerModule(javaTimeModule);
+        return objectMapper;
+    }
+
+
+}
+

+ 36 - 0
src/main/java/com/izouma/zhirongip/config/LocalDateTimeSerializerConfig.java

@@ -0,0 +1,36 @@
+package com.izouma.zhirongip.config;
+
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
+@Configuration
+public class LocalDateTimeSerializerConfig {
+    @Value("${spring.jackson.date-format:yyyy-MM-dd HH:mm:ss}")
+    private String pattern;
+
+    @Bean
+    public LocalDateTimeSerializer localDateTimeDeserializer() {
+        return new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
+    }
+
+    @Bean
+    public LocalDateSerializer localDateSerializer() {
+        return new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
+    }
+
+    @Bean
+    public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
+        return builder -> {
+            builder.serializerByType(LocalDateTime.class, localDateTimeDeserializer());
+            builder.serializerByType(LocalDate.class, localDateSerializer());
+        };
+    }
+}

+ 24 - 0
src/main/java/com/izouma/zhirongip/config/SpringSecurityAuditorAware.java

@@ -0,0 +1,24 @@
+package com.izouma.zhirongip.config;
+
+import com.izouma.zhirongip.domain.User;
+import com.izouma.zhirongip.utils.SecurityUtils;
+import org.springframework.data.domain.AuditorAware;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Nonnull;
+import java.util.Optional;
+
+@Component
+public class SpringSecurityAuditorAware implements AuditorAware<String> {
+
+    @Override
+    @Nonnull
+    public Optional<String> getCurrentAuditor() {
+        String auditor = "system";
+        User user = SecurityUtils.getAuthenticatedUser();
+        if (user != null) {
+            auditor = user.getNickname() + "(" + user.getId() + ")";
+        }
+        return Optional.of(auditor);
+    }
+}

+ 76 - 0
src/main/java/com/izouma/zhirongip/config/WebMvcConfig.java

@@ -0,0 +1,76 @@
+package com.izouma.zhirongip.config;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+
+@Configuration
+public class WebMvcConfig implements WebMvcConfigurer {
+    @Value("${storage.local_path}")
+    private String localPath;
+
+    @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/");
+        registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
+        registry.addResourceHandler("/admin/**").addResourceLocations("classpath:/static/admin/");
+        registry.addResourceHandler("/files/**").addResourceLocations("file:" + localPath);
+        registry.addResourceHandler("/MP_verify*").addResourceLocations("classpath:/");
+    }
+
+    @Bean
+    public Docket createApi() {
+        return new Docket(DocumentationType.SWAGGER_2)
+                .apiInfo(new ApiInfoBuilder()
+                                 .title("接口文档")
+                                 .version("1.0.0")
+                                 .termsOfServiceUrl("#")
+                                 .description("接口文档")
+                                 .build())
+                .select()
+                .apis(RequestHandlerSelectors.basePackage("com.izouma.zhirongip.web"))
+                .paths(PathSelectors.any())
+                .build();
+    }
+
+    // @Bean
+    // public MappingJackson2HttpMessageConverter getMappingJackson2HttpMessageConverter() {
+    //     MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter = new MappingJackson2HttpMessageConverter();
+    //     //设置日期格式
+    //     ObjectMapper objectMapper = new ObjectMapper();
+    //     objectMapper.setDateFormat(CustomDateFormat.instance);
+    //     objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+    //     mappingJackson2HttpMessageConverter.setObjectMapper(objectMapper);
+    //     //设置中文编码格式
+    //     List<MediaType> list = new ArrayList<>();
+    //     list.add(MediaType.APPLICATION_JSON_UTF8);
+    //     mappingJackson2HttpMessageConverter.setSupportedMediaTypes(list);
+    //     return mappingJackson2HttpMessageConverter;
+    // }
+
+//    @Override
+//    public void addFormatters(FormatterRegistry registry) {
+//        DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
+//        registrar.setUseIsoFormat(true);
+//        registrar.registerFormatters(registry);
+//    }
+
+    @Override
+    public void addCorsMappings(CorsRegistry registry) {
+        registry.addMapping("/**")
+                .allowedHeaders("*")
+                .allowCredentials(true)
+                .allowedMethods("HEAD", "GET", "PUT", "POST", "DELETE", "PATCH")
+                .exposedHeaders("Content-Disposition");
+    }
+
+}

+ 30 - 0
src/main/java/com/izouma/zhirongip/config/WxMaConfiguration.java

@@ -0,0 +1,30 @@
+package com.izouma.zhirongip.config;
+
+import cn.binarywang.wx.miniapp.api.WxMaService;
+import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
+import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl;
+import lombok.AllArgsConstructor;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@AllArgsConstructor
+@Configuration
+@EnableConfigurationProperties(WxMaProperties.class)
+public class WxMaConfiguration {
+    private final WxMaProperties properties;
+
+    @Bean
+    public WxMaService wxMaService() {
+        WxMaService service = new WxMaServiceImpl();
+        WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl();
+        config.setAppid(properties.getAppId());
+        config.setSecret(properties.getAppSecret());
+        config.setToken(properties.getMsgToken());
+        config.setAesKey(properties.getMsgAesKey());
+        config.setMsgDataFormat(properties.getMsgFormat());
+        service.setWxMaConfig(config);
+        return service;
+    }
+
+}

+ 14 - 0
src/main/java/com/izouma/zhirongip/config/WxMaProperties.java

@@ -0,0 +1,14 @@
+package com.izouma.zhirongip.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@Data
+@ConfigurationProperties(prefix = "wx.ma")
+public class WxMaProperties {
+    private String appId;
+    private String appSecret;
+    private String msgToken;
+    private String msgAesKey;
+    private String msgFormat;
+}

+ 74 - 0
src/main/java/com/izouma/zhirongip/config/WxMpConfiguration.java

@@ -0,0 +1,74 @@
+package com.izouma.zhirongip.config;
+
+import com.izouma.zhirongip.mpHandler.LogHandler;
+import lombok.AllArgsConstructor;
+import me.chanjar.weixin.mp.api.WxMpMessageRouter;
+import me.chanjar.weixin.mp.api.WxMpService;
+import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
+import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@AllArgsConstructor
+@Configuration
+@EnableConfigurationProperties(WxMpProperties.class)
+public class WxMpConfiguration {
+    private final WxMpProperties properties;
+    private final LogHandler     logHandler;
+
+    @Bean
+    public WxMpService wxMpService() {
+        WxMpDefaultConfigImpl mpConfig = new WxMpDefaultConfigImpl();
+        mpConfig.setAppId(properties.getAppId());
+        mpConfig.setSecret(properties.getAppSecret());
+        mpConfig.setAccessToken(properties.getToken());
+        mpConfig.setAesKey(properties.getAesKey());
+        WxMpService service = new WxMpServiceImpl();
+        service.setWxMpConfigStorage(mpConfig);
+        return service;
+    }
+
+    @Bean
+    public WxMpMessageRouter messageRouter(WxMpService wxMpService) {
+        final WxMpMessageRouter newRouter = new WxMpMessageRouter(wxMpService);
+
+        // 记录所有事件的日志 (异步执行)
+        newRouter.rule().handler(this.logHandler).next();
+
+        /*// 接收客服会话管理事件
+        newRouter.rule().async(false).msgType(EVENT).event(KF_CREATE_SESSION).handler(this.kfSessionHandler).end();
+        newRouter.rule().async(false).msgType(EVENT).event(KF_CLOSE_SESSION).handler(this.kfSessionHandler).end();
+        newRouter.rule().async(false).msgType(EVENT).event(KF_SWITCH_SESSION).handler(this.kfSessionHandler).end();
+
+        // 门店审核事件
+        newRouter.rule().async(false).msgType(EVENT).event(POI_CHECK_NOTIFY).handler(this.storeCheckNotifyHandler).end();
+
+        // 自定义菜单事件
+        newRouter.rule().async(false).msgType(EVENT).event(WxConsts.EventType.CLICK).handler(this.menuHandler).end();
+
+        // 点击菜单连接事件
+        newRouter.rule().async(false).msgType(EVENT).event(WxConsts.EventType.VIEW).handler(this.nullHandler).end();
+
+        // 关注事件
+        newRouter.rule().async(false).msgType(EVENT).event(SUBSCRIBE).handler(this.subscribeHandler).end();
+
+        // 取消关注事件
+        newRouter.rule().async(false).msgType(EVENT).event(UNSUBSCRIBE).handler(this.unsubscribeHandler).end();
+
+        // 上报地理位置事件
+        newRouter.rule().async(false).msgType(EVENT).event(WxConsts.EventType.LOCATION).handler(this.locationHandler).end();
+
+        // 接收地理位置消息
+        newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.LOCATION).handler(this.locationHandler).end();
+
+        // 扫码事件
+        newRouter.rule().async(false).msgType(EVENT).event(WxConsts.EventType.SCAN).handler(this.scanHandler).end();
+
+        // 默认
+        newRouter.rule().async(false).handler(this.msgHandler).end();*/
+
+        return newRouter;
+    }
+
+}

+ 13 - 0
src/main/java/com/izouma/zhirongip/config/WxMpProperties.java

@@ -0,0 +1,13 @@
+package com.izouma.zhirongip.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@Data
+@ConfigurationProperties(prefix = "wx.mp")
+public class WxMpProperties {
+    private String appId;
+    private String appSecret;
+    private String token;
+    private String aesKey;
+}

+ 47 - 0
src/main/java/com/izouma/zhirongip/config/WxPayConfiguration.java

@@ -0,0 +1,47 @@
+package com.izouma.zhirongip.config;
+
+import com.github.binarywang.wxpay.config.WxPayConfig;
+import com.github.binarywang.wxpay.service.WxPayService;
+import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author Binary Wang
+ */
+@Configuration
+@ConditionalOnClass(WxPayService.class)
+@EnableConfigurationProperties(WxPayProperties.class)
+public class WxPayConfiguration {
+    private WxPayProperties properties;
+
+    @Autowired
+    public WxPayConfiguration(WxPayProperties properties) {
+        this.properties = properties;
+    }
+
+    @Bean
+    @ConditionalOnMissingBean
+    public WxPayService wxService() {
+        WxPayConfig payConfig = new WxPayConfig();
+        payConfig.setAppId(StringUtils.trimToNull(this.properties.getAppId()));
+        payConfig.setMchId(StringUtils.trimToNull(this.properties.getMchId()));
+        payConfig.setMchKey(StringUtils.trimToNull(this.properties.getMchKey()));
+        payConfig.setSubAppId(StringUtils.trimToNull(this.properties.getSubAppId()));
+        payConfig.setSubMchId(StringUtils.trimToNull(this.properties.getSubMchId()));
+        payConfig.setKeyPath(StringUtils.trimToNull(this.properties.getKeyPath()));
+
+        // 可以指定是否使用沙箱环境
+        payConfig.setUseSandboxEnv(false);
+
+        WxPayService wxPayService = new WxPayServiceImpl();
+        wxPayService.setConfig(payConfig);
+        return wxPayService;
+    }
+
+}

+ 97 - 0
src/main/java/com/izouma/zhirongip/config/WxPayProperties.java

@@ -0,0 +1,97 @@
+package com.izouma.zhirongip.config;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * wxpay pay properties
+ *
+ * @author Binary Wang
+ */
+@ConfigurationProperties(prefix = "wx.pay")
+public class WxPayProperties {
+  /**
+   * 设置微信公众号或者小程序等的appid
+   */
+  private String appId;
+
+  /**
+   * 微信支付商户号
+   */
+  private String mchId;
+
+  /**
+   * 微信支付商户密钥
+   */
+  private String mchKey;
+
+  /**
+   * 服务商模式下的子商户公众账号ID,普通模式请不要配置,请在配置文件中将对应项删除
+   */
+  private String subAppId;
+
+  /**
+   * 服务商模式下的子商户号,普通模式请不要配置,最好是请在配置文件中将对应项删除
+   */
+  private String subMchId;
+
+  /**
+   * apiclient_cert.p12文件的绝对路径,或者如果放在项目中,请以classpath:开头指定
+   */
+  private String keyPath;
+
+  public String getAppId() {
+    return this.appId;
+  }
+
+  public void setAppId(String appId) {
+    this.appId = appId;
+  }
+
+  public String getMchId() {
+    return mchId;
+  }
+
+  public void setMchId(String mchId) {
+    this.mchId = mchId;
+  }
+
+  public String getMchKey() {
+    return mchKey;
+  }
+
+  public void setMchKey(String mchKey) {
+    this.mchKey = mchKey;
+  }
+
+  public String getSubAppId() {
+    return subAppId;
+  }
+
+  public void setSubAppId(String subAppId) {
+    this.subAppId = subAppId;
+  }
+
+  public String getSubMchId() {
+    return subMchId;
+  }
+
+  public void setSubMchId(String subMchId) {
+    this.subMchId = subMchId;
+  }
+
+  public String getKeyPath() {
+    return this.keyPath;
+  }
+
+  public void setKeyPath(String keyPath) {
+    this.keyPath = keyPath;
+  }
+
+  @Override
+  public String toString() {
+    return ToStringBuilder.reflectionToString(this,
+        ToStringStyle.MULTI_LINE_STYLE);
+  }
+}

+ 24 - 0
src/main/java/com/izouma/zhirongip/converter/FileObjectConverter.java

@@ -0,0 +1,24 @@
+package com.izouma.zhirongip.converter;
+
+import com.alibaba.fastjson.JSON;
+import com.izouma.zhirongip.domain.FileObject;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.persistence.AttributeConverter;
+
+public class FileObjectConverter implements AttributeConverter<FileObject, String> {
+    @Override
+    public String convertToDatabaseColumn(FileObject fileObject) {
+        if (fileObject != null  )
+            return JSON.toJSONString(fileObject);
+        return null;
+    }
+
+    @Override
+    public FileObject convertToEntityAttribute(String s) {
+        if (StringUtils.isNotEmpty(s)) {
+            return JSON.parseObject(s, FileObject.class);
+        }
+        return null;
+    }
+}

+ 25 - 0
src/main/java/com/izouma/zhirongip/converter/FileObjectListConverter.java

@@ -0,0 +1,25 @@
+package com.izouma.zhirongip.converter;
+
+import com.alibaba.fastjson.JSON;
+import com.izouma.zhirongip.domain.FileObject;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.persistence.AttributeConverter;
+import java.util.List;
+
+public class FileObjectListConverter implements AttributeConverter<List<FileObject>, String> {
+    @Override
+    public String convertToDatabaseColumn(List<FileObject> list) {
+        if (list != null)
+            return JSON.toJSONString(list);
+        return null;
+    }
+
+    @Override
+    public List<FileObject> convertToEntityAttribute(String s) {
+        if (StringUtils.isNotEmpty(s)) {
+            return JSON.parseArray(s, FileObject.class);
+        }
+        return null;
+    }
+}

+ 28 - 0
src/main/java/com/izouma/zhirongip/converter/JSONObjectConverter.java

@@ -0,0 +1,28 @@
+package com.izouma.zhirongip.converter;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import lombok.extern.slf4j.Slf4j;
+
+import javax.persistence.AttributeConverter;
+
+@Slf4j
+public class JSONObjectConverter implements AttributeConverter<JSONObject, String> {
+    @Override
+    public String convertToDatabaseColumn(JSONObject jsonObject) {
+        if (jsonObject != null) {
+            return jsonObject.toJSONString();
+        }
+        return null;
+    }
+
+    @Override
+    public JSONObject convertToEntityAttribute(String s) {
+        try {
+            return JSON.parseObject(s);
+        } catch (Exception e) {
+            log.error("parse json error", e);
+        }
+        return null;
+    }
+}

+ 26 - 0
src/main/java/com/izouma/zhirongip/converter/LongArrayConverter.java

@@ -0,0 +1,26 @@
+package com.izouma.zhirongip.converter;
+
+import org.apache.commons.lang3.StringUtils;
+
+import javax.persistence.AttributeConverter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class LongArrayConverter implements AttributeConverter<List<Long>, String> {
+    @Override
+    public String convertToDatabaseColumn(List<Long> longs) {
+        if (longs != null && !longs.isEmpty())
+            return StringUtils.join(longs, ",");
+        return null;
+    }
+
+    @Override
+    public List<Long> convertToEntityAttribute(String s) {
+        if (StringUtils.isNotEmpty(s)) {
+            return Arrays.stream(s.split(",")).map(Long::parseLong).collect(Collectors.toList());
+        }
+        return new ArrayList<>();
+    }
+}

+ 25 - 0
src/main/java/com/izouma/zhirongip/converter/NumOfIpListConverter.java

@@ -0,0 +1,25 @@
+package com.izouma.zhirongip.converter;
+
+import com.alibaba.fastjson.JSONObject;
+import com.izouma.zhirongip.domain.resource.NumOfIp;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.persistence.AttributeConverter;
+import java.util.List;
+
+public class NumOfIpListConverter implements AttributeConverter<List<NumOfIp>, String> {
+    @Override
+    public String convertToDatabaseColumn(List<NumOfIp> list) {
+        if (list != null)
+            return JSONObject.toJSONString(list);
+        return null;
+    }
+
+    @Override
+    public List<NumOfIp> convertToEntityAttribute(String s) {
+        if (StringUtils.isNotEmpty(s)) {
+            return JSONObject.parseArray(s, NumOfIp.class);
+        }
+        return null;
+    }
+}

+ 25 - 0
src/main/java/com/izouma/zhirongip/converter/StringArrayConverter.java

@@ -0,0 +1,25 @@
+package com.izouma.zhirongip.converter;
+
+import org.apache.commons.lang3.StringUtils;
+
+import javax.persistence.AttributeConverter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class StringArrayConverter implements AttributeConverter<List<String>, String> {
+    @Override
+    public String convertToDatabaseColumn(List<String> strings) {
+        if (strings != null && !strings.isEmpty())
+            return StringUtils.join(strings, ",");
+        return null;
+    }
+
+    @Override
+    public List<String> convertToEntityAttribute(String s) {
+        if (StringUtils.isNotEmpty(s)) {
+            return Arrays.asList(s.split(","));
+        }
+        return new ArrayList<>();
+    }
+}

+ 24 - 0
src/main/java/com/izouma/zhirongip/converter/StringToMapConverter.java

@@ -0,0 +1,24 @@
+package com.izouma.zhirongip.converter;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.core.convert.converter.Converter;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Nullable;
+import java.io.IOException;
+import java.util.Map;
+
+@Component
+public class StringToMapConverter implements Converter<String, Map<String, Object>> {
+
+    @Override
+    public Map<String, Object> convert(@Nullable String source) {
+        try {
+            return new ObjectMapper().readValue(source, new TypeReference<Map<String, Object>>() {
+            });
+        } catch (IOException e) {
+            throw new RuntimeException(e.getMessage());
+        }
+    }
+}

+ 83 - 0
src/main/java/com/izouma/zhirongip/domain/AuditedEntity.java

@@ -0,0 +1,83 @@
+package com.izouma.zhirongip.domain;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.hibernate.envers.Audited;
+import org.springframework.data.annotation.CreatedBy;
+import org.springframework.data.annotation.CreatedDate;
+import org.springframework.data.annotation.LastModifiedBy;
+import org.springframework.data.annotation.LastModifiedDate;
+import org.springframework.data.jpa.domain.support.AuditingEntityListener;
+
+import javax.persistence.EntityListeners;
+import javax.persistence.MappedSuperclass;
+import java.time.LocalDateTime;
+
+@MappedSuperclass
+@Audited
+@EntityListeners(AuditingEntityListener.class)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public abstract class AuditedEntity {
+
+    @JsonIgnore
+    @CreatedBy
+    private String createdBy;
+
+    @JsonIgnore
+    @CreatedDate
+    private LocalDateTime createdAt;
+
+    @JsonIgnore
+    @LastModifiedBy
+    private String modifiedBy;
+
+    @JsonIgnore
+    @LastModifiedDate
+    private LocalDateTime modifiedAt;
+
+    private boolean del;
+
+    public String getCreatedBy() {
+        return createdBy;
+    }
+
+    public void setCreatedBy(String createdBy) {
+        this.createdBy = createdBy;
+    }
+
+    @JsonProperty("createdAt")
+    public LocalDateTime getCreatedAt() {
+        return createdAt;
+    }
+
+    public void setCreatedAt(LocalDateTime createdAt) {
+        this.createdAt = createdAt;
+    }
+
+    public String getModifiedBy() {
+        return modifiedBy;
+    }
+
+    public void setModifiedBy(String modifiedBy) {
+        this.modifiedBy = modifiedBy;
+    }
+
+    public LocalDateTime getModifiedAt() {
+        return modifiedAt;
+    }
+
+    public void setModifiedAt(LocalDateTime modifiedAt) {
+        this.modifiedAt = modifiedAt;
+    }
+
+    public boolean isDel() {
+        return del;
+    }
+
+    public void setDel(boolean del) {
+        this.del = del;
+    }
+}

+ 40 - 0
src/main/java/com/izouma/zhirongip/domain/Banner.java

@@ -0,0 +1,40 @@
+package com.izouma.zhirongip.domain;
+
+import com.izouma.zhirongip.enums.NavType;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.NotFound;
+import org.hibernate.annotations.NotFoundAction;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "banner")
+@Where(clause = "del = 0")
+public class Banner extends BaseEntity {
+    @ApiModelProperty(value = "图片")
+    private String img;
+
+    @ApiModelProperty(value = "链接")
+    private String url;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ApiModelProperty("位置")
+    private Long navigationId;
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "navigationId", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
+    private Navigation navigation;
+
+}

+ 100 - 0
src/main/java/com/izouma/zhirongip/domain/BaseEntity.java

@@ -0,0 +1,100 @@
+package com.izouma.zhirongip.domain;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import org.hibernate.envers.Audited;
+import org.springframework.data.annotation.CreatedBy;
+import org.springframework.data.annotation.CreatedDate;
+import org.springframework.data.annotation.LastModifiedBy;
+import org.springframework.data.annotation.LastModifiedDate;
+import org.springframework.data.jpa.domain.support.AuditingEntityListener;
+
+import javax.persistence.*;
+import java.time.LocalDateTime;
+
+@MappedSuperclass
+@Audited
+@EntityListeners(AuditingEntityListener.class)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = {"hibernateLazyInitializer"}, ignoreUnknown = true)
+public abstract class BaseEntity {
+    @ExcelIgnore
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    private Long id;
+
+    @ExcelIgnore
+    @JsonIgnore
+    @CreatedBy
+    private String createdBy;
+
+    @ExcelIgnore
+    @JsonIgnore
+    @CreatedDate
+    private LocalDateTime createdAt;
+
+    @ExcelIgnore
+    @JsonIgnore
+    @LastModifiedBy
+    private String modifiedBy;
+
+    @ExcelIgnore
+    @JsonIgnore
+    @LastModifiedDate
+    private LocalDateTime modifiedAt;
+
+    @ExcelIgnore
+    private boolean del;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCreatedBy() {
+        return createdBy;
+    }
+
+    public void setCreatedBy(String createdBy) {
+        this.createdBy = createdBy;
+    }
+
+    @JsonProperty("createdAt")
+    public LocalDateTime getCreatedAt() {
+        return createdAt;
+    }
+
+    public void setCreatedAt(LocalDateTime createdAt) {
+        this.createdAt = createdAt;
+    }
+
+    public String getModifiedBy() {
+        return modifiedBy;
+    }
+
+    public void setModifiedBy(String modifiedBy) {
+        this.modifiedBy = modifiedBy;
+    }
+
+    public LocalDateTime getModifiedAt() {
+        return modifiedAt;
+    }
+
+    public void setModifiedAt(LocalDateTime modifiedAt) {
+        this.modifiedAt = modifiedAt;
+    }
+
+    public boolean isDel() {
+        return del;
+    }
+
+    public void setDel(boolean del) {
+        this.del = del;
+    }
+}

+ 49 - 0
src/main/java/com/izouma/zhirongip/domain/District.java

@@ -0,0 +1,49 @@
+package com.izouma.zhirongip.domain;
+
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.enums.DistrictLevel;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.*;
+
+@Data
+@Entity
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("行政区域")
+public class District extends AuditedEntity {
+    @Id
+    private Long id;
+
+    @Column(length = 10)
+    private String cityCode;
+
+    @Searchable
+    private String name;
+
+    private double lat;
+
+    private double lng;
+
+    @Column(length = 20)
+    @Enumerated(EnumType.STRING)
+    private DistrictLevel level;
+
+    private Long parent;
+
+    private int childCount;
+
+    private int cityCount;
+
+    private int districtCount;
+
+    private int streetCount;
+
+    @Transient
+    private Boolean leaf;
+}

+ 71 - 0
src/main/java/com/izouma/zhirongip/domain/ExceptionLog.java

@@ -0,0 +1,71 @@
+package com.izouma.zhirongip.domain;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.*;
+import java.time.LocalDateTime;
+
+@Data
+@Entity
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = {"hibernateLazyInitializer"}, ignoreUnknown = true)
+@ApiModel("异常日志")
+public class ExceptionLog {
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    private Long id;
+
+    @ApiModelProperty("异常名称")
+    private String name;
+
+    @ApiModelProperty("操作类型")
+    private String type;
+
+    @ApiModelProperty("用户ID")
+    private String userId;
+
+    @ApiModelProperty("用户名")
+    private String username;
+
+    @ApiModelProperty("描述")
+    @Column(name = "description")
+    private String desc;
+
+    @ApiModelProperty("调用方法")
+    private String reqMethod;
+
+    @ApiModelProperty("请求地址")
+    private String reqUrl;
+
+    @ApiModelProperty("请求参数")
+    @Lob
+    private String reqParams;
+
+    @ApiModelProperty("请求ip")
+    private String reqIp;
+
+    @ApiModelProperty("返回结果")
+    @Lob
+    private String resp;
+
+    @ApiModelProperty("操作时间")
+    private LocalDateTime time;
+
+    @ApiModelProperty("异常消息")
+    @Lob
+    private String message;
+
+    @ApiModelProperty("错误追踪")
+    @Lob
+    private String stackTrace;
+}

+ 10 - 0
src/main/java/com/izouma/zhirongip/domain/FileObject.java

@@ -0,0 +1,10 @@
+package com.izouma.zhirongip.domain;
+
+import lombok.Data;
+
+@Data
+public class FileObject {
+    String name;
+
+    String url;
+}

+ 33 - 0
src/main/java/com/izouma/zhirongip/domain/Information.java

@@ -0,0 +1,33 @@
+package com.izouma.zhirongip.domain;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "消息")
+@Where(clause = "del = 0")
+public class Information extends BaseEntity {
+
+    @ApiModelProperty(value = "接收人")
+    private Long receiveUserId;
+
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "内容")
+    private String content;
+
+    private Long messageId;
+
+    private boolean isRead;
+}

+ 60 - 0
src/main/java/com/izouma/zhirongip/domain/Institution.java

@@ -0,0 +1,60 @@
+package com.izouma.zhirongip.domain;
+
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.enums.ApplyStatus;
+import com.izouma.zhirongip.enums.InstitutionalNature;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import java.time.LocalDate;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@Where(clause = "del = 0")
+@ApiModel(value = "机构认证")
+public class Institution extends BaseEntity {
+    private Long userId;
+
+    @Searchable
+    private String name;
+
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "机构性质")
+    private InstitutionalNature nature;
+
+    @ApiModelProperty(value = "成立日期")
+    private LocalDate establishedAt;
+
+    @ApiModelProperty(value = "官网地址")
+    private String url;
+
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "机构简介")
+    private String introduction;
+
+    private String logo;
+
+    @ApiModelProperty(value = "统一社会信用代码 ")
+    private String uscc;
+
+//    @ApiModelProperty(value = "名片")
+//    private String card;
+
+    @ApiModelProperty(value = "营业执照")
+    private String businessLicense;
+
+    @Enumerated(EnumType.STRING)
+    private ApplyStatus status;
+}

+ 71 - 0
src/main/java/com/izouma/zhirongip/domain/Menu.java

@@ -0,0 +1,71 @@
+package com.izouma.zhirongip.domain;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.izouma.zhirongip.dto.MenuDTO;
+import com.izouma.zhirongip.security.Authority;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+@Data
+@Entity
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+@Where(clause = "active = 1")
+public class Menu extends BaseEntity implements Serializable {
+    private String name;
+
+    private String path;
+
+    private String icon;
+
+    private Integer sort;
+
+    private Long parent;
+
+    private Boolean root;
+
+    private Boolean enabled;
+
+    private Boolean active;
+
+    private String category;
+
+    @OneToMany
+    @JoinColumn(name = "parent", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
+    List<Menu> children;
+
+    @ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.DETACH})
+    @JoinTable(
+            name = "menu_authority",
+            joinColumns = {@JoinColumn(name = "menu_id", referencedColumnName = "id")},
+            inverseJoinColumns = {@JoinColumn(name = "authority", referencedColumnName = "name")})
+    @ExcelIgnore
+    private Set<Authority> authorities = new HashSet<>();
+
+    public static Menu from(MenuDTO menuDTO) {
+        Menu menu = Menu.builder()
+                .name(menuDTO.getName())
+                .path(menuDTO.getPath())
+                .icon(menuDTO.getIcon())
+                .sort(menuDTO.getSort())
+                .parent(menuDTO.getParent())
+                .root(menuDTO.getRoot())
+                .enabled(menuDTO.getEnabled())
+                .active(menuDTO.getActive())
+                .category(menuDTO.getCategory())
+                .children(null)
+                .build();
+        menu.setId(menuDTO.getId());
+        return menu;
+    }
+}

+ 73 - 0
src/main/java/com/izouma/zhirongip/domain/Message.java

@@ -0,0 +1,73 @@
+package com.izouma.zhirongip.domain;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.izouma.zhirongip.annotations.EnumFormat;
+import com.izouma.zhirongip.converter.StringArrayConverter;
+import com.izouma.zhirongip.enums.DocumentType;
+import com.izouma.zhirongip.utils.excel.EnumExcelConverter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "留言")
+@Where(clause = "del = 0")
+public class Message extends BaseEntity{
+    @ExcelIgnore
+    private Long userId;
+
+    @ApiModelProperty(value = "姓名")
+    private String name;
+
+    @ApiModelProperty(value = "职业")
+    private String occupation;
+
+    @ApiModelProperty(value = "电话")
+    private String phone;
+
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+    @EnumFormat(value = DocumentType.class,
+            fromExcel = {"身份证", "军官证"},
+            toJavaEnum = {"ID_CARD", "OFFICER_ID"})
+    @ExcelProperty(value = "证件类型", converter = EnumExcelConverter.class)
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "证件类型")
+    private DocumentType type;
+
+    @ApiModelProperty(value = "证件编号")
+    private String documentNumber;
+
+    @ApiModelProperty(value = "咨询标题")
+    private String title;
+
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "正文详情")
+    private String content;
+
+    @ExcelIgnore
+    @Convert(converter = StringArrayConverter.class)
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "图片")
+    private List<String> img;
+
+    @ApiModelProperty(value = "是否回复")
+    private boolean isReply;
+
+    @ApiModelProperty(value = "回复内容")
+    @Column(columnDefinition = "TEXT")
+    private String replyContent;
+}

+ 49 - 0
src/main/java/com/izouma/zhirongip/domain/Navigation.java

@@ -0,0 +1,49 @@
+package com.izouma.zhirongip.domain;
+
+import com.izouma.zhirongip.enums.NavAuth;
+import com.izouma.zhirongip.enums.NavType;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.Transient;
+import java.util.ArrayList;
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel("导航条")
+@Where(clause = "del = 0")
+public class Navigation extends BaseEntity {
+    private String name;
+
+    private String path;
+
+    private Integer sort;
+
+    private Long parent;
+
+    /*
+    首页导航/页面中3个导航
+     */
+    @ApiModelProperty(value = "导航类别")
+    @Enumerated(EnumType.STRING)
+    private NavType type;
+
+    @ApiModelProperty(value = "查看权限")
+    @Enumerated(EnumType.STRING)
+    private NavAuth navAuth;
+
+    @Transient
+    private List<Navigation> children = new ArrayList<>();
+}

+ 63 - 0
src/main/java/com/izouma/zhirongip/domain/OperationLog.java

@@ -0,0 +1,63 @@
+package com.izouma.zhirongip.domain;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.*;
+import java.time.LocalDateTime;
+
+@Data
+@Entity
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = {"hibernateLazyInitializer"}, ignoreUnknown = true)
+@ApiModel("操作日志")
+public class OperationLog {
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    private Long id;
+
+    @ApiModelProperty("操作名称")
+    private String name;
+
+    @ApiModelProperty("操作类型")
+    private String type;
+
+    @ApiModelProperty("用户ID")
+    private String userId;
+
+    @ApiModelProperty("用户名")
+    private String username;
+
+    @ApiModelProperty("描述")
+    @Column(name = "description")
+    private String desc;
+
+    @ApiModelProperty("调用方法")
+    private String reqMethod;
+
+    @ApiModelProperty("请求地址")
+    private String reqUrl;
+
+    @ApiModelProperty("请求参数")
+    @Lob
+    private String reqParams;
+
+    @ApiModelProperty("请求ip")
+    private String reqIp;
+
+    @ApiModelProperty("返回结果")
+    @Lob
+    private String resp;
+
+    @ApiModelProperty("操作时间")
+    private LocalDateTime time;
+}

+ 29 - 0
src/main/java/com/izouma/zhirongip/domain/Partner.java

@@ -0,0 +1,29 @@
+package com.izouma.zhirongip.domain;
+
+import com.izouma.zhirongip.enums.PartnerType;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "客户")
+@Where(clause = "del = 0")
+public class Partner extends BaseEntity {
+    private String img;
+
+    private String url;
+
+    @Enumerated(EnumType.STRING)
+    private PartnerType type;
+}

+ 42 - 0
src/main/java/com/izouma/zhirongip/domain/Personal.java

@@ -0,0 +1,42 @@
+package com.izouma.zhirongip.domain;
+
+import com.izouma.zhirongip.enums.ApplyStatus;
+import com.izouma.zhirongip.enums.DocumentType;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+
+@Data
+@Entity
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Where(clause = "del = 0")
+@ApiModel(value = "个人认证", description = "个人认证")
+public class Personal extends BaseEntity {
+    private Long userId;
+
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "证件类型")
+    private DocumentType type;
+
+    @ApiModelProperty(value = "证件编号")
+    private String documentNumber;
+
+    @ApiModelProperty(value = "证件照片(正面)")
+    private String photoFront;
+
+    @ApiModelProperty(value = "证件照片(反面)")
+    private String photoBackside;
+
+    @Enumerated(EnumType.STRING)
+    private ApplyStatus status;
+}

+ 35 - 0
src/main/java/com/izouma/zhirongip/domain/ServiceDetail.java

@@ -0,0 +1,35 @@
+package com.izouma.zhirongip.domain;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "融合服务多图文页面")
+@Where(clause = "del = 0")
+public class ServiceDetail extends BaseEntity {
+
+    private String icon;
+
+    private String title;
+
+    private String content;
+
+    @ApiModelProperty("位置")
+    private Long navigationId;
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "navigationId", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
+    private Navigation navigation;
+
+}

+ 35 - 0
src/main/java/com/izouma/zhirongip/domain/Setting.java

@@ -0,0 +1,35 @@
+package com.izouma.zhirongip.domain;
+
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.Entity;
+import javax.persistence.Transient;
+import java.util.ArrayList;
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "参数设置")
+@Where(clause = "del = 0")
+public class Setting extends BaseEntity {
+
+    private String name;
+
+    private Long parent;
+
+    private int flag;
+
+    private Integer sort;
+
+    @Transient
+    private List<Setting> children = new ArrayList<>();
+
+}

+ 32 - 0
src/main/java/com/izouma/zhirongip/domain/SmsRecord.java

@@ -0,0 +1,32 @@
+package com.izouma.zhirongip.domain;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.Entity;
+import java.time.LocalDateTime;
+
+@Data
+@Entity
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel(value = "短信验证码记录", description = "短信验证码记录")
+public class SmsRecord extends BaseEntity {
+    @ApiModelProperty(value = "会话ID", name = "sessionId")
+    private String        sessionId;
+    @ApiModelProperty(value = "手机号", name = "phone;")
+    private String        phone;
+    @ApiModelProperty(value = "验证码", name = "code")
+    private String        code;
+    @ApiModelProperty(value = "过期时间", name = "expiresAt")
+    private LocalDateTime expiresAt;
+    @ApiModelProperty(value = "是否过期", name = "expired")
+    private Boolean       expired;
+    @ApiModelProperty(value = "验证码用途", name = "scope")
+    private String        scope;
+}

+ 25 - 0
src/main/java/com/izouma/zhirongip/domain/Statistic.java

@@ -0,0 +1,25 @@
+package com.izouma.zhirongip.domain;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel("统计附件")
+public class Statistic extends BaseEntity {
+    private String name;
+
+    private String img;
+
+    @ApiModelProperty(value = "摘要")
+    private String summary;
+
+    @ApiModelProperty(value = "附件")
+    private String annex;
+}

+ 57 - 0
src/main/java/com/izouma/zhirongip/domain/SuperUser.java

@@ -0,0 +1,57 @@
+package com.izouma.zhirongip.domain;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.config.Constants;
+import com.izouma.zhirongip.security.Authority;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.BatchSize;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+import java.util.HashSet;
+import java.util.Set;
+
+@Data
+@Entity
+@AllArgsConstructor
+@NoArgsConstructor
+@Where(clause = "enabled = 1")
+@ApiModel(value = "超级用户", description = "超级用户")
+public class SuperUser extends BaseEntity {
+
+    @Pattern(regexp = Constants.Regex.USERNAME)
+    @Size(min = 1, max = 50)
+    @Column(nullable = false, unique = true)
+    @Searchable
+    private String username;
+
+    @Searchable
+    private String nickname;
+
+    private String avatar;
+
+    @JsonIgnore
+    private String password;
+
+    @Searchable
+    private String phone;
+
+    @Column(nullable = false)
+    private Boolean enabled = true;
+
+    @ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.ALL})
+    @JoinTable(
+            name = "super_user_authority",
+            joinColumns = {@JoinColumn(name = "user_id", referencedColumnName = "id")},
+            inverseJoinColumns = {@JoinColumn(name = "authority_name", referencedColumnName = "name")})
+    @BatchSize(size = 20)
+    @ExcelIgnore
+    private Set<Authority> authorities = new HashSet<>();
+}

+ 41 - 0
src/main/java/com/izouma/zhirongip/domain/SysConfig.java

@@ -0,0 +1,41 @@
+package com.izouma.zhirongip.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.*;
+
+@Data
+@Entity
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+public class SysConfig extends AuditedEntity {
+    @Id
+    @Column(length = 25, unique = true)
+    @ApiModelProperty(value = "名称", name = "name")
+    private String name;
+
+    @Column(name = "description")
+    @ApiModelProperty(value = "描述", name = "desc")
+    private String desc;
+
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "值", name = "value")
+    private String value;
+
+    @Enumerated(EnumType.STRING)
+    private ValueType type;
+
+    public enum ValueType {
+        STRING,
+        TIME,
+        DATE,
+        DATETIME,
+        BOOLEAN,
+        NUMBER
+    }
+}

+ 17 - 0
src/main/java/com/izouma/zhirongip/domain/TestClass.java

@@ -0,0 +1,17 @@
+package com.izouma.zhirongip.domain;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.Entity;
+
+@Data
+@Entity
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+public class TestClass extends BaseEntity {
+    private String name;
+}

+ 71 - 0
src/main/java/com/izouma/zhirongip/domain/User.java

@@ -0,0 +1,71 @@
+package com.izouma.zhirongip.domain;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.config.Constants;
+import com.izouma.zhirongip.security.Authority;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.BatchSize;
+
+import javax.persistence.*;
+import javax.validation.constraints.Pattern;
+import javax.validation.constraints.Size;
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.Set;
+
+@Data
+@Entity
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel(value = "用户", description = "用户")
+public class User extends BaseEntity implements Serializable {
+
+    @Pattern(regexp = Constants.Regex.USERNAME)
+    @Size(min = 1, max = 50)
+    @Column(nullable = false, unique = true)
+    @Searchable
+    private String username;
+
+    @Searchable
+    private String nickname;
+
+    private String avatar;
+
+    @JsonIgnore
+    private String password;
+
+    private boolean del = false;
+
+    @ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.DETACH})
+    @JoinTable(
+            name = "user_authority",
+            joinColumns = {@JoinColumn(name = "user_id", referencedColumnName = "id", foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))},
+            inverseJoinColumns = {@JoinColumn(name = "authority_name", referencedColumnName = "name", foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))})
+    @BatchSize(size = 20)
+    @ExcelIgnore
+    private Set<Authority> authorities = new HashSet<>();
+
+    private String openId;
+
+    private String sex;
+
+    private String language;
+
+    private String city;
+
+    private String province;
+
+    private String country;
+
+    @Searchable
+    private String phone;
+
+    private String email;
+}

+ 103 - 0
src/main/java/com/izouma/zhirongip/domain/demand/CopyrightDemand.java

@@ -0,0 +1,103 @@
+package com.izouma.zhirongip.domain.demand;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.domain.BaseEntity;
+import com.izouma.zhirongip.enums.ApplyStatus;
+import com.izouma.zhirongip.enums.CopyrightType;
+import com.izouma.zhirongip.enums.TradingMethod;
+import com.izouma.zhirongip.utils.excel.EnumExcelConverter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+import java.math.BigDecimal;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "版权/软著/服务")
+@Where(clause = "del = 0")
+public class CopyrightDemand extends BaseEntity {
+    @ExcelIgnore
+    private Long userId;
+
+    @Searchable
+    @ExcelProperty("作品名称")
+    @ApiModelProperty(value = "作品名称")
+    private String name;
+
+    /*
+    作品类型
+    软著类型
+    服务类型
+     */
+    @ExcelIgnore
+    @ApiModelProperty(value = "作品类型")
+    private Long workType;
+
+    @Searchable
+    @ExcelIgnore
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "需求描述")
+    private String description;
+
+    /*
+    服务没有
+     */
+
+    @ApiModelProperty(value = "转移转化方式")
+    private String mode;
+    @ApiModelProperty(value = "转移转化方式")
+    private Long modeId;
+
+    /*
+    (万元)
+     */
+    @ExcelProperty("预算(万元)")
+    @ApiModelProperty(value = "预算(万元)")
+    private BigDecimal expectedPrice;
+
+    @ExcelIgnore
+    @ApiModelProperty(value = "面议")
+    private Boolean negotiateDirectly;
+
+    @ExcelProperty("联系人")
+    @ApiModelProperty(value = "联系人")
+    private String contact;
+
+    @ExcelProperty("电话")
+    @ApiModelProperty(value = "电话")
+    private String phone;
+
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+    @ExcelProperty("所在地区")
+    @ApiModelProperty(value = "所在地区")
+    private String address;
+
+    @ExcelIgnore
+    @ApiModelProperty(value = "版权/软著")
+    @Enumerated(EnumType.STRING)
+    private CopyrightType type;
+
+    @ExcelProperty("作品类型")
+    @Transient
+    private String workName;
+
+    @ExcelProperty("浏览量")
+    @ApiModelProperty(value = "浏览量")
+    private long view;
+
+    @Enumerated(EnumType.STRING)
+    private ApplyStatus status;
+}

+ 70 - 0
src/main/java/com/izouma/zhirongip/domain/demand/Funding.java

@@ -0,0 +1,70 @@
+package com.izouma.zhirongip.domain.demand;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.izouma.zhirongip.annotations.EnumFormat;
+import com.izouma.zhirongip.converter.LongArrayConverter;
+import com.izouma.zhirongip.domain.BaseEntity;
+import com.izouma.zhirongip.enums.LoanTerm;
+import com.izouma.zhirongip.utils.excel.EnumExcelConverter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "资金")
+@Where(clause = "del = 0")
+public class Funding extends BaseEntity {
+    @ExcelIgnore
+    private Long userId;
+
+    @ExcelProperty("拟融资额")
+    @ApiModelProperty(value = "拟融资额")
+    private String amount;
+
+    @EnumFormat(value = LoanTerm.class,
+            fromExcel = {"3个月以下", "3-6个月", "6个月-1年", "1-2年"},
+            toJavaEnum = {"UNDER_THREE_MONTHS", "THREE_SIX_MONTHS", "SIX_MONTHS_ONE_YEAR", "ONE_TWO_YEARS"})
+    @ExcelProperty(value = "转移转化方式", converter = EnumExcelConverter.class)
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "期望贷款期限")
+    private LoanTerm loanTerm;
+
+    /*
+    flag-5
+     */
+    @ExcelIgnore
+    @Convert(converter = LongArrayConverter.class)
+    @ApiModelProperty(value = "融资目的")
+    private List<Long> purpose;
+
+    @ExcelProperty("联系人")
+    @ApiModelProperty(value = "联系人")
+    private String contact;
+
+    @ExcelProperty("电话")
+    @ApiModelProperty(value = "电话")
+    private String phone;
+
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+    @ExcelProperty("所在地区")
+    @ApiModelProperty(value = "所在地区")
+    private String address;
+
+    @Transient
+    private List<String> purposeName;
+
+}

+ 89 - 0
src/main/java/com/izouma/zhirongip/domain/demand/LogoDemand.java

@@ -0,0 +1,89 @@
+package com.izouma.zhirongip.domain.demand;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.domain.BaseEntity;
+import com.izouma.zhirongip.enums.ApplyStatus;
+import com.izouma.zhirongip.enums.TradingMethod;
+import com.izouma.zhirongip.utils.excel.EnumExcelConverter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+import java.math.BigDecimal;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "商标")
+@Where(clause = "del = 0")
+public class LogoDemand extends BaseEntity {
+    @ExcelIgnore
+    private Long userId;
+
+    @ApiModelProperty(value = "包含文字")
+    private String containText;
+
+    @ApiModelProperty(value = "包含字母")
+    private String containLetter;
+
+    @ApiModelProperty(value = "包含图形")
+    private String containGraphic;
+
+    /**
+     *setting
+     */
+    @ExcelIgnore
+    @ApiModelProperty(value = "所属分类")
+    private Long category;
+
+    @Searchable
+    @ExcelIgnore
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "需求描述")
+    private String description;
+
+
+    @ApiModelProperty(value = "转移转化方式")
+    private String mode;
+    @ApiModelProperty(value = "转移转化方式")
+    private Long modeId;
+
+    /**
+     *(万元)
+     */
+    @ApiModelProperty(value = "预算(万元)")
+    private BigDecimal expectedPrice;
+
+    @ApiModelProperty(value = "面议")
+    private Boolean negotiateDirectly;
+
+    @ApiModelProperty(value = "联系人")
+    private String contact;
+
+    @ApiModelProperty(value = "电话")
+    private String phone;
+
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+    @ApiModelProperty(value = "所在地区")
+    private String address;
+
+    @Transient
+    private String categoryName;
+
+    @ApiModelProperty(value = "浏览量")
+    private long view;
+
+    @Enumerated(EnumType.STRING)
+    private ApplyStatus status;
+}

+ 110 - 0
src/main/java/com/izouma/zhirongip/domain/demand/PatentDemand.java

@@ -0,0 +1,110 @@
+package com.izouma.zhirongip.domain.demand;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.izouma.zhirongip.annotations.EnumFormat;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.domain.BaseEntity;
+import com.izouma.zhirongip.enums.*;
+import com.izouma.zhirongip.utils.excel.EnumExcelConverter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+import java.math.BigDecimal;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "专利")
+@Where(clause = "del = 0")
+public class PatentDemand extends BaseEntity {
+    @ExcelIgnore
+    private Long userId;
+
+    /*
+    一种***方法 或 一种***装置
+     */
+    @ApiModelProperty(value = "专利名称")
+    private String name;
+
+    @ApiModelProperty(value = "包含关键字")
+    private String keyword;
+
+    /*
+    脱密专利没有
+     */
+    @ApiModelProperty(value = "专利类型")
+    private String patentType;
+    @ApiModelProperty(value = "专利类型")
+    private Long patentTypeId;
+
+    /*
+    脱密专利没有
+     */
+
+    @ApiModelProperty(value = "专利状态")
+    private String patentStatus;
+    @ApiModelProperty(value = "专利状态")
+    private Long patentStatusId;
+
+    /*
+    setting
+     */
+    @ExcelIgnore
+    @ApiModelProperty(value = "行业分类")
+    private Long industryClass;
+
+    @Searchable
+    @ExcelIgnore
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "需求描述")
+    private String description;
+
+
+    @ApiModelProperty(value = "转移转化方式")
+    private String mode;
+    @ApiModelProperty(value = "转移转化方式")
+    private Long modeId;
+
+    /*
+    (万元)
+     */
+    @ApiModelProperty(value = "预算(万元)")
+    private BigDecimal expectedPrice;
+
+    @ApiModelProperty(value = "面议")
+    private Boolean negotiateDirectly;
+
+    @ApiModelProperty(value = "联系人")
+    private String contact;
+
+    @ApiModelProperty(value = "手机号")
+    private String phone;
+
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+    @ApiModelProperty(value = "所在地区")
+    private String address;
+
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "专利分类")
+    private CaseType caseType;
+
+    @Transient
+    private String industryName;
+
+    @ApiModelProperty(value = "浏览量")
+    private long view;
+
+    @Enumerated(EnumType.STRING)
+    private ApplyStatus status;
+}

+ 103 - 0
src/main/java/com/izouma/zhirongip/domain/demand/TechProductDemand.java

@@ -0,0 +1,103 @@
+package com.izouma.zhirongip.domain.demand;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.domain.BaseEntity;
+import com.izouma.zhirongip.enums.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+import java.math.BigDecimal;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "产品")
+@Where(clause = "del = 0")
+public class TechProductDemand extends BaseEntity {
+    @ExcelIgnore
+    private Long userId;
+
+    @Searchable
+    @ApiModelProperty(value = "产品名称")
+    private String name;
+
+    /*
+    setting
+     */
+    @ExcelIgnore
+    @ApiModelProperty(value = "所属行业")
+    private Long industry;
+
+    /*
+    技术没有
+     */
+    @ApiModelProperty(value = "是否需要专利技术")
+    private Boolean isPatented;
+
+    /*
+    技术没有 选择是时,出现
+    */
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "专利类型")
+    private PatentType patentType;
+
+    @Searchable
+    @ExcelIgnore
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "需求描述")
+    private String description;
+
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "所属阶段")
+    private Stage stage;
+
+
+    @ApiModelProperty(value = "转移转化方式")
+    private String mode;
+    @ApiModelProperty(value = "转移转化方式")
+    private Long modeId;
+
+    /*
+    (万元)
+     */
+    @ApiModelProperty(value = "预算(万元)")
+    private BigDecimal expectedPrice;
+
+    @ApiModelProperty(value = "面议")
+    private Boolean negotiateDirectly;
+
+    @ApiModelProperty(value = "联系人")
+    private String contact;
+
+    @ApiModelProperty(value = "电话")
+    private String phone;
+
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+    @ApiModelProperty(value = "所在地区")
+    private String address;
+
+    @ExcelIgnore
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "技术/产品")
+    private TpType tpType;
+
+    @ApiModelProperty(value = "浏览量")
+    private long view;
+
+    @Enumerated(EnumType.STRING)
+    private ApplyStatus status;
+
+    @Transient
+    private String industryName;
+}

+ 132 - 0
src/main/java/com/izouma/zhirongip/domain/resource/Company.java

@@ -0,0 +1,132 @@
+package com.izouma.zhirongip.domain.resource;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.annotations.SearchableOne;
+import com.izouma.zhirongip.converter.LongArrayConverter;
+import com.izouma.zhirongip.converter.NumOfIpListConverter;
+import com.izouma.zhirongip.domain.BaseEntity;
+import com.izouma.zhirongip.dto.CompanyDTO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+import java.time.LocalDateTime;
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "参数设置")
+@Where(clause = "del = 0")
+public class Company extends BaseEntity {
+    @ExcelIgnore
+    @ApiModelProperty(value = "企业性质")
+    private Long settingId;
+
+    /*
+    为新材料、电子信息..
+     */
+    @ExcelIgnore
+    @ApiModelProperty(value = "所属领域")
+    private Long field;
+
+    @Searchable
+    @SearchableOne
+    @ApiModelProperty(value = "企业名称")
+    private String name;
+
+    @SearchableOne
+    @ApiModelProperty(value = "所属地区")
+    private String owner;
+
+    @ExcelIgnore
+    private String img;
+
+    @ExcelIgnore
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "企业简介")
+    private String manual;
+
+    @Convert(converter = LongArrayConverter.class)
+    @ApiModelProperty(value = "入库入网")
+    private List<Long> network;
+
+    @ApiModelProperty(value = "武器装备科研生产单位保密资格证")
+    private boolean confidentialityQualification;
+
+    @ApiModelProperty(value = "级别")
+    private Long confidentialityLevel;
+
+    @ApiModelProperty(value = "武器装备质量管理体系认证")
+    private boolean certification;
+
+    @ApiModelProperty(value = "武器装备承制单位资格证")
+    private boolean unitQualification;
+
+    @ApiModelProperty(value = "级别")
+    private Long unitLevel;
+
+    @ApiModelProperty(value = "武器装备科研生产许可证")
+    private boolean productionLicence;
+
+    @ApiModelProperty(value = "类别")
+    private Long productionLevel;
+
+    @ApiModelProperty(value = "涉密信息系统集成")
+    private boolean systemIntegration;
+
+    @ApiModelProperty(value = "级别")
+    private Long integrationLevel;
+
+    @ApiModelProperty(value = "高新技术企业")
+    private boolean highTech;
+
+    @ApiModelProperty(value = "知识产权数量")
+    @Convert(converter = NumOfIpListConverter.class)
+    private List<NumOfIp> numOfIps;
+
+    @ApiModelProperty(value = "知识产权贯标")
+    private boolean standardization;
+
+    @Convert(converter = LongArrayConverter.class)
+    @ApiModelProperty(value = "级别")
+    private List<Long> standardizationLevel;
+
+    @Convert(converter = LongArrayConverter.class)
+    @ApiModelProperty(value = "企业技术资质")
+    private List<Long> qualificationLevel;
+
+    @ApiModelProperty(value = "联系人")
+    private String contact;
+
+    @ApiModelProperty(value = "电话")
+    private String phone;
+
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+    @ApiModelProperty(value = "官网地址")
+    private String url;
+
+    @ApiModelProperty(value = "信息更新时间")
+    private LocalDateTime updateAt;
+
+    @Transient
+    private String fieldName;
+
+    @Transient
+    private String settingName;
+
+    public Company(CompanyDTO dto) {
+        BeanUtil.copyProperties(dto, this);
+    }
+}

+ 86 - 0
src/main/java/com/izouma/zhirongip/domain/resource/Digital.java

@@ -0,0 +1,86 @@
+package com.izouma.zhirongip.domain.resource;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.annotations.SearchableOne;
+import com.izouma.zhirongip.domain.BaseEntity;
+import com.izouma.zhirongip.dto.ProductDTO;
+import com.izouma.zhirongip.dto.TechnologyDTO;
+import com.izouma.zhirongip.enums.DigitalType;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "数据")
+@Where(clause = "del = 0")
+public class Digital extends BaseEntity {
+    /*
+    技术区分:包括军转民技术,民参军技术
+    企业性质:包括军工单位,民口企业,民营企业
+     */
+    @ExcelIgnore
+    private Long settingId;
+
+    /*
+    为新材料、电子信息..
+     */
+    @ExcelIgnore
+    @ApiModelProperty(value = "所属领域")
+    private Long field;
+
+    @Transient
+    @ExcelProperty(value = "技术区分")
+    private String settingName;
+
+    @Transient
+    @ExcelProperty(value = "行业领域")
+    private String fieldName;
+
+
+    @Searchable
+    @SearchableOne
+    @ExcelProperty(value = "技术名称")
+    private String name;
+
+    /*
+    技术: 成果所有人
+    产品: 持有人
+    公司: 地区
+     */
+    @SearchableOne
+    @ExcelProperty(value = "技术所属人")
+    private String owner;
+
+    @ExcelProperty(value = "附图")
+    private String img;
+
+    @Column(columnDefinition = "TEXT")
+    @ExcelProperty(value = "描述")
+    private String manual;
+
+    @ExcelIgnore
+    @Enumerated(EnumType.STRING)
+    private DigitalType type;
+
+    public Digital(TechnologyDTO dto) {
+        BeanUtil.copyProperties(dto, this);
+    }
+
+    public Digital(ProductDTO dto) {
+        BeanUtil.copyProperties(dto, this);
+    }
+
+}

+ 117 - 0
src/main/java/com/izouma/zhirongip/domain/resource/Expert.java

@@ -0,0 +1,117 @@
+package com.izouma.zhirongip.domain.resource;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.annotations.SearchableOne;
+import com.izouma.zhirongip.converter.LongArrayConverter;
+import com.izouma.zhirongip.domain.BaseEntity;
+import com.izouma.zhirongip.dto.ExpertDTO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.Column;
+import javax.persistence.Convert;
+import javax.persistence.Entity;
+import javax.persistence.Transient;
+import java.time.LocalDate;
+import java.util.List;
+
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+@Builder
+@Entity
+@ApiModel(value = "技术经理人")
+@Where(clause = "del = 0")
+public class Expert extends BaseEntity {
+
+    @ExcelProperty(value = "照片")
+    @ApiModelProperty(value = "照片")
+    private String avatar;
+
+    @ExcelProperty(value = "姓名")
+    @Searchable
+    @ApiModelProperty(value = "姓名")
+    private String name;
+
+    @ExcelProperty(value = "性别")
+    @ApiModelProperty(value = "出生年月")
+    private String sex;
+
+    @ExcelProperty(value = "出生年月")
+    @ApiModelProperty(value = "出生年月")
+    private LocalDate birthday;
+
+    @ExcelProperty(value = "单位")
+    @ApiModelProperty(value = "单位")
+    private String work;
+
+    @ExcelProperty(value = "学历")
+    @SearchableOne
+    @ApiModelProperty(value = "学历")
+    private String academicQualification;
+
+    @ExcelProperty(value = "职称")
+    @SearchableOne
+    @ApiModelProperty(value = "职称")
+    private String jobTitle;
+
+    @ExcelProperty(value = "职位")
+    @ApiModelProperty(value = "职位")
+    private String position;
+
+    @ExcelProperty(value = "电话")
+    @Searchable
+    @ApiModelProperty(value = "电话")
+    private String phone;
+
+    @ExcelProperty(value = "邮箱")
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+    @ExcelProperty(value = "通讯地址")
+    @ApiModelProperty(value = "通讯地址")
+    private String address;
+
+    @ExcelIgnore
+    @ApiModelProperty(value = "研究方向")
+    private Long affiliation;
+
+    /**
+     * setting
+     */
+    @ExcelIgnore
+    @Convert(converter = LongArrayConverter.class)
+    @ApiModelProperty(value = "专业领域")
+    private List<Long> field;
+
+    @Searchable
+    @ExcelProperty(value = "个人简介")
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "个人简介")
+    private String selfIntroduction;
+
+    @ExcelIgnore
+    @Transient
+    private List<String> fieldName;
+
+    @ExcelProperty(value = "专业领域")
+    private String fieldNames;
+
+    @ExcelProperty(value = "研究方向")
+    @Transient
+    private String affiliationName;
+
+    public Expert(ExpertDTO dto) {
+        BeanUtil.copyProperties(dto, this);
+    }
+
+
+}

+ 146 - 0
src/main/java/com/izouma/zhirongip/domain/resource/IntellectualProperty.java

@@ -0,0 +1,146 @@
+package com.izouma.zhirongip.domain.resource;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.annotations.SearchableOne;
+import com.izouma.zhirongip.converter.StringArrayConverter;
+import com.izouma.zhirongip.domain.BaseEntity;
+import com.izouma.zhirongip.domain.Setting;
+import com.izouma.zhirongip.dto.IntellectualPropertyDTO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.NotFound;
+import org.hibernate.annotations.NotFoundAction;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+import java.time.LocalDate;
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "知产")
+@Where(clause = "del = 0")
+public class IntellectualProperty extends BaseEntity {
+
+//    @ApiModelProperty(value = "发明名称")
+//    private String proName;
+
+    @ApiModelProperty(value = "专利代理机构")
+    private String agency;
+
+    @ApiModelProperty(value = "代理人")
+    private String agent;
+
+    @ApiModelProperty(value = "申请主体")
+    private String applyMain;
+
+    @ApiModelProperty(value = "申请人")
+    private String applyName;
+
+    @ApiModelProperty(value = "申请日")
+    private LocalDate applyTime;
+
+    @ApiModelProperty(value = "授权公告日")
+    private LocalDate authTime;
+
+    @ApiModelProperty(value = "公开号")
+    private String openCode;
+
+    @SearchableOne
+    @ApiModelProperty(value = "申请号")
+    private String code;
+
+    @ApiModelProperty(value = "摘要")
+    @Column(columnDefinition = "TEXT")
+    private String digest;
+
+    @ApiModelProperty(value = "发布时间")
+    private LocalDate issue;
+
+    @ApiModelProperty(value = "发明人")
+    @Convert(converter = StringArrayConverter.class)
+    private List<String> inventor;
+
+    @ApiModelProperty(value = "IPC分类")
+    @Convert(converter = StringArrayConverter.class)
+    private List<String> ipc;
+
+    @SearchableOne
+    @Searchable
+    @ApiModelProperty(value = "专利权人")
+    private String owner;
+
+    @ApiModelProperty(value = "专利权人地址")
+    private String ownerOneAddr;
+
+//    @ApiModelProperty(value = "专业领域")
+//    private String profession;
+
+    @ApiModelProperty(value = "技术分类1")
+    private String techOne;
+
+    private String wordUrl;
+
+    private String pdfUrl;
+
+    @SearchableOne
+    @Searchable
+    @ApiModelProperty(value = "专利名称")
+    private String name;
+
+    /**
+     * setting
+     */
+    @ApiModelProperty(value = "行业分类")
+    private Long industryClass;
+
+    //    @EnumFormat(value = IntePropLawStatus.class,
+//            fromExcel = {"有效", "失效", "未知"},
+//            toJavaEnum = {"EFFECTIVE", "FAILURE", "UNKNOWN"})
+//    @ExcelProperty(value = "法律状态", converter = EnumExcelConverter.class)
+//    @Enumerated(EnumType.STRING)
+    @Transient
+    @ApiModelProperty(value = "法律状态")
+    private String lawStatus;
+
+    private Long lawStatusId;
+
+    /**
+     * 专利区分:包括脱密国防专利,军转民专利
+     */
+//    @EnumFormat(value = IntePropertyType.class,
+//            fromExcel = {"脱密国防专利", "军转民专利"},
+//            toJavaEnum = {"DECLASSIFICATION", "MILITARY_TO_CIVILIAN"})
+//    @ExcelProperty(value = "专利区分", converter = EnumExcelConverter.class)
+//    @Enumerated(EnumType.STRING)
+    @Transient
+    private String type;
+
+    private Long typeId;
+
+    private String img;
+
+    @Searchable
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "权利要求书")
+    private String manual;
+
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "industryClass", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
+    @NotFound(action = NotFoundAction.IGNORE)
+    private Setting setting;
+
+
+    public IntellectualProperty(IntellectualPropertyDTO dto) {
+        BeanUtil.copyProperties(dto, this);
+    }
+}

+ 18 - 0
src/main/java/com/izouma/zhirongip/domain/resource/NumOfIp.java

@@ -0,0 +1,18 @@
+package com.izouma.zhirongip.domain.resource;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+public class NumOfIp {
+    private Long ip;
+    private int  num;
+
+    public String getContent(String name) {
+        return name + ":" + this.num + ";";
+    }
+}

+ 93 - 0
src/main/java/com/izouma/zhirongip/domain/resource/PolicyLaw.java

@@ -0,0 +1,93 @@
+package com.izouma.zhirongip.domain.resource;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.annotations.SearchableOne;
+import com.izouma.zhirongip.converter.FileObjectListConverter;
+import com.izouma.zhirongip.domain.BaseEntity;
+import com.izouma.zhirongip.domain.FileObject;
+import com.izouma.zhirongip.domain.Setting;
+import com.izouma.zhirongip.enums.ResourceCategory;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.NotFound;
+import org.hibernate.annotations.NotFoundAction;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+import java.time.LocalDate;
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "政策法律")
+@Where(clause = "del = 0")
+public class PolicyLaw extends BaseEntity {
+    @Searchable
+    @SearchableOne
+    @ApiModelProperty(value = "名称")
+    private String name;
+
+    /*
+    setting 政策-7 新闻-8 法律-9
+     */
+    @ExcelIgnore
+    @ApiModelProperty(value = "类型")
+    private Long typeSettingId;
+
+    @ApiModelProperty(value = "发文时间")
+    private LocalDate issuedAt;
+
+    @SearchableOne
+    @ApiModelProperty(value = "发文单位")
+    private String issuedBy;
+
+    /*
+    只有政策有
+     */
+    @SearchableOne
+    @ApiModelProperty(value = "发文号")
+    private String issuedCode;
+
+    @ApiModelProperty(value = "封面图片")
+    private String img;
+
+    @Searchable
+    @ExcelIgnore
+    @ApiModelProperty(value = "内容")
+    @Column(columnDefinition = "TEXT")
+    private String content;
+
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "摘要")
+    private String summary;
+
+    /*
+    只有法律有
+     */
+    @ApiModelProperty(value = "实施年份")
+    private LocalDate implementationAt;
+
+    @ExcelIgnore
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "typeSettingId", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
+    @NotFound(action = NotFoundAction.IGNORE)
+    private Setting setting;
+
+    @Enumerated(EnumType.STRING)
+    private ResourceCategory category;
+
+    @Column(columnDefinition = "TEXT ")
+    @Convert(converter = FileObjectListConverter.class)
+    private List<FileObject> annex;
+
+//    @ApiModelProperty(value = "浏览量")
+//    private long view;
+}

+ 89 - 0
src/main/java/com/izouma/zhirongip/domain/resource/Purchase.java

@@ -0,0 +1,89 @@
+package com.izouma.zhirongip.domain.resource;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.izouma.zhirongip.annotations.EnumFormat;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.converter.StringArrayConverter;
+import com.izouma.zhirongip.domain.BaseEntity;
+import com.izouma.zhirongip.domain.Setting;
+import com.izouma.zhirongip.enums.PurchaseItem;
+import com.izouma.zhirongip.enums.PurchaseType;
+import com.izouma.zhirongip.utils.excel.EnumExcelConverter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.NotFound;
+import org.hibernate.annotations.NotFoundAction;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "军采信息")
+@Where(clause = "del = 0")
+public class Purchase extends BaseEntity {
+
+    @ApiModelProperty(value = "项目名称")
+    private String name;
+
+    @EnumFormat(value = PurchaseType.class,
+            fromExcel = {"公开招标", "邀请招标", "竞争性谈判", "询价"},
+            toJavaEnum = {"PUBLIC_TENDER", "INVITATION_TO_TENDER", "COMPETITIVE_NEGOTIATION", "INQUIRY"})
+    @ExcelProperty(value = "采购类型", converter = EnumExcelConverter.class)
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "采购类型")
+    private PurchaseType purchaseType;
+
+    @EnumFormat(value = PurchaseItem.class,
+            fromExcel = {"工程", "货物", "服务"},
+            toJavaEnum = {"ENGINEERING", "CARGO", "SERVICE"})
+    @ExcelProperty(value = "采购项目", converter = EnumExcelConverter.class)
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "采购项目")
+    private PurchaseItem purchaseItem;
+
+    @ApiModelProperty(value = "报名截止时间")
+    private LocalDate registerDeadline;
+
+    @ExcelIgnore
+    @ApiModelProperty(value = "专业领域")
+    private Long field;
+
+    @ApiModelProperty(value = "地点")
+    private String address;
+
+    @ApiModelProperty(value = "预算(万元)")
+    private BigDecimal expectedPrice;
+
+    @Searchable
+    @ExcelIgnore
+    @ApiModelProperty(value = "详情介绍")
+    @Column(columnDefinition = "TEXT")
+    private String content;
+
+    @ApiModelProperty(value = "浏览量")
+    private long view;
+
+    @ExcelIgnore
+    @Convert(converter = StringArrayConverter.class)
+    @Column(columnDefinition = "TEXT")
+    private List<String> img;
+
+    @ExcelIgnore
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "field", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
+    @NotFound(action = NotFoundAction.IGNORE)
+    private Setting setting;
+
+}

+ 104 - 0
src/main/java/com/izouma/zhirongip/domain/resource/SuccessCase.java

@@ -0,0 +1,104 @@
+package com.izouma.zhirongip.domain.resource;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.izouma.zhirongip.annotations.EnumFormat;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.domain.BaseEntity;
+import com.izouma.zhirongip.domain.Setting;
+import com.izouma.zhirongip.enums.CaseCategory;
+import com.izouma.zhirongip.enums.LogoType;
+import com.izouma.zhirongip.enums.PatentType;
+import com.izouma.zhirongip.enums.TechTradingMethod;
+import com.izouma.zhirongip.utils.excel.EnumExcelConverter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.NotFound;
+import org.hibernate.annotations.NotFoundAction;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@Where(clause = "del = 0")
+@ApiModel(value = "成功案例")
+public class SuccessCase extends BaseEntity {
+    @Searchable
+    @ApiModelProperty(value = "名称")
+    private String name;
+
+    @ExcelIgnore
+    @ApiModelProperty(value = "封面")
+    private String img;
+
+    /*
+    所属领域/商标类型/版权分类/软著分类/服务类型
+     */
+    @ExcelIgnore
+    private Long settingId;
+
+    @ApiModelProperty(value = "成交时间")
+    private LocalDate soldAt;
+
+    @ApiModelProperty(value = "成交价格")
+    private BigDecimal soldPrice;
+
+    @ExcelProperty(value = "专利类型", converter = EnumExcelConverter.class)
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "转移转化方式")
+    private TechTradingMethod mode;
+
+    @ApiModelProperty(value = "成交地点")
+    private String soldAddress;
+
+    @Searchable
+    @ExcelIgnore
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "描述")
+    private String manual;
+
+    @ApiModelProperty(value = "浏览量")
+    private long view;
+
+    /*
+    普通专利 ---专利类型
+     */
+    @EnumFormat(value = PatentType.class,
+            fromExcel = {"发明专利", "实用新型专利", "外观设计专利"},
+            toJavaEnum = {"INVENTION", "UTILITY_MODEL", "APPEARANCE_DESIGN"})
+    @ExcelProperty(value = "专利类型", converter = EnumExcelConverter.class)
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "专利类型")
+    private PatentType patentType;
+
+    /*
+    商标
+     */
+    @EnumFormat(value = LogoType.class,
+            fromExcel = {"普通商标", "集体商标", "证明商标"},
+            toJavaEnum = {"GENERAL", "COLLECTIVE", "PROOF"})
+    @ExcelProperty(value = "商标类型", converter = EnumExcelConverter.class)
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "商标类型")
+    private LogoType logoType;
+
+    @ExcelIgnore
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "settingId", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT))
+    @NotFound(action = NotFoundAction.IGNORE)
+    private Setting setting;
+
+    @ExcelIgnore
+    @Enumerated(EnumType.STRING)
+    private CaseCategory category;
+}

+ 125 - 0
src/main/java/com/izouma/zhirongip/domain/supply/Copyright.java

@@ -0,0 +1,125 @@
+package com.izouma.zhirongip.domain.supply;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.izouma.zhirongip.annotations.EnumFormat;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.converter.StringArrayConverter;
+import com.izouma.zhirongip.domain.BaseEntity;
+import com.izouma.zhirongip.enums.ApplyStatus;
+import com.izouma.zhirongip.enums.CommissionType;
+import com.izouma.zhirongip.enums.CopyrightType;
+import com.izouma.zhirongip.enums.TradingMethod;
+import com.izouma.zhirongip.utils.excel.EnumExcelConverter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "版权/软著")
+@Where(clause = "del = 0")
+public class Copyright extends BaseEntity {
+
+    private Long userId;
+
+    @Searchable
+    @ApiModelProperty(value = "作品名称")
+    private String name;
+
+    @ApiModelProperty(value = "登记号")
+    private String code;
+
+    @ApiModelProperty(value = "登记日期")
+    private LocalDate registrationTime;
+
+    /*
+    作品类型-3 软著类型-4
+     */
+    @ExcelIgnore
+    @ApiModelProperty(value = "作品类型/软著类型")
+    private Long workType;
+
+    /*
+    软著没有作者
+     */
+    @ApiModelProperty(value = "作者")
+    private String author;
+
+    @ApiModelProperty(value = "著作权人")
+    private String owner;
+
+
+    @ApiModelProperty(value = "交易方式")
+    private String tradingMethod;
+
+    @ApiModelProperty(value = "交易方式")
+    private Long tradingMethodId;
+
+    @ExcelIgnore
+    @Convert(converter = StringArrayConverter.class)
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "附图")
+    private List<String> img;
+
+    /*
+    (万元)
+     */
+    @ApiModelProperty(value = "期望价(万元)")
+    private BigDecimal expectedPrice;
+
+    @ApiModelProperty(value = "面议")
+    private Boolean negotiateDirectly;
+
+    @ApiModelProperty(value = "底价(万元)")
+    private BigDecimal basePrice;
+
+    @EnumFormat(value = CommissionType.class,
+            fromExcel = {"佣金", "百分比"},
+            toJavaEnum = {"COMMISSION", "PERCENTAGE"})
+    @ExcelProperty(value = "佣金类型", converter = EnumExcelConverter.class)
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "佣金类型")
+    private CommissionType commissionType;
+
+    @ApiModelProperty(value = "佣金(万元)")
+    private BigDecimal commission;
+
+    @ApiModelProperty(value = "联系人")
+    private String contact;
+
+    @ApiModelProperty(value = "电话")
+    private String phone;
+
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+    @ApiModelProperty(value = "所在地区")
+    private String address;
+
+    @ExcelIgnore
+    @ApiModelProperty(value = "版权/软著")
+    @Enumerated(EnumType.STRING)
+    private CopyrightType type;
+
+    @ApiModelProperty(value = "浏览量")
+    private long view;
+
+    @Enumerated(EnumType.STRING)
+    private ApplyStatus status;
+
+    @Transient
+    private String workName;
+}

+ 124 - 0
src/main/java/com/izouma/zhirongip/domain/supply/Logo.java

@@ -0,0 +1,124 @@
+package com.izouma.zhirongip.domain.supply;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.izouma.zhirongip.annotations.EnumFormat;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.converter.StringArrayConverter;
+import com.izouma.zhirongip.domain.BaseEntity;
+import com.izouma.zhirongip.enums.*;
+import com.izouma.zhirongip.utils.excel.EnumExcelConverter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "商标")
+@Where(clause = "del = 0")
+public class Logo extends BaseEntity {
+
+    @ExcelIgnore
+    private Long userId;
+
+    @Searchable
+    @ApiModelProperty(value = "商标名称")
+    private String name;
+
+    @ApiModelProperty(value = "申请号")
+    private String code;
+
+    @ApiModelProperty(value = "申请日期")
+    private LocalDate applyTime;
+
+    @EnumFormat(value = LogoType.class,
+            fromExcel = {"普通商标", "集体商标", "证明商标"},
+            toJavaEnum = {"GENERAL", "COLLECTIVE", "PROOF"})
+    @ExcelProperty(value = "商标类型", converter = EnumExcelConverter.class)
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "商标类型")
+    private LogoType logoType;
+
+    /*
+    setting
+     */
+    @ExcelIgnore
+    @ApiModelProperty(value = "所属分类")
+    private Long category;
+
+    @ApiModelProperty(value = "核定使用商品/服务项目")
+    @Convert(converter = StringArrayConverter.class)
+    private List<String> servicesItem;
+
+    @ApiModelProperty(value = "商标注册人")
+    private String owner;
+
+    @ExcelIgnore
+    @Convert(converter = StringArrayConverter.class)
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "商标图样")
+    private List<String> img;
+
+
+    @ApiModelProperty(value = "交易方式")
+    private String tradingMethod;
+
+    @ApiModelProperty(value = "交易方式")
+    private Long tradingMethodId;
+
+    /*
+    (万元)
+     */
+    @ApiModelProperty(value = "期望价(万元)")
+    private BigDecimal expectedPrice;
+
+    @ApiModelProperty(value = "面议")
+    private Boolean negotiateDirectly;
+
+    @ApiModelProperty(value = "底价(万元)")
+    private BigDecimal basePrice;
+
+    @EnumFormat(value = CommissionType.class,
+            fromExcel = {"佣金", "百分比"},
+            toJavaEnum = {"COMMISSION", "PERCENTAGE"})
+    @ExcelProperty(value = "佣金类型", converter = EnumExcelConverter.class)
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "佣金类型")
+    private CommissionType commissionType;
+
+    @ApiModelProperty(value = "佣金(万元)")
+    private BigDecimal commission;
+
+    @ApiModelProperty(value = "联系人")
+    private String contact;
+
+    @ApiModelProperty(value = "电话")
+    private String phone;
+
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+    @ApiModelProperty(value = "所在地区")
+    private String address;
+
+    @ApiModelProperty(value = "浏览量")
+    private long view;
+
+    @Enumerated(EnumType.STRING)
+    private ApplyStatus status;
+
+    @Transient
+    private String categoryName;
+}

+ 162 - 0
src/main/java/com/izouma/zhirongip/domain/supply/Patent.java

@@ -0,0 +1,162 @@
+package com.izouma.zhirongip.domain.supply;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.izouma.zhirongip.annotations.EnumFormat;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.converter.StringArrayConverter;
+import com.izouma.zhirongip.domain.BaseEntity;
+import com.izouma.zhirongip.enums.*;
+import com.izouma.zhirongip.utils.excel.EnumExcelConverter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "专利")
+@Where(clause = "del = 0")
+public class Patent extends BaseEntity {
+
+    @ExcelIgnore
+    private Long userId;
+
+    @ApiModelProperty(value = "专利名称")
+    private String name;
+
+    @ApiModelProperty(value = "申请号")
+    private String code;
+
+    /*
+    脱密专利没有
+     */
+
+    @ExcelIgnore
+    @ApiModelProperty(value = "专利类型")
+    private String patentType;
+    @ApiModelProperty(value = "专利类型")
+    private Long patentTypeId;
+
+    @ApiModelProperty(value = "申请日期")
+    private LocalDate applyTime;
+
+    /**
+     * setting
+     */
+
+    @ApiModelProperty(value = "行业分类")
+    private Long industryClass;
+
+    @ApiModelProperty(value = "IPC分类号")
+    private String ipc;
+
+
+    @ApiModelProperty(value = "法律状态")
+    private String lawStatus;
+    @ApiModelProperty(value = "法律状态")
+    private Long lawStatusId;
+
+    @ApiModelProperty(value = "申请人")
+    @Convert(converter = StringArrayConverter.class)
+    private List<String> applicant;
+
+    @ApiModelProperty(value = "专利权人")
+    @Convert(converter = StringArrayConverter.class)
+    private List<String> owner;
+
+    /*
+    脱密专利没有
+     */
+//    @Enumerated(EnumType.STRING)
+//    @ApiModelProperty(value = "专利权人类型")
+//    private OwnerType ownerType;
+
+    @ApiModelProperty(value = "发明人")
+    @Convert(converter = StringArrayConverter.class)
+    private List<String> inventor;
+
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "摘要")
+    private String digest;
+
+    @Searchable
+    @ExcelIgnore
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "权利要求书")
+    private String manual;
+
+    @ExcelIgnore
+    @Convert(converter = StringArrayConverter.class)
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "专利附图")
+    private List<String> img;
+
+
+
+    @ApiModelProperty(value = "交易方式")
+    private String tradingMethod;
+
+    @ApiModelProperty(value = "交易方式")
+    private Long tradingMethodId;
+
+    /*
+    (万元)
+     */
+    @ApiModelProperty(value = "期望价(万元)")
+    private BigDecimal expectedPrice;
+
+    @ApiModelProperty(value = "面议")
+    private Boolean negotiateDirectly;
+
+    @ApiModelProperty(value = "底价(万元)")
+    private BigDecimal basePrice;
+
+    @EnumFormat(value = CommissionType.class,
+            fromExcel = {"佣金", "百分比"},
+            toJavaEnum = {"COMMISSION", "PERCENTAGE"})
+    @ExcelProperty(value = "佣金类型", converter = EnumExcelConverter.class)
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "佣金类型")
+    private CommissionType commissionType;
+
+    @ApiModelProperty(value = "佣金(万元)")
+    private BigDecimal commission;
+
+    @ApiModelProperty(value = "联系人")
+    private String contact;
+
+    @ApiModelProperty(value = "电话")
+    private String phone;
+
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+    @ApiModelProperty(value = "所在地区")
+    private String address;
+
+    @ExcelIgnore
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "专利分类")
+    private CaseType caseType;
+
+    @ApiModelProperty(value = "浏览量")
+    private long view;
+
+    @Enumerated(EnumType.STRING)
+    private ApplyStatus status;
+
+    @Transient
+    private String industryName;
+}

+ 80 - 0
src/main/java/com/izouma/zhirongip/domain/supply/ServiceProvider.java

@@ -0,0 +1,80 @@
+package com.izouma.zhirongip.domain.supply;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.converter.LongArrayConverter;
+import com.izouma.zhirongip.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.Column;
+import javax.persistence.Convert;
+import javax.persistence.Entity;
+import javax.persistence.Transient;
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "服务机构")
+@Where(clause = "del = 0")
+public class ServiceProvider extends BaseEntity {
+    @ExcelIgnore
+    private Long userId;
+
+    @Searchable
+    @ApiModelProperty(value = "机构名称")
+    private String name;
+
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "机构简介")
+    private String introduction;
+
+    @ExcelIgnore
+    @ApiModelProperty(value = "服务机构logo")
+    private String logo;
+
+    /*
+    setting,最多选择三个
+     */
+    @ExcelIgnore
+    @Convert(converter = LongArrayConverter.class)
+    @ApiModelProperty(value = "擅长领域")
+    private List<Long> field;
+
+    /*
+    包括产品型能、应用场景、预期效益
+     */
+    @ExcelIgnore
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "服务内容列表")
+    private String content;
+
+    @ExcelIgnore
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "服务案例")
+    private String example;
+
+    @ApiModelProperty(value = "联系人")
+    private String contact;
+
+    @ApiModelProperty(value = "电话")
+    private String phone;
+
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+    @ApiModelProperty(value = "联系地址")
+    private String address;
+
+    @Transient
+    private List<String> fieldName;
+
+}

+ 100 - 0
src/main/java/com/izouma/zhirongip/domain/supply/TechnicalManager.java

@@ -0,0 +1,100 @@
+package com.izouma.zhirongip.domain.supply;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.izouma.zhirongip.annotations.EnumFormat;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.converter.LongArrayConverter;
+import com.izouma.zhirongip.converter.StringArrayConverter;
+import com.izouma.zhirongip.domain.BaseEntity;
+import com.izouma.zhirongip.enums.ApplyStatus;
+import com.izouma.zhirongip.enums.AreaOfAffiliation;
+import com.izouma.zhirongip.utils.excel.EnumExcelConverter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+import java.util.List;
+
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+@Builder
+@Entity
+@ApiModel(value = "技术经理人")
+@Where(clause = "del = 0")
+public class TechnicalManager extends BaseEntity {
+    @ExcelIgnore
+    private Long userId;
+
+    @ExcelProperty(value = "照片")
+    @ApiModelProperty(value = "照片")
+    private String avatar;
+
+    private String sex;
+
+    @Searchable
+    @ApiModelProperty(value = "姓名")
+    private String name;
+
+    @ApiModelProperty(value = "所在单位")
+    private String work;
+
+    @Searchable
+    @ApiModelProperty(value = "电话")
+    private String phone;
+
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+//    @ApiModelProperty(value = "主要成果")
+//    @Column(columnDefinition = "TEXT")
+//    private String keyAchievement;
+
+    @Searchable
+    @ExcelIgnore
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "自我介绍")
+    private String selfIntroduction;
+
+    /**
+     * setting
+     */
+    @ExcelIgnore
+    @Convert(converter = LongArrayConverter.class)
+    @ApiModelProperty(value = "擅长技术领域")
+    private List<Long> field;
+
+    @ExcelIgnore
+    @Column(columnDefinition = "TEXT")
+    @Convert(converter = StringArrayConverter.class)
+    @ApiModelProperty(value = "资质")
+    private List<String> qualification;
+
+    @Transient
+    private List<String> fieldName;
+
+    /*
+    专家
+     */
+//    @EnumFormat(value = AreaOfAffiliation.class,
+//            fromExcel = {"知识产权", "国防科工"},
+//            toJavaEnum = {"INTELLECTUAL_PROPERTY", "NATIONAL_DEFENCE"})
+//    @ExcelProperty(value = "所属领域", converter = EnumExcelConverter.class)
+//    @Enumerated(EnumType.STRING)
+//    @ApiModelProperty(value = "所属领域")
+//    private AreaOfAffiliation affiliation;
+
+    /*
+    是否专家
+     */
+    private boolean isExpert;
+
+    @Enumerated(EnumType.STRING)
+    private ApplyStatus status;
+}

+ 140 - 0
src/main/java/com/izouma/zhirongip/domain/supply/TechnologyProduct.java

@@ -0,0 +1,140 @@
+package com.izouma.zhirongip.domain.supply;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.izouma.zhirongip.annotations.EnumFormat;
+import com.izouma.zhirongip.annotations.Searchable;
+import com.izouma.zhirongip.converter.StringArrayConverter;
+import com.izouma.zhirongip.domain.BaseEntity;
+import com.izouma.zhirongip.enums.*;
+import com.izouma.zhirongip.utils.excel.EnumExcelConverter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.hibernate.annotations.Where;
+
+import javax.persistence.*;
+import java.math.BigDecimal;
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Entity
+@ApiModel(value = "技术/产品")
+@Where(clause = "del = 0")
+public class TechnologyProduct extends BaseEntity {
+    @ExcelIgnore
+    private Long userId;
+
+    @Searchable
+    @ApiModelProperty(value = "名称")
+    private String name;
+
+    /*
+    为新材料、电子信息..
+     */
+    @ExcelIgnore
+    @ApiModelProperty(value = "所属领域")
+    private Long field;
+
+    /*
+    技术: 成果所有人
+    产品:持有单位
+     */
+    @ApiModelProperty(value = "成果所属人/持有单位")
+    private String owner;
+
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "技术成熟度/所属阶段")
+    private Stage stage;
+
+    @Searchable
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "摘要")
+    private String digest;
+
+    /*
+    技术:包括技术指标、技术特点、适用范围、预期效益
+    产品:包括产品型能、应用场景、预期效益
+     */
+    @ExcelIgnore
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "描述")
+    private String manual;
+
+    @ApiModelProperty(value = "是否专利技术")
+    private boolean isPatented;
+
+    /*
+    选择是专利技术时,出现
+     */
+    @Convert(converter = StringArrayConverter.class)
+    @ApiModelProperty(value = "专利号")
+    private List<String> patentNo;
+
+    @ExcelIgnore
+    @Convert(converter = StringArrayConverter.class)
+    @Column(columnDefinition = "TEXT")
+    @ApiModelProperty(value = "附图")
+    private List<String> img;
+
+
+    @ApiModelProperty(value = "交易方式")
+    private String tradingMethod;
+    @ApiModelProperty(value = "交易方式")
+    private Long tradingMethodId;
+
+    /*
+    (万元)
+     */
+    @ApiModelProperty(value = "期望价(万元)")
+    private BigDecimal expectedPrice;
+
+    @ApiModelProperty(value = "面议")
+    private Boolean negotiateDirectly;
+
+    @ApiModelProperty(value = "底价(万元)")
+    private BigDecimal basePrice;
+
+    @EnumFormat(value = CommissionType.class,
+            fromExcel = {"佣金", "百分比"},
+            toJavaEnum = {"COMMISSION", "PERCENTAGE"})
+    @ExcelProperty(value = "佣金类型", converter = EnumExcelConverter.class)
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "佣金类型")
+    private CommissionType commissionType;
+
+    @ApiModelProperty(value = "佣金(万元)")
+    private BigDecimal commission;
+
+    @ApiModelProperty(value = "联系人")
+    private String contact;
+
+    @ApiModelProperty(value = "电话")
+    private String phone;
+
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+    @ApiModelProperty(value = "所在地区")
+    private String address;
+
+    @ExcelIgnore
+    @Enumerated(EnumType.STRING)
+    @ApiModelProperty(value = "技术/产品")
+    private TpType tpType;
+
+    @ApiModelProperty(value = "浏览量")
+    private long view;
+
+    @Enumerated(EnumType.STRING)
+    private ApplyStatus status;
+
+    @Transient
+    private String fieldName;
+}

+ 11 - 0
src/main/java/com/izouma/zhirongip/dto/Captcha.java

@@ -0,0 +1,11 @@
+package com.izouma.zhirongip.dto;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+@Data
+@AllArgsConstructor
+public class Captcha {
+    private String key;
+    private String image;
+}

+ 105 - 0
src/main/java/com/izouma/zhirongip/dto/CompanyDTO.java

@@ -0,0 +1,105 @@
+package com.izouma.zhirongip.dto;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.metadata.BaseRowModel;
+import com.izouma.zhirongip.domain.resource.Company;
+import com.izouma.zhirongip.utils.excel.BooleanConverter;
+import com.izouma.zhirongip.utils.excel.LocalDateTimeConverter;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.time.LocalDateTime;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel(value = "Company")
+public class CompanyDTO extends BaseRowModel {
+
+    @ExcelProperty(value = "企业性质")
+    private String settingName;
+
+    @ExcelProperty(value = "所属领域")
+    private String fieldName;
+
+    @ExcelProperty(value = "企业名称")
+    private String name;
+
+    @ExcelProperty(value = "所属地区")
+    private String owner;
+
+    @ExcelProperty(value = "图片")
+    private String img;
+
+    @ExcelProperty(value = "企业简介")
+    private String manual;
+
+    @ExcelProperty(value = "入库入网")
+    private String networkName;
+
+    @ExcelProperty(value = "武器装备科研生产单位保密资格证", converter = BooleanConverter.class)
+    private boolean confidentialityQualification;
+
+    @ExcelProperty(value = "保密资格证级别")
+    private String confidentialityLevelName;
+
+    @ExcelProperty(value = "武器装备质量管理体系认证", converter = BooleanConverter.class)
+    private boolean certification;
+
+    @ExcelProperty(value = "武器装备承制单位资格证", converter = BooleanConverter.class)
+    private boolean unitQualification;
+
+    @ExcelProperty(value = "承制单位资格证级别")
+    private String unitLevelName;
+
+    @ExcelProperty(value = "武器装备科研生产许可证", converter = BooleanConverter.class)
+    private boolean productionLicence;
+
+    @ExcelProperty(value = "生产许可证类别")
+    private String productionLevelName;
+
+    @ExcelProperty(value = "涉密信息系统集成", converter = BooleanConverter.class)
+    private boolean systemIntegration;
+
+    @ExcelProperty(value = "系统集成级别")
+    private String integrationLevelName;
+
+    @ExcelProperty(value = "高新技术企业", converter = BooleanConverter.class)
+    private boolean highTech;
+
+    @ExcelProperty(value = "知识产权数量")
+    private String numOfIpsName;
+
+    @ExcelProperty(value = "知识产权贯标", converter = BooleanConverter.class)
+    private boolean standardization;
+
+    @ExcelProperty(value = "知识产权贯标级别")
+    private String standardizationLevelName;
+
+    @ExcelProperty(value = "企业技术资质")
+    private String qualificationLevelName;
+
+    @ExcelProperty(value = "联系人")
+    private String contact;
+
+    @ExcelProperty(value = "电话")
+    private String phone;
+
+    @ExcelProperty(value = "邮箱")
+    private String email;
+
+    @ExcelProperty(value = "官网地址")
+    private String url;
+
+    @ExcelProperty(value = "信息更新时间", converter = LocalDateTimeConverter.class)
+    private LocalDateTime updateAt;
+
+    public CompanyDTO(Company company) {
+        BeanUtil.copyProperties(company, this);
+    }
+}

+ 16 - 0
src/main/java/com/izouma/zhirongip/dto/DemandDTO.java

@@ -0,0 +1,16 @@
+package com.izouma.zhirongip.dto;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class DemandDTO {
+    private String type;
+    private long demand;
+    private long supply;
+}

+ 63 - 0
src/main/java/com/izouma/zhirongip/dto/ExpertDTO.java

@@ -0,0 +1,63 @@
+package com.izouma.zhirongip.dto;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.metadata.BaseRowModel;
+import com.izouma.zhirongip.utils.excel.LocalDateConverter;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.time.LocalDate;
+
+@AllArgsConstructor
+@NoArgsConstructor
+@Data
+@Builder
+@ApiModel(value = "技术经理人")
+public class ExpertDTO extends BaseRowModel {
+
+    @ExcelProperty(value = "照片")
+    private String avatar;
+
+    @ExcelProperty(value = "姓名")
+    private String name;
+
+    @ExcelProperty(value = "性别")
+    private String sex;
+
+    @ExcelProperty(value = "出生年月", converter = LocalDateConverter.class)
+    private LocalDate birthday;
+
+    @ExcelProperty(value = "单位")
+    private String work;
+
+    @ExcelProperty(value = "学历")
+    private String academicQualification;
+
+    @ExcelProperty(value = "职称")
+    private String jobTitle;
+
+    @ExcelProperty(value = "职位")
+    private String position;
+
+    @ExcelProperty(value = "电话")
+    private String phone;
+
+    @ExcelProperty(value = "邮箱")
+    private String email;
+
+    @ExcelProperty(value = "通讯地址")
+    private String address;
+
+    @ExcelProperty(value = "个人简介")
+    private String selfIntroduction;
+
+    @ExcelProperty(value = "专业领域")
+    private String fieldNames;
+
+    @ExcelProperty(value = "研究方向")
+    private String affiliationName;
+
+}

+ 89 - 0
src/main/java/com/izouma/zhirongip/dto/InstitutionDTO.java

@@ -0,0 +1,89 @@
+package com.izouma.zhirongip.dto;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.izouma.zhirongip.domain.Institution;
+import com.izouma.zhirongip.domain.User;
+import com.izouma.zhirongip.enums.ApplyStatus;
+import com.izouma.zhirongip.enums.InstitutionalNature;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import java.time.LocalDate;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel(value = "机构认证")
+public class InstitutionDTO {
+    private Long id;
+
+    @ExcelIgnore
+    private Long userId;
+
+    @ExcelProperty(value = "企业名称")
+    private String name;
+
+    @ExcelIgnore
+    @ApiModelProperty(value = "机构性质")
+    private InstitutionalNature nature;
+
+    @ExcelProperty(value = "机构性质")
+    private String natureDesc;
+
+    @ExcelProperty(value = "成立日期")
+    private LocalDate establishedAt;
+
+    @ExcelProperty(value = "官网地址")
+    private String url;
+
+    @ExcelProperty(value = "机构简介")
+    private String introduction;
+
+    @ExcelIgnore
+    private String logo;
+
+    @ExcelProperty(value = "统一社会信用代码 ")
+    private String uscc;
+
+    @ExcelIgnore
+    @ApiModelProperty(value = "营业执照")
+    private String businessLicense;
+
+    @ExcelIgnore
+    private ApplyStatus status;
+
+    @ExcelProperty(value = "姓名 ")
+    private String nickname;
+
+    @ExcelIgnore
+    private String avatar;
+
+    @ExcelProperty(value = "电话 ")
+    private String phone;
+
+    @ExcelProperty(value = "邮箱 ")
+    private String email;
+
+    @ExcelProperty(value = "申请状态")
+    private String statusDesc;
+
+    public InstitutionDTO(Institution institution, User user) {
+        BeanUtil.copyProperties(institution, this);
+        this.natureDesc = institution.getNature().getDesc();
+        this.statusDesc = institution.getStatus().getDesc();
+
+        this.nickname = user.getNickname();
+        this.avatar = user.getAvatar();
+        this.phone = user.getPhone();
+        this.email = user.getEmail();
+    }
+}

+ 97 - 0
src/main/java/com/izouma/zhirongip/dto/IntellectualPropertyDTO.java

@@ -0,0 +1,97 @@
+package com.izouma.zhirongip.dto;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.metadata.BaseRowModel;
+import com.izouma.zhirongip.domain.resource.IntellectualProperty;
+import com.izouma.zhirongip.utils.excel.LocalDateConverter;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.time.LocalDate;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel(value = "知产")
+public class IntellectualPropertyDTO extends BaseRowModel {
+
+    @ExcelProperty(value = "专利区分")
+    private String type;
+
+    @ExcelProperty(value = "专利名称")
+    private String name;
+
+    @ExcelProperty(value = "法律状态")
+    private String lawStatus;
+
+    @ExcelProperty(value = "行业分类")
+    private String industryClassName;
+
+    @ExcelProperty(value = "专利代理机构")
+    private String agency;
+
+    @ExcelProperty(value = "代理人")
+    private String agent;
+
+    @ExcelProperty(value = "申请主体")
+    private String applyMain;
+
+    @ExcelProperty(value = "申请人")
+    private String applyName;
+
+    @ExcelProperty(value = "申请日", converter = LocalDateConverter.class)
+    private LocalDate applyTime;
+
+    @ExcelProperty(value = "授权公告日", converter = LocalDateConverter.class)
+    private LocalDate authTime;
+
+    @ExcelProperty(value = "公开号")
+    private String openCode;
+
+    @ExcelProperty(value = "申请号")
+    private String code;
+
+    @ExcelProperty(value = "发明人")
+    private String inventor;
+
+    @ExcelProperty(value = "IPC分类")
+    private String ipc;
+
+    @ExcelProperty(value = "专利权人")
+    private String owner;
+
+    @ExcelProperty(value = "专利权人地址")
+    private String ownerOneAddr;
+
+    @ExcelProperty(value = "技术分类1")
+    private String techOne;
+
+    @ExcelProperty(value = "摘要")
+    private String digest;
+
+    @ExcelProperty(value = "摘要附图")
+    private String img;
+
+    @ExcelProperty(value = "权利要求书")
+    private String manual;
+
+    @ExcelProperty(value = "发布时间", converter = LocalDateConverter.class)
+    private LocalDate issue;
+
+    @ExcelProperty(value = "word")
+    private String wordUrl;
+
+    @ExcelProperty(value = "pdf")
+    private String pdfUrl;
+
+    public IntellectualPropertyDTO(IntellectualProperty ip) {
+        BeanUtil.copyProperties(ip, this);
+        this.inventor = String.join(",", ip.getInventor());
+        this.ipc = String.join(",", ip.getIpc());
+    }
+}

+ 23 - 0
src/main/java/com/izouma/zhirongip/dto/MenuDTO.java

@@ -0,0 +1,23 @@
+package com.izouma.zhirongip.dto;
+
+public interface MenuDTO {
+    Long getId();
+
+    String getName();
+
+    String getPath();
+
+    String getIcon();
+
+    Integer getSort();
+
+    Long getParent();
+
+    Boolean getRoot();
+
+    Boolean getEnabled();
+
+    Boolean getActive();
+
+    String getCategory();
+}

+ 15 - 0
src/main/java/com/izouma/zhirongip/dto/PageQuery.java

@@ -0,0 +1,15 @@
+package com.izouma.zhirongip.dto;
+
+import lombok.Data;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Data
+public class PageQuery {
+    private int                 page  = 0;
+    private int                 size  = 20;
+    private String              sort;
+    private String              search;
+    private Map<String, Object> query = new HashMap<>();
+}

+ 74 - 0
src/main/java/com/izouma/zhirongip/dto/PersonalDTO.java

@@ -0,0 +1,74 @@
+package com.izouma.zhirongip.dto;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.izouma.zhirongip.domain.Personal;
+import com.izouma.zhirongip.domain.User;
+import com.izouma.zhirongip.enums.ApplyStatus;
+import com.izouma.zhirongip.enums.DocumentType;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel(value = "个人认证", description = "个人认证")
+public class PersonalDTO {
+
+    private Long id;
+
+    @ExcelIgnore
+    private Long userId;
+
+    @ExcelIgnore
+    private DocumentType type;
+
+    @ExcelProperty(value = "证件类型")
+    private String typeDesc;
+
+    @ExcelProperty(value = "证件编号")
+    private String documentNumber;
+
+    @ExcelIgnore
+    @ApiModelProperty(value = "证件照片(正面)")
+    private String photoFront;
+
+    @ExcelIgnore
+    @ApiModelProperty(value = "证件照片(反面)")
+    private String photoBackside;
+
+    @ExcelIgnore
+    private ApplyStatus status;
+
+    @ExcelProperty(value = "姓名 ")
+    private String nickname;
+
+    @ExcelIgnore
+    private String avatar;
+
+    @ExcelProperty(value = "电话 ")
+    private String phone;
+
+    @ExcelProperty(value = "邮箱 ")
+    private String email;
+
+    @ExcelProperty(value = "申请状态")
+    private String statusDesc;
+
+    public PersonalDTO(Personal personal, User user) {
+        BeanUtil.copyProperties(personal, this);
+        this.statusDesc = personal.getStatus().getDesc();
+        this.typeDesc = personal.getType().getDesc();
+
+        this.nickname = user.getNickname();
+        this.avatar = user.getAvatar();
+        this.phone = user.getPhone();
+        this.email = user.getEmail();
+    }
+}

+ 41 - 0
src/main/java/com/izouma/zhirongip/dto/ProductDTO.java

@@ -0,0 +1,41 @@
+package com.izouma.zhirongip.dto;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.metadata.BaseRowModel;
+import com.izouma.zhirongip.domain.resource.Digital;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel(value = "数据")
+public class ProductDTO extends BaseRowModel {
+    @ExcelProperty(value = "产品类别")
+    private String settingName;
+
+    @ExcelProperty(value = "行业领域")
+    private String fieldName;
+
+    @ExcelProperty(value = "产品名称")
+    private String name;
+
+    @ExcelProperty(value = "产品所属人")
+    private String owner;
+
+    @ExcelProperty(value = "附图")
+    private String img;
+
+    @ExcelProperty(value = "描述")
+    private String manual;
+
+    public ProductDTO(Digital digital) {
+        BeanUtil.copyProperties(digital, this);
+    }
+
+}

+ 16 - 0
src/main/java/com/izouma/zhirongip/dto/SearchDTO.java

@@ -0,0 +1,16 @@
+package com.izouma.zhirongip.dto;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class SearchDTO {
+    private Long id;
+    private String name;
+    private String type;
+}

+ 35 - 0
src/main/java/com/izouma/zhirongip/dto/TechnologyDTO.java

@@ -0,0 +1,35 @@
+package com.izouma.zhirongip.dto;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.metadata.BaseRowModel;
+import io.swagger.annotations.ApiModel;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@ApiModel(value = "数据")
+public class TechnologyDTO extends BaseRowModel {
+    @ExcelProperty(value = "技术区分")
+    private String settingName;
+
+    @ExcelProperty(value = "行业领域")
+    private String fieldName;
+
+    @ExcelProperty(value = "技术名称")
+    private String name;
+
+    @ExcelProperty(value = "技术所属人")
+    private String owner;
+
+    @ExcelProperty(value = "附图")
+    private String img;
+
+    @ExcelProperty(value = "描述")
+    private String manual;
+
+}

+ 37 - 0
src/main/java/com/izouma/zhirongip/dto/UserRegister.java

@@ -0,0 +1,37 @@
+package com.izouma.zhirongip.dto;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.izouma.zhirongip.security.Authority;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.HashSet;
+import java.util.Set;
+
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(value = {"hibernateLazyInitializer"}, ignoreUnknown = true)
+public class UserRegister {
+
+    private String username;
+
+    private String nickname;
+
+    private String avatar;
+
+    private String password;
+
+    private Set<Authority> authorities = new HashSet<>();
+
+    private String sex;
+
+    private String phone;
+
+    private String email;
+}

+ 354 - 0
src/main/java/com/izouma/zhirongip/dto/gen/GenCode.java

@@ -0,0 +1,354 @@
+package com.izouma.zhirongip.dto.gen;
+
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+import java.util.List;
+
+/**
+ * gen_code_model 实体类
+ * Fri May 04 15:57:06 CST 2018  Suo Chen Cheng
+ */
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class GenCode {
+
+    /**
+     * id
+     */
+    private Integer id;
+
+    /**
+     * 表名
+     */
+    private String tableName;
+
+    /**
+     * 类名
+     */
+    private String className;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 是否生成表
+     */
+    private Boolean genTable;
+
+    /**
+     * 是否生成类
+     */
+    private Boolean genClass;
+
+    /**
+     * 是否生成列表页面
+     */
+    private Boolean genList;
+
+    /**
+     * 是否生成表单页面
+     */
+    private Boolean genForm;
+
+    /**
+     * 是否生成路由
+     */
+    private Boolean genRouter;
+
+    /**
+     * 字段表id
+     */
+    private String fieldId;
+
+    /**
+     * java生成路径
+     */
+    private String javaPath;
+
+    /**
+     * vue生成路径
+     */
+    private String viewPath;
+
+    /**
+     * 路由生成路径
+     */
+    private String routerPath;
+
+    /**
+     * resources生成路径
+     */
+    private String resourcesPath;
+
+    /**
+     * 数据库类型:Mysql/SqlServer
+     */
+    private String dataBaseType;
+
+    private List<TableField> fields;    // 表字段
+    private TableField primaryField; //主键字段
+
+    private Boolean readTable;
+
+    /**
+     * 数据库CODE,使用什么数据源S
+     */
+    private String dataSourceCode;
+
+    /**
+     * 生成代码的JSON Str
+     */
+    private String genJson;
+
+    private String searchKey;
+
+    private String delFlag;
+
+    private String typeFlag;
+
+    private List<Subtable> subtables;
+
+    private boolean update;
+
+    private String basePackage;//基础包路径
+
+    private String tablePackage;//对象的包名
+
+    private String genPackage;//子包名
+
+
+    public List<TableField> getFields() {
+        return fields;
+    }
+
+    public void setFields(List<TableField> fields) {
+        this.fields = fields;
+    }
+
+    public TableField getPrimaryField() {
+        return primaryField;
+    }
+
+    public void setPrimaryField(TableField primaryField) {
+        this.primaryField = primaryField;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setTableName(String tableName) {
+        this.tableName = tableName;
+    }
+
+    public String getTableName() {
+        return tableName;
+    }
+
+    public void setClassName(String className) {
+        this.className = className;
+    }
+
+    public String getClassName() {
+        return className;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setGenTable(Boolean genTable) {
+        this.genTable = genTable;
+    }
+
+    public Boolean getGenTable() {
+        return genTable;
+    }
+
+    public void setGenClass(Boolean genClass) {
+        this.genClass = genClass;
+    }
+
+    public Boolean getGenClass() {
+        return genClass;
+    }
+
+    public void setGenList(Boolean genList) {
+        this.genList = genList;
+    }
+
+    public Boolean getGenList() {
+        return genList;
+    }
+
+    public void setGenForm(Boolean genForm) {
+        this.genForm = genForm;
+    }
+
+    public Boolean getGenForm() {
+        return genForm;
+    }
+
+    public void setFieldId(String fieldId) {
+        this.fieldId = fieldId;
+    }
+
+    public String getFieldId() {
+        return fieldId;
+    }
+
+    public String getJavaPath() {
+        return javaPath;
+    }
+
+    public void setJavaPath(String javaPath) {
+        this.javaPath = javaPath;
+    }
+
+    public String getViewPath() {
+        return viewPath;
+    }
+
+    public void setViewPath(String viewPath) {
+        this.viewPath = viewPath;
+    }
+
+    public String getDataBaseType() {
+        return dataBaseType;
+    }
+
+    public void setDataBaseType(String dataBaseType) {
+        this.dataBaseType = dataBaseType;
+    }
+
+    public Boolean getReadTable() {
+        return readTable;
+    }
+
+    public void setReadTable(Boolean readTable) {
+        this.readTable = readTable;
+    }
+
+    public String getRouterPath() {
+        return routerPath;
+    }
+
+    public void setRouterPath(String routerPath) {
+        this.routerPath = routerPath;
+    }
+
+    public Boolean getGenRouter() {
+        return genRouter;
+    }
+
+    public void setGenRouter(Boolean genRouter) {
+        this.genRouter = genRouter;
+    }
+
+    public String getDataSourceCode() {
+        return dataSourceCode;
+    }
+
+    public void setDataSourceCode(String dataSourceCode) {
+        this.dataSourceCode = dataSourceCode;
+    }
+
+    public String getGenJson() {
+        return genJson;
+    }
+
+    public void setGenJson(String genJson) {
+        this.genJson = genJson;
+    }
+
+    public String getSearchKey() {
+        return searchKey;
+    }
+
+    public void setSearchKey(String searchKey) {
+        this.searchKey = searchKey;
+    }
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getTypeFlag() {
+        return typeFlag;
+    }
+
+    public void setTypeFlag(String typeFlag) {
+        this.typeFlag = typeFlag;
+    }
+
+    public List<Subtable> getSubtables() {
+        return subtables;
+    }
+
+    public void setSubtables(List<Subtable> subtables) {
+        this.subtables = subtables;
+    }
+
+    public boolean getUpdate() {
+        return update;
+    }
+
+    public void setUpdate(boolean update) {
+        this.update = update;
+    }
+
+    public String getResourcesPath() {
+        return resourcesPath;
+    }
+
+    public void setResourcesPath(String resourcesPath) {
+        this.resourcesPath = resourcesPath;
+    }
+
+    public boolean isUpdate() {
+        return update;
+    }
+
+    public String getBasePackage() {
+        return basePackage;
+    }
+
+    public void setBasePackage(String basePackage) {
+        this.basePackage = basePackage;
+    }
+
+    public String getTablePackage() {
+        return tablePackage;
+    }
+
+    public void setTablePackage(String tablePackage) {
+        this.tablePackage = tablePackage;
+    }
+
+    public String getGenPackage() {
+        return genPackage;
+    }
+
+    public void setGenPackage(String genPackage) {
+        this.genPackage = genPackage;
+    }
+}
+

+ 55 - 0
src/main/java/com/izouma/zhirongip/dto/gen/Subtable.java

@@ -0,0 +1,55 @@
+package com.izouma.zhirongip.dto.gen;
+
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+/**
+ * table_field 实体类
+ * Fri May 04 13:38:24 CST 2018  Suo Chen Cheng
+ */
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class Subtable {
+
+    private String name;
+
+    private String column;
+
+    private String subColumn;
+
+    private String subCode;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getColumn() {
+        return column;
+    }
+
+    public void setColumn(String column) {
+        this.column = column;
+    }
+
+    public String getSubColumn() {
+        return subColumn;
+    }
+
+    public void setSubColumn(String subColumn) {
+        this.subColumn = subColumn;
+    }
+
+    public String getSubCode() {
+        return subCode;
+    }
+
+    public void setSubCode(String subCode) {
+        this.subCode = subCode;
+    }
+}
+

+ 163 - 0
src/main/java/com/izouma/zhirongip/dto/gen/TableField.java

@@ -0,0 +1,163 @@
+package com.izouma.zhirongip.dto.gen;
+
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.Data;
+
+@Data
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class TableField {
+
+    /**
+     * id
+     */
+    private Integer id;
+
+    /**
+     * 字段名
+     */
+    private String name;
+
+    /**
+     * 驼峰式名字
+     */
+    private String modelName;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 数据类型(数据库)
+     */
+    private String jdbcType;
+
+    /**
+     * java类型
+     */
+    private String javaType;
+
+    /**
+     * 长度
+     */
+    private Integer length;
+
+    /**
+     * 小数长度
+     */
+    private Integer decimalPlaces;
+
+    /**
+     * 默认值
+     */
+    private String defaultValue;
+
+    /**
+     * 非空
+     */
+    private Boolean notNull;
+
+    /**
+     * 主键
+     */
+    private Boolean primaryKey;
+
+    /**
+     * 自增
+     */
+    private Boolean autoIncrease;
+
+    /**
+     * 在列表中显示
+     */
+    private Boolean showInList;
+
+    /**
+     * 在表单中显示
+     */
+    private Boolean showInForm;
+
+    /**
+     * 可以排序
+     */
+    private Boolean sortable;
+
+    /**
+     * 表单类型
+     */
+    private String formType;
+
+    /**
+     * 搜索方式
+     */
+    private String searchMethod;
+
+    /**
+     * 表单必填
+     */
+    private Boolean required;
+
+    /**
+     * 表单验证
+     */
+    private Boolean validate;
+
+    /**
+     * 最短长度
+     */
+    private Integer minLength;
+
+    /**
+     * 最大长度
+     */
+    private Integer maxLength;
+
+    /**
+     * 最小值
+     */
+    private String min;
+
+    /**
+     * 最大值
+     */
+    private String max;
+
+    /**
+     * 验证类型
+     */
+    private String validatorType;
+
+    /**
+     * xml里jdbcType
+     */
+    private String sqlType;
+
+    /**
+     * 下拉框类型 1 枚举, 2 接口, 3 读表
+     */
+    private String apiFlag;
+
+    /**
+     * 接口方法/表名
+     */
+    private String optionsMethod;
+
+    /**
+     * 选项值,在枚举是用该值解析
+     */
+    private String optionsValue;
+
+
+    /**
+     * 显示值
+     */
+    private String optionsLabel;
+
+
+}
+

Некоторые файлы не были показаны из-за большого количества измененных файлов