├── .gitignore ├── .mvn └── wrapper │ ├── MavenWrapperDownloader.java │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── Git_tour.md ├── LICENSE ├── README.md ├── doc ├── CONTRIBUTING.md └── CONTRIBUTING_CN.md ├── mvnw ├── mvnw.cmd ├── pom.xml └── src ├── main ├── java │ └── miniprogram │ │ └── server │ │ ├── ServerApplication.java │ │ ├── beans │ │ ├── AdminOpeType.java │ │ ├── AdminRole.java │ │ ├── AdminUser.java │ │ ├── AdminUserLog.java │ │ ├── ComDistrict.java │ │ ├── ComDistrictLevel.java │ │ ├── ComProvincial.java │ │ ├── OrgDep.java │ │ ├── OrgTag.java │ │ ├── OrgTagAdmin.java │ │ ├── OrgTagUser.java │ │ ├── OrgUserInfoCompany.java │ │ ├── OrgUserInfoSchool.java │ │ ├── OrgWhitelist.java │ │ ├── Organization.java │ │ ├── ReportRecordCompany.java │ │ ├── ReportRecordDefault.java │ │ ├── ReportTemplate.java │ │ ├── WxMpBindInfo.java │ │ ├── WxMpLog.java │ │ ├── WxMpUser.java │ │ ├── WxQyAccessToken.java │ │ └── WxQyLog.java │ │ ├── controller │ │ ├── DistrictController.java │ │ ├── IndexController.java │ │ ├── InfoController.java │ │ ├── LoginController.java │ │ └── ReportController.java │ │ ├── mapper │ │ ├── AdminOpeTypeMapper.java │ │ ├── AdminRoleMapper.java │ │ ├── AdminUserLogMapper.java │ │ ├── AdminUserMapper.java │ │ ├── ComDistrictLevelMapper.java │ │ ├── ComDistrictMapper.java │ │ ├── ComProvincialMapper.java │ │ ├── OrgDepMapper.java │ │ ├── OrgTagAdminMapper.java │ │ ├── OrgTagMapper.java │ │ ├── OrgTagUserMapper.java │ │ ├── OrgUserInfoCompanyMapper.java │ │ ├── OrgUserInfoSchoolMapper.java │ │ ├── OrgWhitelistMapper.java │ │ ├── OrganizationMapper.java │ │ ├── ReportRecordCompanyMapper.java │ │ ├── ReportRecordDefaultMapper.java │ │ ├── ReportTemplateMapper.java │ │ ├── WxMpBindInfoMapper.java │ │ ├── WxMpLogMapper.java │ │ ├── WxMpUserMapper.java │ │ ├── WxQyAccessTokenMapper.java │ │ └── WxQyLogMapper.java │ │ ├── service │ │ ├── AllService.java │ │ ├── ComDistrictLevelService.java │ │ ├── OrganizationService.java │ │ ├── ReportRecordDefaultService.java │ │ ├── WxMpBindInfoService.java │ │ └── WxMpUserService.java │ │ └── utils │ │ ├── DateUtil.java │ │ ├── JSONRes.java │ │ ├── MyMapper.java │ │ └── PropertiesUtil.java └── resources │ ├── META-INF │ └── additional-spring-configuration-metadata.json │ ├── application.properties │ └── mapper │ ├── AdminOpeTypeMapper.xml │ ├── AdminRoleMapper.xml │ ├── AdminUserLogMapper.xml │ ├── AdminUserMapper.xml │ ├── ComDistrictLevelMapper.xml │ ├── ComDistrictMapper.xml │ ├── ComProvincialMapper.xml │ ├── OrgDepMapper.xml │ ├── OrgTagAdminMapper.xml │ ├── OrgTagMapper.xml │ ├── OrgTagUserMapper.xml │ ├── OrgUserInfoCompanyMapper.xml │ ├── OrgUserInfoSchoolMapper.xml │ ├── OrgWhitelistMapper.xml │ ├── OrganizationMapper.xml │ ├── ReportRecordCompanyMapper.xml │ ├── ReportRecordDefaultMapper.xml │ ├── ReportTemplateMapper.xml │ ├── WxMpBindInfoMapper.xml │ ├── WxMpLogMapper.xml │ ├── WxMpUserMapper.xml │ ├── WxQyAccessTokenMapper.xml │ └── WxQyLogMapper.xml └── test └── java └── miniprogram └── server └── ServerApplicationTests.java /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /.mvn/wrapper/MavenWrapperDownloader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import java.net.*; 18 | import java.io.*; 19 | import java.nio.channels.*; 20 | import java.util.Properties; 21 | 22 | public class MavenWrapperDownloader { 23 | 24 | private static final String WRAPPER_VERSION = "0.5.6"; 25 | /** 26 | * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. 27 | */ 28 | private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" 29 | + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; 30 | 31 | /** 32 | * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to 33 | * use instead of the default one. 34 | */ 35 | private static final String MAVEN_WRAPPER_PROPERTIES_PATH = 36 | ".mvn/wrapper/maven-wrapper.properties"; 37 | 38 | /** 39 | * Path where the maven-wrapper.jar will be saved to. 40 | */ 41 | private static final String MAVEN_WRAPPER_JAR_PATH = 42 | ".mvn/wrapper/maven-wrapper.jar"; 43 | 44 | /** 45 | * Name of the property which should be used to override the default download url for the wrapper. 46 | */ 47 | private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; 48 | 49 | public static void main(String args[]) { 50 | System.out.println("- Downloader started"); 51 | File baseDirectory = new File(args[0]); 52 | System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); 53 | 54 | // If the maven-wrapper.properties exists, read it and check if it contains a custom 55 | // wrapperUrl parameter. 56 | File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); 57 | String url = DEFAULT_DOWNLOAD_URL; 58 | if (mavenWrapperPropertyFile.exists()) { 59 | FileInputStream mavenWrapperPropertyFileInputStream = null; 60 | try { 61 | mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); 62 | Properties mavenWrapperProperties = new Properties(); 63 | mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); 64 | url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); 65 | } catch (IOException e) { 66 | System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); 67 | } finally { 68 | try { 69 | if (mavenWrapperPropertyFileInputStream != null) { 70 | mavenWrapperPropertyFileInputStream.close(); 71 | } 72 | } catch (IOException e) { 73 | // Ignore ... 74 | } 75 | } 76 | } 77 | System.out.println("- Downloading from: " + url); 78 | 79 | File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); 80 | if (!outputFile.getParentFile().exists()) { 81 | if (!outputFile.getParentFile().mkdirs()) { 82 | System.out.println( 83 | "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); 84 | } 85 | } 86 | System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); 87 | try { 88 | downloadFileFromURL(url, outputFile); 89 | System.out.println("Done"); 90 | System.exit(0); 91 | } catch (Throwable e) { 92 | System.out.println("- Error downloading"); 93 | e.printStackTrace(); 94 | System.exit(1); 95 | } 96 | } 97 | 98 | private static void downloadFileFromURL(String urlString, File destination) throws Exception { 99 | if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { 100 | String username = System.getenv("MVNW_USERNAME"); 101 | char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); 102 | Authenticator.setDefault(new Authenticator() { 103 | @Override 104 | protected PasswordAuthentication getPasswordAuthentication() { 105 | return new PasswordAuthentication(username, password); 106 | } 107 | }); 108 | } 109 | URL website = new URL(urlString); 110 | ReadableByteChannel rbc; 111 | rbc = Channels.newChannel(website.openStream()); 112 | FileOutputStream fos = new FileOutputStream(destination); 113 | fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); 114 | fos.close(); 115 | rbc.close(); 116 | } 117 | 118 | } 119 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2020NCOV/MiniProgram-server-JAVA/bc1562b72d78605f2407fbd6a06231ac2a2c7121/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /Git_tour.md: -------------------------------------------------------------------------------- 1 | # Git常用命令积累 2 | 3 | 收集一些常用的组合命令,欢迎大家补充! 4 | 5 | ## 导航 6 | 7 | - [本地及远程仓库与上游仓库保持一致组合命令](#本地及远程仓库与上游仓库保持一致组合命令) 8 | - [Git常用命令](#Git常用命令) 9 | 10 | ## 本地及远程仓库与上游仓库保持一致组合命令 11 | 12 | ##### 1.查看是否已添加上游仓库 13 | 14 | ~~~ 15 | git remote -v 16 | ~~~ 17 | 18 | ##### 2.添加上游仓库 19 | 20 | ~~~ 21 | git remote add upstream [upstream_url] 22 | ~~~ 23 | 24 | ##### 3.获取原始仓库分支和对应的提交 25 | 26 | ~~~ 27 | git fetch upstream 28 | ~~~ 29 | 30 | ##### 4.在本地实现与upstream的同步 31 | 32 | ~~~ 33 | git rebase upstream/master(master或其他分支名) 34 | ~~~ 35 | 36 | ##### 5.推送自己的本地仓库到自己的远程仓库 37 | 38 | ~~~ 39 | git push 40 | ~~~ 41 | 42 | ## Git常用命令 43 | 44 | ##### 1.为自己的变化添加提示 45 | 46 | ~~~ 47 | git commit -m "message" 48 | ~~~ 49 | 50 | ##### 2.将工作时的全部变化存储到暂存区(记得一定要在.前打上空格) 51 | 52 | ~~~ 53 | git add . 54 | ~~~ 55 | ##### 3.将工作时的全部变化缓存 56 | ~~~ 57 | git stash 58 | ~~~ 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MiniProgram-server-JAVA 2 | 3 | 这里是NCOV 2020疫情防控-人员健康管理平台开源项目的小程序后端--Java版本。 4 | 5 | 主项目入口 >> https://github.com/2020NCOV/ncov-report 6 | 7 | **数据库表结构与主项目保持一致** 8 | 9 | 数据库文件位置 >> https://github.com/2020NCOV/ncov-report/tree/master/database 10 | 11 | commit前如何与上游仓库同步?>> [本地及远程仓库如何与上游仓库保持一致](https://github.com/msq0313/MiniProgram-server-JAVA/blob/master/Git_tour.md) 12 | 13 | ## 项目导航 14 | 15 | [MiniProgram-server-JAVA](#MiniProgram-server-JAVA) 16 | 17 | - [项目导航](#项目导航) 18 | - [项目结构](#项目结构) 19 | - [本地配置](#本地配置) 20 | 21 | ## 项目结构 22 | 23 | #### (1)代码层的结构 24 | 25 | #####   根目录:src/main/java/miniprogram/server 26 | 27 |     1.工程启动类(ServerApplication.java)置于miniprogram.server 28 | 29 |     2.实体类(Beans)置于miniprogram.server.beans 30 | 31 |     3.数据访问层(Mapper)置于miniprogram.server.mapper 32 | 33 |     4.数据服务层(Service)置于miniprogram.server.service 34 | 35 |     5.前端控制器(Controller)置于miniprogram.server.controller 36 | 37 |     6.工具类(utils)置于miniprogram.server.utils 38 | 39 |     7.常量接口类(constant)置于miniprogram.server.constant 40 | 41 |     8.配置信息类(config)置于miniprogram.server.config 42 | 43 |     9.数据传输类(vo)置于miniprogram.server.vo 44 | 45 | #### (2)资源文件的结构 46 | 47 | #####   根目录:src/main/resources 48 | 49 |     1.配置文件(.yaml/.json等)置于config文件夹下 50 | 51 |     2.国际化(i18n))置于i18n文件夹下 52 | 53 |     3.spring.xml置于META-INF/spring文件夹下 54 | 55 |     4.页面以及js/css/image等置于static文件夹下的各自文件下 56 | 57 | ## 本地配置 58 | 59 | ### 1.导入IDEA 60 | 61 | IDE根据pom.xml自动导入依赖 62 | 63 | ### 2.修改配置文件 64 | 65 | src/main/resources/application.properties 66 | 67 | ~~~ 68 | # 根据项目情况修改 69 | 70 | # 配置api端口号 71 | 72 | server.port=8080 73 | 74 | # 连接数据库 75 | 76 | spring.datasource.url=jdbc:mysql://localhost:3306/数据库名?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true 77 | spring.datasource.username=数据库用户名名 78 | spring.datasource.password=数据库密码 79 | ~~~ 80 | 81 | ### 3.配置小程序参数 82 | 83 | src/main/resources/application.properties 84 | 85 | ~~~ 86 | APPID = 自己的小程序appid(注意没有双引号) 87 | SECRET = 自己的小程序secret(注意没有双引号) 88 | ~~~ 89 | 90 | ### 4.运行ServerApplication 91 | 92 | 浏览器中输入http://localhost:8080/index 93 | 94 | 可返回 MiniProgram-server-JAVA 即成功运行 95 | 96 | ### 5.小程序联调 97 | 98 | 打开小程序开发工具,导入项目 99 | 100 | 小程序项目地址:https://github.com/2020NCOV/ncov-report-mini-program-server 101 | 102 | 修改小程序端的baseURL,在/ncov-report-mini-program/util/config.js文件中 103 | 104 | ~~~ 105 | const baseURL = 'http://127.0.0.1:8080/index'; //这表示小程序访问的是本机的8080端口,正是后端程序监听的端口 106 | ~~~ 107 | 108 | - 编译运行小程序 109 | - 打开调试器,点击network 110 | - 查看小程序发出的请求getcode,如果返回status code是200ok则表示前后端通信成功,并可查看response内容 111 | - 可正常进行注册登录,解绑信息等操作。 112 | 113 | 114 | 115 | **项目已经可以正常运行,但存在bug,且各接口仍需完善(如安全性问题),欢迎朋友们共同参与开发!** -------------------------------------------------------------------------------- /doc/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guide 2 | 3 | It is warmly welcomed if you have interest to contribute to this project and help make it even better than it is today! The following is a set of guidelines for contributing. 4 | 5 | - [Code of Conduct](#coc) 6 | - [Submitting an Issue](#issue) 7 | - [Submitting a Pull Request](#pr) 8 | 9 | ## Code of Conduct 10 | 11 | We have adopted a [Code of Conduct][coc] to help us keep this project open and inclusive. Please read the full text so that you can understand what actions will and will not be tolerated. 12 | 13 | ## Submitting an issue 14 | 15 | If you have any questions or feature requests, please feel free to [submit an issue][new-issue]. 16 | 17 | Before you submit an issue, consider the following guidelines: 18 | 19 | - Please search for related issues. Make sure you are not going to open a duplicate issue. 20 | - Please specify what kind of issue it is and explain it in the title or content, e.g. `feature`, `bug`, `documentation`, `discussion`, `help wanted`... The issue will be tagged automatically by the robot of the project(Menbotics). See [supported issue labels][issue-label]. 21 | 22 | To make the issue details as standard as possible, we setup an [Issue Template][issue-template] for issue reporters. Please be sure to follow the instructions to fill fields in template. 23 | 24 | There are a lot of cases when you could open an issue: 25 | 26 | - bug report 27 | - feature request 28 | - performance issues 29 | - feature design 30 | - help wanted 31 | - doc incomplete 32 | - test improvement 33 | - any questions on project 34 | - and so on 35 | 36 | Also we must remind that when filling a new issue, please remember to remove the sensitive data from your post. Sensitive data could be password, secret key, network locations, private business data and so on. 37 | 38 | ## Submitting a Pull Request 39 | 40 | To help you get your feet wet and get you familiar with our contribution process, we have collected some [good first issues][good-first-issues] that contain bugs or small features that have a relatively limited scope. This is a great place to get started. 41 | 42 | Before you submit your Pull Request (PR), consider the following guidelines. 43 | 44 | ### 1. Claim an issue 45 | 46 | Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add. 47 | 48 | If you decide to fix an issue, please be sure to check the comment thread in case somebody is already working on a fix. If nobody is working on it at the moment, please leave a comment with `/self-assign` stating that you intend to work on it so other people don't accidentally duplicate your effort. The robot of the project(Menbotics) will set assignees of the issue to yourself automatically. 49 | 50 | ```shell 51 | /self-assign 52 | ``` 53 | 54 | If somebody claims an issue but doesn't follow up for more than two weeks, it's fine to take over it but you should still leave a comment. 55 | 56 | ### 2. Fork and clone the repository 57 | 58 | Visit [2020NCOV/ncov-report-mini-program-server][repo] repo and make your own copy of the repository by **forking** it. 59 | 60 | And **clone** your own copy of the repository to local, like : 61 | 62 | ```shell 63 | # replace the XXX with your own user name 64 | git clone git@github.com:XXX/ncov-report-mini-program-server.git 65 | cd ncov-report-mini-program-server 66 | ``` 67 | 68 | ### 3. Create a new branch 69 | 70 | Create a new branch for development. 71 | 72 | ```shell 73 | git checkout -b branch-name 74 | ``` 75 | 76 | The name of branch should be semantic, avoiding words like 'update' or 'tmp'. We suggest to use `feature/xxx`, if the modification is about to implement a new feature. 77 | 78 | ### 4. Make your changes 79 | 80 | Now you can create your patch, including appropriate test cases in the new branch. 81 | 82 | ### 5. Commit your changes 83 | 84 | Commit your changes If your changes pass the tests. You are encouraged to use [angular commit-message-format][angular-commit-message-format] to write commit message. In this way, we could have a more trackable history and an automatically generated changelog. 85 | 86 | ```shell 87 | git add . 88 | git commit -m "fix: add license headers (#264)" 89 | ``` 90 | 91 | ### 6. Sync your local repository with the upstream 92 | 93 | Keep your local repository updated with upstream repository by: 94 | 95 | ```shell 96 | git remote add upstream git@github.com:2020NCOV/ncov-report-mini-program-server.git 97 | git fetch upstream master 98 | git rebase upstream/master 99 | ``` 100 | 101 | If conflicts arise, you need to resolve the conflicts manually, then: 102 | 103 | ```shell 104 | git add my-fix-file 105 | git rebase --continue 106 | ``` 107 | 108 | ### 7. Push your branch to GitHub 109 | 110 | ```shell 111 | git push -f origin branch-name 112 | ``` 113 | 114 | ### 8. Create a Pull Request 115 | 116 | In GitHub, send a pull request to `2020NCOV:ncov-report-mini-program-server`. 117 | 118 | To make sure we can easily recap what happened previously, we have prepared a [pull request template][pr-template] and you need to fill out the PR template. 119 | 120 | The core team is monitoring for pull requests. We will review your pull request and either merge it, request changes to it, or close it with an explanation. 121 | 122 | If we suggest changes then: 123 | 124 | - Make the required updates. 125 | 126 | - Re-run the test to ensure tests are still passing. 127 | 128 | - Commit your changes with `--amend` and force push to your GitHub repository (this will update your Pull Request): 129 | 130 | ```shell 131 | git add . 132 | git commit --amend 133 | git push -f origin branch-name 134 | ``` 135 | 136 | That's it! Thank you for your contribution! 137 | 138 | ### 9. After your pull request is merged 139 | 140 | After your pull request is merged, you can safely delete your branch and pull the changes from the upstream repository: 141 | 142 | - Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows: 143 | 144 | ```shell 145 | git push origin --delete branch-name 146 | ``` 147 | 148 | - Check out the master branch: 149 | 150 | ```shell 151 | git checkout master -f 152 | ``` 153 | 154 | - Delete the local branch: 155 | 156 | ```shell 157 | git branch -D my-fix-branch 158 | ``` 159 | 160 | - Update your master with the latest upstream version: 161 | 162 | ```shell 163 | git pull --ff upstream master 164 | ``` 165 | 166 | [coc]: ./CODE_OF_CONDUCT.md 167 | 168 | [new-issue]: https://github.com/2020NCOV/ncov-report-mini-program-server/issues/new 169 | 170 | [issue-label]: https://github.com/2020NCOV/ncov-report-mini-program-server/labels 171 | 172 | [good-first-issues]: https://github.com/2020NCOV/ncov-report-mini-program-server/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+ 173 | 174 | [repo]: https://github.com/2020NCOV/ncov-report-mini-program-server 175 | 176 | [angular-commit-message-format]: https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines 177 | 178 | [pr-template]: ./.github/pull_request_template.md 179 | 180 | [issue-template]: ./.github/issue_template.md 181 | -------------------------------------------------------------------------------- /doc/CONTRIBUTING_CN.md: -------------------------------------------------------------------------------- 1 | # 贡献指导 2 | 3 | 如果您有兴趣为这个项目做出贡献使之变得更好,我们将热烈欢迎! 以下是一系列的贡献准则 4 | 5 | - [行为准则](#coc) 6 | - [提交一个issue](#issue) 7 | - [提交一个PR](#pr) 8 | 9 | ## 行为准则 10 | 11 | 我们采用了《行为准则》 [coc],以保证该项目的开放性和包容性。 请阅读全文,以便您了解可被接纳的行为。 12 | 13 | ## 如何提交一个issue 14 | 15 | 如果您有任何问题或者功能建议,请随时提交issue。 16 | 17 | 当您提交issue之前,请参考以下准则: 18 | 19 | - 请搜索相关issue,以确保您不会打开重复的issue。 20 | 21 | - 请指定issue的类型,并在标题或内容中说明问题,如:功能、故障、文档、讨论、需要的帮助…该issue将由项目的机器人(Menbotics)自动标记。请参阅支持的issue标签。 22 | 23 | 为了使issue的详细尽可能标准,我们为issue报告者设置了issue模板。请确保按照说明填写模板中的字段。 24 | 25 | 在很多情况下,您可以打开一个issue: 26 | 27 | - 故障报告 28 | 29 | - 功能建议 30 | 31 | - 性能问题 32 | 33 | - 功能设计 34 | 35 | - 需要的帮助 36 | 37 | - 文档不完整 38 | 39 | - 测试改进 40 | 41 | - 关于项目的任何问题 42 | 43 | - 等等 44 | 45 | 另外,我们必须提醒您,在填写新issue时,请记住从您的帖子中删除敏感数据。敏感数据可以是密码,密钥,网络位置,私人业务数据等。 46 | 47 | 48 | ## 提交一个PR 49 | 50 | 为帮助您熟悉我们贡献的过程,我们已经收集了一些相对较小的包含bug或者有特色的issue。这是迈向开始的很好的一步。 51 | 52 | 在您提交pr之前,请参考以下准则: 53 | 54 | ### 1. 提出一个issue 55 | 56 | 确定一个issue描述清楚了要解决的问题或您想添加的文档特点。 57 | 58 | 如果您决定要解决一个issue,请确认并检查评论,以防已经有人解决了这个问题。如果没有人解决这个问题,您可以留下一个以 /self-assign 为开头的评论,这样其他人不会再重复操作。项目的机器人会自动为您认领任务。 59 | 60 | ```shell 61 | /self-assign 62 | ``` 63 | 如果两周以上没有人跟进这个问题,您可以解决这个问题,但您仍应该留下一个评论。 64 | 65 | ### 2. Fork并clone 仓库 66 | 67 | 访问名为2020NCOV/ncov-report-mini-program-server 的报告,并通过forking在您的仓库中克隆。并从仓库中克隆到本地。例子如下: 68 | 69 | ```shell 70 | # replace the XXX with your own user name 71 | git clone git@github.com:XXX/ncov-report-mini-program-server.git 72 | cd ncov-report-mini-program-server 73 | ``` 74 | 75 | ### 3. 创建一个新分支 76 | 77 | 创建一个新的开发分支。 78 | 79 | ```shell 80 | git checkout -b branch-name 81 | ``` 82 | 83 | 分支的名字应该有明确的含义,应避免使用诸如“update“或 “tmp”这些词。 如果修改将要实现新功能,我们建议使用`feature/xxx` 84 | 85 | ### 4. 进行更改 86 | 87 | 现在,您可以创建补丁,包括在新分支中包含适当的测试用例。 88 | 89 | ### 5. 提交您的更改 90 | 91 | 如果您的更改通过了测试,您就可以提交更改。我们鼓励您使用 [angular commit-message-format][angular-commit-message-format] 来编写提交信息。这样,我们可以拥有更可追踪的历史记录和自动生成的变更日志。 92 | 93 | ```shell 94 | git add . 95 | git commit -m "fix: add license headers (#264)" 96 | ``` 97 | 98 | ### 6. 将您的本地库与上游同步 99 | 100 | 通过以下命令更新您的本地库,使本地库与上游库保持同步: 101 | 102 | ```shell 103 | git remote add upstream git@github.com:2020NCOV/ncov-report-mini-program-server.git 104 | git fetch upstream master 105 | git rebase upstream/master 106 | ``` 107 | 108 | 如果发生冲突,则需要手动解决冲突,然后使用以下命令: 109 | 110 | ```shell 111 | git add my-fix-file 112 | git rebase --continue 113 | ``` 114 | 115 | 116 | ### 7. 个人分支推送至github 117 | 118 | ```shell 119 | git push -f origin branch-name 120 | ``` 121 | 122 | ### 8. 提交PR 123 | 124 | 在github中,向项目`2020NCOV:ncov-report-mini-program-server`提交PR。 125 | 126 | 为了确保我们能容易地理解大家提出的问题,我们提供了一个【PR模板】,您只需要在此模板的基础上进行完善即可。 127 | 128 | 我们的核心团队会关注你的PR并进行审核。如果符合要求,我们会将它们合并到主分支上(或给出一些简单的修改意见),或者将其关闭并给出修改意见。 129 | 130 | 如果我们给出修改意见,那么我们会请您: 131 | 132 | - 完成我们需求的更新。 133 | - 重新运行测试用例,并确保测试仍能通过。 134 | - 用“commit --amend”的方式来提交代码,并强制推送到您的github仓库(git push -f)(这也会更新你的PR). 135 | 136 | ```shell 137 | git add . 138 | git commit --amend 139 | git push -f origin branch-name 140 | ``` 141 | 142 | 这就足够了,感谢您的贡献! 143 | 144 | ### 9. 在您的PR被合并后 145 | 当您的PR得到合并(merge)后,您可以放心删除您用来进行修改的分支并将修改的内容提交到upstream仓库中: 146 | 147 | - 在github网页端或者本地的git bash客户端中的命令行用如下的方式来删除远程分支: 148 | 149 | ```shell 150 | git push origin --delete branch-name 151 | ``` 152 | 153 | - 检查本地仓库的主分支(master): 154 | 155 | ```shell 156 | git checkout master -f 157 | ``` 158 | 159 | - 删除本地分支: 160 | 161 | ```shell 162 | git branch -D my-fix-branch 163 | ``` 164 | 165 | - 用最新的upstream版本来更新本地主分支(master): 166 | 167 | ```shell 168 | git pull --ff upstream master 169 | ``` 170 | 171 | [coc]: ./CODE_OF_CONDUCT.md 172 | 173 | [new-issue]: https://github.com/2020NCOV/ncov-report-mini-program-server/issues/new 174 | 175 | [issue-label]: https://github.com/2020NCOV/ncov-report-mini-program-server/labels 176 | 177 | [good-first-issues]: https://github.com/2020NCOV/ncov-report-mini-program-server/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+ 178 | 179 | [repo]: https://github.com/2020NCOV/ncov-report-mini-program-server 180 | 181 | [angular-commit-message-format]: https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines 182 | 183 | [pr-template]: ./.github/pull_request_template.md 184 | 185 | [issue-template]: ./.github/issue_template.md. 186 | 187 | -------------------------------------------------------------------------------- /mvnw: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ---------------------------------------------------------------------------- 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # https://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # ---------------------------------------------------------------------------- 20 | 21 | # ---------------------------------------------------------------------------- 22 | # Maven Start Up Batch script 23 | # 24 | # Required ENV vars: 25 | # ------------------ 26 | # JAVA_HOME - location of a JDK home dir 27 | # 28 | # Optional ENV vars 29 | # ----------------- 30 | # M2_HOME - location of maven2's installed home dir 31 | # MAVEN_OPTS - parameters passed to the Java VM when running Maven 32 | # e.g. to debug Maven itself, use 33 | # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 34 | # MAVEN_SKIP_RC - flag to disable loading of mavenrc files 35 | # ---------------------------------------------------------------------------- 36 | 37 | if [ -z "$MAVEN_SKIP_RC" ] ; then 38 | 39 | if [ -f /etc/mavenrc ] ; then 40 | . /etc/mavenrc 41 | fi 42 | 43 | if [ -f "$HOME/.mavenrc" ] ; then 44 | . "$HOME/.mavenrc" 45 | fi 46 | 47 | fi 48 | 49 | # OS specific support. $var _must_ be set to either true or false. 50 | cygwin=false; 51 | darwin=false; 52 | mingw=false 53 | case "`uname`" in 54 | CYGWIN*) cygwin=true ;; 55 | MINGW*) mingw=true;; 56 | Darwin*) darwin=true 57 | # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home 58 | # See https://developer.apple.com/library/mac/qa/qa1170/_index.html 59 | if [ -z "$JAVA_HOME" ]; then 60 | if [ -x "/usr/libexec/java_home" ]; then 61 | export JAVA_HOME="`/usr/libexec/java_home`" 62 | else 63 | export JAVA_HOME="/Library/Java/Home" 64 | fi 65 | fi 66 | ;; 67 | esac 68 | 69 | if [ -z "$JAVA_HOME" ] ; then 70 | if [ -r /etc/gentoo-release ] ; then 71 | JAVA_HOME=`java-config --jre-home` 72 | fi 73 | fi 74 | 75 | if [ -z "$M2_HOME" ] ; then 76 | ## resolve links - $0 may be a link to maven's home 77 | PRG="$0" 78 | 79 | # need this for relative symlinks 80 | while [ -h "$PRG" ] ; do 81 | ls=`ls -ld "$PRG"` 82 | link=`expr "$ls" : '.*-> \(.*\)$'` 83 | if expr "$link" : '/.*' > /dev/null; then 84 | PRG="$link" 85 | else 86 | PRG="`dirname "$PRG"`/$link" 87 | fi 88 | done 89 | 90 | saveddir=`pwd` 91 | 92 | M2_HOME=`dirname "$PRG"`/.. 93 | 94 | # make it fully qualified 95 | M2_HOME=`cd "$M2_HOME" && pwd` 96 | 97 | cd "$saveddir" 98 | # echo Using m2 at $M2_HOME 99 | fi 100 | 101 | # For Cygwin, ensure paths are in UNIX format before anything is touched 102 | if $cygwin ; then 103 | [ -n "$M2_HOME" ] && 104 | M2_HOME=`cygpath --unix "$M2_HOME"` 105 | [ -n "$JAVA_HOME" ] && 106 | JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 107 | [ -n "$CLASSPATH" ] && 108 | CLASSPATH=`cygpath --path --unix "$CLASSPATH"` 109 | fi 110 | 111 | # For Mingw, ensure paths are in UNIX format before anything is touched 112 | if $mingw ; then 113 | [ -n "$M2_HOME" ] && 114 | M2_HOME="`(cd "$M2_HOME"; pwd)`" 115 | [ -n "$JAVA_HOME" ] && 116 | JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" 117 | fi 118 | 119 | if [ -z "$JAVA_HOME" ]; then 120 | javaExecutable="`which javac`" 121 | if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then 122 | # readlink(1) is not available as standard on Solaris 10. 123 | readLink=`which readlink` 124 | if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then 125 | if $darwin ; then 126 | javaHome="`dirname \"$javaExecutable\"`" 127 | javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" 128 | else 129 | javaExecutable="`readlink -f \"$javaExecutable\"`" 130 | fi 131 | javaHome="`dirname \"$javaExecutable\"`" 132 | javaHome=`expr "$javaHome" : '\(.*\)/bin'` 133 | JAVA_HOME="$javaHome" 134 | export JAVA_HOME 135 | fi 136 | fi 137 | fi 138 | 139 | if [ -z "$JAVACMD" ] ; then 140 | if [ -n "$JAVA_HOME" ] ; then 141 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 142 | # IBM's JDK on AIX uses strange locations for the executables 143 | JAVACMD="$JAVA_HOME/jre/sh/java" 144 | else 145 | JAVACMD="$JAVA_HOME/bin/java" 146 | fi 147 | else 148 | JAVACMD="`which java`" 149 | fi 150 | fi 151 | 152 | if [ ! -x "$JAVACMD" ] ; then 153 | echo "Error: JAVA_HOME is not defined correctly." >&2 154 | echo " We cannot execute $JAVACMD" >&2 155 | exit 1 156 | fi 157 | 158 | if [ -z "$JAVA_HOME" ] ; then 159 | echo "Warning: JAVA_HOME environment variable is not set." 160 | fi 161 | 162 | CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher 163 | 164 | # traverses directory structure from process work directory to filesystem root 165 | # first directory with .mvn subdirectory is considered project base directory 166 | find_maven_basedir() { 167 | 168 | if [ -z "$1" ] 169 | then 170 | echo "Path not specified to find_maven_basedir" 171 | return 1 172 | fi 173 | 174 | basedir="$1" 175 | wdir="$1" 176 | while [ "$wdir" != '/' ] ; do 177 | if [ -d "$wdir"/.mvn ] ; then 178 | basedir=$wdir 179 | break 180 | fi 181 | # workaround for JBEAP-8937 (on Solaris 10/Sparc) 182 | if [ -d "${wdir}" ]; then 183 | wdir=`cd "$wdir/.."; pwd` 184 | fi 185 | # end of workaround 186 | done 187 | echo "${basedir}" 188 | } 189 | 190 | # concatenates all lines of a file 191 | concat_lines() { 192 | if [ -f "$1" ]; then 193 | echo "$(tr -s '\n' ' ' < "$1")" 194 | fi 195 | } 196 | 197 | BASE_DIR=`find_maven_basedir "$(pwd)"` 198 | if [ -z "$BASE_DIR" ]; then 199 | exit 1; 200 | fi 201 | 202 | ########################################################################################## 203 | # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 204 | # This allows using the maven wrapper in projects that prohibit checking in binary data. 205 | ########################################################################################## 206 | if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then 207 | if [ "$MVNW_VERBOSE" = true ]; then 208 | echo "Found .mvn/wrapper/maven-wrapper.jar" 209 | fi 210 | else 211 | if [ "$MVNW_VERBOSE" = true ]; then 212 | echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." 213 | fi 214 | if [ -n "$MVNW_REPOURL" ]; then 215 | jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 216 | else 217 | jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 218 | fi 219 | while IFS="=" read key value; do 220 | case "$key" in (wrapperUrl) jarUrl="$value"; break ;; 221 | esac 222 | done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" 223 | if [ "$MVNW_VERBOSE" = true ]; then 224 | echo "Downloading from: $jarUrl" 225 | fi 226 | wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" 227 | if $cygwin; then 228 | wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` 229 | fi 230 | 231 | if command -v wget > /dev/null; then 232 | if [ "$MVNW_VERBOSE" = true ]; then 233 | echo "Found wget ... using wget" 234 | fi 235 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 236 | wget "$jarUrl" -O "$wrapperJarPath" 237 | else 238 | wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" 239 | fi 240 | elif command -v curl > /dev/null; then 241 | if [ "$MVNW_VERBOSE" = true ]; then 242 | echo "Found curl ... using curl" 243 | fi 244 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 245 | curl -o "$wrapperJarPath" "$jarUrl" -f 246 | else 247 | curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f 248 | fi 249 | 250 | else 251 | if [ "$MVNW_VERBOSE" = true ]; then 252 | echo "Falling back to using Java to download" 253 | fi 254 | javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" 255 | # For Cygwin, switch paths to Windows format before running javac 256 | if $cygwin; then 257 | javaClass=`cygpath --path --windows "$javaClass"` 258 | fi 259 | if [ -e "$javaClass" ]; then 260 | if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 261 | if [ "$MVNW_VERBOSE" = true ]; then 262 | echo " - Compiling MavenWrapperDownloader.java ..." 263 | fi 264 | # Compiling the Java class 265 | ("$JAVA_HOME/bin/javac" "$javaClass") 266 | fi 267 | if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 268 | # Running the downloader 269 | if [ "$MVNW_VERBOSE" = true ]; then 270 | echo " - Running MavenWrapperDownloader.java ..." 271 | fi 272 | ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") 273 | fi 274 | fi 275 | fi 276 | fi 277 | ########################################################################################## 278 | # End of extension 279 | ########################################################################################## 280 | 281 | export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} 282 | if [ "$MVNW_VERBOSE" = true ]; then 283 | echo $MAVEN_PROJECTBASEDIR 284 | fi 285 | MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" 286 | 287 | # For Cygwin, switch paths to Windows format before running java 288 | if $cygwin; then 289 | [ -n "$M2_HOME" ] && 290 | M2_HOME=`cygpath --path --windows "$M2_HOME"` 291 | [ -n "$JAVA_HOME" ] && 292 | JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` 293 | [ -n "$CLASSPATH" ] && 294 | CLASSPATH=`cygpath --path --windows "$CLASSPATH"` 295 | [ -n "$MAVEN_PROJECTBASEDIR" ] && 296 | MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` 297 | fi 298 | 299 | # Provide a "standardized" way to retrieve the CLI args that will 300 | # work with both Windows and non-Windows executions. 301 | MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" 302 | export MAVEN_CMD_LINE_ARGS 303 | 304 | WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 305 | 306 | exec "$JAVACMD" \ 307 | $MAVEN_OPTS \ 308 | -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ 309 | "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ 310 | ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" 311 | -------------------------------------------------------------------------------- /mvnw.cmd: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM https://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Maven Start Up Batch script 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM M2_HOME - location of maven2's installed home dir 28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending 30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 31 | @REM e.g. to debug Maven itself, use 32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 34 | @REM ---------------------------------------------------------------------------- 35 | 36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 37 | @echo off 38 | @REM set title of command window 39 | title %0 40 | @REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' 41 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 42 | 43 | @REM set %HOME% to equivalent of $HOME 44 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 45 | 46 | @REM Execute a user defined script before this one 47 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 48 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 49 | if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" 50 | if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" 51 | :skipRcPre 52 | 53 | @setlocal 54 | 55 | set ERROR_CODE=0 56 | 57 | @REM To isolate internal variables from possible post scripts, we use another setlocal 58 | @setlocal 59 | 60 | @REM ==== START VALIDATION ==== 61 | if not "%JAVA_HOME%" == "" goto OkJHome 62 | 63 | echo. 64 | echo Error: JAVA_HOME not found in your environment. >&2 65 | echo Please set the JAVA_HOME variable in your environment to match the >&2 66 | echo location of your Java installation. >&2 67 | echo. 68 | goto error 69 | 70 | :OkJHome 71 | if exist "%JAVA_HOME%\bin\java.exe" goto init 72 | 73 | echo. 74 | echo Error: JAVA_HOME is set to an invalid directory. >&2 75 | echo JAVA_HOME = "%JAVA_HOME%" >&2 76 | echo Please set the JAVA_HOME variable in your environment to match the >&2 77 | echo location of your Java installation. >&2 78 | echo. 79 | goto error 80 | 81 | @REM ==== END VALIDATION ==== 82 | 83 | :init 84 | 85 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 86 | @REM Fallback to current working directory if not found. 87 | 88 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 89 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 90 | 91 | set EXEC_DIR=%CD% 92 | set WDIR=%EXEC_DIR% 93 | :findBaseDir 94 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 95 | cd .. 96 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 97 | set WDIR=%CD% 98 | goto findBaseDir 99 | 100 | :baseDirFound 101 | set MAVEN_PROJECTBASEDIR=%WDIR% 102 | cd "%EXEC_DIR%" 103 | goto endDetectBaseDir 104 | 105 | :baseDirNotFound 106 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 107 | cd "%EXEC_DIR%" 108 | 109 | :endDetectBaseDir 110 | 111 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 112 | 113 | @setlocal EnableExtensions EnableDelayedExpansion 114 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 115 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 116 | 117 | :endReadAdditionalConfig 118 | 119 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 120 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" 121 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 122 | 123 | set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 124 | 125 | FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( 126 | IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B 127 | ) 128 | 129 | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 130 | @REM This allows using the maven wrapper in projects that prohibit checking in binary data. 131 | if exist %WRAPPER_JAR% ( 132 | if "%MVNW_VERBOSE%" == "true" ( 133 | echo Found %WRAPPER_JAR% 134 | ) 135 | ) else ( 136 | if not "%MVNW_REPOURL%" == "" ( 137 | SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 138 | ) 139 | if "%MVNW_VERBOSE%" == "true" ( 140 | echo Couldn't find %WRAPPER_JAR%, downloading it ... 141 | echo Downloading from: %DOWNLOAD_URL% 142 | ) 143 | 144 | powershell -Command "&{"^ 145 | "$webclient = new-object System.Net.WebClient;"^ 146 | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ 147 | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ 148 | "}"^ 149 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ 150 | "}" 151 | if "%MVNW_VERBOSE%" == "true" ( 152 | echo Finished downloading %WRAPPER_JAR% 153 | ) 154 | ) 155 | @REM End of extension 156 | 157 | @REM Provide a "standardized" way to retrieve the CLI args that will 158 | @REM work with both Windows and non-Windows executions. 159 | set MAVEN_CMD_LINE_ARGS=%* 160 | 161 | %MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* 162 | if ERRORLEVEL 1 goto error 163 | goto end 164 | 165 | :error 166 | set ERROR_CODE=1 167 | 168 | :end 169 | @endlocal & set ERROR_CODE=%ERROR_CODE% 170 | 171 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost 172 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 173 | if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" 174 | if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" 175 | :skipRcPost 176 | 177 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 178 | if "%MAVEN_BATCH_PAUSE%" == "on" pause 179 | 180 | if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% 181 | 182 | exit /B %ERROR_CODE% 183 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.2.5.RELEASE 9 | 10 | 11 | com.example 12 | demo 13 | 0.0.1-SNAPSHOT 14 | demo 15 | Demo project for Spring Boot 16 | 17 | 18 | 1.8 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-web 25 | 26 | 27 | 28 | org.springframework.boot 29 | spring-boot-starter-test 30 | test 31 | 32 | 33 | org.junit.vintage 34 | junit-vintage-engine 35 | 36 | 37 | 38 | 39 | 40 | mysql 41 | mysql-connector-java 42 | runtime 43 | 44 | 45 | 46 | 47 | org.mybatis.spring.boot 48 | mybatis-spring-boot-starter 49 | 1.3.4 50 | 51 | 52 | 53 | tk.mybatis 54 | mapper-spring-boot-starter 55 | 1.2.4 56 | 57 | 58 | 59 | commons-httpclient 60 | commons-httpclient 61 | 3.1 62 | 63 | 64 | 65 | com.alibaba 66 | fastjson 67 | 1.2.62 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | org.springframework.boot 76 | spring-boot-maven-plugin 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/ServerApplication.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import tk.mybatis.spring.annotation.MapperScan; 6 | 7 | @SpringBootApplication 8 | @MapperScan("miniprogram.server.mapper") 9 | public class ServerApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(ServerApplication.class, args); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/AdminOpeType.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Id; 4 | import javax.persistence.Table; 5 | 6 | @Table(name = "admin_ope_type") 7 | public class AdminOpeType { 8 | @Id 9 | private Integer id; 10 | 11 | /** 12 | * 操作名 13 | */ 14 | private String name; 15 | 16 | private Integer status; 17 | 18 | /** 19 | * @return id 20 | */ 21 | public Integer getId() { 22 | return id; 23 | } 24 | 25 | /** 26 | * @param id 27 | */ 28 | public void setId(Integer id) { 29 | this.id = id; 30 | } 31 | 32 | /** 33 | * 获取操作名 34 | * 35 | * @return name - 操作名 36 | */ 37 | public String getName() { 38 | return name; 39 | } 40 | 41 | /** 42 | * 设置操作名 43 | * 44 | * @param name 操作名 45 | */ 46 | public void setName(String name) { 47 | this.name = name; 48 | } 49 | 50 | /** 51 | * @return status 52 | */ 53 | public Integer getStatus() { 54 | return status; 55 | } 56 | 57 | /** 58 | * @param status 59 | */ 60 | public void setStatus(Integer status) { 61 | this.status = status; 62 | } 63 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/AdminRole.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Id; 4 | import javax.persistence.Table; 5 | 6 | @Table(name = "admin_role") 7 | public class AdminRole { 8 | @Id 9 | private Integer id; 10 | 11 | /** 12 | * 角色名 13 | */ 14 | private String name; 15 | 16 | private String remark; 17 | 18 | /** 19 | * @return id 20 | */ 21 | public Integer getId() { 22 | return id; 23 | } 24 | 25 | /** 26 | * @param id 27 | */ 28 | public void setId(Integer id) { 29 | this.id = id; 30 | } 31 | 32 | /** 33 | * 获取角色名 34 | * 35 | * @return name - 角色名 36 | */ 37 | public String getName() { 38 | return name; 39 | } 40 | 41 | /** 42 | * 设置角色名 43 | * 44 | * @param name 角色名 45 | */ 46 | public void setName(String name) { 47 | this.name = name; 48 | } 49 | 50 | /** 51 | * @return remark 52 | */ 53 | public String getRemark() { 54 | return remark; 55 | } 56 | 57 | /** 58 | * @param remark 59 | */ 60 | public void setRemark(String remark) { 61 | this.remark = remark; 62 | } 63 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/AdminUser.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Id; 5 | import javax.persistence.Table; 6 | import java.util.Date; 7 | 8 | @Table(name = "admin_user") 9 | public class AdminUser { 10 | @Id 11 | private Integer id; 12 | 13 | /** 14 | * 机构id 15 | */ 16 | @Column(name = "org_id") 17 | private Integer orgId; 18 | 19 | /** 20 | * 所管理部门的id 21 | */ 22 | @Column(name = "dep_id") 23 | private Integer depId; 24 | 25 | /** 26 | * 用户名 27 | */ 28 | private String username; 29 | 30 | private String name; 31 | 32 | /** 33 | * 密码 34 | */ 35 | private String password; 36 | 37 | private Integer role; 38 | 39 | /** 40 | * 内置机构管理员 41 | */ 42 | @Column(name = "is_admin") 43 | private Integer isAdmin; 44 | 45 | @Column(name = "is_del") 46 | private Integer isDel; 47 | 48 | @Column(name = "need_m_pass") 49 | private Integer needMPass; 50 | 51 | private String remarks; 52 | 53 | private Date datetime; 54 | 55 | /** 56 | * @return id 57 | */ 58 | public Integer getId() { 59 | return id; 60 | } 61 | 62 | /** 63 | * @param id 64 | */ 65 | public void setId(Integer id) { 66 | this.id = id; 67 | } 68 | 69 | /** 70 | * 获取机构id 71 | * 72 | * @return org_id - 机构id 73 | */ 74 | public Integer getOrgId() { 75 | return orgId; 76 | } 77 | 78 | /** 79 | * 设置机构id 80 | * 81 | * @param orgId 机构id 82 | */ 83 | public void setOrgId(Integer orgId) { 84 | this.orgId = orgId; 85 | } 86 | 87 | /** 88 | * 获取所管理部门的id 89 | * 90 | * @return dep_id - 所管理部门的id 91 | */ 92 | public Integer getDepId() { 93 | return depId; 94 | } 95 | 96 | /** 97 | * 设置所管理部门的id 98 | * 99 | * @param depId 所管理部门的id 100 | */ 101 | public void setDepId(Integer depId) { 102 | this.depId = depId; 103 | } 104 | 105 | /** 106 | * 获取用户名 107 | * 108 | * @return username - 用户名 109 | */ 110 | public String getUsername() { 111 | return username; 112 | } 113 | 114 | /** 115 | * 设置用户名 116 | * 117 | * @param username 用户名 118 | */ 119 | public void setUsername(String username) { 120 | this.username = username; 121 | } 122 | 123 | /** 124 | * @return name 125 | */ 126 | public String getName() { 127 | return name; 128 | } 129 | 130 | /** 131 | * @param name 132 | */ 133 | public void setName(String name) { 134 | this.name = name; 135 | } 136 | 137 | /** 138 | * 获取密码 139 | * 140 | * @return password - 密码 141 | */ 142 | public String getPassword() { 143 | return password; 144 | } 145 | 146 | /** 147 | * 设置密码 148 | * 149 | * @param password 密码 150 | */ 151 | public void setPassword(String password) { 152 | this.password = password; 153 | } 154 | 155 | /** 156 | * @return role 157 | */ 158 | public Integer getRole() { 159 | return role; 160 | } 161 | 162 | /** 163 | * @param role 164 | */ 165 | public void setRole(Integer role) { 166 | this.role = role; 167 | } 168 | 169 | /** 170 | * 获取内置机构管理员 171 | * 172 | * @return is_admin - 内置机构管理员 173 | */ 174 | public Integer getIsAdmin() { 175 | return isAdmin; 176 | } 177 | 178 | /** 179 | * 设置内置机构管理员 180 | * 181 | * @param isAdmin 内置机构管理员 182 | */ 183 | public void setIsAdmin(Integer isAdmin) { 184 | this.isAdmin = isAdmin; 185 | } 186 | 187 | /** 188 | * @return is_del 189 | */ 190 | public Integer getIsDel() { 191 | return isDel; 192 | } 193 | 194 | /** 195 | * @param isDel 196 | */ 197 | public void setIsDel(Integer isDel) { 198 | this.isDel = isDel; 199 | } 200 | 201 | /** 202 | * @return need_m_pass 203 | */ 204 | public Integer getNeedMPass() { 205 | return needMPass; 206 | } 207 | 208 | /** 209 | * @param needMPass 210 | */ 211 | public void setNeedMPass(Integer needMPass) { 212 | this.needMPass = needMPass; 213 | } 214 | 215 | /** 216 | * @return remarks 217 | */ 218 | public String getRemarks() { 219 | return remarks; 220 | } 221 | 222 | /** 223 | * @param remarks 224 | */ 225 | public void setRemarks(String remarks) { 226 | this.remarks = remarks; 227 | } 228 | 229 | /** 230 | * @return datetime 231 | */ 232 | public Date getDatetime() { 233 | return datetime; 234 | } 235 | 236 | /** 237 | * @param datetime 238 | */ 239 | public void setDatetime(Date datetime) { 240 | this.datetime = datetime; 241 | } 242 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/AdminUserLog.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Id; 5 | import javax.persistence.Table; 6 | import java.util.Date; 7 | 8 | @Table(name = "admin_user_log") 9 | public class AdminUserLog { 10 | @Id 11 | private Integer id; 12 | 13 | /** 14 | * user表ID 15 | */ 16 | private Integer uid; 17 | 18 | private String name; 19 | 20 | /** 21 | * 操作类别 22 | */ 23 | @Column(name = "ope_type") 24 | private Integer opeType; 25 | 26 | /** 27 | * URL 28 | */ 29 | private String path; 30 | 31 | /** 32 | * 操作内容 33 | */ 34 | private String content; 35 | 36 | /** 37 | * IP地址 38 | */ 39 | private String ip; 40 | 41 | /** 42 | * 浏览器数据 43 | */ 44 | private String agent; 45 | 46 | private Date datetime; 47 | 48 | /** 49 | * @return id 50 | */ 51 | public Integer getId() { 52 | return id; 53 | } 54 | 55 | /** 56 | * @param id 57 | */ 58 | public void setId(Integer id) { 59 | this.id = id; 60 | } 61 | 62 | /** 63 | * 获取user表ID 64 | * 65 | * @return uid - user表ID 66 | */ 67 | public Integer getUid() { 68 | return uid; 69 | } 70 | 71 | /** 72 | * 设置user表ID 73 | * 74 | * @param uid user表ID 75 | */ 76 | public void setUid(Integer uid) { 77 | this.uid = uid; 78 | } 79 | 80 | /** 81 | * @return name 82 | */ 83 | public String getName() { 84 | return name; 85 | } 86 | 87 | /** 88 | * @param name 89 | */ 90 | public void setName(String name) { 91 | this.name = name; 92 | } 93 | 94 | /** 95 | * 获取操作类别 96 | * 97 | * @return ope_type - 操作类别 98 | */ 99 | public Integer getOpeType() { 100 | return opeType; 101 | } 102 | 103 | /** 104 | * 设置操作类别 105 | * 106 | * @param opeType 操作类别 107 | */ 108 | public void setOpeType(Integer opeType) { 109 | this.opeType = opeType; 110 | } 111 | 112 | /** 113 | * 获取URL 114 | * 115 | * @return path - URL 116 | */ 117 | public String getPath() { 118 | return path; 119 | } 120 | 121 | /** 122 | * 设置URL 123 | * 124 | * @param path URL 125 | */ 126 | public void setPath(String path) { 127 | this.path = path; 128 | } 129 | 130 | /** 131 | * 获取操作内容 132 | * 133 | * @return content - 操作内容 134 | */ 135 | public String getContent() { 136 | return content; 137 | } 138 | 139 | /** 140 | * 设置操作内容 141 | * 142 | * @param content 操作内容 143 | */ 144 | public void setContent(String content) { 145 | this.content = content; 146 | } 147 | 148 | /** 149 | * 获取IP地址 150 | * 151 | * @return ip - IP地址 152 | */ 153 | public String getIp() { 154 | return ip; 155 | } 156 | 157 | /** 158 | * 设置IP地址 159 | * 160 | * @param ip IP地址 161 | */ 162 | public void setIp(String ip) { 163 | this.ip = ip; 164 | } 165 | 166 | /** 167 | * 获取浏览器数据 168 | * 169 | * @return agent - 浏览器数据 170 | */ 171 | public String getAgent() { 172 | return agent; 173 | } 174 | 175 | /** 176 | * 设置浏览器数据 177 | * 178 | * @param agent 浏览器数据 179 | */ 180 | public void setAgent(String agent) { 181 | this.agent = agent; 182 | } 183 | 184 | /** 185 | * @return datetime 186 | */ 187 | public Date getDatetime() { 188 | return datetime; 189 | } 190 | 191 | /** 192 | * @param datetime 193 | */ 194 | public void setDatetime(Date datetime) { 195 | this.datetime = datetime; 196 | } 197 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/ComDistrict.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Id; 5 | import javax.persistence.Table; 6 | 7 | @Table(name = "com_district") 8 | public class ComDistrict { 9 | /** 10 | * 行政区划标识id 11 | */ 12 | @Id 13 | private Integer id; 14 | 15 | /** 16 | * 行政区划名称 17 | */ 18 | private String name; 19 | 20 | /** 21 | * 行政区划字典值(不重复) 22 | */ 23 | private Integer value; 24 | 25 | /** 26 | * 行政区划级别(关联行政区划级别id) 27 | */ 28 | @Column(name = "level_id") 29 | private Integer levelId; 30 | 31 | /** 32 | * 父级行政区划id(最顶级为0) 33 | */ 34 | @Column(name = "parent_id") 35 | private Integer parentId; 36 | 37 | /** 38 | * 排序号(数值大的在前) 39 | */ 40 | private Integer seq; 41 | 42 | @Column(name = "short_name") 43 | private String shortName; 44 | 45 | /** 46 | * 获取 行政区划标识id 47 | * 48 | * @return id - 行政区划标识id 49 | */ 50 | public Integer getId() { 51 | return id; 52 | } 53 | 54 | /** 55 | * 设置 行政区划标识id 56 | * 57 | * @param id 行政区划标识id 58 | */ 59 | public void setId(Integer id) { 60 | this.id = id; 61 | } 62 | 63 | /** 64 | * 获取行政区划名称 65 | * 66 | * @return name - 行政区划名称 67 | */ 68 | public String getName() { 69 | return name; 70 | } 71 | 72 | /** 73 | * 设置行政区划名称 74 | * 75 | * @param name 行政区划名称 76 | */ 77 | public void setName(String name) { 78 | this.name = name; 79 | } 80 | 81 | /** 82 | * 获取行政区划字典值(不重复) 83 | * 84 | * @return value - 行政区划字典值(不重复) 85 | */ 86 | public Integer getValue() { 87 | return value; 88 | } 89 | 90 | /** 91 | * 设置行政区划字典值(不重复) 92 | * 93 | * @param value 行政区划字典值(不重复) 94 | */ 95 | public void setValue(Integer value) { 96 | this.value = value; 97 | } 98 | 99 | /** 100 | * 获取行政区划级别(关联行政区划级别id) 101 | * 102 | * @return level_id - 行政区划级别(关联行政区划级别id) 103 | */ 104 | public Integer getLevelId() { 105 | return levelId; 106 | } 107 | 108 | /** 109 | * 设置行政区划级别(关联行政区划级别id) 110 | * 111 | * @param levelId 行政区划级别(关联行政区划级别id) 112 | */ 113 | public void setLevelId(Integer levelId) { 114 | this.levelId = levelId; 115 | } 116 | 117 | /** 118 | * 获取父级行政区划id(最顶级为0) 119 | * 120 | * @return parent_id - 父级行政区划id(最顶级为0) 121 | */ 122 | public Integer getParentId() { 123 | return parentId; 124 | } 125 | 126 | /** 127 | * 设置父级行政区划id(最顶级为0) 128 | * 129 | * @param parentId 父级行政区划id(最顶级为0) 130 | */ 131 | public void setParentId(Integer parentId) { 132 | this.parentId = parentId; 133 | } 134 | 135 | /** 136 | * 获取排序号(数值大的在前) 137 | * 138 | * @return seq - 排序号(数值大的在前) 139 | */ 140 | public Integer getSeq() { 141 | return seq; 142 | } 143 | 144 | /** 145 | * 设置排序号(数值大的在前) 146 | * 147 | * @param seq 排序号(数值大的在前) 148 | */ 149 | public void setSeq(Integer seq) { 150 | this.seq = seq; 151 | } 152 | 153 | /** 154 | * @return short_name 155 | */ 156 | public String getShortName() { 157 | return shortName; 158 | } 159 | 160 | /** 161 | * @param shortName 162 | */ 163 | public void setShortName(String shortName) { 164 | this.shortName = shortName; 165 | } 166 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/ComDistrictLevel.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Id; 4 | import javax.persistence.Table; 5 | 6 | @Table(name = "com_district_level") 7 | public class ComDistrictLevel { 8 | @Id 9 | private Integer id; 10 | 11 | /** 12 | * 级别名称 13 | */ 14 | private String name; 15 | 16 | /** 17 | * 级别序号(数值大的在前,不应重复) 18 | */ 19 | private Integer level; 20 | 21 | /** 22 | * @return id 23 | */ 24 | public Integer getId() { 25 | return id; 26 | } 27 | 28 | /** 29 | * @param id 30 | */ 31 | public void setId(Integer id) { 32 | this.id = id; 33 | } 34 | 35 | /** 36 | * 获取级别名称 37 | * 38 | * @return name - 级别名称 39 | */ 40 | public String getName() { 41 | return name; 42 | } 43 | 44 | /** 45 | * 设置级别名称 46 | * 47 | * @param name 级别名称 48 | */ 49 | public void setName(String name) { 50 | this.name = name; 51 | } 52 | 53 | /** 54 | * 获取级别序号(数值大的在前,不应重复) 55 | * 56 | * @return level - 级别序号(数值大的在前,不应重复) 57 | */ 58 | public Integer getLevel() { 59 | return level; 60 | } 61 | 62 | /** 63 | * 设置级别序号(数值大的在前,不应重复) 64 | * 65 | * @param level 级别序号(数值大的在前,不应重复) 66 | */ 67 | public void setLevel(Integer level) { 68 | this.level = level; 69 | } 70 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/ComProvincial.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Id; 5 | import javax.persistence.Table; 6 | 7 | @Table(name = "com_provincial") 8 | public class ComProvincial { 9 | @Id 10 | private Integer pid; 11 | 12 | @Column(name = "Provincial") 13 | private String provincial; 14 | 15 | /** 16 | * @return pid 17 | */ 18 | public Integer getPid() { 19 | return pid; 20 | } 21 | 22 | /** 23 | * @param pid 24 | */ 25 | public void setPid(Integer pid) { 26 | this.pid = pid; 27 | } 28 | 29 | /** 30 | * @return Provincial 31 | */ 32 | public String getProvincial() { 33 | return provincial; 34 | } 35 | 36 | /** 37 | * @param provincial 38 | */ 39 | public void setProvincial(String provincial) { 40 | this.provincial = provincial; 41 | } 42 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/OrgDep.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Id; 5 | import javax.persistence.Table; 6 | import java.util.Date; 7 | 8 | @Table(name = "org_dep") 9 | public class OrgDep { 10 | @Id 11 | private Integer id; 12 | 13 | @Column(name = "org_id") 14 | private Integer orgId; 15 | 16 | @Column(name = "dep_name") 17 | private String depName; 18 | 19 | private Integer level; 20 | 21 | @Column(name = "is_del") 22 | private Integer isDel; 23 | 24 | private Integer status; 25 | 26 | private String remark; 27 | 28 | private Date datetime; 29 | 30 | /** 31 | * @return id 32 | */ 33 | public Integer getId() { 34 | return id; 35 | } 36 | 37 | /** 38 | * @param id 39 | */ 40 | public void setId(Integer id) { 41 | this.id = id; 42 | } 43 | 44 | /** 45 | * @return org_id 46 | */ 47 | public Integer getOrgId() { 48 | return orgId; 49 | } 50 | 51 | /** 52 | * @param orgId 53 | */ 54 | public void setOrgId(Integer orgId) { 55 | this.orgId = orgId; 56 | } 57 | 58 | /** 59 | * @return dep_name 60 | */ 61 | public String getDepName() { 62 | return depName; 63 | } 64 | 65 | /** 66 | * @param depName 67 | */ 68 | public void setDepName(String depName) { 69 | this.depName = depName; 70 | } 71 | 72 | /** 73 | * @return level 74 | */ 75 | public Integer getLevel() { 76 | return level; 77 | } 78 | 79 | /** 80 | * @param level 81 | */ 82 | public void setLevel(Integer level) { 83 | this.level = level; 84 | } 85 | 86 | /** 87 | * @return is_del 88 | */ 89 | public Integer getIsDel() { 90 | return isDel; 91 | } 92 | 93 | /** 94 | * @param isDel 95 | */ 96 | public void setIsDel(Integer isDel) { 97 | this.isDel = isDel; 98 | } 99 | 100 | /** 101 | * @return status 102 | */ 103 | public Integer getStatus() { 104 | return status; 105 | } 106 | 107 | /** 108 | * @param status 109 | */ 110 | public void setStatus(Integer status) { 111 | this.status = status; 112 | } 113 | 114 | /** 115 | * @return remark 116 | */ 117 | public String getRemark() { 118 | return remark; 119 | } 120 | 121 | /** 122 | * @param remark 123 | */ 124 | public void setRemark(String remark) { 125 | this.remark = remark; 126 | } 127 | 128 | /** 129 | * @return datetime 130 | */ 131 | public Date getDatetime() { 132 | return datetime; 133 | } 134 | 135 | /** 136 | * @param datetime 137 | */ 138 | public void setDatetime(Date datetime) { 139 | this.datetime = datetime; 140 | } 141 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/OrgTag.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Id; 5 | import javax.persistence.Table; 6 | import java.util.Date; 7 | 8 | @Table(name = "org_tag") 9 | public class OrgTag { 10 | @Id 11 | private Integer id; 12 | 13 | @Column(name = "org_id") 14 | private Integer orgId; 15 | 16 | @Column(name = "dep_id") 17 | private Integer depId; 18 | 19 | private String name; 20 | 21 | @Column(name = "is_del") 22 | private Integer isDel; 23 | 24 | private Integer status; 25 | 26 | private String remark; 27 | 28 | private Date datetime; 29 | 30 | /** 31 | * @return id 32 | */ 33 | public Integer getId() { 34 | return id; 35 | } 36 | 37 | /** 38 | * @param id 39 | */ 40 | public void setId(Integer id) { 41 | this.id = id; 42 | } 43 | 44 | /** 45 | * @return org_id 46 | */ 47 | public Integer getOrgId() { 48 | return orgId; 49 | } 50 | 51 | /** 52 | * @param orgId 53 | */ 54 | public void setOrgId(Integer orgId) { 55 | this.orgId = orgId; 56 | } 57 | 58 | /** 59 | * @return dep_id 60 | */ 61 | public Integer getDepId() { 62 | return depId; 63 | } 64 | 65 | /** 66 | * @param depId 67 | */ 68 | public void setDepId(Integer depId) { 69 | this.depId = depId; 70 | } 71 | 72 | /** 73 | * @return name 74 | */ 75 | public String getName() { 76 | return name; 77 | } 78 | 79 | /** 80 | * @param name 81 | */ 82 | public void setName(String name) { 83 | this.name = name; 84 | } 85 | 86 | /** 87 | * @return is_del 88 | */ 89 | public Integer getIsDel() { 90 | return isDel; 91 | } 92 | 93 | /** 94 | * @param isDel 95 | */ 96 | public void setIsDel(Integer isDel) { 97 | this.isDel = isDel; 98 | } 99 | 100 | /** 101 | * @return status 102 | */ 103 | public Integer getStatus() { 104 | return status; 105 | } 106 | 107 | /** 108 | * @param status 109 | */ 110 | public void setStatus(Integer status) { 111 | this.status = status; 112 | } 113 | 114 | /** 115 | * @return remark 116 | */ 117 | public String getRemark() { 118 | return remark; 119 | } 120 | 121 | /** 122 | * @param remark 123 | */ 124 | public void setRemark(String remark) { 125 | this.remark = remark; 126 | } 127 | 128 | /** 129 | * @return datetime 130 | */ 131 | public Date getDatetime() { 132 | return datetime; 133 | } 134 | 135 | /** 136 | * @param datetime 137 | */ 138 | public void setDatetime(Date datetime) { 139 | this.datetime = datetime; 140 | } 141 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/OrgTagAdmin.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Id; 5 | import javax.persistence.Table; 6 | import java.util.Date; 7 | 8 | @Table(name = "org_tag_admin") 9 | public class OrgTagAdmin { 10 | @Id 11 | private Integer id; 12 | 13 | @Column(name = "org_id") 14 | private Integer orgId; 15 | 16 | @Column(name = "dep_id") 17 | private Integer depId; 18 | 19 | @Column(name = "tag_id") 20 | private Integer tagId; 21 | 22 | @Column(name = "admin_id") 23 | private Integer adminId; 24 | 25 | @Column(name = "is_del") 26 | private Integer isDel; 27 | 28 | private Integer status; 29 | 30 | private String remark; 31 | 32 | private Date datetime; 33 | 34 | /** 35 | * @return id 36 | */ 37 | public Integer getId() { 38 | return id; 39 | } 40 | 41 | /** 42 | * @param id 43 | */ 44 | public void setId(Integer id) { 45 | this.id = id; 46 | } 47 | 48 | /** 49 | * @return org_id 50 | */ 51 | public Integer getOrgId() { 52 | return orgId; 53 | } 54 | 55 | /** 56 | * @param orgId 57 | */ 58 | public void setOrgId(Integer orgId) { 59 | this.orgId = orgId; 60 | } 61 | 62 | /** 63 | * @return dep_id 64 | */ 65 | public Integer getDepId() { 66 | return depId; 67 | } 68 | 69 | /** 70 | * @param depId 71 | */ 72 | public void setDepId(Integer depId) { 73 | this.depId = depId; 74 | } 75 | 76 | /** 77 | * @return tag_id 78 | */ 79 | public Integer getTagId() { 80 | return tagId; 81 | } 82 | 83 | /** 84 | * @param tagId 85 | */ 86 | public void setTagId(Integer tagId) { 87 | this.tagId = tagId; 88 | } 89 | 90 | /** 91 | * @return admin_id 92 | */ 93 | public Integer getAdminId() { 94 | return adminId; 95 | } 96 | 97 | /** 98 | * @param adminId 99 | */ 100 | public void setAdminId(Integer adminId) { 101 | this.adminId = adminId; 102 | } 103 | 104 | /** 105 | * @return is_del 106 | */ 107 | public Integer getIsDel() { 108 | return isDel; 109 | } 110 | 111 | /** 112 | * @param isDel 113 | */ 114 | public void setIsDel(Integer isDel) { 115 | this.isDel = isDel; 116 | } 117 | 118 | /** 119 | * @return status 120 | */ 121 | public Integer getStatus() { 122 | return status; 123 | } 124 | 125 | /** 126 | * @param status 127 | */ 128 | public void setStatus(Integer status) { 129 | this.status = status; 130 | } 131 | 132 | /** 133 | * @return remark 134 | */ 135 | public String getRemark() { 136 | return remark; 137 | } 138 | 139 | /** 140 | * @param remark 141 | */ 142 | public void setRemark(String remark) { 143 | this.remark = remark; 144 | } 145 | 146 | /** 147 | * @return datetime 148 | */ 149 | public Date getDatetime() { 150 | return datetime; 151 | } 152 | 153 | /** 154 | * @param datetime 155 | */ 156 | public void setDatetime(Date datetime) { 157 | this.datetime = datetime; 158 | } 159 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/OrgTagUser.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Id; 5 | import javax.persistence.Table; 6 | import java.util.Date; 7 | 8 | @Table(name = "org_tag_user") 9 | public class OrgTagUser { 10 | @Id 11 | private Integer id; 12 | 13 | @Column(name = "org_id") 14 | private Integer orgId; 15 | 16 | @Column(name = "dep_id") 17 | private Integer depId; 18 | 19 | @Column(name = "tag_id") 20 | private Integer tagId; 21 | 22 | @Column(name = "userID") 23 | private String userid; 24 | 25 | @Column(name = "is_del") 26 | private Integer isDel; 27 | 28 | private Integer status; 29 | 30 | private String remark; 31 | 32 | private Date datetime; 33 | 34 | /** 35 | * @return id 36 | */ 37 | public Integer getId() { 38 | return id; 39 | } 40 | 41 | /** 42 | * @param id 43 | */ 44 | public void setId(Integer id) { 45 | this.id = id; 46 | } 47 | 48 | /** 49 | * @return org_id 50 | */ 51 | public Integer getOrgId() { 52 | return orgId; 53 | } 54 | 55 | /** 56 | * @param orgId 57 | */ 58 | public void setOrgId(Integer orgId) { 59 | this.orgId = orgId; 60 | } 61 | 62 | /** 63 | * @return dep_id 64 | */ 65 | public Integer getDepId() { 66 | return depId; 67 | } 68 | 69 | /** 70 | * @param depId 71 | */ 72 | public void setDepId(Integer depId) { 73 | this.depId = depId; 74 | } 75 | 76 | /** 77 | * @return tag_id 78 | */ 79 | public Integer getTagId() { 80 | return tagId; 81 | } 82 | 83 | /** 84 | * @param tagId 85 | */ 86 | public void setTagId(Integer tagId) { 87 | this.tagId = tagId; 88 | } 89 | 90 | /** 91 | * @return userID 92 | */ 93 | public String getUserid() { 94 | return userid; 95 | } 96 | 97 | /** 98 | * @param userid 99 | */ 100 | public void setUserid(String userid) { 101 | this.userid = userid; 102 | } 103 | 104 | /** 105 | * @return is_del 106 | */ 107 | public Integer getIsDel() { 108 | return isDel; 109 | } 110 | 111 | /** 112 | * @param isDel 113 | */ 114 | public void setIsDel(Integer isDel) { 115 | this.isDel = isDel; 116 | } 117 | 118 | /** 119 | * @return status 120 | */ 121 | public Integer getStatus() { 122 | return status; 123 | } 124 | 125 | /** 126 | * @param status 127 | */ 128 | public void setStatus(Integer status) { 129 | this.status = status; 130 | } 131 | 132 | /** 133 | * @return remark 134 | */ 135 | public String getRemark() { 136 | return remark; 137 | } 138 | 139 | /** 140 | * @param remark 141 | */ 142 | public void setRemark(String remark) { 143 | this.remark = remark; 144 | } 145 | 146 | /** 147 | * @return datetime 148 | */ 149 | public Date getDatetime() { 150 | return datetime; 151 | } 152 | 153 | /** 154 | * @param datetime 155 | */ 156 | public void setDatetime(Date datetime) { 157 | this.datetime = datetime; 158 | } 159 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/OrgWhitelist.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Id; 5 | import javax.persistence.Table; 6 | import java.util.Date; 7 | 8 | @Table(name = "org_whitelist") 9 | public class OrgWhitelist { 10 | @Id 11 | private Integer id; 12 | 13 | /** 14 | * 机构id 15 | */ 16 | @Column(name = "org_id") 17 | private Integer orgId; 18 | 19 | /** 20 | * 用户标识 21 | */ 22 | @Column(name = "userID") 23 | private String userid; 24 | 25 | /** 26 | * 姓名 27 | */ 28 | private String name; 29 | 30 | /** 31 | * 性别 32 | */ 33 | private String gender; 34 | 35 | /** 36 | * 一级子部门id 37 | */ 38 | @Column(name = "sub1_department_id") 39 | private Integer sub1DepartmentId; 40 | 41 | /** 42 | * 二级子部门 43 | */ 44 | @Column(name = "sub2_department_id") 45 | private Integer sub2DepartmentId; 46 | 47 | /** 48 | * 类型1(学生类型) 49 | */ 50 | private String tag1; 51 | 52 | private String tag2; 53 | 54 | private String tag3; 55 | 56 | private String tag4; 57 | 58 | /** 59 | * 添加时间 60 | */ 61 | @Column(name = "add_datetime") 62 | private Date addDatetime; 63 | 64 | /** 65 | * 最后更新时间 66 | */ 67 | @Column(name = "last_update_time") 68 | private Date lastUpdateTime; 69 | 70 | /** 71 | * 添加备注 72 | */ 73 | @Column(name = "add_remark") 74 | private String addRemark; 75 | 76 | /** 77 | * 用户录入数据,为了便于核对 78 | */ 79 | @Column(name = "dep_name") 80 | private String depName; 81 | 82 | /** 83 | * 报告编号 84 | */ 85 | @Column(name = "report_id") 86 | private Integer reportId; 87 | 88 | /** 89 | * 最后报告时间 90 | */ 91 | @Column(name = "report_date") 92 | private Date reportDate; 93 | 94 | /** 95 | * 状态 96 | */ 97 | private Integer status; 98 | 99 | /** 100 | * @return id 101 | */ 102 | public Integer getId() { 103 | return id; 104 | } 105 | 106 | /** 107 | * @param id 108 | */ 109 | public void setId(Integer id) { 110 | this.id = id; 111 | } 112 | 113 | /** 114 | * 获取机构id 115 | * 116 | * @return org_id - 机构id 117 | */ 118 | public Integer getOrgId() { 119 | return orgId; 120 | } 121 | 122 | /** 123 | * 设置机构id 124 | * 125 | * @param orgId 机构id 126 | */ 127 | public void setOrgId(Integer orgId) { 128 | this.orgId = orgId; 129 | } 130 | 131 | /** 132 | * 获取用户标识 133 | * 134 | * @return userID - 用户标识 135 | */ 136 | public String getUserid() { 137 | return userid; 138 | } 139 | 140 | /** 141 | * 设置用户标识 142 | * 143 | * @param userid 用户标识 144 | */ 145 | public void setUserid(String userid) { 146 | this.userid = userid; 147 | } 148 | 149 | /** 150 | * 获取姓名 151 | * 152 | * @return name - 姓名 153 | */ 154 | public String getName() { 155 | return name; 156 | } 157 | 158 | /** 159 | * 设置姓名 160 | * 161 | * @param name 姓名 162 | */ 163 | public void setName(String name) { 164 | this.name = name; 165 | } 166 | 167 | /** 168 | * 获取性别 169 | * 170 | * @return gender - 性别 171 | */ 172 | public String getGender() { 173 | return gender; 174 | } 175 | 176 | /** 177 | * 设置性别 178 | * 179 | * @param gender 性别 180 | */ 181 | public void setGender(String gender) { 182 | this.gender = gender; 183 | } 184 | 185 | /** 186 | * 获取一级子部门id 187 | * 188 | * @return sub1_department_id - 一级子部门id 189 | */ 190 | public Integer getSub1DepartmentId() { 191 | return sub1DepartmentId; 192 | } 193 | 194 | /** 195 | * 设置一级子部门id 196 | * 197 | * @param sub1DepartmentId 一级子部门id 198 | */ 199 | public void setSub1DepartmentId(Integer sub1DepartmentId) { 200 | this.sub1DepartmentId = sub1DepartmentId; 201 | } 202 | 203 | /** 204 | * 获取二级子部门 205 | * 206 | * @return sub2_department_id - 二级子部门 207 | */ 208 | public Integer getSub2DepartmentId() { 209 | return sub2DepartmentId; 210 | } 211 | 212 | /** 213 | * 设置二级子部门 214 | * 215 | * @param sub2DepartmentId 二级子部门 216 | */ 217 | public void setSub2DepartmentId(Integer sub2DepartmentId) { 218 | this.sub2DepartmentId = sub2DepartmentId; 219 | } 220 | 221 | /** 222 | * 获取类型1(学生类型) 223 | * 224 | * @return tag1 - 类型1(学生类型) 225 | */ 226 | public String getTag1() { 227 | return tag1; 228 | } 229 | 230 | /** 231 | * 设置类型1(学生类型) 232 | * 233 | * @param tag1 类型1(学生类型) 234 | */ 235 | public void setTag1(String tag1) { 236 | this.tag1 = tag1; 237 | } 238 | 239 | /** 240 | * @return tag2 241 | */ 242 | public String getTag2() { 243 | return tag2; 244 | } 245 | 246 | /** 247 | * @param tag2 248 | */ 249 | public void setTag2(String tag2) { 250 | this.tag2 = tag2; 251 | } 252 | 253 | /** 254 | * @return tag3 255 | */ 256 | public String getTag3() { 257 | return tag3; 258 | } 259 | 260 | /** 261 | * @param tag3 262 | */ 263 | public void setTag3(String tag3) { 264 | this.tag3 = tag3; 265 | } 266 | 267 | /** 268 | * @return tag4 269 | */ 270 | public String getTag4() { 271 | return tag4; 272 | } 273 | 274 | /** 275 | * @param tag4 276 | */ 277 | public void setTag4(String tag4) { 278 | this.tag4 = tag4; 279 | } 280 | 281 | /** 282 | * 获取添加时间 283 | * 284 | * @return add_datetime - 添加时间 285 | */ 286 | public Date getAddDatetime() { 287 | return addDatetime; 288 | } 289 | 290 | /** 291 | * 设置添加时间 292 | * 293 | * @param addDatetime 添加时间 294 | */ 295 | public void setAddDatetime(Date addDatetime) { 296 | this.addDatetime = addDatetime; 297 | } 298 | 299 | /** 300 | * 获取最后更新时间 301 | * 302 | * @return last_update_time - 最后更新时间 303 | */ 304 | public Date getLastUpdateTime() { 305 | return lastUpdateTime; 306 | } 307 | 308 | /** 309 | * 设置最后更新时间 310 | * 311 | * @param lastUpdateTime 最后更新时间 312 | */ 313 | public void setLastUpdateTime(Date lastUpdateTime) { 314 | this.lastUpdateTime = lastUpdateTime; 315 | } 316 | 317 | /** 318 | * 获取添加备注 319 | * 320 | * @return add_remark - 添加备注 321 | */ 322 | public String getAddRemark() { 323 | return addRemark; 324 | } 325 | 326 | /** 327 | * 设置添加备注 328 | * 329 | * @param addRemark 添加备注 330 | */ 331 | public void setAddRemark(String addRemark) { 332 | this.addRemark = addRemark; 333 | } 334 | 335 | /** 336 | * 获取用户录入数据,为了便于核对 337 | * 338 | * @return dep_name - 用户录入数据,为了便于核对 339 | */ 340 | public String getDepName() { 341 | return depName; 342 | } 343 | 344 | /** 345 | * 设置用户录入数据,为了便于核对 346 | * 347 | * @param depName 用户录入数据,为了便于核对 348 | */ 349 | public void setDepName(String depName) { 350 | this.depName = depName; 351 | } 352 | 353 | /** 354 | * 获取报告编号 355 | * 356 | * @return report_id - 报告编号 357 | */ 358 | public Integer getReportId() { 359 | return reportId; 360 | } 361 | 362 | /** 363 | * 设置报告编号 364 | * 365 | * @param reportId 报告编号 366 | */ 367 | public void setReportId(Integer reportId) { 368 | this.reportId = reportId; 369 | } 370 | 371 | /** 372 | * 获取最后报告时间 373 | * 374 | * @return report_date - 最后报告时间 375 | */ 376 | public Date getReportDate() { 377 | return reportDate; 378 | } 379 | 380 | /** 381 | * 设置最后报告时间 382 | * 383 | * @param reportDate 最后报告时间 384 | */ 385 | public void setReportDate(Date reportDate) { 386 | this.reportDate = reportDate; 387 | } 388 | 389 | /** 390 | * 获取状态 391 | * 392 | * @return status - 状态 393 | */ 394 | public Integer getStatus() { 395 | return status; 396 | } 397 | 398 | /** 399 | * 设置状态 400 | * 401 | * @param status 状态 402 | */ 403 | public void setStatus(Integer status) { 404 | this.status = status; 405 | } 406 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/Organization.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Id; 5 | import java.util.Date; 6 | 7 | public class Organization { 8 | @Id 9 | private Integer id; 10 | 11 | /** 12 | * 单位名称 13 | */ 14 | private String corpname; 15 | 16 | @Column(name = "corpname_full") 17 | private String corpnameFull; 18 | 19 | /** 20 | * mp 小程序 qw 企业微信 21 | */ 22 | @Column(name = "access_type") 23 | private String accessType; 24 | 25 | /** 26 | * 单位模板 27 | */ 28 | @Column(name = "template_code") 29 | private String templateCode; 30 | 31 | /** 32 | * 单位编号 33 | */ 34 | @Column(name = "corp_code") 35 | private String corpCode; 36 | 37 | /** 38 | * 公司名称/学校名称 39 | */ 40 | @Column(name = "type_corpname") 41 | private String typeCorpname; 42 | 43 | /** 44 | * 学号/职工号等内容提示语 45 | */ 46 | @Column(name = "type_username") 47 | private String typeUsername; 48 | 49 | @Column(name = "admin_name") 50 | private String adminName; 51 | 52 | private String tel; 53 | 54 | @Column(name = "is_del") 55 | private Integer isDel; 56 | 57 | private Integer status; 58 | 59 | private String remark; 60 | 61 | @Column(name = "add_date") 62 | private Date addDate; 63 | 64 | /** 65 | * @return id 66 | */ 67 | public Integer getId() { 68 | return id; 69 | } 70 | 71 | /** 72 | * @param id 73 | */ 74 | public void setId(Integer id) { 75 | this.id = id; 76 | } 77 | 78 | /** 79 | * 获取单位名称 80 | * 81 | * @return corpname - 单位名称 82 | */ 83 | public String getCorpname() { 84 | return corpname; 85 | } 86 | 87 | /** 88 | * 设置单位名称 89 | * 90 | * @param corpname 单位名称 91 | */ 92 | public void setCorpname(String corpname) { 93 | this.corpname = corpname; 94 | } 95 | 96 | /** 97 | * @return corpname_full 98 | */ 99 | public String getCorpnameFull() { 100 | return corpnameFull; 101 | } 102 | 103 | /** 104 | * @param corpnameFull 105 | */ 106 | public void setCorpnameFull(String corpnameFull) { 107 | this.corpnameFull = corpnameFull; 108 | } 109 | 110 | /** 111 | * 获取mp 小程序 qw 企业微信 112 | * 113 | * @return access_type - mp 小程序 qw 企业微信 114 | */ 115 | public String getAccessType() { 116 | return accessType; 117 | } 118 | 119 | /** 120 | * 设置mp 小程序 qw 企业微信 121 | * 122 | * @param accessType mp 小程序 qw 企业微信 123 | */ 124 | public void setAccessType(String accessType) { 125 | this.accessType = accessType; 126 | } 127 | 128 | /** 129 | * 获取单位模板 130 | * 131 | * @return template_code - 单位模板 132 | */ 133 | public String getTemplateCode() { 134 | return templateCode; 135 | } 136 | 137 | /** 138 | * 设置单位模板 139 | * 140 | * @param templateCode 单位模板 141 | */ 142 | public void setTemplateCode(String templateCode) { 143 | this.templateCode = templateCode; 144 | } 145 | 146 | /** 147 | * 获取单位编号 148 | * 149 | * @return corp_code - 单位编号 150 | */ 151 | public String getCorpCode() { 152 | return corpCode; 153 | } 154 | 155 | /** 156 | * 设置单位编号 157 | * 158 | * @param corpCode 单位编号 159 | */ 160 | public void setCorpCode(String corpCode) { 161 | this.corpCode = corpCode; 162 | } 163 | 164 | /** 165 | * 获取公司名称/学校名称 166 | * 167 | * @return type_corpname - 公司名称/学校名称 168 | */ 169 | public String getTypeCorpname() { 170 | return typeCorpname; 171 | } 172 | 173 | /** 174 | * 设置公司名称/学校名称 175 | * 176 | * @param typeCorpname 公司名称/学校名称 177 | */ 178 | public void setTypeCorpname(String typeCorpname) { 179 | this.typeCorpname = typeCorpname; 180 | } 181 | 182 | /** 183 | * 获取学号/职工号等内容提示语 184 | * 185 | * @return type_username - 学号/职工号等内容提示语 186 | */ 187 | public String getTypeUsername() { 188 | return typeUsername; 189 | } 190 | 191 | /** 192 | * 设置学号/职工号等内容提示语 193 | * 194 | * @param typeUsername 学号/职工号等内容提示语 195 | */ 196 | public void setTypeUsername(String typeUsername) { 197 | this.typeUsername = typeUsername; 198 | } 199 | 200 | /** 201 | * @return admin_name 202 | */ 203 | public String getAdminName() { 204 | return adminName; 205 | } 206 | 207 | /** 208 | * @param adminName 209 | */ 210 | public void setAdminName(String adminName) { 211 | this.adminName = adminName; 212 | } 213 | 214 | /** 215 | * @return tel 216 | */ 217 | public String getTel() { 218 | return tel; 219 | } 220 | 221 | /** 222 | * @param tel 223 | */ 224 | public void setTel(String tel) { 225 | this.tel = tel; 226 | } 227 | 228 | /** 229 | * @return is_del 230 | */ 231 | public Integer getIsDel() { 232 | return isDel; 233 | } 234 | 235 | /** 236 | * @param isDel 237 | */ 238 | public void setIsDel(Integer isDel) { 239 | this.isDel = isDel; 240 | } 241 | 242 | /** 243 | * @return status 244 | */ 245 | public Integer getStatus() { 246 | return status; 247 | } 248 | 249 | /** 250 | * @param status 251 | */ 252 | public void setStatus(Integer status) { 253 | this.status = status; 254 | } 255 | 256 | /** 257 | * @return remark 258 | */ 259 | public String getRemark() { 260 | return remark; 261 | } 262 | 263 | /** 264 | * @param remark 265 | */ 266 | public void setRemark(String remark) { 267 | this.remark = remark; 268 | } 269 | 270 | /** 271 | * @return add_date 272 | */ 273 | public Date getAddDate() { 274 | return addDate; 275 | } 276 | 277 | /** 278 | * @param addDate 279 | */ 280 | public void setAddDate(Date addDate) { 281 | this.addDate = addDate; 282 | } 283 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/ReportRecordCompany.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Id; 5 | import javax.persistence.Table; 6 | import java.util.Date; 7 | 8 | @Table(name = "report_record_company") 9 | public class ReportRecordCompany { 10 | @Id 11 | private Long id; 12 | 13 | /** 14 | * 微信小程序用户id 15 | */ 16 | private Integer wxuid; 17 | 18 | /** 19 | * 机构id 20 | */ 21 | @Column(name = "org_id") 22 | private Integer orgId; 23 | 24 | /** 25 | * 机构名称 26 | */ 27 | @Column(name = "org_name") 28 | private String orgName; 29 | 30 | /** 31 | * 用户标识码 32 | */ 33 | @Column(name = "userID") 34 | private String userid; 35 | 36 | /** 37 | * 姓名 38 | */ 39 | private String name; 40 | 41 | /** 42 | * 是否返校(选项值) 43 | */ 44 | @Column(name = "is_return_school") 45 | private Integer isReturnSchool; 46 | 47 | /** 48 | * 所在宿舍号 49 | */ 50 | @Column(name = "return_dorm_num") 51 | private String returnDormNum; 52 | 53 | /** 54 | * 返校时间(Unix时间戳-UTC时间) 55 | */ 56 | @Column(name = "return_time") 57 | private Date returnTime; 58 | 59 | /** 60 | * 从哪里返回学校(行政区划字典值) 61 | */ 62 | @Column(name = "return_district_value") 63 | private Integer returnDistrictValue; 64 | 65 | /** 66 | * 从哪里返回学校(从上级到下级按逗号分隔的字典值) 67 | */ 68 | @Column(name = "return_district_path") 69 | private String returnDistrictPath; 70 | 71 | /** 72 | * 返校过程的交通信息 73 | */ 74 | @Column(name = "return_traffic_info") 75 | private String returnTrafficInfo; 76 | 77 | /** 78 | * 目前所在地 79 | */ 80 | @Column(name = "current_district_value") 81 | private Integer currentDistrictValue; 82 | 83 | /** 84 | * 目前所在地(从上级到下级按逗号分隔的字典值) 85 | */ 86 | @Column(name = "current_district_path") 87 | private String currentDistrictPath; 88 | 89 | /** 90 | * 目前本人身体状况(选项值) 91 | */ 92 | @Column(name = "current_health_value") 93 | private Integer currentHealthValue; 94 | 95 | /** 96 | * 被传染风险(选项值) 97 | */ 98 | @Column(name = "current_contagion_risk_value") 99 | private Integer currentContagionRiskValue; 100 | 101 | /** 102 | * 当前体温(摄氏度) 103 | */ 104 | @Column(name = "current_temperature") 105 | private Float currentTemperature; 106 | 107 | @Column(name = "psy_status") 108 | private Integer psyStatus; 109 | 110 | @Column(name = "psy_demand") 111 | private Integer psyDemand; 112 | 113 | @Column(name = "psy_knowledge") 114 | private Integer psyKnowledge; 115 | 116 | @Column(name = "return_company_date") 117 | private String returnCompanyDate; 118 | 119 | @Column(name = "plan_company_date") 120 | private String planCompanyDate; 121 | 122 | @Column(name = "template_code") 123 | private String templateCode; 124 | 125 | /** 126 | * 其它信息 127 | */ 128 | private String remarks; 129 | 130 | private Date time; 131 | 132 | /** 133 | * @return id 134 | */ 135 | public Long getId() { 136 | return id; 137 | } 138 | 139 | /** 140 | * @param id 141 | */ 142 | public void setId(Long id) { 143 | this.id = id; 144 | } 145 | 146 | /** 147 | * 获取微信小程序用户id 148 | * 149 | * @return wxuid - 微信小程序用户id 150 | */ 151 | public Integer getWxuid() { 152 | return wxuid; 153 | } 154 | 155 | /** 156 | * 设置微信小程序用户id 157 | * 158 | * @param wxuid 微信小程序用户id 159 | */ 160 | public void setWxuid(Integer wxuid) { 161 | this.wxuid = wxuid; 162 | } 163 | 164 | /** 165 | * 获取机构id 166 | * 167 | * @return org_id - 机构id 168 | */ 169 | public Integer getOrgId() { 170 | return orgId; 171 | } 172 | 173 | /** 174 | * 设置机构id 175 | * 176 | * @param orgId 机构id 177 | */ 178 | public void setOrgId(Integer orgId) { 179 | this.orgId = orgId; 180 | } 181 | 182 | /** 183 | * 获取机构名称 184 | * 185 | * @return org_name - 机构名称 186 | */ 187 | public String getOrgName() { 188 | return orgName; 189 | } 190 | 191 | /** 192 | * 设置机构名称 193 | * 194 | * @param orgName 机构名称 195 | */ 196 | public void setOrgName(String orgName) { 197 | this.orgName = orgName; 198 | } 199 | 200 | /** 201 | * 获取用户标识码 202 | * 203 | * @return userID - 用户标识码 204 | */ 205 | public String getUserid() { 206 | return userid; 207 | } 208 | 209 | /** 210 | * 设置用户标识码 211 | * 212 | * @param userid 用户标识码 213 | */ 214 | public void setUserid(String userid) { 215 | this.userid = userid; 216 | } 217 | 218 | /** 219 | * 获取姓名 220 | * 221 | * @return name - 姓名 222 | */ 223 | public String getName() { 224 | return name; 225 | } 226 | 227 | /** 228 | * 设置姓名 229 | * 230 | * @param name 姓名 231 | */ 232 | public void setName(String name) { 233 | this.name = name; 234 | } 235 | 236 | /** 237 | * 获取 是否返校(选项值) 238 | * 239 | * @return is_return_school - 是否返校(选项值) 240 | */ 241 | public Integer getIsReturnSchool() { 242 | return isReturnSchool; 243 | } 244 | 245 | /** 246 | * 设置 是否返校(选项值) 247 | * 248 | * @param isReturnSchool 是否返校(选项值) 249 | */ 250 | public void setIsReturnSchool(Integer isReturnSchool) { 251 | this.isReturnSchool = isReturnSchool; 252 | } 253 | 254 | /** 255 | * 获取所在宿舍号 256 | * 257 | * @return return_dorm_num - 所在宿舍号 258 | */ 259 | public String getReturnDormNum() { 260 | return returnDormNum; 261 | } 262 | 263 | /** 264 | * 设置所在宿舍号 265 | * 266 | * @param returnDormNum 所在宿舍号 267 | */ 268 | public void setReturnDormNum(String returnDormNum) { 269 | this.returnDormNum = returnDormNum; 270 | } 271 | 272 | /** 273 | * 获取返校时间(Unix时间戳-UTC时间) 274 | * 275 | * @return return_time - 返校时间(Unix时间戳-UTC时间) 276 | */ 277 | public Date getReturnTime() { 278 | return returnTime; 279 | } 280 | 281 | /** 282 | * 设置返校时间(Unix时间戳-UTC时间) 283 | * 284 | * @param returnTime 返校时间(Unix时间戳-UTC时间) 285 | */ 286 | public void setReturnTime(Date returnTime) { 287 | this.returnTime = returnTime; 288 | } 289 | 290 | /** 291 | * 获取从哪里返回学校(行政区划字典值) 292 | * 293 | * @return return_district_value - 从哪里返回学校(行政区划字典值) 294 | */ 295 | public Integer getReturnDistrictValue() { 296 | return returnDistrictValue; 297 | } 298 | 299 | /** 300 | * 设置从哪里返回学校(行政区划字典值) 301 | * 302 | * @param returnDistrictValue 从哪里返回学校(行政区划字典值) 303 | */ 304 | public void setReturnDistrictValue(Integer returnDistrictValue) { 305 | this.returnDistrictValue = returnDistrictValue; 306 | } 307 | 308 | /** 309 | * 获取从哪里返回学校(从上级到下级按逗号分隔的字典值) 310 | * 311 | * @return return_district_path - 从哪里返回学校(从上级到下级按逗号分隔的字典值) 312 | */ 313 | public String getReturnDistrictPath() { 314 | return returnDistrictPath; 315 | } 316 | 317 | /** 318 | * 设置从哪里返回学校(从上级到下级按逗号分隔的字典值) 319 | * 320 | * @param returnDistrictPath 从哪里返回学校(从上级到下级按逗号分隔的字典值) 321 | */ 322 | public void setReturnDistrictPath(String returnDistrictPath) { 323 | this.returnDistrictPath = returnDistrictPath; 324 | } 325 | 326 | /** 327 | * 获取返校过程的交通信息 328 | * 329 | * @return return_traffic_info - 返校过程的交通信息 330 | */ 331 | public String getReturnTrafficInfo() { 332 | return returnTrafficInfo; 333 | } 334 | 335 | /** 336 | * 设置返校过程的交通信息 337 | * 338 | * @param returnTrafficInfo 返校过程的交通信息 339 | */ 340 | public void setReturnTrafficInfo(String returnTrafficInfo) { 341 | this.returnTrafficInfo = returnTrafficInfo; 342 | } 343 | 344 | /** 345 | * 获取目前所在地 346 | * 347 | * @return current_district_value - 目前所在地 348 | */ 349 | public Integer getCurrentDistrictValue() { 350 | return currentDistrictValue; 351 | } 352 | 353 | /** 354 | * 设置目前所在地 355 | * 356 | * @param currentDistrictValue 目前所在地 357 | */ 358 | public void setCurrentDistrictValue(Integer currentDistrictValue) { 359 | this.currentDistrictValue = currentDistrictValue; 360 | } 361 | 362 | /** 363 | * 获取目前所在地(从上级到下级按逗号分隔的字典值) 364 | * 365 | * @return current_district_path - 目前所在地(从上级到下级按逗号分隔的字典值) 366 | */ 367 | public String getCurrentDistrictPath() { 368 | return currentDistrictPath; 369 | } 370 | 371 | /** 372 | * 设置目前所在地(从上级到下级按逗号分隔的字典值) 373 | * 374 | * @param currentDistrictPath 目前所在地(从上级到下级按逗号分隔的字典值) 375 | */ 376 | public void setCurrentDistrictPath(String currentDistrictPath) { 377 | this.currentDistrictPath = currentDistrictPath; 378 | } 379 | 380 | /** 381 | * 获取目前本人身体状况(选项值) 382 | * 383 | * @return current_health_value - 目前本人身体状况(选项值) 384 | */ 385 | public Integer getCurrentHealthValue() { 386 | return currentHealthValue; 387 | } 388 | 389 | /** 390 | * 设置目前本人身体状况(选项值) 391 | * 392 | * @param currentHealthValue 目前本人身体状况(选项值) 393 | */ 394 | public void setCurrentHealthValue(Integer currentHealthValue) { 395 | this.currentHealthValue = currentHealthValue; 396 | } 397 | 398 | /** 399 | * 获取被传染风险(选项值) 400 | * 401 | * @return current_contagion_risk_value - 被传染风险(选项值) 402 | */ 403 | public Integer getCurrentContagionRiskValue() { 404 | return currentContagionRiskValue; 405 | } 406 | 407 | /** 408 | * 设置被传染风险(选项值) 409 | * 410 | * @param currentContagionRiskValue 被传染风险(选项值) 411 | */ 412 | public void setCurrentContagionRiskValue(Integer currentContagionRiskValue) { 413 | this.currentContagionRiskValue = currentContagionRiskValue; 414 | } 415 | 416 | /** 417 | * 获取当前体温(摄氏度) 418 | * 419 | * @return current_temperature - 当前体温(摄氏度) 420 | */ 421 | public Float getCurrentTemperature() { 422 | return currentTemperature; 423 | } 424 | 425 | /** 426 | * 设置当前体温(摄氏度) 427 | * 428 | * @param currentTemperature 当前体温(摄氏度) 429 | */ 430 | public void setCurrentTemperature(Float currentTemperature) { 431 | this.currentTemperature = currentTemperature; 432 | } 433 | 434 | /** 435 | * @return psy_status 436 | */ 437 | public Integer getPsyStatus() { 438 | return psyStatus; 439 | } 440 | 441 | /** 442 | * @param psyStatus 443 | */ 444 | public void setPsyStatus(Integer psyStatus) { 445 | this.psyStatus = psyStatus; 446 | } 447 | 448 | /** 449 | * @return psy_demand 450 | */ 451 | public Integer getPsyDemand() { 452 | return psyDemand; 453 | } 454 | 455 | /** 456 | * @param psyDemand 457 | */ 458 | public void setPsyDemand(Integer psyDemand) { 459 | this.psyDemand = psyDemand; 460 | } 461 | 462 | /** 463 | * @return psy_knowledge 464 | */ 465 | public Integer getPsyKnowledge() { 466 | return psyKnowledge; 467 | } 468 | 469 | /** 470 | * @param psyKnowledge 471 | */ 472 | public void setPsyKnowledge(Integer psyKnowledge) { 473 | this.psyKnowledge = psyKnowledge; 474 | } 475 | 476 | /** 477 | * @return return_company_date 478 | */ 479 | public String getReturnCompanyDate() { 480 | return returnCompanyDate; 481 | } 482 | 483 | /** 484 | * @param returnCompanyDate 485 | */ 486 | public void setReturnCompanyDate(String returnCompanyDate) { 487 | this.returnCompanyDate = returnCompanyDate; 488 | } 489 | 490 | /** 491 | * @return plan_company_date 492 | */ 493 | public String getPlanCompanyDate() { 494 | return planCompanyDate; 495 | } 496 | 497 | /** 498 | * @param planCompanyDate 499 | */ 500 | public void setPlanCompanyDate(String planCompanyDate) { 501 | this.planCompanyDate = planCompanyDate; 502 | } 503 | 504 | /** 505 | * @return template_code 506 | */ 507 | public String getTemplateCode() { 508 | return templateCode; 509 | } 510 | 511 | /** 512 | * @param templateCode 513 | */ 514 | public void setTemplateCode(String templateCode) { 515 | this.templateCode = templateCode; 516 | } 517 | 518 | /** 519 | * 获取其它信息 520 | * 521 | * @return remarks - 其它信息 522 | */ 523 | public String getRemarks() { 524 | return remarks; 525 | } 526 | 527 | /** 528 | * 设置其它信息 529 | * 530 | * @param remarks 其它信息 531 | */ 532 | public void setRemarks(String remarks) { 533 | this.remarks = remarks; 534 | } 535 | 536 | /** 537 | * @return time 538 | */ 539 | public Date getTime() { 540 | return time; 541 | } 542 | 543 | /** 544 | * @param time 545 | */ 546 | public void setTime(Date time) { 547 | this.time = time; 548 | } 549 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/ReportTemplate.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Id; 5 | import javax.persistence.Table; 6 | import java.util.Date; 7 | 8 | @Table(name = "report_template") 9 | public class ReportTemplate { 10 | @Id 11 | private Integer id; 12 | 13 | private String name; 14 | 15 | private String code; 16 | 17 | private String remark; 18 | 19 | @Column(name = "is_visable") 20 | private Integer isVisable; 21 | 22 | @Column(name = "is_del") 23 | private Integer isDel; 24 | 25 | @Column(name = "add_time") 26 | private Date addTime; 27 | 28 | /** 29 | * @return id 30 | */ 31 | public Integer getId() { 32 | return id; 33 | } 34 | 35 | /** 36 | * @param id 37 | */ 38 | public void setId(Integer id) { 39 | this.id = id; 40 | } 41 | 42 | /** 43 | * @return name 44 | */ 45 | public String getName() { 46 | return name; 47 | } 48 | 49 | /** 50 | * @param name 51 | */ 52 | public void setName(String name) { 53 | this.name = name; 54 | } 55 | 56 | /** 57 | * @return code 58 | */ 59 | public String getCode() { 60 | return code; 61 | } 62 | 63 | /** 64 | * @param code 65 | */ 66 | public void setCode(String code) { 67 | this.code = code; 68 | } 69 | 70 | /** 71 | * @return remark 72 | */ 73 | public String getRemark() { 74 | return remark; 75 | } 76 | 77 | /** 78 | * @param remark 79 | */ 80 | public void setRemark(String remark) { 81 | this.remark = remark; 82 | } 83 | 84 | /** 85 | * @return is_visable 86 | */ 87 | public Integer getIsVisable() { 88 | return isVisable; 89 | } 90 | 91 | /** 92 | * @param isVisable 93 | */ 94 | public void setIsVisable(Integer isVisable) { 95 | this.isVisable = isVisable; 96 | } 97 | 98 | /** 99 | * @return is_del 100 | */ 101 | public Integer getIsDel() { 102 | return isDel; 103 | } 104 | 105 | /** 106 | * @param isDel 107 | */ 108 | public void setIsDel(Integer isDel) { 109 | this.isDel = isDel; 110 | } 111 | 112 | /** 113 | * @return add_time 114 | */ 115 | public Date getAddTime() { 116 | return addTime; 117 | } 118 | 119 | /** 120 | * @param addTime 121 | */ 122 | public void setAddTime(Date addTime) { 123 | this.addTime = addTime; 124 | } 125 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/WxMpBindInfo.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Id; 5 | import javax.persistence.Table; 6 | import java.util.Date; 7 | 8 | @Table(name = "wx_mp_bind_info") 9 | public class WxMpBindInfo { 10 | @Id 11 | private Integer id; 12 | 13 | /** 14 | * department_id 15 | */ 16 | @Column(name = "org_id") 17 | private Integer orgId; 18 | 19 | /** 20 | * weixin_id 21 | */ 22 | @Column(name = "wx_uid") 23 | private Integer wxUid; 24 | 25 | /** 26 | * 用户唯一表示 27 | */ 28 | private String username; 29 | 30 | /** 31 | * 是否绑定 32 | */ 33 | private Integer isbind; 34 | 35 | @Column(name = "bind_date") 36 | private Date bindDate; 37 | 38 | @Column(name = "unbind_date") 39 | private Date unbindDate; 40 | 41 | private String remark; 42 | 43 | /** 44 | * @return id 45 | */ 46 | public Integer getId() { 47 | return id; 48 | } 49 | 50 | /** 51 | * @param id 52 | */ 53 | public void setId(Integer id) { 54 | this.id = id; 55 | } 56 | 57 | /** 58 | * 获取department_id 59 | * 60 | * @return org_id - department_id 61 | */ 62 | public Integer getOrgId() { 63 | return orgId; 64 | } 65 | 66 | /** 67 | * 设置department_id 68 | * 69 | * @param orgId department_id 70 | */ 71 | public void setOrgId(Integer orgId) { 72 | this.orgId = orgId; 73 | } 74 | 75 | /** 76 | * 获取weixin_id 77 | * 78 | * @return wx_uid - weixin_id 79 | */ 80 | public Integer getWxUid() { 81 | return wxUid; 82 | } 83 | 84 | /** 85 | * 设置weixin_id 86 | * 87 | * @param wxUid weixin_id 88 | */ 89 | public void setWxUid(Integer wxUid) { 90 | this.wxUid = wxUid; 91 | } 92 | 93 | /** 94 | * 获取用户唯一表示 95 | * 96 | * @return username - 用户唯一表示 97 | */ 98 | public String getUsername() { 99 | return username; 100 | } 101 | 102 | /** 103 | * 设置用户唯一表示 104 | * 105 | * @param username 用户唯一表示 106 | */ 107 | public void setUsername(String username) { 108 | this.username = username; 109 | } 110 | 111 | /** 112 | * 获取是否绑定 113 | * 114 | * @return isbind - 是否绑定 115 | */ 116 | public Integer getIsbind() { 117 | return isbind; 118 | } 119 | 120 | /** 121 | * 设置是否绑定 122 | * 123 | * @param isbind 是否绑定 124 | */ 125 | public void setIsbind(Integer isbind) { 126 | this.isbind = isbind; 127 | } 128 | 129 | /** 130 | * @return bind_date 131 | */ 132 | public Date getBindDate() { 133 | return bindDate; 134 | } 135 | 136 | /** 137 | * @param bindDate 138 | */ 139 | public void setBindDate(Date bindDate) { 140 | this.bindDate = bindDate; 141 | } 142 | 143 | /** 144 | * @return unbind_date 145 | */ 146 | public Date getUnbindDate() { 147 | return unbindDate; 148 | } 149 | 150 | /** 151 | * @param unbindDate 152 | */ 153 | public void setUnbindDate(Date unbindDate) { 154 | this.unbindDate = unbindDate; 155 | } 156 | 157 | /** 158 | * @return remark 159 | */ 160 | public String getRemark() { 161 | return remark; 162 | } 163 | 164 | /** 165 | * @param remark 166 | */ 167 | public void setRemark(String remark) { 168 | this.remark = remark; 169 | } 170 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/WxMpLog.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Id; 4 | import javax.persistence.Table; 5 | import java.util.Date; 6 | 7 | @Table(name = "wx_mp_log") 8 | public class WxMpLog { 9 | @Id 10 | private Integer id; 11 | 12 | private Integer uid; 13 | 14 | private String url; 15 | 16 | private String token; 17 | 18 | private Date time; 19 | 20 | /** 21 | * @return id 22 | */ 23 | public Integer getId() { 24 | return id; 25 | } 26 | 27 | /** 28 | * @param id 29 | */ 30 | public void setId(Integer id) { 31 | this.id = id; 32 | } 33 | 34 | /** 35 | * @return uid 36 | */ 37 | public Integer getUid() { 38 | return uid; 39 | } 40 | 41 | /** 42 | * @param uid 43 | */ 44 | public void setUid(Integer uid) { 45 | this.uid = uid; 46 | } 47 | 48 | /** 49 | * @return url 50 | */ 51 | public String getUrl() { 52 | return url; 53 | } 54 | 55 | /** 56 | * @param url 57 | */ 58 | public void setUrl(String url) { 59 | this.url = url; 60 | } 61 | 62 | /** 63 | * @return token 64 | */ 65 | public String getToken() { 66 | return token; 67 | } 68 | 69 | /** 70 | * @param token 71 | */ 72 | public void setToken(String token) { 73 | this.token = token; 74 | } 75 | 76 | /** 77 | * @return time 78 | */ 79 | public Date getTime() { 80 | return time; 81 | } 82 | 83 | /** 84 | * @param time 85 | */ 86 | public void setTime(Date time) { 87 | this.time = time; 88 | } 89 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/WxMpUser.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Id; 5 | import javax.persistence.Table; 6 | import java.util.Date; 7 | 8 | @Table(name = "wx_mp_user") 9 | public class WxMpUser { 10 | @Id 11 | private Integer wid; 12 | 13 | private String openid; 14 | 15 | private String token; 16 | 17 | @Column(name = "time_out") 18 | private Integer timeOut; 19 | 20 | @Column(name = "session_key") 21 | private String sessionKey; 22 | 23 | private String nickname; 24 | 25 | private String gender; 26 | 27 | private String city; 28 | 29 | @Column(name = "avatar_url") 30 | private String avatarUrl; 31 | 32 | @Column(name = "login_time") 33 | private String loginTime; 34 | 35 | private String userid; 36 | 37 | private String name; 38 | 39 | @Column(name = "phone_num") 40 | private String phoneNum; 41 | 42 | /** 43 | * 注册时间 44 | */ 45 | @Column(name = "reg_date") 46 | private Date regDate; 47 | 48 | private Integer status; 49 | 50 | /** 51 | * @return wid 52 | */ 53 | public Integer getWid() { 54 | return wid; 55 | } 56 | 57 | /** 58 | * @param wid 59 | */ 60 | public void setWid(Integer wid) { 61 | this.wid = wid; 62 | } 63 | 64 | /** 65 | * @return openid 66 | */ 67 | public String getOpenid() { 68 | return openid; 69 | } 70 | 71 | /** 72 | * @param openid 73 | */ 74 | public void setOpenid(String openid) { 75 | this.openid = openid; 76 | } 77 | 78 | /** 79 | * @return token 80 | */ 81 | public String getToken() { 82 | return token; 83 | } 84 | 85 | /** 86 | * @param token 87 | */ 88 | public void setToken(String token) { 89 | this.token = token; 90 | } 91 | 92 | /** 93 | * @return time_out 94 | */ 95 | public Integer getTimeOut() { 96 | return timeOut; 97 | } 98 | 99 | /** 100 | * @param timeOut 101 | */ 102 | public void setTimeOut(Integer timeOut) { 103 | this.timeOut = timeOut; 104 | } 105 | 106 | /** 107 | * @return session_key 108 | */ 109 | public String getSessionKey() { 110 | return sessionKey; 111 | } 112 | 113 | /** 114 | * @param sessionKey 115 | */ 116 | public void setSessionKey(String sessionKey) { 117 | this.sessionKey = sessionKey; 118 | } 119 | 120 | /** 121 | * @return nickname 122 | */ 123 | public String getNickname() { 124 | return nickname; 125 | } 126 | 127 | /** 128 | * @param nickname 129 | */ 130 | public void setNickname(String nickname) { 131 | this.nickname = nickname; 132 | } 133 | 134 | /** 135 | * @return gender 136 | */ 137 | public String getGender() { 138 | return gender; 139 | } 140 | 141 | /** 142 | * @param gender 143 | */ 144 | public void setGender(String gender) { 145 | this.gender = gender; 146 | } 147 | 148 | /** 149 | * @return city 150 | */ 151 | public String getCity() { 152 | return city; 153 | } 154 | 155 | /** 156 | * @param city 157 | */ 158 | public void setCity(String city) { 159 | this.city = city; 160 | } 161 | 162 | /** 163 | * @return avatar_url 164 | */ 165 | public String getAvatarUrl() { 166 | return avatarUrl; 167 | } 168 | 169 | /** 170 | * @param avatarUrl 171 | */ 172 | public void setAvatarUrl(String avatarUrl) { 173 | this.avatarUrl = avatarUrl; 174 | } 175 | 176 | /** 177 | * @return login_time 178 | */ 179 | public String getLoginTime() { 180 | return loginTime; 181 | } 182 | 183 | /** 184 | * @param loginTime 185 | */ 186 | public void setLoginTime(String loginTime) { 187 | this.loginTime = loginTime; 188 | } 189 | 190 | /** 191 | * @return userid 192 | */ 193 | public String getUserid() { 194 | return userid; 195 | } 196 | 197 | /** 198 | * @param userid 199 | */ 200 | public void setUserid(String userid) { 201 | this.userid = userid; 202 | } 203 | 204 | /** 205 | * @return name 206 | */ 207 | public String getName() { 208 | return name; 209 | } 210 | 211 | /** 212 | * @param name 213 | */ 214 | public void setName(String name) { 215 | this.name = name; 216 | } 217 | 218 | /** 219 | * @return phone_num 220 | */ 221 | public String getPhoneNum() { 222 | return phoneNum; 223 | } 224 | 225 | /** 226 | * @param phoneNum 227 | */ 228 | public void setPhoneNum(String phoneNum) { 229 | this.phoneNum = phoneNum; 230 | } 231 | 232 | /** 233 | * 获取注册时间 234 | * 235 | * @return reg_date - 注册时间 236 | */ 237 | public Date getRegDate() { 238 | return regDate; 239 | } 240 | 241 | /** 242 | * 设置注册时间 243 | * 244 | * @param regDate 注册时间 245 | */ 246 | public void setRegDate(Date regDate) { 247 | this.regDate = regDate; 248 | } 249 | 250 | /** 251 | * @return status 252 | */ 253 | public Integer getStatus() { 254 | return status; 255 | } 256 | 257 | /** 258 | * @param status 259 | */ 260 | public void setStatus(Integer status) { 261 | this.status = status; 262 | } 263 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/WxQyAccessToken.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Id; 5 | import javax.persistence.Table; 6 | import java.util.Date; 7 | 8 | @Table(name = "wx_qy_access_token") 9 | public class WxQyAccessToken { 10 | @Id 11 | private Integer id; 12 | 13 | @Column(name = "agent_id") 14 | private String agentId; 15 | 16 | @Column(name = "access_token") 17 | private String accessToken; 18 | 19 | @Column(name = "expires_in") 20 | private Integer expiresIn; 21 | 22 | private Date time; 23 | 24 | /** 25 | * @return id 26 | */ 27 | public Integer getId() { 28 | return id; 29 | } 30 | 31 | /** 32 | * @param id 33 | */ 34 | public void setId(Integer id) { 35 | this.id = id; 36 | } 37 | 38 | /** 39 | * @return agent_id 40 | */ 41 | public String getAgentId() { 42 | return agentId; 43 | } 44 | 45 | /** 46 | * @param agentId 47 | */ 48 | public void setAgentId(String agentId) { 49 | this.agentId = agentId; 50 | } 51 | 52 | /** 53 | * @return access_token 54 | */ 55 | public String getAccessToken() { 56 | return accessToken; 57 | } 58 | 59 | /** 60 | * @param accessToken 61 | */ 62 | public void setAccessToken(String accessToken) { 63 | this.accessToken = accessToken; 64 | } 65 | 66 | /** 67 | * @return expires_in 68 | */ 69 | public Integer getExpiresIn() { 70 | return expiresIn; 71 | } 72 | 73 | /** 74 | * @param expiresIn 75 | */ 76 | public void setExpiresIn(Integer expiresIn) { 77 | this.expiresIn = expiresIn; 78 | } 79 | 80 | /** 81 | * @return time 82 | */ 83 | public Date getTime() { 84 | return time; 85 | } 86 | 87 | /** 88 | * @param time 89 | */ 90 | public void setTime(Date time) { 91 | this.time = time; 92 | } 93 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/beans/WxQyLog.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.beans; 2 | 3 | import javax.persistence.Id; 4 | import javax.persistence.Table; 5 | import java.util.Date; 6 | 7 | @Table(name = "wx_qy_log") 8 | public class WxQyLog { 9 | @Id 10 | private Integer id; 11 | 12 | private String url; 13 | 14 | private String response; 15 | 16 | private String type; 17 | 18 | private String ip; 19 | 20 | private String agent; 21 | 22 | private Date time; 23 | 24 | /** 25 | * @return id 26 | */ 27 | public Integer getId() { 28 | return id; 29 | } 30 | 31 | /** 32 | * @param id 33 | */ 34 | public void setId(Integer id) { 35 | this.id = id; 36 | } 37 | 38 | /** 39 | * @return url 40 | */ 41 | public String getUrl() { 42 | return url; 43 | } 44 | 45 | /** 46 | * @param url 47 | */ 48 | public void setUrl(String url) { 49 | this.url = url; 50 | } 51 | 52 | /** 53 | * @return response 54 | */ 55 | public String getResponse() { 56 | return response; 57 | } 58 | 59 | /** 60 | * @param response 61 | */ 62 | public void setResponse(String response) { 63 | this.response = response; 64 | } 65 | 66 | /** 67 | * @return type 68 | */ 69 | public String getType() { 70 | return type; 71 | } 72 | 73 | /** 74 | * @param type 75 | */ 76 | public void setType(String type) { 77 | this.type = type; 78 | } 79 | 80 | /** 81 | * @return ip 82 | */ 83 | public String getIp() { 84 | return ip; 85 | } 86 | 87 | /** 88 | * @param ip 89 | */ 90 | public void setIp(String ip) { 91 | this.ip = ip; 92 | } 93 | 94 | /** 95 | * @return agent 96 | */ 97 | public String getAgent() { 98 | return agent; 99 | } 100 | 101 | /** 102 | * @param agent 103 | */ 104 | public void setAgent(String agent) { 105 | this.agent = agent; 106 | } 107 | 108 | /** 109 | * @return time 110 | */ 111 | public Date getTime() { 112 | return time; 113 | } 114 | 115 | /** 116 | * @param time 117 | */ 118 | public void setTime(Date time) { 119 | this.time = time; 120 | } 121 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/controller/IndexController.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.controller; 2 | 3 | import org.springframework.web.bind.annotation.RequestMapping; 4 | import org.springframework.web.bind.annotation.RequestMethod; 5 | import org.springframework.web.bind.annotation.RestController; 6 | 7 | 8 | @RestController 9 | @RequestMapping(value = "/index") 10 | public class IndexController { 11 | 12 | @RequestMapping(method = RequestMethod.GET) 13 | public String index() { 14 | return "MiniProgram-server-JAVA"; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/controller/InfoController.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.controller; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import miniprogram.server.beans.Organization; 5 | import miniprogram.server.beans.WxMpUser; 6 | import miniprogram.server.service.OrganizationService; 7 | import miniprogram.server.service.WxMpBindInfoService; 8 | import miniprogram.server.service.WxMpUserService; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.web.bind.annotation.PostMapping; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | @RestController 15 | @RequestMapping("/index/info") 16 | public class InfoController { 17 | 18 | @Autowired 19 | WxMpUserService wxMpUserService; 20 | 21 | @Autowired 22 | OrganizationService organizationService; 23 | 24 | @Autowired 25 | WxMpBindInfoService wxMpBindInfoService; 26 | 27 | /** 28 | * { 29 | * "errcode":0, 30 | * "userid":"12", 31 | * "name":"张三", 32 | * "corpname":"学校名称", 33 | * "phone_num":"13444444444" 34 | * } 35 | * 36 | * @param uid 37 | * @param token 38 | * @param corpid 39 | * @return 40 | */ 41 | @PostMapping(value = "getmyinfo") 42 | public JSONObject getMyInfo(Integer uid, String token, Integer corpid) { 43 | System.out.println("method----------------------getMyInfo"); 44 | JSONObject data = new JSONObject(); 45 | 46 | if (uid == null || token == null || corpid == null) { 47 | data.put("errcode", 1003); 48 | data.put("msg", "参数错误"); 49 | return data; 50 | } 51 | 52 | Organization organization = organizationService.selectByCorpCode(corpid); 53 | if (organization != null) { 54 | Organization bindOrg = wxMpBindInfoService.selectByUserId(uid); 55 | if (bindOrg == null) { 56 | data.put("errcode", 1005); 57 | data.put("msg", "获取用户绑定信息失败,未绑定任何机构!"); 58 | return data; 59 | } 60 | 61 | if (!organization.getId().equals(bindOrg.getId())) { 62 | data.put("errcode", 1099); 63 | data.put("corp_code", bindOrg.getId()); 64 | data.put("bind_corp_name", bindOrg.getCorpname()); 65 | data.put("cur_corp_name", organization.getCorpname()); 66 | data.put("msg", "您尚未绑定" + organization.getCorpname() + ",请先从" + bindOrg.getCorpname() + "解绑后再绑定"); 67 | return data; 68 | } 69 | 70 | WxMpUser wxMpUser = wxMpUserService.selectByWid(uid); 71 | if (wxMpUser != null) { 72 | data.put("errcode", 0); 73 | data.put("userid", wxMpUser.getUserid()); 74 | data.put("name", wxMpUser.getName()); 75 | data.put("phone_num", wxMpUser.getPhoneNum()); 76 | data.put("corpname", organization.getCorpname()); 77 | data.put("type_corpname", organization.getTypeCorpname()); 78 | data.put("type_username", organization.getTypeUsername()); 79 | return data; 80 | } else { 81 | data.put("errcode", 1005); 82 | data.put("msg", "获取用户信息失败"); 83 | return data; 84 | } 85 | 86 | } else { 87 | data.put("errcode", 10006); 88 | data.put("msg", "获取企业信息失败"); 89 | return data; 90 | } 91 | } 92 | 93 | /** 94 | * { 95 | * "errcode ": 0, 96 | * 'is_bind':1, (1代表已绑定某个企业,0代表未绑定任何企业) 97 | * 'corp_code':''10000lxxl''' 98 | * } 99 | * 100 | * @param uid 101 | * @param token 102 | * @return 103 | */ 104 | @PostMapping(value = "getbindinfo") 105 | public JSONObject getbindinfo(Integer uid, String token) { 106 | System.out.println("method----------------------getbindinfo"); 107 | JSONObject data = new JSONObject(); 108 | data.put("errcode", 0); 109 | data.put("is_bind", 1); 110 | data.put("corp_code", "10000lxxl"); 111 | return data; 112 | } 113 | 114 | 115 | } 116 | -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/controller/LoginController.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.controller; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import miniprogram.server.beans.Organization; 5 | import miniprogram.server.beans.WxMpBindInfo; 6 | import miniprogram.server.beans.WxMpUser; 7 | import miniprogram.server.service.OrganizationService; 8 | import miniprogram.server.service.WxMpBindInfoService; 9 | import miniprogram.server.service.WxMpUserService; 10 | import miniprogram.server.utils.PropertiesUtil; 11 | import org.apache.commons.httpclient.HttpClient; 12 | import org.apache.commons.httpclient.HttpStatus; 13 | import org.apache.commons.httpclient.methods.GetMethod; 14 | import org.apache.commons.httpclient.params.HttpMethodParams; 15 | import org.springframework.beans.factory.annotation.Autowired; 16 | import org.springframework.web.bind.annotation.*; 17 | 18 | import java.util.Date; 19 | 20 | @RestController 21 | @RequestMapping("/index/login") 22 | public class LoginController { 23 | 24 | @Autowired 25 | WxMpUserService wxMpUserService; 26 | 27 | @Autowired 28 | OrganizationService organizationService; 29 | 30 | @Autowired 31 | WxMpBindInfoService wxMpBindInfoService; 32 | 33 | 34 | @PostMapping(value = "getcode") 35 | public JSONObject getCode(String code, String corpid, String type) { 36 | System.out.println("method----------------------getCode"); 37 | String appid = PropertiesUtil.getValue("APPID"); 38 | String secret = PropertiesUtil.getValue("SECRET"); 39 | System.out.println(appid); 40 | System.out.println(secret); 41 | String getTokenUrl = "https://api.weixin.qq.com/cgi-bin/token?appid=" + appid + "&secret=" + secret + "&grant_type=client_credential"; 42 | JSONObject tokenJO = doGetRequest(getTokenUrl); 43 | String getOpenIDUrl = "https://api.weixin.qq.com/sns/jscode2session?appid=" + appid + "&secret=" + secret + "&js_code=" + code + "&grant_type=authorization_code"; 44 | JSONObject openIDJO = doGetRequest(getOpenIDUrl); 45 | 46 | WxMpUser wxMpUser = new WxMpUser(); 47 | wxMpUser.setToken(tokenJO.getString("access_token")); 48 | wxMpUser.setOpenid(openIDJO.getString("openid")); 49 | wxMpUser.setSessionKey(openIDJO.getString("session_key")); 50 | wxMpUserService.insert(wxMpUser); 51 | 52 | JSONObject data = new JSONObject(); 53 | data.put("errcode", 0); 54 | data.put("token", wxMpUser.getToken()); 55 | data.put("uid", wxMpUser.getWid()); 56 | data.put("is_registered", 0); 57 | return data; 58 | } 59 | 60 | /** 61 | * { 62 | * "errcode": 0, 63 | * "is_registered": 0 64 | * } 65 | * 66 | * @param code 67 | * @param corpid 68 | * @param uid 69 | * @return 70 | */ 71 | @PostMapping(value = "check_is_registered") 72 | public JSONObject checkIsRegistered(String code, Integer corpid, Integer uid) { 73 | System.out.println("method----------------------checkIsRegistered"); 74 | JSONObject data = new JSONObject(); 75 | Organization organization = organizationService.selectByCorpCode(corpid); 76 | if (organization != null) { 77 | WxMpBindInfo param = new WxMpBindInfo(); 78 | param.setWxUid(uid); 79 | param.setOrgId(corpid); 80 | param.setIsbind(1); 81 | WxMpBindInfo wxMpBindInfo = wxMpBindInfoService.mySelect(param); 82 | if (wxMpBindInfo != null) { 83 | data.put("is_registered", 1); 84 | } else { 85 | data.put("is_registered", 0); 86 | } 87 | data.put("errcode", 0); 88 | return data; 89 | } else { 90 | data.put("errcode", 10006); 91 | data.put("msg", "获取企业信息失败"); 92 | return data; 93 | } 94 | } 95 | 96 | /** 97 | * { 98 | * "errcode": 0, 99 | * "corpid": "202010013742", 100 | * "corpname": '学校名称', 101 | * "template_code": 'default', 102 | * "type_corpname": '公司名称', 103 | * "type_username": '职工号', 104 | * } 105 | * 106 | * @param uid 107 | * @param token 108 | * @param corpid 109 | * @param template_code 110 | * @return 111 | */ 112 | @PostMapping(value = "getcorpname") 113 | public JSONObject getcorpname(Integer uid, String token, Integer corpid, String template_code) { 114 | System.out.println("method----------------------getcorpname"); 115 | JSONObject data = new JSONObject(); 116 | Organization organization = organizationService.selectByCorpCode(corpid); 117 | if (organization != null) { 118 | data.put("errcode", 0); 119 | data.put("corpid", organization.getCorpCode()); 120 | data.put("corpname", organization.getCorpname()); 121 | data.put("template_code", organization.getTemplateCode()); 122 | data.put("type_corpname", organization.getTypeCorpname()); 123 | data.put("type_username", organization.getTypeUsername()); 124 | data.put("depid", organization.getId()); 125 | } else { 126 | data.put("errcode", 1); 127 | data.put("msg", "查无数据"); 128 | } 129 | return data; 130 | } 131 | 132 | 133 | /** 134 | * { 135 | * "errcode": 0, 136 | * "corpid": "202010013742", 137 | * "userid": 'A010002', 138 | * "is_exist": 0 139 | * } 140 | * 141 | * @param uid 142 | * @param token 143 | * @param corpid 144 | * @param userid 145 | * @return 146 | */ 147 | @PostMapping(value = "check_user") 148 | public JSONObject checkUser(Integer uid, String token, Integer corpid, String userid) { 149 | System.out.println("method----------------------checkUser"); 150 | JSONObject data = new JSONObject(); 151 | 152 | Organization organization = organizationService.selectByCorpCode(corpid); 153 | if (organization != null) { 154 | WxMpBindInfo param = new WxMpBindInfo(); 155 | param.setOrgId(corpid); 156 | param.setUsername(userid); 157 | param.setIsbind(1); 158 | WxMpBindInfo result = wxMpBindInfoService.mySelect(param); 159 | if (result != null) { 160 | if (result.getIsbind() == 0) { 161 | data.put("errcode", 0); 162 | data.put("corpid", result.getOrgId()); 163 | data.put("userid", result.getUsername()); 164 | data.put("is_exist", 0); 165 | return data; 166 | } else { 167 | data.put("errcode", 100020); 168 | data.put("msg", "该用户已被其他微信绑定,每个用户只能被一个微信绑定"); 169 | return data; 170 | } 171 | } 172 | 173 | } else { 174 | data.put("errcode", 10006); 175 | data.put("msg", "获取企业信息失败"); 176 | return data; 177 | } 178 | 179 | data.put("errcode", 0); 180 | data.put("corpid", corpid); 181 | data.put("userid", userid); 182 | data.put("is_exist", 0); 183 | return data; 184 | } 185 | 186 | /** 187 | * 目前没用到此方法 188 | * uid: app.globalData.uid, 189 | * token: app.globalData.token, 190 | * corpid: that.data.corpid, 191 | * userid: that.data.userid, 192 | * password: e.detail.value.password.trim() 193 | */ 194 | @PostMapping(value = "bind") 195 | public JSONObject bind(Integer uid, String token, Integer corpid, String userid, String password) { 196 | System.out.println("method----------------------bind"); 197 | JSONObject data = new JSONObject(); 198 | //判断用户是否已注册 199 | WxMpUser wxMpUser = wxMpUserService.selectByUserid(userid); 200 | if (wxMpUser == null) { 201 | data.put("errcode", 0); 202 | data.put("is_registered", 0); 203 | return data; 204 | } 205 | 206 | WxMpBindInfo param = new WxMpBindInfo(); 207 | param.setUsername(userid); 208 | param.setIsbind(1); 209 | WxMpBindInfo checkIsBind = wxMpBindInfoService.mySelect(param); 210 | if (checkIsBind == null) { 211 | Date date = new Date(); 212 | System.out.println(date); 213 | WxMpBindInfo wxMpBindInfo = new WxMpBindInfo(); 214 | wxMpBindInfo.setWxUid(uid); 215 | wxMpBindInfo.setOrgId(corpid); 216 | wxMpBindInfo.setUsername(userid); 217 | wxMpBindInfo.setIsbind(1); 218 | wxMpBindInfo.setBindDate(date); 219 | wxMpBindInfoService.insert(wxMpBindInfo); 220 | } 221 | data.put("errcode", 0); 222 | data.put("is_registered", 2); 223 | return data; 224 | } 225 | 226 | /** 227 | * { 228 | * "errcode ": 0, 229 | * "is_registered ": 1, 230 | * } 231 | * 232 | * @param uid 233 | * @param token 234 | * @param corpid 235 | * @param userid 236 | * @param name 237 | * @param phone_num 238 | * @return 239 | */ 240 | @PostMapping(value = "register") 241 | public JSONObject register(Integer uid, String token, Integer corpid, String userid, String name, String phone_num) { 242 | System.out.println("method----------------------register"); 243 | JSONObject data = new JSONObject(); 244 | 245 | // WxMpBindInfo wxMpBindInfo = wxMpBindInfoService.isBindByParam(uid, corpid, userid); 246 | //检查是否已注册 247 | WxMpBindInfo param = new WxMpBindInfo(); 248 | param.setWxUid(uid); 249 | param.setOrgId(corpid); 250 | param.setUsername(userid); 251 | param.setIsbind(1); 252 | WxMpBindInfo check = wxMpBindInfoService.mySelect(param); 253 | 254 | if (check != null) { 255 | data.put("errcode", 0); 256 | data.put("is_registered", 1); 257 | return data; 258 | } else { 259 | param.setOrgId(null); 260 | //此处检查一个微信,只能绑定一个企业 261 | WxMpBindInfo wxMpBindInfo2 = wxMpBindInfoService.mySelect(param); 262 | if (wxMpBindInfo2 != null) { 263 | data.put("errcode", 100020); 264 | data.put("is_registered", "本微信已经绑定其他机构,不能重复绑定"); 265 | return data; 266 | } 267 | 268 | WxMpUser wxMpUser = new WxMpUser(); 269 | wxMpUser.setWid(uid); 270 | wxMpUser.setUserid(userid); 271 | wxMpUser.setName(name); 272 | wxMpUser.setPhoneNum(phone_num); 273 | wxMpUserService.update(wxMpUser); 274 | 275 | WxMpBindInfo wxMpBindInfo = new WxMpBindInfo(); 276 | wxMpBindInfo.setWxUid(uid); 277 | wxMpBindInfo.setOrgId(corpid); 278 | wxMpBindInfo.setUsername(userid); 279 | wxMpBindInfo.setIsbind(1); 280 | wxMpBindInfoService.insert(wxMpBindInfo); 281 | 282 | data.put("errcode", 0); 283 | data.put("is_registered", 1); 284 | return data; 285 | } 286 | } 287 | 288 | @PostMapping(value = "unbind") 289 | public JSONObject unbind(Integer uid, String token){ 290 | System.out.println("method----------------------unbind"); 291 | 292 | wxMpBindInfoService.updateStatus(uid); 293 | 294 | JSONObject data = new JSONObject(); 295 | data.put("errcode", 0); 296 | data.put("is_registered", 0); 297 | return data; 298 | } 299 | 300 | 301 | private JSONObject doGetRequest(String url) { 302 | JSONObject jo = new JSONObject(); 303 | //1.生成HttpClient对象并设置参数 304 | HttpClient httpClient = new HttpClient(); 305 | //设置Http连接超时为5秒 306 | httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(5000); 307 | 308 | //2.生成GetMethod对象并设置参数 309 | GetMethod getMethod = new GetMethod(url); 310 | //设置get请求超时为5秒 311 | getMethod.getParams().setParameter(HttpMethodParams.SO_TIMEOUT, 5000); 312 | //设置请求重试处理,用的是默认的重试处理:请求三次 313 | // getMethod.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler()); 314 | 315 | try { 316 | //3.执行HTTP GET 请求 317 | int statusCode = httpClient.executeMethod(getMethod); 318 | 319 | //4.判断访问的状态码 320 | if (statusCode != HttpStatus.SC_OK) { 321 | System.err.println("请求出错:" + getMethod.getStatusLine()); 322 | } 323 | 324 | //5.处理HTTP响应内容 325 | //读取HTTP响应内容,这里简单打印网页内容 326 | //读取为字节数组 327 | byte[] responseBody = getMethod.getResponseBody(); 328 | jo = JSONObject.parseObject(new String(responseBody, "UTF-8")); 329 | System.out.println("-----------response:" + jo); 330 | //读取为InputStream,在网页内容数据量大时候推荐使用 331 | //InputStream response = getMethod.getResponseBodyAsStream(); 332 | 333 | } catch (Exception e) { 334 | e.printStackTrace(); 335 | } finally { 336 | // 6.释放连接 337 | getMethod.releaseConnection(); 338 | } 339 | return jo; 340 | } 341 | 342 | 343 | } 344 | -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/controller/ReportController.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.controller; 2 | 3 | import com.alibaba.fastjson.JSON; 4 | import com.alibaba.fastjson.JSONObject; 5 | import miniprogram.server.beans.Organization; 6 | import miniprogram.server.beans.ReportRecordDefault; 7 | import miniprogram.server.beans.WxMpUser; 8 | import miniprogram.server.service.OrganizationService; 9 | import miniprogram.server.service.ReportRecordDefaultService; 10 | import miniprogram.server.service.WxMpBindInfoService; 11 | import miniprogram.server.service.WxMpUserService; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.web.bind.annotation.PostMapping; 14 | import org.springframework.web.bind.annotation.RequestMapping; 15 | import org.springframework.web.bind.annotation.RestController; 16 | 17 | @RestController 18 | @RequestMapping("/index/report") 19 | public class ReportController { 20 | @Autowired 21 | WxMpUserService wxMpUserService; 22 | 23 | @Autowired 24 | OrganizationService organizationService; 25 | 26 | @Autowired 27 | WxMpBindInfoService wxMpBindInfoService; 28 | 29 | @Autowired 30 | ReportRecordDefaultService reportRecordDefaultService; 31 | 32 | /** 33 | * { 34 | * "errcode": 0, 35 | * "isEmpty": 0, (1代表没有记录, 0代表有记录) 36 | * "data":{} 37 | * } 38 | * 39 | * @param uid 40 | * @param token 41 | * @return 42 | */ 43 | @PostMapping(value = "getlastdata") 44 | public JSONObject getLastData(Integer uid, String token) { 45 | System.out.println("method----------------------getLastData"); 46 | JSONObject data = new JSONObject(); 47 | WxMpUser wxMpUser = wxMpUserService.selectByWid(uid); 48 | String name = wxMpUser.getName(); 49 | ReportRecordDefault reportRecordDefault = reportRecordDefaultService.selectLastByName(name); 50 | 51 | if (reportRecordDefault == null) { 52 | data.put("errcode", 0); 53 | data.put("isEmpty", 1); 54 | data.put("data", ""); 55 | return data; 56 | } else { 57 | // String jsonString = JSON.toJSONString(reportRecordDefault); 58 | // System.out.println(jsonString); 59 | // JSONObject jo = JSONObject.parseObject(jsonString); 60 | //序列化没做好,未来考虑改进 61 | JSONObject jo = new JSONObject(); 62 | jo.put("id", reportRecordDefault.getId()); 63 | jo.put("wxuid", reportRecordDefault.getWxuid()); 64 | jo.put("org_id", reportRecordDefault.getOrgId()); 65 | jo.put("org_name", reportRecordDefault.getOrgName()); 66 | jo.put("userID", reportRecordDefault.getUserid()); 67 | jo.put("name", reportRecordDefault.getName()); 68 | jo.put("is_return_school", reportRecordDefault.getIsReturnSchool()); 69 | jo.put("return_dorm_num", reportRecordDefault.getReturnDormNum()); 70 | jo.put("return_time", reportRecordDefault.getReturnTime()); 71 | jo.put("return_district_value", reportRecordDefault.getReturnDistrictValue()); 72 | jo.put("return_district_path", reportRecordDefault.getReturnDistrictPath()); 73 | jo.put("return_traffic_info", reportRecordDefault.getReturnTrafficInfo()); 74 | jo.put("current_district_value", reportRecordDefault.getCurrentDistrictValue()); 75 | jo.put("current_district_path", reportRecordDefault.getCurrentDistrictPath()); 76 | jo.put("current_health_value", reportRecordDefault.getCurrentHealthValue()); 77 | jo.put("current_contagion_risk_value", reportRecordDefault.getCurrentContagionRiskValue()); 78 | jo.put("current_temperature", reportRecordDefault.getCurrentTemperature()); 79 | jo.put("psy_status", reportRecordDefault.getPsyStatus()); 80 | jo.put("psy_demand", reportRecordDefault.getPsyDemand()); 81 | jo.put("psy_knowledge", reportRecordDefault.getPsyKnowledge()); 82 | jo.put("return_company_date", reportRecordDefault.getReturnCompanyDate()); 83 | jo.put("plan_company_date", reportRecordDefault.getPlanCompanyDate()); 84 | jo.put("template_code", reportRecordDefault.getTemplateCode()); 85 | jo.put("remarks", reportRecordDefault.getRemarks()); 86 | jo.put("time", reportRecordDefault.getTime()); 87 | 88 | /** 89 | * {"errcode":0,"isEmpty":0,"data":{"id":2,"wxuid":1,"org_id":1,"org_name":"缺省学校名称","userID":"1900022750","name":"msq","is_return_school":2,"return_dorm_num":null,"return_time":null,"return_district_value":0,"return_district_path":"","return_traffic_info":null,"current_district_value":1101000,"current_district_path":"北京市,直辖区","current_health_value":5,"current_contagion_risk_value":7,"current_temperature":36.6,"psy_status":1,"psy_demand":5,"psy_knowledge":1,"return_company_date":null,"plan_company_date":"2020-03-15","template_code":"default","remarks":"","time":"2020-03-15 21:30:04"}} 90 | */ 91 | data.put("errcode", 0); 92 | data.put("isEmpty", 0); 93 | data.put("data", jo); 94 | return data; 95 | } 96 | } 97 | 98 | /** 99 | * { 100 | * "errcode": 0, 101 | * "message": "数据提交成功" 102 | * } 103 | * 104 | * @param uid 105 | * @param token 106 | * @param template_code 107 | * @return 108 | */ 109 | @PostMapping(value = "save") 110 | public JSONObject save(String data, Integer uid, String token, String template_code) { 111 | System.out.println("method----------------------save"); 112 | Organization bindOrg = wxMpBindInfoService.selectByUserId(uid); 113 | WxMpUser wxMpUser = wxMpUserService.selectByWid(uid); 114 | 115 | //序列化没做好,未来考虑改进 116 | JSONObject jo = JSONObject.parseObject(data); 117 | ReportRecordDefault reportRecordDefault = new ReportRecordDefault(); 118 | reportRecordDefault.setWxuid(uid); 119 | reportRecordDefault.setOrgId(bindOrg.getId()); 120 | reportRecordDefault.setOrgName(bindOrg.getCorpname()); 121 | reportRecordDefault.setUserid(wxMpUser.getUserid()); 122 | reportRecordDefault.setName(wxMpUser.getName()); 123 | reportRecordDefault.setIsReturnSchool(jo.getInteger("is_return_school")); 124 | reportRecordDefault.setReturnDormNum(jo.getString("return_dorm_num")); 125 | reportRecordDefault.setReturnTime(jo.getDate("return_time")); 126 | reportRecordDefault.setReturnDistrictValue(jo.getInteger("return_district_value")); 127 | reportRecordDefault.setReturnDistrictPath(jo.getString("return_district_path")); 128 | reportRecordDefault.setReturnTrafficInfo(jo.getString("return_traffic_info")); 129 | reportRecordDefault.setCurrentDistrictValue(jo.getInteger("current_district_value")); 130 | reportRecordDefault.setCurrentDistrictPath(jo.getString("current_district_path")); 131 | reportRecordDefault.setCurrentHealthValue(jo.getInteger("current_health_value")); 132 | reportRecordDefault.setCurrentContagionRiskValue(jo.getInteger("current_contagion_risk_value")); 133 | reportRecordDefault.setCurrentTemperature(jo.getFloat("current_temperature")); 134 | reportRecordDefault.setPsyStatus(jo.getInteger("psy_status")); 135 | reportRecordDefault.setPsyDemand(jo.getInteger("psy_demand")); 136 | reportRecordDefault.setPsyKnowledge(jo.getInteger("psy_knowledge")); 137 | reportRecordDefault.setReturnCompanyDate(jo.getString("return_company_date")); 138 | reportRecordDefault.setPlanCompanyDate(jo.getString("plan_company_date")); 139 | reportRecordDefault.setTemplateCode(template_code); 140 | reportRecordDefault.setRemarks(jo.getString("remarks")); 141 | reportRecordDefault.setTime(jo.getDate("time")); 142 | reportRecordDefaultService.insert(reportRecordDefault); 143 | 144 | JSONObject result = new JSONObject(); 145 | result.put("errcode", 0); 146 | result.put("msg", "数据提交成功"); 147 | return result; 148 | } 149 | 150 | } 151 | -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/AdminOpeTypeMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.AdminOpeType; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface AdminOpeTypeMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/AdminRoleMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.AdminRole; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface AdminRoleMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/AdminUserLogMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.AdminUserLog; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface AdminUserLogMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/AdminUserMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.AdminUser; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface AdminUserMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/ComDistrictLevelMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.ComDistrictLevel; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface ComDistrictLevelMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/ComDistrictMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.ComDistrict; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface ComDistrictMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/ComProvincialMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.ComProvincial; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface ComProvincialMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/OrgDepMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.OrgDep; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface OrgDepMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/OrgTagAdminMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.OrgTagAdmin; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface OrgTagAdminMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/OrgTagMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.OrgTag; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface OrgTagMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/OrgTagUserMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.OrgTagUser; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface OrgTagUserMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/OrgUserInfoCompanyMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.OrgUserInfoCompany; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface OrgUserInfoCompanyMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/OrgUserInfoSchoolMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.OrgUserInfoSchool; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface OrgUserInfoSchoolMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/OrgWhitelistMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.OrgWhitelist; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface OrgWhitelistMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/OrganizationMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.Organization; 4 | import miniprogram.server.utils.MyMapper; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | @Mapper 9 | public interface OrganizationMapper{ 10 | 11 | Organization selectByCorpCode(@Param("corpCode") Integer corpCode); 12 | 13 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/ReportRecordCompanyMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.ReportRecordCompany; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface ReportRecordCompanyMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/ReportRecordDefaultMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.ReportRecordDefault; 4 | import miniprogram.server.utils.MyMapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | public interface ReportRecordDefaultMapper extends MyMapper { 8 | ReportRecordDefault selectLastByName(@Param("name") String name); 9 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/ReportTemplateMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.ReportTemplate; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface ReportTemplateMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/WxMpBindInfoMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.Organization; 4 | import miniprogram.server.beans.WxMpBindInfo; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.apache.ibatis.annotations.Param; 7 | import org.springframework.web.bind.annotation.RequestBody; 8 | 9 | @Mapper 10 | public interface WxMpBindInfoMapper { 11 | 12 | Organization selectByUserId(@Param("wxUid") Integer wxUid); 13 | 14 | WxMpBindInfo selectByOrgIdAndUid(@Param("wxUid") Integer wxUid, @Param("orgId") String orgId); 15 | 16 | WxMpBindInfo isBindByParam(@Param("wxUid") Integer wxUid, @Param("orgId") String orgId, @Param("userId") String userId); 17 | 18 | void updateStatus(@Param("wxUid") Integer wxUid); 19 | 20 | WxMpBindInfo mySelect(@RequestBody WxMpBindInfo wxMpBindInfo); 21 | 22 | void insert(WxMpBindInfo wxMpBindInfo); 23 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/WxMpLogMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.WxMpLog; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface WxMpLogMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/WxMpUserMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.WxMpUser; 4 | import org.apache.ibatis.annotations.Mapper; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | @Mapper 8 | public interface WxMpUserMapper{ 9 | 10 | WxMpUser selectByOpenId(@Param("openid") String openid); 11 | 12 | WxMpUser selectByWid(@Param("wid") Integer wid); 13 | 14 | void insert(WxMpUser wxMpUser); 15 | 16 | void update(WxMpUser wxMpUser); 17 | 18 | WxMpUser selectByUserid(@Param("userid") String userid); 19 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/WxQyAccessTokenMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.WxQyAccessToken; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface WxQyAccessTokenMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/mapper/WxQyLogMapper.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.mapper; 2 | 3 | import miniprogram.server.beans.WxQyLog; 4 | import miniprogram.server.utils.MyMapper; 5 | 6 | public interface WxQyLogMapper extends MyMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/service/AllService.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.service; 2 | 3 | 4 | public interface AllService { 5 | 6 | //考虑在此形成Service方法列表 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/service/ComDistrictLevelService.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.service; 2 | 3 | import miniprogram.server.beans.ComDistrictLevel; 4 | import miniprogram.server.mapper.ComDistrictLevelMapper; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | import org.springframework.transaction.annotation.Transactional; 8 | 9 | import java.util.List; 10 | 11 | @Service 12 | @Transactional 13 | public class ComDistrictLevelService { 14 | @Autowired 15 | ComDistrictLevelMapper comDistrictLevelMapper; 16 | 17 | public List selectAll() { 18 | return comDistrictLevelMapper.selectAll(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/service/OrganizationService.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.service; 2 | 3 | import miniprogram.server.beans.Organization; 4 | import miniprogram.server.mapper.OrganizationMapper; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | import org.springframework.transaction.annotation.Transactional; 8 | 9 | @Service 10 | @Transactional 11 | public class OrganizationService { 12 | 13 | @Autowired 14 | OrganizationMapper organizationMapper; 15 | 16 | public Organization selectByCorpCode(Integer corpCode){ 17 | return organizationMapper.selectByCorpCode(corpCode); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/service/ReportRecordDefaultService.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.service; 2 | 3 | import miniprogram.server.beans.ReportRecordDefault; 4 | import miniprogram.server.mapper.ReportRecordDefaultMapper; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | import org.springframework.transaction.annotation.Transactional; 8 | 9 | @Service 10 | @Transactional 11 | public class ReportRecordDefaultService { 12 | 13 | @Autowired 14 | ReportRecordDefaultMapper reportRecordDefaultMapper; 15 | 16 | public void insert(ReportRecordDefault reportRecordDefault) { 17 | reportRecordDefaultMapper.insert(reportRecordDefault); 18 | } 19 | 20 | public ReportRecordDefault selectLastByName(String name) { 21 | return reportRecordDefaultMapper.selectLastByName(name); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/service/WxMpBindInfoService.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.service; 2 | 3 | 4 | import miniprogram.server.beans.Organization; 5 | import miniprogram.server.beans.WxMpBindInfo; 6 | import miniprogram.server.mapper.WxMpBindInfoMapper; 7 | import org.apache.ibatis.annotations.Param; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | import org.springframework.transaction.annotation.Transactional; 11 | 12 | import java.util.List; 13 | 14 | @Service 15 | @Transactional 16 | public class WxMpBindInfoService { 17 | 18 | @Autowired 19 | WxMpBindInfoMapper wxMpBindInfoMapper; 20 | 21 | public Organization selectByUserId(Integer wxUid){ 22 | return wxMpBindInfoMapper.selectByUserId(wxUid); 23 | } 24 | 25 | public WxMpBindInfo selectByOrgIdAndUid(Integer wxUid, String orgId){ 26 | return wxMpBindInfoMapper.selectByOrgIdAndUid(wxUid, orgId); 27 | } 28 | 29 | public WxMpBindInfo isBindByParam(Integer wxUid, String orgId, String userId){ 30 | return wxMpBindInfoMapper.isBindByParam(wxUid, orgId, userId); 31 | } 32 | 33 | public WxMpBindInfo mySelect(WxMpBindInfo wxMpBindInfo){ 34 | return wxMpBindInfoMapper.mySelect(wxMpBindInfo); 35 | } 36 | 37 | public void updateStatus(Integer wxUid){ 38 | wxMpBindInfoMapper.updateStatus(wxUid); 39 | } 40 | 41 | public void insert(WxMpBindInfo wxMpBindInfo) { 42 | wxMpBindInfoMapper.insert(wxMpBindInfo); 43 | } 44 | 45 | public void update(WxMpBindInfo wxMpBindInfo) { 46 | wxMpBindInfoMapper.insert(wxMpBindInfo); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/service/WxMpUserService.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.service; 2 | 3 | import miniprogram.server.beans.WxMpUser; 4 | import miniprogram.server.mapper.WxMpUserMapper; 5 | import miniprogram.server.utils.DateUtil; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | import java.util.Date; 11 | 12 | @Service 13 | @Transactional 14 | public class WxMpUserService { 15 | 16 | @Autowired 17 | WxMpUserMapper wxMpUserMapper; 18 | 19 | public void insert(WxMpUser wxMpUser){ 20 | // 查询当前用户在数据库中是否存在 21 | WxMpUser result = wxMpUserMapper.selectByOpenId(wxMpUser.getOpenid()); 22 | if(result != null){ 23 | wxMpUser.setWid(result.getWid()); 24 | }else{ 25 | wxMpUser.setLoginTime(DateUtil.getDate(new Date(), "yyyy-MM-dd hh:mm:ss")); 26 | wxMpUser.setTimeOut(DateUtil.getTime(new Date())); 27 | wxMpUser.setRegDate(new Date()); 28 | wxMpUser.setStatus(0); 29 | wxMpUserMapper.insert(wxMpUser); 30 | } 31 | } 32 | 33 | public WxMpUser selectByWid(Integer wid){ 34 | return wxMpUserMapper.selectByWid(wid); 35 | } 36 | 37 | public void update(WxMpUser wxMpUser){ 38 | wxMpUserMapper.update(wxMpUser); 39 | } 40 | 41 | public WxMpUser selectByUserid(String userid){ 42 | return wxMpUserMapper.selectByUserid(userid); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/utils/DateUtil.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.utils; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | 6 | import java.text.SimpleDateFormat; 7 | import java.time.Instant; 8 | import java.time.LocalDate; 9 | import java.time.LocalDateTime; 10 | import java.time.ZoneId; 11 | import java.time.format.DateTimeFormatter; 12 | import java.time.temporal.TemporalAdjusters; 13 | import java.util.Calendar; 14 | import java.util.Date; 15 | import java.util.GregorianCalendar; 16 | 17 | /** 18 | * @Description: 日期处理类 19 | * @Author: mashaochuan/马少川 20 | * @Date: 2017/11/21 9:55 21 | */ 22 | public class DateUtil { 23 | 24 | private static final Logger logger = LoggerFactory.getLogger(DateUtil.class); 25 | 26 | /** 27 | * 获得当前日期 28 | * 29 | * @param pattern 30 | * @return 31 | */ 32 | public static String getCurrentDate(String pattern) { 33 | if (null == pattern) { 34 | return null; 35 | } 36 | return LocalDateTime.now().format(DateTimeFormatter.ofPattern(pattern)); 37 | } 38 | 39 | /** 40 | * 日期转字符串 41 | * 42 | * @param date 43 | * @param pattern 44 | * @return 45 | */ 46 | public static String getDate(Date date, String pattern) { 47 | if (null == date) { 48 | return null; 49 | } 50 | SimpleDateFormat sdf = new SimpleDateFormat(pattern); 51 | return sdf.format(date); 52 | } 53 | 54 | /** 55 | * 字符串转日期 56 | * 57 | * @param str 58 | * @param pattern 59 | * @return 60 | */ 61 | public static Date toDate(String str, String pattern) { 62 | try { 63 | SimpleDateFormat sdf = new SimpleDateFormat(pattern); 64 | return sdf.parse(str); 65 | } catch (Exception e) { 66 | logger.error("convert string to date error. str=" + str + "; pattern=" + pattern, e); 67 | } 68 | return null; 69 | } 70 | 71 | /** 72 | * 获取时间 73 | * 74 | * @param date 75 | * @return 76 | */ 77 | public static Integer getTime(Date date) { 78 | if (null == date) { 79 | return null; 80 | } 81 | return Integer.parseInt(getDate(date, "HHmm")); 82 | } 83 | 84 | /** 85 | * 获取周 86 | * 87 | * @param date 88 | * @return 89 | */ 90 | public static Integer getWeek(Date date) { 91 | if (null == date) { 92 | return null; 93 | } 94 | Calendar cal = Calendar.getInstance(); 95 | cal.setTime(date); 96 | return cal.get(Calendar.DAY_OF_WEEK); 97 | } 98 | 99 | 100 | /** 101 | * 获取年 102 | * 103 | * @return 104 | */ 105 | public static int getCurrentYear() { 106 | Calendar cal = Calendar.getInstance(); 107 | return cal.get(Calendar.YEAR); 108 | } 109 | 110 | /** 111 | * 获取月 112 | * 113 | * @param date 114 | * @return int 115 | */ 116 | public static int getDateMonth(Date date) { 117 | Calendar cal = Calendar.getInstance(); 118 | cal.setTime(date); 119 | return cal.get(Calendar.MONTH); 120 | } 121 | 122 | /** 123 | * 获取年 124 | * 125 | * @param date 126 | * @return int 127 | */ 128 | public static int getDateYear(Date date) { 129 | Calendar cal = Calendar.getInstance(); 130 | cal.setTime(date); 131 | return cal.get(Calendar.YEAR); 132 | } 133 | 134 | 135 | /** 136 | * 判断date是否在time1和time2之间 137 | * 138 | * @param date 139 | * @param time1 140 | * @param time2 141 | * @return 142 | */ 143 | public static boolean isInTimes(Date date, int time1, int time2) { 144 | int time = Integer.parseInt(getDate(date, "HHmm")); 145 | return time >= time1 && time <= time2; 146 | } 147 | 148 | /** 149 | * 判断date是否在time之后 150 | * 151 | * @param date 152 | * @param time 153 | * @return 154 | */ 155 | public static boolean isAfterTime(Date date, int time) { 156 | return (Integer.parseInt(getDate(date, "HHmm")) - time) >= 0; 157 | } 158 | 159 | /** 160 | * 获取date1到date2之间的小时数 161 | * 162 | * @param date1 163 | * @param date2 164 | * @return 165 | */ 166 | public static int getBetweenHours(Date date1, Date date2) { 167 | return (int) ((date1.getTime() - date2.getTime()) / (1000 * 60 * 60)); 168 | } 169 | 170 | 171 | /** 172 | * 计算两个时间之间的小时数 173 | * 174 | * @param startTime 175 | * @param endTime 176 | * @return 177 | */ 178 | public static float getHours(Date startTime, Date endTime) { 179 | long hourTimes = 60 * 60 * 1000;//1小时 180 | long minuteTimes = 60 * 1000;//1分钟 181 | long times = endTime.getTime() - startTime.getTime();//总时长 182 | Long hours = times / hourTimes;//小时数 183 | Long minute = (times - hours * hourTimes) / minuteTimes;//剩余分钟数 184 | float hour = hours.floatValue(); 185 | if (minute > 0 && minute <= 15) { 186 | hour += 0.25f; 187 | } else if (minute > 15 && minute <= 30) { 188 | hour += 0.5f; 189 | } else if (minute > 30 && minute <= 45) { 190 | hour += 0.75f; 191 | } else if (minute > 45 && minute <= 60) { 192 | hour += 1f; 193 | } 194 | return hour; 195 | } 196 | 197 | /** 198 | * 获取某天所在月的最后一天 199 | * 200 | * @param date 201 | * @return java.util.Date 202 | * @author ningkuilong 203 | * @date 2018/3/1 204 | */ 205 | public static Date getLastDayOfMonth(Date date) { 206 | ZoneId zoneId = ZoneId.systemDefault(); 207 | LocalDate localDate = date.toInstant().atZone(zoneId).toLocalDate(); 208 | // 获取当前日期所在月的最后一天 209 | LocalDate firstDayOfMonth = localDate.with(TemporalAdjusters.lastDayOfMonth()); 210 | // LocalDateTime 转为 将Date 211 | return Date.from(firstDayOfMonth.atStartOfDay(zoneId).toInstant()); 212 | } 213 | 214 | /** 215 | * 获取某天所在月的第一天 216 | * 217 | * @param date 218 | * @return java.util.Date 219 | * @author ningkuilong 220 | * @date 2018/3/1 221 | */ 222 | public static Date getFristDayOfMonth(Date date) { 223 | ZoneId zoneId = ZoneId.systemDefault(); 224 | LocalDate localDate = date.toInstant().atZone(zoneId).toLocalDate(); 225 | // 获取当前日期所在月的第一天 226 | LocalDate firstDayOfMonth = localDate.with(TemporalAdjusters.firstDayOfMonth()); 227 | // LocalDateTime 转为 将Date 228 | return Date.from(firstDayOfMonth.atStartOfDay(zoneId).toInstant()); 229 | } 230 | 231 | /** 232 | * 对所给日期进行月份加减 233 | * 234 | * @param date 235 | * @param amount 添加或减去月份的数量 236 | * @return java.util.Date 237 | * @author ningkuilong 238 | * @date 2018/09/20 239 | */ 240 | public static Date getOtherMonthOfCurrentDate(Date date, int amount){ 241 | Calendar calendar = new GregorianCalendar(); 242 | calendar.setTime(date); 243 | calendar.add(Calendar.MONTH, amount); 244 | return calendar.getTime(); 245 | } 246 | 247 | /** 248 | * 根据所给日期获取其他月份的第一天 249 | * @param date 250 | * @param amount 251 | * @return 252 | */ 253 | public static Date getFristDayOfOtherMonth(Date date, int amount){ 254 | return getFristDayOfMonth(getOtherMonthOfCurrentDate(date, amount)); 255 | } 256 | 257 | /** 258 | * 根据所给日期获取其他月份的最后一天 259 | * @param date 260 | * @param amount 261 | * @return 262 | */ 263 | public static Date getLastDayOfOtherMonth(Date date, int amount){ 264 | return getLastDayOfMonth(getOtherMonthOfCurrentDate(date, amount)); 265 | } 266 | 267 | /** 268 | * 对所给日期进行天数加减 269 | * 270 | * @param date 271 | * @param amount 添加或减去天的数量 272 | * @return java.util.Date 273 | * @author ningkuilong 274 | * @date 2018/09/20 275 | */ 276 | public static Date getOtherDayOfCurrentDate(Date date, int amount){ 277 | Calendar calendar = new GregorianCalendar(); 278 | calendar.setTime(date); 279 | calendar.add(Calendar.DAY_OF_MONTH, amount); 280 | return calendar.getTime(); 281 | } 282 | 283 | /** 284 | * java.util.Date --> java.time.LocalDate 285 | * @return 286 | */ 287 | public static LocalDate dateToLocalDate(Date date) { 288 | Instant instant = date.toInstant(); 289 | ZoneId zone = ZoneId.systemDefault(); 290 | LocalDateTime localDateTime = LocalDateTime.ofInstant(instant, zone); 291 | LocalDate localDate = localDateTime.toLocalDate(); 292 | return localDate; 293 | } 294 | 295 | /** 296 | * 根据出生日期 获取 年龄(周岁) 297 | * 298 | * @param birthDay 299 | * @return 300 | */ 301 | public static int getAge(Date birthDay) { 302 | Calendar cal = Calendar.getInstance(); 303 | 304 | if (cal.before(birthDay)) { 305 | throw new IllegalArgumentException("生日不能超过当前日期"); 306 | } 307 | int yearNow = cal.get(Calendar.YEAR); 308 | int monthNow = cal.get(Calendar.MONTH); 309 | int dayOfMonthNow = cal.get(Calendar.DAY_OF_MONTH); 310 | cal.setTime(birthDay); 311 | 312 | int yearBirth = cal.get(Calendar.YEAR); 313 | int monthBirth = cal.get(Calendar.MONTH); 314 | int dayOfMonthBirth = cal.get(Calendar.DAY_OF_MONTH); 315 | 316 | int age = yearNow - yearBirth; 317 | 318 | if (monthNow <= monthBirth) { 319 | if (monthNow == monthBirth) { 320 | if (dayOfMonthNow < dayOfMonthBirth) age--; 321 | } else { 322 | age--; 323 | } 324 | } 325 | return age; 326 | } 327 | 328 | /** 329 | * 判断年龄是否16岁以下 330 | * @param birthdayDate 331 | * @return 332 | */ 333 | public static Boolean checkChildLabor(Date birthdayDate){ 334 | LocalDate birthdayLocalDate = DateUtil.dateToLocalDate(birthdayDate); 335 | Boolean flag = birthdayLocalDate.plusYears(16).isAfter(LocalDate.now()); 336 | return flag; 337 | } 338 | 339 | /** 340 | * 获取两个日期相差的月数 341 | * @param d1 较大的日期 342 | * @param d2 较小的日期 343 | * @return 如果d1>d2返回 月数差 否则返回0 344 | */ 345 | public static int getMonthDiff(Date d1, Date d2) { 346 | Calendar c1 = Calendar.getInstance(); 347 | Calendar c2 = Calendar.getInstance(); 348 | c1.setTime(d1); 349 | c2.setTime(d2); 350 | if(c1.getTimeInMillis() < c2.getTimeInMillis()) {return 0;} 351 | int year1 = c1.get(Calendar.YEAR); 352 | int year2 = c2.get(Calendar.YEAR); 353 | int month1 = c1.get(Calendar.MONTH); 354 | int month2 = c2.get(Calendar.MONTH); 355 | int day1 = c1.get(Calendar.DAY_OF_MONTH); 356 | int day2 = c2.get(Calendar.DAY_OF_MONTH); 357 | // 获取年的差值 假设 d1 = 2015-8-16 d2 = 2011-9-30 358 | int yearInterval = year1 - year2; 359 | // 如果 d1的 月-日 小于 d2的 月-日 那么 yearInterval-- 这样就得到了相差的年数 360 | if(month1 < month2 || month1 == month2 && day1 < day2) {yearInterval --;} 361 | // 获取月数差值 362 | int monthInterval = (month1 + 12) - month2 ; 363 | if(day1 < day2) {monthInterval --;} 364 | monthInterval %= 12; 365 | return yearInterval * 12 + monthInterval; 366 | } 367 | 368 | } 369 | -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/utils/JSONRes.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.utils; 2 | 3 | public class JSONRes { 4 | 5 | private Integer errcode; 6 | private String token; 7 | private Integer uid; 8 | 9 | public JSONRes(Integer errcode, String token, Integer uid) { 10 | this.errcode = errcode; 11 | this.token = token; 12 | this.uid = uid; 13 | } 14 | 15 | public Integer getErrcode() { 16 | return errcode; 17 | } 18 | 19 | public void setErrcode(Integer errcode) { 20 | this.errcode = errcode; 21 | } 22 | 23 | public String getToken() { 24 | return token; 25 | } 26 | 27 | public void setToken(String token) { 28 | this.token = token; 29 | } 30 | 31 | public Integer getUid() { 32 | return uid; 33 | } 34 | 35 | public void setUid(Integer uid) { 36 | this.uid = uid; 37 | } 38 | 39 | @Override 40 | public String toString() { 41 | return "JSONopenid{" + 42 | "errcode=" + errcode + 43 | ", token='" + token + '\'' + 44 | ", uid=" + uid + 45 | '}'; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/utils/MyMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * The MIT License (MIT) 3 | * 4 | * Copyright (c) 2014-2016 abel533@gmail.com 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in 14 | * all copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | * THE SOFTWARE. 23 | */ 24 | 25 | package miniprogram.server.utils; 26 | 27 | import tk.mybatis.mapper.common.Mapper; 28 | import tk.mybatis.mapper.common.MySqlMapper; 29 | 30 | /* 31 | * 继承自己的MyMapper 32 | */ 33 | public interface MyMapper extends Mapper, MySqlMapper { 34 | //TODO 35 | //FIXME 特别注意,该接口不能被扫描到,否则会出错 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/miniprogram/server/utils/PropertiesUtil.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server.utils; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.util.Properties; 6 | 7 | public class PropertiesUtil { 8 | //获取获取配置文件中的全局变量信息,以后期方便维护修改 9 | 10 | public static String getValue(String key){ 11 | Properties prop = new Properties(); 12 | InputStream in = PropertiesUtil.class.getResourceAsStream("/application.properties"); 13 | try { 14 | prop.load(in); 15 | 16 | } catch (IOException e) { 17 | e.printStackTrace(); 18 | } 19 | return prop.getProperty(key); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/additional-spring-configuration-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": [ 3 | { 4 | "name": "APPID", 5 | "type": "java.lang.String", 6 | "description": "Description for APPID." 7 | }, 8 | { 9 | "name": "SECRET", 10 | "type": "java.lang.String", 11 | "description": "Description for SECRET." 12 | } 13 | ] } -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | ############################################################ 2 | # 3 | # Server 服务端相关配置 4 | # 5 | ############################################################ 6 | # 配置api端口号 7 | server.port=8080 8 | ############################################################ 9 | # Server - tomcat 相关常用配置 10 | ############################################################ 11 | server.tomcat.uri-encoding=UTF-8 12 | ############################################################ 13 | # 微信相关配置 14 | ############################################################ 15 | APPID=xxx 16 | SECRET=xxx 17 | ############################################################ 18 | # 19 | # 配置数据源相关 使用 HikariCP 数据源 20 | # 21 | ############################################################ 22 | # jdbc_config datasource 23 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 24 | spring.datasource.url=jdbc:mysql://localhost:3306/ncov_db_v1.0.0?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true 25 | spring.datasource.username=xxx 26 | spring.datasource.password=xxx 27 | # Hikari will use the above plus the following to setup connection pooling 28 | spring.datasource.type=com.zaxxer.hikari.HikariDataSource 29 | # 等待连接池分配连接的最大时长(毫秒),超过这个时长还没可用的连接则发生SQLException, 默认:30秒 30 | spring.datasource.hikari.connection-timeout=30000 31 | # 最小连接数 32 | spring.datasource.hikari.minimum-idle=5 33 | # 最大连接数 34 | spring.datasource.hikari.maximum-pool-size=15 35 | # 自动提交 36 | spring.datasource.hikari.auto-commit=true 37 | # 一个连接idle状态的最大时长(毫秒),超时则被释放(retired),默认:10分钟 38 | spring.datasource.hikari.idle-timeout=600000 39 | # 连接池名字 40 | spring.datasource.hikari.pool-name=DatebookHikariCP 41 | # 一个连接的生命时长(毫秒),超时而且没被使用则被释放(retired),默认:30分钟 1800000ms,建议设置比数据库超时时长少60秒,参考MySQL wait_timeout参数(show variables like '%timeout%';) --> 42 | spring.datasource.hikari.max-lifetime=28740000 43 | spring.datasource.hikari.connection-test-query=SELECT 1 44 | ############################################################ 45 | # 46 | # mybatis 配置 47 | # 48 | ############################################################ 49 | # mybatis 配置 50 | mybatis.type-aliases-package=miniprogram.server.bean 51 | mybatis.mapper-locations=classpath:mapper/*.xml 52 | # 通用 Mapper 配置 53 | mapper.mappers=miniprogram.server.utils.MyMapper 54 | mapper.not-empty=false 55 | mapper.identity=MYSQL -------------------------------------------------------------------------------- /src/main/resources/mapper/AdminOpeTypeMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/resources/mapper/AdminRoleMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/resources/mapper/AdminUserLogMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/mapper/AdminUserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ComDistrictLevelMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ComDistrictMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ComProvincialMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/resources/mapper/OrgDepMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/resources/mapper/OrgTagAdminMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/mapper/OrgTagMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/resources/mapper/OrgTagUserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/resources/mapper/OrgUserInfoCompanyMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/main/resources/mapper/OrgUserInfoSchoolMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/main/resources/mapper/OrgWhitelistMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/main/resources/mapper/OrganizationMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ReportRecordCompanyMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ReportRecordDefaultMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 38 | 39 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ReportTemplateMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/mapper/WxMpBindInfoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 25 | 26 | 29 | 30 | 45 | 46 | 47 | update wx_mp_bind_info set isbind = 0, unbind_date = now() where wx_uid = #{wxUid} 48 | 49 | 50 | 51 | insert into wx_mp_bind_info(org_id, wx_uid, username, isbind) 52 | values (#{orgId, jdbcType=INTEGER}, 53 | #{wxUid, jdbcType=INTEGER}, 54 | #{username, jdbcType=VARCHAR}, 55 | #{isbind, jdbcType=INTEGER}) 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/main/resources/mapper/WxMpLogMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/resources/mapper/WxMpUserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 | 32 | 33 | 36 | 37 | 38 | insert into wx_mp_user(openid, token, time_out, session_key, nickname, gender, city, avatar_url, login_time, userid, name, phone_num, reg_date, status) 39 | values (#{openid, jdbcType=VARCHAR}, 40 | #{token, jdbcType=VARCHAR}, 41 | #{timeOut, jdbcType=INTEGER}, 42 | #{sessionKey, jdbcType=VARCHAR}, 43 | #{nickname, jdbcType=VARCHAR}, 44 | #{gender, jdbcType=VARCHAR}, 45 | #{city, jdbcType=VARCHAR}, 46 | #{avatarUrl, jdbcType=VARCHAR}, 47 | #{loginTime, jdbcType=VARCHAR}, 48 | #{userid, jdbcType=VARCHAR}, 49 | #{name, jdbcType=VARCHAR}, 50 | #{phoneNum, jdbcType=VARCHAR}, 51 | #{regDate, jdbcType=DATE}, 52 | #{status, jdbcType=INTEGER}) 53 | 54 | 55 | 56 | update wx_mp_user set userid = #{userid}, name = #{name} ,phone_num = #{phoneNum} where wid = #{wid} 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/main/resources/mapper/WxQyAccessTokenMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/resources/mapper/WxQyLogMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/test/java/miniprogram/server/ServerApplicationTests.java: -------------------------------------------------------------------------------- 1 | package miniprogram.server; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class ServerApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | --------------------------------------------------------------------------------