├── .classpath ├── .factorypath ├── .gitignore ├── .project ├── .settings ├── org.eclipse.core.resources.prefs ├── org.eclipse.jdt.apt.core.prefs ├── org.eclipse.jdt.core.prefs ├── org.eclipse.ltk.core.refactoring.prefs ├── org.eclipse.m2e.core.prefs └── org.eclipse.wst.common.project.facet.core.xml ├── GSSB}ZCF%D@E2J[H7X_1[66.png ├── JDataX.iml ├── JDataX.png ├── LICENSE ├── TIM截图20190805202916.jpg ├── jdatax.sql ├── pom.xml ├── readme.md └── src ├── main ├── java │ └── org │ │ └── andot │ │ └── jdatax │ │ ├── JDataXApplication.java │ │ ├── config │ │ ├── MyWebAppConfig.java │ │ └── WebSocketConfig.java │ │ ├── controller │ │ ├── DataXJsonFileController.java │ │ ├── IndexControler.java │ │ ├── IndexController.java │ │ ├── ReadDataBaseController.java │ │ ├── ReadTimeConsoleController.java │ │ └── RootController.java │ │ ├── dao │ │ └── base │ │ │ └── DBInfoMapper.java │ │ ├── datasource │ │ ├── BaseDataSource.java │ │ └── impl │ │ │ ├── DataXDataSource.java │ │ │ └── MgeidsDataBaseSource.java │ │ ├── entity │ │ ├── Config.java │ │ ├── DBInfo.java │ │ └── FieldDetailInfo.java │ │ ├── exception │ │ └── ViewException.java │ │ ├── service │ │ ├── DBInfoService.java │ │ ├── DataTransferService.java │ │ ├── DataXJsonFileService.java │ │ ├── WebSocketService.java │ │ ├── impl │ │ │ ├── DBInfoServiceImpl.java │ │ │ ├── DataTransferServiceImpl.java │ │ │ ├── DataXJsonFileServiceImpl.java │ │ │ └── WebSocketServiceImpl.java │ │ └── settings │ │ │ └── SysConfig.java │ │ ├── utils │ │ ├── CmdLogStore.java │ │ ├── DataBaseOperation.java │ │ ├── FileOperateUtil.java │ │ ├── FileToZip.java │ │ ├── JavaShellUtil.java │ │ ├── Log.java │ │ └── StringOutFile.java │ │ └── vo │ │ ├── AreaInfo.java │ │ ├── ResultJson.java │ │ └── TableJson.java └── resources │ ├── Dockerfile │ ├── application-dev.yml │ ├── application-prod.yml │ ├── application-test.yml │ ├── application.yml │ ├── banner.txt │ ├── dataxJsonTemp.json │ ├── mapper │ └── base │ │ └── DBInfoMapper.xml │ ├── static │ ├── css │ │ ├── index.css │ │ ├── loading.css │ │ └── public.css │ ├── favicon.ico │ ├── images │ │ ├── alipay.jpg │ │ ├── close.png │ │ ├── code.jpg │ │ ├── face.jpg │ │ ├── fly.png │ │ ├── git.png │ │ ├── layui.png │ │ ├── login_bg.jpg │ │ ├── mayun.png │ │ ├── userface1.jpg │ │ ├── userface2.jpg │ │ ├── userface3.jpg │ │ ├── userface4.jpg │ │ ├── userface5.jpg │ │ └── wechat.jpg │ ├── index.html │ ├── js │ │ ├── address.js │ │ ├── bodyTab.js │ │ ├── cache.js │ │ ├── cacheUserInfo.js │ │ ├── index.js │ │ ├── llqrcode.js │ │ └── main.js │ ├── json │ │ ├── address.json │ │ ├── images.json │ │ ├── linkList.json │ │ ├── linkLogo.json │ │ ├── logs.json │ │ ├── navs.json │ │ ├── newsImg.json │ │ ├── systemParameter.json │ │ ├── userGrade.json │ │ ├── userList.json │ │ └── userface.json │ ├── layui │ │ ├── css │ │ │ ├── layui.css │ │ │ ├── layui.mobile.css │ │ │ └── modules │ │ │ │ ├── code.css │ │ │ │ ├── laydate │ │ │ │ └── default │ │ │ │ │ └── laydate.css │ │ │ │ └── layer │ │ │ │ └── default │ │ │ │ ├── icon-ext.png │ │ │ │ ├── icon.png │ │ │ │ ├── layer.css │ │ │ │ ├── loading-0.gif │ │ │ │ ├── loading-1.gif │ │ │ │ └── loading-2.gif │ │ ├── font │ │ │ ├── iconfont.eot │ │ │ ├── iconfont.svg │ │ │ ├── iconfont.ttf │ │ │ └── iconfont.woff │ │ ├── images │ │ │ └── face │ │ │ │ ├── 0.gif │ │ │ │ ├── 1.gif │ │ │ │ ├── 10.gif │ │ │ │ ├── 11.gif │ │ │ │ ├── 12.gif │ │ │ │ ├── 13.gif │ │ │ │ ├── 14.gif │ │ │ │ ├── 15.gif │ │ │ │ ├── 16.gif │ │ │ │ ├── 17.gif │ │ │ │ ├── 18.gif │ │ │ │ ├── 19.gif │ │ │ │ ├── 2.gif │ │ │ │ ├── 20.gif │ │ │ │ ├── 21.gif │ │ │ │ ├── 22.gif │ │ │ │ ├── 23.gif │ │ │ │ ├── 24.gif │ │ │ │ ├── 25.gif │ │ │ │ ├── 26.gif │ │ │ │ ├── 27.gif │ │ │ │ ├── 28.gif │ │ │ │ ├── 29.gif │ │ │ │ ├── 3.gif │ │ │ │ ├── 30.gif │ │ │ │ ├── 31.gif │ │ │ │ ├── 32.gif │ │ │ │ ├── 33.gif │ │ │ │ ├── 34.gif │ │ │ │ ├── 35.gif │ │ │ │ ├── 36.gif │ │ │ │ ├── 37.gif │ │ │ │ ├── 38.gif │ │ │ │ ├── 39.gif │ │ │ │ ├── 4.gif │ │ │ │ ├── 40.gif │ │ │ │ ├── 41.gif │ │ │ │ ├── 42.gif │ │ │ │ ├── 43.gif │ │ │ │ ├── 44.gif │ │ │ │ ├── 45.gif │ │ │ │ ├── 46.gif │ │ │ │ ├── 47.gif │ │ │ │ ├── 48.gif │ │ │ │ ├── 49.gif │ │ │ │ ├── 5.gif │ │ │ │ ├── 50.gif │ │ │ │ ├── 51.gif │ │ │ │ ├── 52.gif │ │ │ │ ├── 53.gif │ │ │ │ ├── 54.gif │ │ │ │ ├── 55.gif │ │ │ │ ├── 56.gif │ │ │ │ ├── 57.gif │ │ │ │ ├── 58.gif │ │ │ │ ├── 59.gif │ │ │ │ ├── 6.gif │ │ │ │ ├── 60.gif │ │ │ │ ├── 61.gif │ │ │ │ ├── 62.gif │ │ │ │ ├── 63.gif │ │ │ │ ├── 64.gif │ │ │ │ ├── 65.gif │ │ │ │ ├── 66.gif │ │ │ │ ├── 67.gif │ │ │ │ ├── 68.gif │ │ │ │ ├── 69.gif │ │ │ │ ├── 7.gif │ │ │ │ ├── 70.gif │ │ │ │ ├── 71.gif │ │ │ │ ├── 8.gif │ │ │ │ └── 9.gif │ │ ├── lay │ │ │ └── modules │ │ │ │ ├── carousel.js │ │ │ │ ├── code.js │ │ │ │ ├── element.js │ │ │ │ ├── flow.js │ │ │ │ ├── form.js │ │ │ │ ├── jquery.js │ │ │ │ ├── laydate.js │ │ │ │ ├── layedit.js │ │ │ │ ├── layer.js │ │ │ │ ├── laypage.js │ │ │ │ ├── laytpl.js │ │ │ │ ├── mobile.js │ │ │ │ ├── table.js │ │ │ │ ├── tree.js │ │ │ │ ├── upload.js │ │ │ │ └── util.js │ │ ├── layui.all.js │ │ └── layui.js │ └── page │ │ ├── 404.html │ │ ├── console │ │ ├── index.html │ │ └── index.js │ │ ├── datax │ │ ├── createDataJsonFile.html │ │ ├── createDataJsonFile.js │ │ ├── dataxConfig.html │ │ └── dataxConfig.js │ │ ├── doc │ │ ├── addressDoc.html │ │ ├── bodyTabDoc.html │ │ └── navDoc.html │ │ ├── img │ │ ├── images.html │ │ └── images.js │ │ ├── login │ │ ├── login.html │ │ └── login.js │ │ ├── main.html │ │ ├── qrcode │ │ └── readQrcode.html │ │ ├── systemSetting │ │ ├── basicParameter.html │ │ ├── basicParameter.js │ │ ├── icons.html │ │ ├── icons.js │ │ ├── linkList.html │ │ ├── linkList.js │ │ ├── linksAdd.html │ │ ├── logs.html │ │ └── logs.js │ │ └── user │ │ ├── changePwd.html │ │ ├── user.js │ │ ├── userAdd.html │ │ ├── userAdd.js │ │ ├── userGrade.html │ │ ├── userInfo.html │ │ ├── userInfo.js │ │ ├── userList.html │ │ └── userList.js │ └── test.bat └── test └── java └── org └── andot └── jdatax ├── BaseTest.java ├── DBInfoTest.java ├── DataTransferTest.java ├── DataXJsonFileTest.java ├── Test.java └── ZipTest.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 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 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | JDataX 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.common.project.facet.core.builder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.springframework.ide.eclipse.core.springbuilder 20 | 21 | 22 | 23 | 24 | org.springframework.ide.eclipse.boot.validation.springbootbuilder 25 | 26 | 27 | 28 | 29 | org.eclipse.m2e.core.maven2Builder 30 | 31 | 32 | 33 | 34 | 35 | org.springframework.ide.eclipse.core.springnature 36 | org.eclipse.jdt.core.javanature 37 | org.eclipse.m2e.core.maven2Nature 38 | org.eclipse.wst.common.project.facet.core.nature 39 | 40 | 41 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/java/org/andot/jdatax/utils/FileOperateUtil.java=UTF-8 4 | encoding//src/main/resources=UTF-8 5 | encoding//src/main/resources/static=UTF-8 6 | encoding//src/main/resources/static/css/index.css=UTF-8 7 | encoding//src/main/resources/static/json=UTF-8 8 | encoding//src/main/resources/static/json/navs.json=UTF-8 9 | encoding//src/main/resources/static/json/systemParameter.json=UTF-8 10 | encoding//src/main/resources/static/json/userList.json=UTF-8 11 | encoding//src/main/resources/static/json/userface.json=UTF-8 12 | encoding//src/main/resources/static/layui/css/layui.css=UTF-8 13 | encoding//src/test/java=UTF-8 14 | encoding//src/test/resources=UTF-8 15 | encoding/=UTF-8 16 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.apt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.apt.aptEnabled=true 3 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.8 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 13 | org.eclipse.jdt.core.compiler.processAnnotations=enabled 14 | org.eclipse.jdt.core.compiler.source=1.8 15 | -------------------------------------------------------------------------------- /.settings/org.eclipse.ltk.core.refactoring.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false 3 | -------------------------------------------------------------------------------- /.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /GSSB}ZCF%D@E2J[H7X_1[66.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/GSSB}ZCF%D@E2J[H7X_1[66.png -------------------------------------------------------------------------------- /JDataX.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/JDataX.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 andotorg 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /TIM截图20190805202916.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/TIM截图20190805202916.jpg -------------------------------------------------------------------------------- /jdatax.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Navicat MySQL Data Transfer 3 | 4 | Source Server : 239 5 | Source Server Version : 50622 6 | Source Host : 192.168.10.239:3306 7 | Source Database : jdatax 8 | 9 | Target Server Type : MYSQL 10 | Target Server Version : 50622 11 | File Encoding : 65001 12 | 13 | Date: 2018-08-12 16:07:42 14 | */ 15 | 16 | SET FOREIGN_KEY_CHECKS=0; 17 | 18 | -- ---------------------------- 19 | -- Table structure for config 20 | -- ---------------------------- 21 | DROP TABLE IF EXISTS `config`; 22 | CREATE TABLE `config` ( 23 | `configId` int(10) DEFAULT NULL, 24 | `configName` varchar(30) DEFAULT NULL, 25 | `subId` int(10) DEFAULT NULL, 26 | `subName` varchar(512) DEFAULT NULL 27 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 28 | 29 | -- ---------------------------- 30 | -- Records of config 31 | -- ---------------------------- 32 | INSERT INTO `config` VALUES ('1', '数据库类型', '1', 'MySQL'); 33 | INSERT INTO `config` VALUES ('1', '数据库类型', '2', 'Oracle'); 34 | INSERT INTO `config` VALUES ('1', '数据库类型', '3', 'SQLServer'); 35 | INSERT INTO `config` VALUES ('2', '数据库类', '1', 'com.mysql.jdbc.Driver'); 36 | INSERT INTO `config` VALUES ('2', '数据库类', '2', 'oracle.jdbc.driver.OracleDriver'); 37 | INSERT INTO `config` VALUES ('2', '数据库类', '3', 'com.microsoft.sqlserver.jdbc.SQLServerDriver'); 38 | 39 | -- ---------------------------- 40 | -- Table structure for dbinfo 41 | -- ---------------------------- 42 | DROP TABLE IF EXISTS `dbinfo`; 43 | CREATE TABLE `dbinfo` ( 44 | `dbId` int(10) NOT NULL AUTO_INCREMENT, 45 | `dbName` varchar(50) DEFAULT NULL, 46 | `dbUrl` varchar(255) DEFAULT NULL, 47 | `dbClass` varchar(150) DEFAULT NULL, 48 | `dbType` int(5) DEFAULT NULL, 49 | `dbUser` varchar(100) DEFAULT NULL, 50 | `dbPwd` varchar(255) DEFAULT NULL, 51 | PRIMARY KEY (`dbId`) 52 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; 53 | 54 | -- ---------------------------- 55 | -- Records of dbinfo 56 | -- ---------------------------- 57 | INSERT INTO `dbinfo` VALUES ('1', 'test', null, null, '0', 'root', 'andot'); 58 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | ### JDataX是整合DataX的一个系统 2 | 3 | #### 目前功能: 4 | 批量处理同步数据库, 通过读取数据库模板文件进行批量创建json文件 5 | SQL文件:在项目根目录 jdatax.sql Mysql数据库 6 | 7 | #### 计划 8 | 1. 2019-10-01 V1.1实现 加入实时显示进度 9 | 例如 目前同步到那张表,同步是否成功,在页面上显示datax控制台打印的信息 10 | 11 | 2. 2019-12-01 V1.2实现 加入定时任务调度,自动同步 12 | 例如 设置定时任务,自动同步,什么时间开始,什么时间定时触发 13 | 14 | #### 说明: 15 | 目前此中间件自用版,根据公司给的需求,自己制作的一个小工具,目前还在完善当中,遇到问题直接QQ问我,或者提出Issues,感谢您的使用! 16 | 17 | ### 思维导图(版本更新计划) 18 | ![JDataX思维导图](https://github.com/andotorg/JDataX/blob/master/JDataX.png) 19 | 20 | #### 效果图 21 | ![xgt](https://github.com/andotorg/JDataX/blob/master/GSSB%7DZCF%25D%40E2J%5BH7X_1%5B66.png "效果图") 22 | 23 | ![实时回传控制台日志](https://github.com/andotorg/JDataX/blob/master/TIM%E6%88%AA%E5%9B%BE20190805202916.jpg) 24 | 25 | ### 欢迎大家贡献自己的代码,感谢 26 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/JDataXApplication.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; 7 | import org.springframework.context.annotation.ComponentScan; 8 | import org.springframework.context.annotation.EnableAspectJAutoProxy; 9 | 10 | import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure; 11 | 12 | /** 13 | * Hello JDataX 14 | * @author andot 15 | */ 16 | 17 | @SpringBootApplication 18 | @EnableAspectJAutoProxy 19 | @EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class, DruidDataSourceAutoConfigure.class}) 20 | @ComponentScan({"org.andot.jdatax"}) 21 | public class JDataXApplication { 22 | public static void main( String[] args ){ 23 | SpringApplication.run(JDataXApplication.class, args); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/config/MyWebAppConfig.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.config; 2 | 3 | import org.springframework.context.annotation.Configuration; 4 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; 5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; 6 | 7 | @Configuration 8 | public class MyWebAppConfig extends WebMvcConfigurerAdapter { 9 | 10 | @Override 11 | public void addResourceHandlers(ResourceHandlerRegistry registry) { 12 | registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/"); 13 | super.addResourceHandlers(registry); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/config/WebSocketConfig.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.config; 2 | 3 | import org.andot.jdatax.controller.ReadTimeConsoleController; 4 | import org.apache.commons.io.filefilter.FileFilterUtils; 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.web.socket.server.standard.ServerEndpointExporter; 8 | 9 | import java.io.*; 10 | import java.util.concurrent.CopyOnWriteArraySet; 11 | 12 | /** 13 | * 开启webscket支持 14 | * 15 | */ 16 | @Configuration 17 | public class WebSocketConfig { 18 | 19 | // 用来记录当前在线连接数 20 | private static volatile int onlineCount = 0; 21 | 22 | // 标记文件已读行数 23 | private static volatile long lines = 0L; 24 | 25 | // 判断是否是第一次加载 26 | private static volatile boolean isFirstRunning = true; 27 | 28 | // concurrent包的线程安全Set,用来存放每个客户端对应的MyWebSocket对象 29 | // 若要实现服务端与单一客户端通信的话,可以使用Map来存放,其中Key可以为用户标识 30 | public static CopyOnWriteArraySet webSocketSet = new CopyOnWriteArraySet<>(); 31 | 32 | @Bean 33 | public ServerEndpointExporter serverEndpointExporter(){ 34 | return new ServerEndpointExporter(); 35 | } 36 | 37 | // 开启监听 38 | public static synchronized void startListening(String rootDir) { 39 | if (!isFirstRunning) { 40 | System.err.println("监听服务已经启动!"); 41 | return; 42 | } 43 | 44 | } 45 | 46 | public static synchronized int getOnlineCount() { 47 | return onlineCount; 48 | } 49 | 50 | public static synchronized void addOnlineCount() { 51 | onlineCount++; 52 | } 53 | 54 | public static synchronized void subOnlineCount() { 55 | onlineCount--; 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/controller/DataXJsonFileController.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.controller; 2 | 3 | import java.io.IOException; 4 | import java.sql.SQLException; 5 | 6 | import javax.annotation.Resource; 7 | import javax.servlet.ServletException; 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | 11 | import org.springframework.web.bind.annotation.GetMapping; 12 | import org.springframework.web.bind.annotation.RestController; 13 | 14 | import org.andot.jdatax.entity.DBInfo; 15 | import org.andot.jdatax.service.DataXJsonFileService; 16 | import org.andot.jdatax.utils.FileToZip; 17 | import org.andot.jdatax.vo.ResultJson; 18 | 19 | @RestController 20 | public class DataXJsonFileController { 21 | 22 | @Resource 23 | private DataXJsonFileService dataXJsonFileService; 24 | 25 | /** 26 | * 批量自动生成datax所需要的json配置文件 27 | * 28 | * */ 29 | @GetMapping("/createDataXJsonFile") 30 | public String createDataXJsonFile(DBInfo dbInfo, String filePath, HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException, SQLException { 31 | String tempFilePath = "dataxJsonTemp.json"; 32 | String msg = dataXJsonFileService.CreateDataXJsonFile(dbInfo, tempFilePath, filePath); 33 | String result = ""; 34 | //压缩 35 | try { 36 | String fileName = "datax-json"; 37 | FileToZip.fileToZip(filePath , filePath.substring(0, filePath.lastIndexOf("\\")), fileName); 38 | result = filePath.substring(0, filePath.lastIndexOf("\\"))+"\\"+fileName+".zip"; 39 | } catch (Exception e) { 40 | System.err.println(e.getMessage()); 41 | } 42 | 43 | return ResultJson.getJsonMsg(new ResultJson(1, result, 0, msg)); 44 | } 45 | 46 | @GetMapping("/isDataxJson") 47 | public String isDataxJson(String jsonPath){ 48 | boolean result = dataXJsonFileService.isDataxStart(jsonPath); 49 | return ResultJson.getJsonMsg(new ResultJson(1, result, 0, "")); 50 | } 51 | 52 | @GetMapping("/dataxStart") 53 | public String dataxStart(String pyPath, String dataxPath, String jsonPath){ 54 | String result = dataXJsonFileService.dataxStart(pyPath, dataxPath, jsonPath); 55 | return ResultJson.getJsonMsg(new ResultJson(1, result, 0, "")); 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/controller/IndexControler.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.controller; 2 | 3 | import javax.annotation.Resource; 4 | 5 | import org.springframework.stereotype.Controller; 6 | import org.springframework.ui.Model; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | 9 | import org.andot.jdatax.entity.DBInfo; 10 | import org.andot.jdatax.service.DBInfoService; 11 | 12 | @Controller 13 | @RequestMapping("/rest/jdatax/index") 14 | public class IndexControler { 15 | 16 | @Resource 17 | private DBInfoService dbInfoService; 18 | 19 | @RequestMapping("") 20 | public String index(Model model){ 21 | DBInfo dbInfo = new DBInfo(); 22 | dbInfo.setDbName("mysql"); 23 | dbInfo.setDbUser("root"); 24 | dbInfo.setDbPwd("iesapp"); 25 | dbInfo.setDbClass("1212"); 26 | dbInfo.setDbType(1); 27 | dbInfoService.addDBInfo(dbInfo); 28 | model.addAttribute("singlePerson", "aaaa"); 29 | return "index"; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/controller/IndexController.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.controller; 2 | 3 | import java.io.IOException; 4 | 5 | import javax.servlet.ServletException; 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | 9 | import org.springframework.web.bind.annotation.GetMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | @RestController 13 | public class IndexController { 14 | 15 | /** 16 | * 首页 17 | * 18 | * */ 19 | @GetMapping("/") 20 | public void index(HttpServletRequest request, HttpServletResponse response){ 21 | try { 22 | request.getRequestDispatcher("/index.html").forward(request, response); 23 | } catch (ServletException e) { 24 | System.err.println("跳转错误:"+e.getMessage()); 25 | } catch (IOException e) { 26 | System.err.println("输入输出错误:"+e.getMessage()); 27 | } 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/controller/ReadDataBaseController.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.controller; 2 | 3 | import java.io.IOException; 4 | import java.sql.Connection; 5 | import java.sql.DriverManager; 6 | import java.sql.SQLException; 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | import javax.annotation.Resource; 12 | import javax.servlet.ServletException; 13 | import javax.servlet.http.HttpServletRequest; 14 | import javax.servlet.http.HttpServletResponse; 15 | 16 | import org.springframework.web.bind.annotation.RequestMapping; 17 | import org.springframework.web.bind.annotation.RestController; 18 | import org.springframework.web.servlet.ModelAndView; 19 | 20 | import org.andot.jdatax.entity.DBInfo; 21 | import org.andot.jdatax.service.DBInfoService; 22 | import org.andot.jdatax.utils.DataBaseOperation; 23 | import org.andot.jdatax.vo.ResultJson; 24 | 25 | /** 26 | * 显示数据库基本字段表 27 | * 28 | * */ 29 | @RestController 30 | @RequestMapping("/rest/jdatax/readDataBase") 31 | public class ReadDataBaseController { 32 | 33 | @Resource 34 | private DBInfoService dbInfoService; 35 | 36 | @RequestMapping("") 37 | public ModelAndView index(){ 38 | return new ModelAndView(""); 39 | } 40 | 41 | @RequestMapping("/testConnection") 42 | public String testConnection(DBInfo dbInfo, HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 43 | Connection conn=null; 44 | try{ 45 | Class.forName(dbInfo.getDbClass()); 46 | conn=DriverManager.getConnection(dbInfo.getDbUrl(), dbInfo.getDbUser(), dbInfo.getDbPwd()); 47 | return ResultJson.getJsonMsg(new ResultJson(1, "false", 0, "success")); 48 | }catch(Exception ex){ 49 | return ResultJson.getJsonMsg(new ResultJson(1, "false", 0, "error; info:"+ex.getMessage())); 50 | }finally{ 51 | if(conn!=null){ 52 | try { 53 | conn.close(); 54 | } catch (SQLException e) { 55 | e.printStackTrace(); 56 | } 57 | } 58 | } 59 | } 60 | 61 | /** 62 | * 显示数据库中所有表格 63 | * 64 | * */ 65 | @RequestMapping("/showTables") 66 | public String showTables(DBInfo dbInfo, int flastRow, int pageSize, HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException, SQLException { 67 | dbInfoService.addDBInfo(dbInfo); 68 | List> list = new ArrayList<>(); 69 | list = DataBaseOperation.getDatabaseTables(dbInfo); 70 | return ResultJson.getJsonMsg(new ResultJson(1, list, list.size(), "success")); 71 | } 72 | 73 | /** 74 | * 显示数据库中指定表的所有字段 75 | * 76 | * */ 77 | @RequestMapping("/showColumn") 78 | public String showColumn(DBInfo dbInfo, String tableName, HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 79 | List list = new ArrayList<>(); 80 | try { 81 | list = DataBaseOperation.getTableColum(tableName, dbInfo); 82 | } catch (Exception e) { 83 | e.printStackTrace(); 84 | } 85 | return ResultJson.getJsonMsg(new ResultJson(1, list, list.size(), "success")); 86 | } 87 | 88 | @RequestMapping("/showTableData") 89 | public String showTableData(DBInfo dbInfo, String tableName, String fields, HttpServletRequest req, HttpServletResponse resp){ 90 | List list = new ArrayList<>(); 91 | try { 92 | list = DataBaseOperation.getTableDataObject(fields, tableName, dbInfo); 93 | } catch (Exception e) { 94 | e.printStackTrace(); 95 | } 96 | return ResultJson.getJsonMsg(new ResultJson(1, list, list.size(), "success")); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/controller/ReadTimeConsoleController.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.controller; 2 | 3 | 4 | import com.alibaba.fastjson.JSONObject; 5 | import org.andot.jdatax.utils.JavaShellUtil; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Component; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RestController; 11 | 12 | import javax.annotation.Resource; 13 | import javax.websocket.server.ServerEndpoint; 14 | import java.io.IOException; 15 | 16 | @RestController 17 | @RequestMapping("/readTime") 18 | public class ReadTimeConsoleController { 19 | 20 | @Autowired 21 | private JavaShellUtil javaShellUtil; 22 | 23 | @GetMapping("") 24 | public JSONObject getConsoleLog(){ 25 | try { 26 | javaShellUtil.execDi(new String[]{"ping", "baidu.com"}); 27 | } catch (IOException e) { 28 | e.printStackTrace(); 29 | } 30 | return null; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/controller/RootController.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.controller; 2 | 3 | import org.springframework.ui.Model; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.bind.annotation.RestController; 6 | import org.springframework.web.servlet.ModelAndView; 7 | 8 | @RestController 9 | public class RootController { 10 | @RequestMapping("/") 11 | public ModelAndView index(Model model){ 12 | return new ModelAndView("login"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/dao/base/DBInfoMapper.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.dao.base; 2 | 3 | import org.apache.ibatis.annotations.Mapper; 4 | 5 | import org.andot.jdatax.entity.DBInfo; 6 | 7 | @Mapper 8 | public interface DBInfoMapper { 9 | 10 | void addDBInfo(DBInfo dbInfo); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/datasource/BaseDataSource.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.datasource; 2 | 3 | import javax.sql.DataSource; 4 | 5 | import org.apache.ibatis.session.SqlSessionFactory; 6 | import org.mybatis.spring.SqlSessionTemplate; 7 | import org.springframework.jdbc.datasource.DataSourceTransactionManager; 8 | 9 | public interface BaseDataSource { 10 | /** 11 | * 创建数据源 12 | * 13 | * */ 14 | DataSource baseDataSource(); 15 | 16 | /** 17 | * 创建sqlsession工程 18 | * 19 | * */ 20 | SqlSessionFactory baseSqlSessionFactory(DataSource baseDataSource); 21 | 22 | /** 23 | * 创建数据源事务 24 | * 25 | * */ 26 | DataSourceTransactionManager baseDataSourceTransactionManager(DataSource baseDataSource); 27 | 28 | /** 29 | * 创建SqlSession工程的SqlSession模板 30 | * 31 | * */ 32 | SqlSessionTemplate baseSqlSessionTemplate(SqlSessionFactory baseSqlSessionFactory); 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/datasource/impl/DataXDataSource.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.datasource.impl; 2 | 3 | import java.io.IOException; 4 | 5 | import javax.sql.DataSource; 6 | 7 | import org.apache.ibatis.session.SqlSessionFactory; 8 | import org.mybatis.spring.SqlSessionFactoryBean; 9 | import org.mybatis.spring.SqlSessionTemplate; 10 | import org.mybatis.spring.annotation.MapperScan; 11 | import org.springframework.beans.factory.annotation.Qualifier; 12 | import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder; 13 | import org.springframework.boot.context.properties.ConfigurationProperties; 14 | import org.springframework.context.annotation.Bean; 15 | import org.springframework.context.annotation.Configuration; 16 | import org.springframework.context.annotation.Primary; 17 | import org.springframework.core.io.support.PathMatchingResourcePatternResolver; 18 | import org.springframework.jdbc.datasource.DataSourceTransactionManager; 19 | 20 | @Configuration 21 | @MapperScan( 22 | basePackages="org.andot.jdatax.dao.base", 23 | sqlSessionFactoryRef="baseSqlSessionFactory", 24 | sqlSessionTemplateRef="baseSqlSessionTemplate" 25 | ) 26 | public class DataXDataSource { 27 | 28 | @Bean("baseDataSource") 29 | @Primary 30 | @ConfigurationProperties(prefix = "spring.datasource.base") 31 | public DataSource baseDataSource() { 32 | return DataSourceBuilder.create().build(); 33 | } 34 | 35 | @Bean("baseSqlSessionFactory") 36 | @Primary 37 | public SqlSessionFactory baseSqlSessionFactory(@Qualifier("baseDataSource") DataSource baseDataSource) { 38 | SqlSessionFactoryBean bean = new SqlSessionFactoryBean(); 39 | bean.setDataSource(baseDataSource); 40 | try { 41 | bean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mapper/base/*Mapper.xml")); 42 | } catch (IOException e1) { 43 | e1.printStackTrace(); 44 | } 45 | SqlSessionFactory sqlSessionFactory = null; 46 | try { 47 | sqlSessionFactory = bean.getObject(); 48 | } catch (Exception e) { 49 | e.printStackTrace(); 50 | } 51 | return sqlSessionFactory; 52 | } 53 | 54 | @Bean("baseDataSourceTransactionManager") 55 | @Primary 56 | public DataSourceTransactionManager baseDataSourceTransactionManager(@Qualifier("baseDataSource") DataSource baseDataSource) { 57 | return new DataSourceTransactionManager(baseDataSource); 58 | } 59 | 60 | @Bean("baseSqlSessionTemplate") 61 | @Primary 62 | public SqlSessionTemplate baseSqlSessionTemplate(@Qualifier("baseSqlSessionFactory") SqlSessionFactory baseSqlSessionFactory) { 63 | return new SqlSessionTemplate(baseSqlSessionFactory); 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/datasource/impl/MgeidsDataBaseSource.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.datasource.impl; 2 | 3 | import java.io.IOException; 4 | 5 | import javax.sql.DataSource; 6 | 7 | import org.apache.ibatis.session.SqlSessionFactory; 8 | import org.mybatis.spring.SqlSessionFactoryBean; 9 | import org.mybatis.spring.SqlSessionTemplate; 10 | import org.mybatis.spring.annotation.MapperScan; 11 | import org.slf4j.Logger; 12 | import org.slf4j.LoggerFactory; 13 | import org.springframework.beans.factory.annotation.Qualifier; 14 | import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder; 15 | import org.springframework.boot.context.properties.ConfigurationProperties; 16 | import org.springframework.context.annotation.Bean; 17 | import org.springframework.context.annotation.Configuration; 18 | import org.springframework.context.annotation.Primary; 19 | import org.springframework.core.io.support.PathMatchingResourcePatternResolver; 20 | import org.springframework.jdbc.datasource.DataSourceTransactionManager; 21 | 22 | import org.andot.jdatax.datasource.BaseDataSource; 23 | 24 | @Configuration 25 | @MapperScan( 26 | basePackages={"org.andot.jdatax.dao.mgeids"}, 27 | sqlSessionFactoryRef="mgeidsSqlSessionFactory", 28 | sqlSessionTemplateRef="mgeidsSqlSessionTemplate") 29 | public class MgeidsDataBaseSource implements BaseDataSource { 30 | 31 | private static Logger log = LoggerFactory.getLogger(MgeidsDataBaseSource.class); 32 | 33 | @Bean("mgeidsDataSource") 34 | @Primary 35 | @ConfigurationProperties(prefix="spring.datasource.mgeids") 36 | @Override 37 | public DataSource baseDataSource() { 38 | return DataSourceBuilder.create().build(); 39 | } 40 | 41 | @Bean("mgeidsSqlSessionFactory") 42 | @Override 43 | public SqlSessionFactory baseSqlSessionFactory(@Qualifier("mgeidsDataSource") DataSource mgeidsDataSource) { 44 | SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean(); 45 | sqlSessionFactoryBean.setDataSource(mgeidsDataSource); 46 | try { 47 | sqlSessionFactoryBean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mapper/mgeids/*Mapper.xml")); 48 | } catch (IOException e) { 49 | log.error("加载mybatis配置文件出错,出错信息:"+e.getMessage()); 50 | } 51 | SqlSessionFactory sqlSessionFactory = null; 52 | try { 53 | sqlSessionFactory = sqlSessionFactoryBean.getObject(); 54 | } catch (Exception e) { 55 | log.error("获取SqlSessionFactory失败,出错信息:"+e.getMessage()); 56 | } 57 | return sqlSessionFactory; 58 | } 59 | 60 | @Bean("mgeidsDataSourceTransactionManager") 61 | @Override 62 | public DataSourceTransactionManager baseDataSourceTransactionManager(@Qualifier("mgeidsDataSource") DataSource mgeidsDataSource) { 63 | return new DataSourceTransactionManager(mgeidsDataSource); 64 | } 65 | 66 | @Bean("mgeidsSqlSessionTemplate") 67 | @Override 68 | public SqlSessionTemplate baseSqlSessionTemplate(@Qualifier("mgeidsSqlSessionFactory") SqlSessionFactory mgeidsSqlSessionFactory) { 69 | return new SqlSessionTemplate(mgeidsSqlSessionFactory); 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/entity/Config.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.entity; 2 | 3 | import java.io.Serializable; 4 | 5 | public class Config implements Serializable { 6 | 7 | /** 8 | * 9 | */ 10 | private static final long serialVersionUID = 1L; 11 | 12 | private Integer configId; 13 | private String configName; 14 | private Integer subId; 15 | private String subName; 16 | public Integer getConfigId() { 17 | return configId; 18 | } 19 | public void setConfigId(Integer configId) { 20 | this.configId = configId; 21 | } 22 | public String getConfigName() { 23 | return configName; 24 | } 25 | public void setConfigName(String configName) { 26 | this.configName = configName; 27 | } 28 | public Integer getSubId() { 29 | return subId; 30 | } 31 | public void setSubId(Integer subId) { 32 | this.subId = subId; 33 | } 34 | public String getSubName() { 35 | return subName; 36 | } 37 | public void setSubName(String subName) { 38 | this.subName = subName; 39 | } 40 | public static long getSerialversionuid() { 41 | return serialVersionUID; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/entity/DBInfo.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.entity; 2 | 3 | import java.io.Serializable; 4 | 5 | public class DBInfo implements Serializable { 6 | /** 7 | * 8 | */ 9 | private static final long serialVersionUID = 1L; 10 | 11 | private Integer dbId; //数据库id 12 | private String dbName; //数据库名称 13 | private String dbUser; //数据库用户 14 | private String dbPwd; //数据库密码 15 | private String dbUrl; // 数据库驱动类 16 | private Integer dbType; // 数据库类型 17 | private String dbClass; // 数据库类型 18 | public Integer getDbId() { 19 | return dbId; 20 | } 21 | public void setDbId(Integer dbId) { 22 | this.dbId = dbId; 23 | } 24 | public String getDbName() { 25 | return dbName; 26 | } 27 | public void setDbName(String dbName) { 28 | this.dbName = dbName; 29 | } 30 | public String getDbUser() { 31 | return dbUser; 32 | } 33 | public void setDbUser(String dbUser) { 34 | this.dbUser = dbUser; 35 | } 36 | public String getDbPwd() { 37 | return dbPwd; 38 | } 39 | public void setDbPwd(String dbPwd) { 40 | this.dbPwd = dbPwd; 41 | } 42 | public String getDbUrl() { 43 | return dbUrl; 44 | } 45 | public void setDbUrl(String dbUrl) { 46 | this.dbUrl = dbUrl; 47 | } 48 | public Integer getDbType() { 49 | return dbType; 50 | } 51 | public void setDbType(Integer dbType) { 52 | this.dbType = dbType; 53 | } 54 | public String getDbClass() { 55 | return dbClass; 56 | } 57 | public void setDbClass(String dbClass) { 58 | this.dbClass = dbClass; 59 | } 60 | public static long getSerialversionuid() { 61 | return serialVersionUID; 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/entity/FieldDetailInfo.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.entity; 2 | 3 | public class FieldDetailInfo { 4 | private String tableName; //表名 5 | private String tableCloumn; //列明 6 | private String dataType; //字段类型 7 | private Integer isPrimaryKey; //是否为主键 8 | private Integer cloumnIndex; //字段顺序 9 | private Integer dataLength; //字段长度 10 | private Integer isAuto; //是否为自增主键 11 | private Integer isNull; //是否为空 12 | private Integer Scale; //小数后几位 13 | public String getTableName() { 14 | return tableName; 15 | } 16 | public void setTableName(String tableName) { 17 | this.tableName = tableName; 18 | } 19 | public String getTableCloumn() { 20 | return tableCloumn; 21 | } 22 | public void setTableCloumn(String tableCloumn) { 23 | this.tableCloumn = tableCloumn; 24 | } 25 | public String getDataType() { 26 | return dataType; 27 | } 28 | public void setDataType(String dataType) { 29 | this.dataType = dataType; 30 | } 31 | public Integer getIsPrimaryKey() { 32 | return isPrimaryKey; 33 | } 34 | public void setIsPrimaryKey(Integer isPrimaryKey) { 35 | this.isPrimaryKey = isPrimaryKey; 36 | } 37 | public Integer getCloumnIndex() { 38 | return cloumnIndex; 39 | } 40 | public void setCloumnIndex(Integer cloumnIndex) { 41 | this.cloumnIndex = cloumnIndex; 42 | } 43 | public Integer getDataLength() { 44 | return dataLength; 45 | } 46 | public void setDataLength(Integer dataLength) { 47 | this.dataLength = dataLength; 48 | } 49 | public Integer getIsAuto() { 50 | return isAuto; 51 | } 52 | public void setIsAuto(Integer isAuto) { 53 | this.isAuto = isAuto; 54 | } 55 | public Integer getIsNull() { 56 | return isNull; 57 | } 58 | public void setIsNull(Integer isNull) { 59 | this.isNull = isNull; 60 | } 61 | public Integer getScale() { 62 | return Scale; 63 | } 64 | public void setScale(Integer scale) { 65 | Scale = scale; 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/exception/ViewException.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.exception; 2 | 3 | public class ViewException extends Exception { 4 | 5 | /** 6 | * 7 | */ 8 | private static final long serialVersionUID = 1L; 9 | 10 | public ViewException() { 11 | super(); 12 | // TODO Auto-generated constructor stub 13 | } 14 | 15 | public ViewException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { 16 | super(message, cause, enableSuppression, writableStackTrace); 17 | // TODO Auto-generated constructor stub 18 | } 19 | 20 | public ViewException(String message, Throwable cause) { 21 | super(message, cause); 22 | // TODO Auto-generated constructor stub 23 | } 24 | 25 | public ViewException(String message) { 26 | super(message); 27 | // TODO Auto-generated constructor stub 28 | } 29 | 30 | public ViewException(Throwable cause) { 31 | super(cause); 32 | // TODO Auto-generated constructor stub 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/service/DBInfoService.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.service; 2 | 3 | import org.andot.jdatax.entity.DBInfo; 4 | 5 | public interface DBInfoService { 6 | 7 | int addDBInfo(DBInfo dbInfo); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/service/DataTransferService.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.service; 2 | 3 | import java.util.List; 4 | 5 | import org.andot.jdatax.entity.DBInfo; 6 | 7 | public interface DataTransferService { 8 | 9 | String dataTransfer(List dblist, List tables, String fields) throws Exception; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/service/DataXJsonFileService.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.service; 2 | 3 | import java.io.IOException; 4 | 5 | import javax.servlet.ServletException; 6 | 7 | import org.andot.jdatax.entity.DBInfo; 8 | 9 | public interface DataXJsonFileService { 10 | 11 | /** 12 | * 传入表名和字段名生成datax需要用的json配置文件 13 | * 14 | * */ 15 | String CreateDataXJsonFile(DBInfo dbInfo, String tempFilePath, String filePath) throws ServletException, IOException; 16 | 17 | String dataxStart(String pyPath, String dataxPath, String jsonPath); 18 | 19 | boolean isDataxStart(String jsonPath); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/service/WebSocketService.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.service; 2 | 3 | import java.io.IOException; 4 | 5 | public interface WebSocketService { 6 | 7 | 8 | void sendMessage(String message) throws IOException; 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/service/impl/DBInfoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.service.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Service; 5 | import org.springframework.transaction.annotation.Isolation; 6 | import org.springframework.transaction.annotation.Propagation; 7 | import org.springframework.transaction.annotation.Transactional; 8 | 9 | import org.andot.jdatax.dao.base.DBInfoMapper; 10 | import org.andot.jdatax.entity.DBInfo; 11 | import org.andot.jdatax.service.DBInfoService; 12 | 13 | @Transactional(value = "baseDataSourceTransactionManager", 14 | propagation = Propagation.REQUIRED, 15 | isolation = Isolation.DEFAULT, 16 | timeout=36000, 17 | rollbackFor=Exception.class) 18 | @Service("dbInfoService") 19 | public class DBInfoServiceImpl implements DBInfoService { 20 | 21 | @Autowired 22 | private DBInfoMapper dbInfoDao; 23 | 24 | @Override 25 | public int addDBInfo(DBInfo dbInfo) { 26 | dbInfoDao.addDBInfo(dbInfo); 27 | return 1; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/service/impl/DataXJsonFileServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.service.impl; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | import javax.servlet.ServletException; 9 | 10 | import org.slf4j.Logger; 11 | import org.slf4j.LoggerFactory; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.stereotype.Service; 14 | 15 | import org.andot.jdatax.entity.DBInfo; 16 | import org.andot.jdatax.entity.FieldDetailInfo; 17 | import org.andot.jdatax.service.DataXJsonFileService; 18 | import org.andot.jdatax.utils.DataBaseOperation; 19 | import org.andot.jdatax.utils.FileOperateUtil; 20 | import org.andot.jdatax.utils.JavaShellUtil; 21 | 22 | @Service("dataXJsonFileService") 23 | public class DataXJsonFileServiceImpl implements DataXJsonFileService { 24 | 25 | @Autowired 26 | private JavaShellUtil javaShellUtil; 27 | 28 | private Logger log = LoggerFactory.getLogger(DataXJsonFileServiceImpl.class); 29 | 30 | @Override 31 | public String CreateDataXJsonFile(DBInfo dbInfo, String tempFilePath, String filePath) throws ServletException, IOException { 32 | String resultStr = ""; 33 | List> tableList = DataBaseOperation.getDatabaseTables(dbInfo); 34 | for (Map map : tableList) { 35 | String tableName = map.get("name"); 36 | if(tableName.equals("USER_INFO") || tableName.equals("DICAREA")) { 37 | continue; 38 | } 39 | List listCol = DataBaseOperation.getTableColumDetail(tableName, dbInfo); 40 | StringBuilder fields = new StringBuilder(); 41 | int len = listCol.size(); 42 | for (int i = 0; i < len; i++) { 43 | fields.append("\""+listCol.get(i).getTableCloumn()+"\", "); 44 | } 45 | if(fields.toString().equals("")){ 46 | continue; 47 | } 48 | String fieldsStr = fields.toString().substring(0, fields.length()-2); 49 | try { 50 | String allstr = FileOperateUtil.readFileByName(tempFilePath); 51 | 52 | allstr = allstr.replace("{{fieldName}}", fieldsStr.toUpperCase()); 53 | allstr = allstr.replace("{{oldTableName}}", tableName.toUpperCase()); 54 | allstr = allstr.replace("{{newTableName}}", tableName.toLowerCase()); 55 | 56 | FileOperateUtil.textWriteFile(allstr, filePath+"/" + tableName + "DataX.json"); 57 | log.info(tableName+".json 文件写入成功!保存路径:"+filePath +"; "); 58 | resultStr += tableName+".json 文件写入成功!保存路径:"+filePath +"; "; 59 | } catch (Exception e) { 60 | log.error(tableName+".json 文件写入出错!出错原因:"+e.getMessage() +"; "); 61 | resultStr += tableName+".json 文件写入出错!出错原因:"+e.getMessage() +"; "; 62 | break; 63 | } 64 | } 65 | return resultStr; 66 | } 67 | 68 | @Override 69 | public String dataxStart(String pyPath, String dataxPath, String jsonPath) { 70 | String result = "同步成功"; 71 | try { 72 | // 获得指定文件对象 73 | File file = new File(jsonPath); 74 | // 获得该文件夹内的所有文件 75 | File[] array = file.listFiles(); 76 | for(int i=0;i 0) 98 | return true; 99 | else 100 | return false; 101 | } 102 | 103 | } 104 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/service/impl/WebSocketServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.service.impl; 2 | 3 | import org.andot.jdatax.service.WebSocketService; 4 | import org.springframework.stereotype.Service; 5 | 6 | import javax.websocket.*; 7 | import javax.websocket.server.ServerEndpoint; 8 | import java.io.IOException; 9 | import java.util.concurrent.ConcurrentHashMap; 10 | 11 | /*** 12 | * websocket 实现的服务,实现消息时候回传到前端 13 | * @author lucas 14 | * @date 2019-8-1 15:55:51 15 | */ 16 | @ServerEndpoint("/webSocket") 17 | @Service("webSocketService") 18 | public class WebSocketServiceImpl implements WebSocketService { 19 | 20 | //与某个客户端的连接会话,需要通过它来给客户端发送数据 21 | private Session session; 22 | public static ConcurrentHashMap webSocketSet = new ConcurrentHashMap<>(); 23 | 24 | @OnOpen 25 | public void onOpen(Session session) { 26 | this.session = session; 27 | webSocketSet.put("union", session); 28 | } 29 | 30 | @OnClose 31 | public void onClose(){ 32 | webSocketSet.remove("union"); 33 | } 34 | 35 | /** 36 | * 收到客户端消息后调用的方法 37 | * @param message 客户端发送过来的消息 38 | * @param session 可选的参数 39 | */ 40 | @OnMessage 41 | public void onMessage(String message, Session session) { 42 | System.out.println("来自客户端" + session.getId() + "的消息:" + message); 43 | } 44 | 45 | /** 46 | * 发生错误时调用 47 | */ 48 | @OnError 49 | public void onError(Session session, Throwable error) { 50 | System.err.println(session.getId() + "发生错误"); 51 | error.printStackTrace(); 52 | } 53 | 54 | /** 55 | * 实现服务器主动推送 56 | */ 57 | @Override 58 | public void sendMessage(String message) throws IOException { 59 | webSocketSet.get("union").getBasicRemote().sendText(message); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/service/settings/SysConfig.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.service.settings; 2 | 3 | public enum SysConfig { 4 | mysql(1, "com.mysql.jdbc.Driver"), 5 | oracle(2, "oracle.jdbc.driver.OracleDriver"), 6 | sqlserver(3, "com.microsoft.sqlserver.jdbc.SQLServerDriver"); //创建枚举类型 7 | 8 | private int configId; //枚举Id 9 | private String configName; // 10 | 11 | SysConfig (int configId){ //创建构造函数用来定义枚举类型 12 | this.configId = configId; 13 | } 14 | 15 | SysConfig(int configId, String configName) { //获取枚举id的方法 16 | this.configId = configId; 17 | this.configName = configName; 18 | } 19 | 20 | public int getConfigId() { 21 | return configId; 22 | } 23 | 24 | public void setConfigId(int configId) { 25 | this.configId = configId; 26 | } 27 | 28 | public String getConfigName() { 29 | return configName; 30 | } 31 | 32 | public void setConfigName(String configName) { 33 | this.configName = configName; 34 | } 35 | 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/utils/CmdLogStore.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.utils; 2 | 3 | import org.andot.jdatax.controller.ReadTimeConsoleController; 4 | import org.springframework.stereotype.Component; 5 | 6 | import java.util.concurrent.CopyOnWriteArraySet; 7 | 8 | @Component 9 | public class CmdLogStore { 10 | private String log; 11 | public static CopyOnWriteArraySet webSocketSet = new CopyOnWriteArraySet<>(); 12 | 13 | public String getLog() { 14 | return log; 15 | } 16 | 17 | public void setLog(String log) { 18 | this.log = log; 19 | } 20 | 21 | public static CopyOnWriteArraySet getWebSocketSet() { 22 | return webSocketSet; 23 | } 24 | 25 | public static void setWebSocketSet(CopyOnWriteArraySet webSocketSet) { 26 | CmdLogStore.webSocketSet = webSocketSet; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/utils/FileOperateUtil.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.utils; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.BufferedWriter; 5 | import java.io.File; 6 | import java.io.FileInputStream; 7 | import java.io.FileNotFoundException; 8 | import java.io.FileOutputStream; 9 | import java.io.IOException; 10 | import java.io.InputStreamReader; 11 | import java.io.OutputStreamWriter; 12 | import java.nio.charset.StandardCharsets; 13 | 14 | import org.springframework.core.io.ClassPathResource; 15 | import org.springframework.util.FileCopyUtils; 16 | 17 | public class FileOperateUtil { 18 | 19 | /** 20 | * 读取文件文本 21 | * @author Andot 22 | * @date 2018-4-1 16:39:19 23 | * @param filePath 文件路径 24 | * @return 文件内容 25 | * */ 26 | public static String fileReadText(String filePath){ 27 | BufferedReader br=null; 28 | String allstr = ""; 29 | try { 30 | File file=new File(filePath); 31 | 32 | br=new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF-8")); 33 | String str=""; 34 | while((str=br.readLine())!=null){ 35 | byte[] bytes=str.getBytes("UTF-8"); 36 | allstr += new String(bytes, "UTF-8") + "\r\n"; 37 | } 38 | br.close(); 39 | } catch (Exception e) { 40 | throw new RuntimeException(e); 41 | } finally { 42 | if(br != null) { 43 | try { 44 | br.close(); 45 | } catch (IOException e) { 46 | e.printStackTrace(); 47 | throw new RuntimeException(e); 48 | } 49 | } 50 | } 51 | return allstr; 52 | } 53 | 54 | /** 55 | * 写入到文件 56 | * @author Andot 57 | * @date 2018-4-1 16:39:19 58 | * @param allstr 需要写入的文本 59 | * @param filePath 文件路径 60 | * */ 61 | public static void textWriteFile(String allstr, String filePath) { 62 | BufferedWriter bw=null; 63 | try { 64 | File targetFile=new File(filePath); 65 | if(!targetFile.exists()){ 66 | targetFile.createNewFile(); 67 | } 68 | bw=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(targetFile),"UTF-8")); 69 | bw.write(allstr); 70 | bw.close(); 71 | } catch (Exception e) { 72 | throw new RuntimeException(e); 73 | } finally { 74 | if(bw != null) { 75 | try { 76 | bw.close(); 77 | } catch (IOException e) { 78 | e.printStackTrace(); 79 | throw new RuntimeException(e); 80 | } 81 | } 82 | } 83 | 84 | } 85 | 86 | public static String readFileByName(String fileName){ 87 | String encoding = "UTF-8"; 88 | try { 89 | ClassPathResource classPathResource = new ClassPathResource(fileName); 90 | byte[] bdata = FileCopyUtils.copyToByteArray(classPathResource.getInputStream()); 91 | String data = new String(bdata, StandardCharsets.UTF_8); 92 | return data; 93 | } catch (FileNotFoundException e) { 94 | return "File not found, " + encoding+",error:"+e.getMessage(); 95 | } catch (IOException e) { 96 | return "IO Exception, " + encoding+",error:"+e.getMessage(); 97 | } 98 | } 99 | } 100 | 101 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/utils/FileToZip.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.utils; 2 | 3 | import java.io.BufferedInputStream; 4 | import java.io.BufferedOutputStream; 5 | import java.io.File; 6 | import java.io.FileInputStream; 7 | import java.io.FileNotFoundException; 8 | import java.io.FileOutputStream; 9 | import java.io.IOException; 10 | import java.util.zip.ZipEntry; 11 | import java.util.zip.ZipOutputStream; 12 | 13 | public class FileToZip { 14 | 15 | private FileToZip(){} 16 | 17 | /** 18 | * 将存放在sourceFilePath目录下的源文件,打包成fileName名称的zip文件,并存放到zipFilePath路径下 19 | * @param sourceFilePath :待压缩的文件路径 20 | * @param zipFilePath :压缩后存放路径 21 | * @param fileName :压缩后文件的名称 22 | * @return 23 | */ 24 | public static boolean fileToZip(String sourceFilePath,String zipFilePath,String fileName){ 25 | boolean flag = false; 26 | File sourceFile = new File(sourceFilePath); 27 | FileInputStream fis = null; 28 | BufferedInputStream bis = null; 29 | FileOutputStream fos = null; 30 | ZipOutputStream zos = null; 31 | 32 | if(sourceFile.exists() == false){ 33 | System.out.println("待压缩的文件目录:"+sourceFilePath+"不存在."); 34 | sourceFile.mkdir(); // 新建目录 35 | } 36 | try { 37 | File zipFile = new File(zipFilePath + "/" + fileName +".zip"); 38 | if(zipFile.exists()){ 39 | System.out.println(zipFilePath + "目录下存在名字为:" + fileName +".zip" +"打包文件."); 40 | }else{ 41 | File[] sourceFiles = sourceFile.listFiles(); 42 | if(null == sourceFiles || sourceFiles.length<1){ 43 | System.out.println("待压缩的文件目录:" + sourceFilePath + "里面不存在文件,无需压缩."); 44 | }else{ 45 | fos = new FileOutputStream(zipFile); 46 | zos = new ZipOutputStream(new BufferedOutputStream(fos)); 47 | byte[] bufs = new byte[1024*10]; 48 | for(int i=0;i webSocketSet = new CopyOnWriteArraySet<>(); 23 | 24 | /** 25 | * 定义传入shell脚本的参数,将参数放入字符串数组里 26 | * 27 | * 28 | * */ 29 | public static String exec(String cmds[]) throws IOException{ 30 | // 执行shell脚本 31 | Process pcs = Runtime.getRuntime().exec(cmds); 32 | // 定义shell返回值 33 | String result = null; 34 | // 获取shell返回流 35 | InputStreamReader in = new InputStreamReader(pcs.getInputStream(), "GBK"); 36 | // 字符流转换字节流 37 | BufferedReader br = new BufferedReader(in); 38 | // 这里也可以输出文本日志 39 | 40 | String lineStr; 41 | while ((lineStr = br.readLine()) != null) { 42 | result += lineStr; 43 | 44 | System.out.println(lineStr); 45 | } 46 | // 关闭输入流 47 | br.close(); 48 | in.close(); 49 | System.out.println("==============================" + result); 50 | return result; 51 | } 52 | 53 | /** 54 | * 定义传入shell脚本的参数,将参数放入字符串数组里 55 | * 56 | * 57 | * */ 58 | public void execDi(String cmds[]) throws IOException{ 59 | String os = System.getProperty("os.name").toLowerCase(); 60 | // 执行shell脚本 61 | Process pcs = Runtime.getRuntime().exec(cmds); 62 | // 获取shell返回流 63 | InputStreamReader in; 64 | if (os.startsWith("win")) { 65 | in = new InputStreamReader(pcs.getInputStream(), Charset.forName("GBK")); 66 | }else{ 67 | in = new InputStreamReader(pcs.getInputStream(), Charset.forName("UTF-8")); 68 | } 69 | // 字符流转换字节流 70 | BufferedReader br = new BufferedReader(in); 71 | // 这里也可以输出文本日志 72 | 73 | String lineStr; 74 | while ((lineStr = br.readLine()) != null) { 75 | webSocketService.sendMessage(lineStr); 76 | } 77 | // 关闭输入流 78 | br.close(); 79 | in.close(); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/utils/Log.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.utils; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.Date; 5 | 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | import org.springframework.stereotype.Component; 9 | 10 | @Component 11 | public class Log { 12 | 13 | private Logger logger = LoggerFactory.getLogger(Log.class); 14 | 15 | private String nowDate(){ 16 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 17 | return sdf.format(new Date()); 18 | } 19 | 20 | public void info(Object obj, String msg){ 21 | logger.info("["+nowDate()+"] " + obj.getClass().getName() + msg); 22 | } 23 | 24 | public void err(Object obj, String msg){ 25 | logger.error("["+nowDate()+"] " + obj.getClass().getName() + msg); 26 | } 27 | 28 | public void debug(Object obj, String msg){ 29 | logger.debug("["+nowDate()+"] " + obj.getClass().getName() + msg); 30 | } 31 | 32 | public void warn(Object obj, String msg){ 33 | logger.warn("["+nowDate()+"] " + obj.getClass().getName() + msg); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/utils/StringOutFile.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.utils; 2 | 3 | import java.io.File; 4 | import java.io.FileWriter; 5 | import java.io.Writer; 6 | 7 | public class StringOutFile { 8 | public static void charOutStream(String path, String fileName, String context) throws Exception{ 9 | // 1:利用File类找到要操作的对象 10 | File file = new File("../"+ path +"/"+ fileName +".java"); 11 | if(!file.getParentFile().exists()){ 12 | file.getParentFile().mkdirs(); 13 | } 14 | //2:准备输出流 15 | Writer out = new FileWriter(file); 16 | out.write(context); 17 | out.close(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/vo/AreaInfo.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.vo; 2 | 3 | public class AreaInfo { 4 | private Integer province_Code; 5 | private String province_Name; 6 | private Integer city_Code; 7 | private String city_Name; 8 | private Integer county_Code; 9 | private String county_Name; 10 | private Integer areaFlag; 11 | public Integer getProvince_Code() { 12 | return province_Code; 13 | } 14 | public void setProvince_Code(Integer province_Code) { 15 | this.province_Code = province_Code; 16 | } 17 | public String getProvince_Name() { 18 | return province_Name; 19 | } 20 | public void setProvince_Name(String province_Name) { 21 | this.province_Name = province_Name; 22 | } 23 | public Integer getCity_Code() { 24 | return city_Code; 25 | } 26 | public void setCity_Code(Integer city_Code) { 27 | this.city_Code = city_Code; 28 | } 29 | public String getCity_Name() { 30 | return city_Name; 31 | } 32 | public void setCity_Name(String city_Name) { 33 | this.city_Name = city_Name; 34 | } 35 | public Integer getCounty_Code() { 36 | return county_Code; 37 | } 38 | public void setCounty_Code(Integer county_Code) { 39 | this.county_Code = county_Code; 40 | } 41 | public String getCounty_Name() { 42 | return county_Name; 43 | } 44 | public void setCounty_Name(String county_Name) { 45 | this.county_Name = county_Name; 46 | } 47 | public Integer getAreaFlag() { 48 | return areaFlag; 49 | } 50 | public void setAreaFlag(Integer areaFlag) { 51 | this.areaFlag = areaFlag; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/vo/ResultJson.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.vo; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.Date; 5 | 6 | import net.sf.json.JSONObject; 7 | 8 | public class ResultJson { 9 | 10 | private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 11 | 12 | private Integer flag; //结果标志 0 失败 1成功 2异常 13 | private Object data; // 14 | private String msg; 15 | private Integer size; 16 | private String date = sdf.format(new Date()); 17 | 18 | public ResultJson (Integer flag, Object data, Integer size, String msg){ 19 | this.flag = flag; 20 | this.data = data; 21 | this.msg = msg; 22 | this.size = size; 23 | } 24 | 25 | public static String getJsonMsg(ResultJson rjson){ 26 | return JSONObject.fromObject(rjson).toString(); 27 | } 28 | 29 | public Object getData() { 30 | return data; 31 | } 32 | public void setData(Object data) { 33 | this.data = data; 34 | } 35 | public String getMsg() { 36 | return msg; 37 | } 38 | public void setMsg(String msg) { 39 | this.msg = msg; 40 | } 41 | public String getDate() { 42 | return date; 43 | } 44 | public void setDate(String date) { 45 | this.date = date; 46 | } 47 | public Integer getFlag() { 48 | return flag; 49 | } 50 | public void setFlag(Integer flag) { 51 | this.flag = flag; 52 | } 53 | 54 | public Integer getSize() { 55 | return size; 56 | } 57 | 58 | public void setSize(Integer size) { 59 | this.size = size; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/org/andot/jdatax/vo/TableJson.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax.vo; 2 | 3 | import net.sf.json.JSONObject; 4 | 5 | public class TableJson { 6 | 7 | private Object data; // 8 | private String msg; 9 | private Integer code; 10 | private Integer count; 11 | //private String date = sdf.format(new Date()); 12 | 13 | public TableJson (Integer code, String msg, Integer count, Object data){ 14 | this.data = data; 15 | this.msg = msg; 16 | this.code = code; 17 | this.count = count; 18 | } 19 | 20 | public String toString(){ 21 | JSONObject json = new JSONObject(); 22 | json.put("code", code); 23 | json.put("count", count); 24 | json.put("msg", msg); 25 | json.put("data", data); 26 | return json.toString(); 27 | } 28 | 29 | public Object getData() { 30 | return data; 31 | } 32 | 33 | public void setData(Object data) { 34 | this.data = data; 35 | } 36 | 37 | public String getMsg() { 38 | return msg; 39 | } 40 | 41 | public void setMsg(String msg) { 42 | this.msg = msg; 43 | } 44 | 45 | public Integer getCode() { 46 | return code; 47 | } 48 | 49 | public void setCode(Integer code) { 50 | this.code = code; 51 | } 52 | 53 | public Integer getCount() { 54 | return count; 55 | } 56 | 57 | public void setCount(Integer count) { 58 | this.count = count; 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/main/resources/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:8-jre-alpine 2 | 3 | ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \ 4 | JHIPSTER_SLEEP=0 \ 5 | JAVA_OPTS="-Dspring.profiles.active=dev" 6 | 7 | CMD echo "The application will start in ${JHIPSTER_SLEEP}s..." && \ 8 | sleep ${JHIPSTER_SLEEP} && \ 9 | java ${JAVA_OPTS} -jar /JDataX.jar 10 | 11 | EXPOSE 8100 12 | 13 | ADD JDataX.jar /JDataX.jar 14 | -------------------------------------------------------------------------------- /src/main/resources/application-dev.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | profiles: dev 3 | datasource: #数据源 4 | base: 5 | type: com.alibaba.druid.pool.DruidDataSource 6 | driverClassName: com.mysql.jdbc.Driver 7 | url: jdbc:mysql://localhost:3306/jdatax?useUnicode=true&characterEncoding=UTF-8 8 | username: root 9 | password: 123456 10 | initialSize: 50 11 | maxActive: 200 12 | maxIdle: 10 13 | maxWait: 80 14 | validationQuery: SELECT 1 15 | timeBetweenEvictionRunsMillis: 60000 16 | minEvictableIdleTimeMillis: 7200000 17 | removeAbandoned: true 18 | removeAbandonedTimeout: 1800 19 | defaultAutoCommit: true 20 | logAbandoned: true 21 | http: 22 | multipart: 23 | maxFileSize: 100Mb 24 | maxRequestSize: 100Mb 25 | mybatis: 26 | mapper-locations: classpath:mapper/**/*Mapper.xml 27 | 28 | logging: 29 | file: ../log.log 30 | 31 | pagehelper: 32 | helperDialect: mysql 33 | reasonable: true 34 | supportMethodsArguments: true 35 | params: count=countSql 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/main/resources/application-prod.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | profiles: prod 3 | datasource: #数据源 4 | base: 5 | type: com.alibaba.druid.pool.DruidDataSource 6 | driverClassName: com.mysql.jdbc.Driver 7 | url: jdbc:mysql://192.168.18.30:3306/jdatax?useUnicode=true&characterEncoding=UTF-8 8 | username: root 9 | password: iesapp 10 | initialSize: 0 11 | maxActive: 20 12 | maxIdle: 10 13 | maxWait: 80 14 | validationQuery: SELECT 1 15 | timeBetweenEvictionRunsMillis: 60000 16 | minEvictableIdleTimeMillis: 7200000 17 | removeAbandoned: true 18 | removeAbandonedTimeout: 1800 19 | defaultAutoCommit: true 20 | logAbandoned: true 21 | mybatis: 22 | mapper-locations: classpath:mapper/**/*Mapper.xml 23 | 24 | logging: 25 | file: ../log.log 26 | 27 | pagehelper: 28 | helperDialect: mysql 29 | reasonable: true 30 | supportMethodsArguments: true 31 | params: count=countSql 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/main/resources/application-test.yml: -------------------------------------------------------------------------------- 1 | spring: 2 | profiles: dev 3 | datasource: #数据源 4 | base: 5 | type: com.alibaba.druid.pool.DruidDataSource 6 | driverClassName: com.mysql.jdbc.Driver 7 | url: jdbc:mysql://192.168.10.239:3306/jdatax?useUnicode=true&characterEncoding=UTF-8 8 | username: root 9 | password: iesapp 10 | initialSize: 50 11 | maxActive: 200 12 | maxIdle: 10 13 | maxWait: 80 14 | validationQuery: SELECT 1 15 | timeBetweenEvictionRunsMillis: 60000 16 | minEvictableIdleTimeMillis: 7200000 17 | removeAbandoned: true 18 | removeAbandonedTimeout: 1800 19 | defaultAutoCommit: true 20 | logAbandoned: true 21 | mybatis: 22 | mapper-locations: classpath:mapper/**/*Mapper.xml 23 | 24 | logging: 25 | file: ../log.log 26 | 27 | pagehelper: 28 | helperDialect: mysql 29 | reasonable: true 30 | supportMethodsArguments: true 31 | params: count=countSql 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | # 默认的profile为test,其他环境通过指定启动参数使用不同的profile,比如: 2 | # 测试环境:java -jar JDataX.jar --spring.profiles.active=dev 3 | # 测试环境:java -jar JDataX.jar --spring.profiles.active=test 4 | # 生产环境:java -jar JDataX.jar --spring.profiles.active=prod 5 | spring: 6 | profiles: 7 | active: dev -------------------------------------------------------------------------------- /src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | ${AnsiColor.BRIGHT_GREEN} 2 | 3 | JJJJJJJJJJJDDDDDDDDDDDDD tttt XXXXXXX XXXXXXX 4 | J:::::::::JD::::::::::::DDD ttt:::t X:::::X X:::::X 5 | J:::::::::JD:::::::::::::::DD t:::::t X:::::X X:::::X 6 | JJ:::::::JJDDD:::::DDDDD:::::D t:::::t X::::::X X::::::X 7 | J:::::J D:::::D D:::::D aaaaaaaaaaaaa ttttttt:::::ttttttt aaaaaaaaaaaaa XXX:::::X X:::::XXX 8 | J:::::J D:::::D D:::::D a::::::::::::a t:::::::::::::::::t a::::::::::::a X:::::X X:::::X 9 | J:::::J D:::::D D:::::D aaaaaaaaa:::::a t:::::::::::::::::t aaaaaaaaa:::::a X:::::X:::::X 10 | J:::::j D:::::D D:::::D a::::a tttttt:::::::tttttt a::::a X:::::::::X 11 | J:::::J D:::::D D:::::D aaaaaaa:::::a t:::::t aaaaaaa:::::a X:::::::::X 12 | JJJJJJJ J:::::J D:::::D D:::::D aa::::::::::::a t:::::t aa::::::::::::a X:::::X:::::X 13 | J:::::J J:::::J D:::::D D:::::D a::::aaaa::::::a t:::::t a::::aaaa::::::a X:::::X X:::::X 14 | J::::::J J::::::J D:::::D D:::::D a::::a a:::::a t:::::t tttttta::::a a:::::a XXX:::::X X:::::XXX 15 | J:::::::JJJ:::::::J DDD:::::DDDDD:::::D a::::a a:::::a t::::::tttt:::::ta::::a a:::::a X::::::X X::::::X 16 | JJ:::::::::::::JJ D:::::::::::::::DD a:::::aaaa::::::a tt::::::::::::::ta:::::aaaa::::::a X:::::X X:::::X 17 | JJ:::::::::JJ D::::::::::::DDD a::::::::::aa:::a tt:::::::::::tt a::::::::::aa:::aX:::::X X:::::X 18 | JJJJJJJJJ DDDDDDDDDDDDD aaaaaaaaaa aaaa ttttttttttt aaaaaaaaaa aaaaXXXXXXX XXXXXXX 19 | 20 | ${AnsiColor.BRIGHT_BLUE} 21 | ::: Project (version:${application.version}) ::: \(^O^)/ Spring-Boot ${spring-boot.version} -------------------------------------------------------------------------------- /src/main/resources/dataxJsonTemp.json: -------------------------------------------------------------------------------- 1 | { 2 | "job": { 3 | "setting": { 4 | "speed": { 5 | "byte": 1048576, 6 | "channel":"5" 7 | } 8 | }, 9 | "content": [ 10 | { 11 | "reader": { 12 | "name": "sqlserverreader", 13 | "parameter": { 14 | "username": "bjlb", 15 | "password": "hbSUQ_77", 16 | "column": [{{fieldName}}], 17 | "connection": [ 18 | { 19 | "table": ["{{oldTableName}}"], 20 | "jdbcUrl": ["jdbc:sqlserver://192.168.18.10:10007;DatabaseName=DynamicDatabase"] 21 | } 22 | ] 23 | } 24 | }, 25 | "writer": { 26 | "name": "mysqlwriter", 27 | "parameter": { 28 | "writeMode": "update", 29 | "username": "root", 30 | "password": "iesapp", 31 | "column":[{{fieldName}}], 32 | "preSql":[ 33 | "delete from {{newTableName}}" 34 | ], 35 | "connection": [ 36 | { 37 | "table": ["{{newTableName}}"], 38 | "jdbcUrl": "jdbc:mysql://192.168.18.30:3306/mgeids?useUnicode=true&characterEncoding=utf8" 39 | } 40 | ] 41 | } 42 | } 43 | } 44 | ] 45 | } 46 | } -------------------------------------------------------------------------------- /src/main/resources/mapper/base/DBInfoMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | insert into dbinfo 8 | ( 9 | `dbName`, 10 | `dbUser`, 11 | `dbPwd`, 12 | `dbUrl`, 13 | `dbType`, 14 | `dbClass` 15 | ) 16 | values 17 | ( 18 | #{dbName}, 19 | #{dbUser}, 20 | #{dbPwd}, 21 | #{dbUrl}, 22 | #{dbType}, 23 | #{dbClass} 24 | ) 25 | 26 | -------------------------------------------------------------------------------- /src/main/resources/static/css/loading.css: -------------------------------------------------------------------------------- 1 | .sk-folding-cube { 2 | margin: 40px auto; 3 | width: 40px; 4 | height: 40px; 5 | position: relative; 6 | -webkit-transform: rotateZ(45deg); 7 | transform: rotateZ(45deg); } 8 | .sk-folding-cube .sk-cube { 9 | float: left; 10 | width: 50%; 11 | height: 50%; 12 | position: relative; 13 | -webkit-transform: scale(1.1); 14 | -ms-transform: scale(1.1); 15 | transform: scale(1.1); } 16 | .sk-folding-cube .sk-cube:before { 17 | content: ''; 18 | position: absolute; 19 | top: 0; 20 | left: 0; 21 | width: 100%; 22 | height: 100%; 23 | background-color: #333; 24 | -webkit-animation: sk-foldCubeAngle 2.4s infinite linear both; 25 | animation: sk-foldCubeAngle 2.4s infinite linear both; 26 | -webkit-transform-origin: 100% 100%; 27 | -ms-transform-origin: 100% 100%; 28 | transform-origin: 100% 100%; } 29 | .sk-folding-cube .sk-cube2 { 30 | -webkit-transform: scale(1.1) rotateZ(90deg); 31 | transform: scale(1.1) rotateZ(90deg); } 32 | .sk-folding-cube .sk-cube3 { 33 | -webkit-transform: scale(1.1) rotateZ(180deg); 34 | transform: scale(1.1) rotateZ(180deg); } 35 | .sk-folding-cube .sk-cube4 { 36 | -webkit-transform: scale(1.1) rotateZ(270deg); 37 | transform: scale(1.1) rotateZ(270deg); } 38 | .sk-folding-cube .sk-cube2:before { 39 | -webkit-animation-delay: 0.3s; 40 | animation-delay: 0.3s; } 41 | .sk-folding-cube .sk-cube3:before { 42 | -webkit-animation-delay: 0.6s; 43 | animation-delay: 0.6s; } 44 | .sk-folding-cube .sk-cube4:before { 45 | -webkit-animation-delay: 0.9s; 46 | animation-delay: 0.9s; } 47 | 48 | @-webkit-keyframes sk-foldCubeAngle { 49 | 0%, 10% { 50 | -webkit-transform: perspective(140px) rotateX(-180deg); 51 | transform: perspective(140px) rotateX(-180deg); 52 | opacity: 0; } 53 | 25%, 75% { 54 | -webkit-transform: perspective(140px) rotateX(0deg); 55 | transform: perspective(140px) rotateX(0deg); 56 | opacity: 1; } 57 | 90%, 100% { 58 | -webkit-transform: perspective(140px) rotateY(180deg); 59 | transform: perspective(140px) rotateY(180deg); 60 | opacity: 0; } } 61 | 62 | @keyframes sk-foldCubeAngle { 63 | 0%, 10% { 64 | -webkit-transform: perspective(140px) rotateX(-180deg); 65 | transform: perspective(140px) rotateX(-180deg); 66 | opacity: 0; } 67 | 25%, 75% { 68 | -webkit-transform: perspective(140px) rotateX(0deg); 69 | transform: perspective(140px) rotateX(0deg); 70 | opacity: 1; } 71 | 90%, 100% { 72 | -webkit-transform: perspective(140px) rotateY(180deg); 73 | transform: perspective(140px) rotateY(180deg); 74 | opacity: 0; } } -------------------------------------------------------------------------------- /src/main/resources/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/favicon.ico -------------------------------------------------------------------------------- /src/main/resources/static/images/alipay.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/images/alipay.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/images/close.png -------------------------------------------------------------------------------- /src/main/resources/static/images/code.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/images/code.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/face.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/images/face.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/fly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/images/fly.png -------------------------------------------------------------------------------- /src/main/resources/static/images/git.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/images/git.png -------------------------------------------------------------------------------- /src/main/resources/static/images/layui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/images/layui.png -------------------------------------------------------------------------------- /src/main/resources/static/images/login_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/images/login_bg.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/mayun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/images/mayun.png -------------------------------------------------------------------------------- /src/main/resources/static/images/userface1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/images/userface1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/userface2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/images/userface2.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/userface3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/images/userface3.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/userface4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/images/userface4.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/userface5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/images/userface5.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/wechat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/images/wechat.jpg -------------------------------------------------------------------------------- /src/main/resources/static/js/address.js: -------------------------------------------------------------------------------- 1 | layui.define(["form","jquery"],function(exports){ 2 | var form = layui.form, 3 | $ = layui.jquery, 4 | Address = { 5 | provinces : function() { 6 | //加载省数据 7 | var proHtml = '',that = this; 8 | $.get("../../json/address.json", function (data) { 9 | for (var i = 0; i < data.length; i++) { 10 | proHtml += ''; 11 | } 12 | //初始化省数据 13 | $("select[name=province]").append(proHtml); 14 | form.render(); 15 | form.on('select(province)', function (proData) { 16 | $("select[name=area]").html(''); 17 | var value = proData.value; 18 | if (value > 0) { 19 | that.citys(data[$(this).index() - 1].childs); 20 | } else { 21 | $("select[name=city]").attr("disabled", "disabled"); 22 | } 23 | }); 24 | }) 25 | }, 26 | //加载市数据 27 | citys : function(citys) { 28 | var cityHtml = '',that = this; 29 | for (var i = 0; i < citys.length; i++) { 30 | cityHtml += ''; 31 | } 32 | $("select[name=city]").html(cityHtml).removeAttr("disabled"); 33 | form.render(); 34 | form.on('select(city)', function (cityData) { 35 | var value = cityData.value; 36 | if (value > 0) { 37 | that.areas(citys[$(this).index() - 1].childs); 38 | } else { 39 | $("select[name=area]").attr("disabled", "disabled"); 40 | } 41 | }); 42 | }, 43 | //加载县/区数据 44 | areas : function(areas) { 45 | var areaHtml = ''; 46 | for (var i = 0; i < areas.length; i++) { 47 | areaHtml += ''; 48 | } 49 | $("select[name=area]").html(areaHtml).removeAttr("disabled"); 50 | form.render(); 51 | } 52 | }; 53 | exports("address",Address); 54 | }) -------------------------------------------------------------------------------- /src/main/resources/static/js/cacheUserInfo.js: -------------------------------------------------------------------------------- 1 | layui.config({ 2 | base : "../../js/" 3 | }).use(['form','jquery',"address"],function() { 4 | var form = layui.form, 5 | $ = layui.jquery, 6 | address = layui.address; 7 | 8 | //判断是否设置过头像,如果设置过则修改顶部、左侧和个人资料中的头像,否则使用默认头像 9 | if(window.sessionStorage.getItem('userFace')){ 10 | $("#userFace").attr("src",window.sessionStorage.getItem('userFace')); 11 | $(".userAvatar").attr("src",$(".userAvatar").attr("src").split("images/")[0] + "images/" + window.sessionStorage.getItem('userFace').split("images/")[1]); 12 | }else{ 13 | $("#userFace").attr("src","../../images/face.jpg"); 14 | } 15 | 16 | //判断是否修改过用户信息,如果修改过则填充修改后的信息 17 | var menuText = $("#top_tabs",parent.document).text(); //判断打开的窗口是否存在“个人资料”页面 18 | var citys,areas; 19 | if(window.sessionStorage.getItem('userInfo')){ 20 | //获取省信息 21 | address.provinces(); 22 | var userInfo = JSON.parse(window.sessionStorage.getItem('userInfo')); 23 | var citys; 24 | $(".realName").val(userInfo.realName); //用户名 25 | $(".userSex input[value="+userInfo.sex+"]").attr("checked","checked"); //性别 26 | $(".userPhone").val(userInfo.userPhone); //手机号 27 | $(".userBirthday").val(userInfo.userBirthday); //出生年月 28 | //填充省份信息,同时调取市级信息列表 29 | $.get("../../json/address.json", function (addressData) { 30 | $(".userAddress select[name='province']").val(userInfo.province); //省 31 | var value = userInfo.province; 32 | if (value > 0) { 33 | address.citys(addressData[$(".userAddress select[name='province'] option[value='"+userInfo.province+"']").index()-1].childs); 34 | citys = addressData[$(".userAddress select[name='province'] option[value='"+userInfo.province+"']").index()-1].childs; 35 | } else { 36 | $('.userAddress select[name=city]').attr("disabled","disabled"); 37 | } 38 | $(".userAddress select[name='city']").val(userInfo.city); //市 39 | //填充市级信息,同时调取区县信息列表 40 | var value = userInfo.city; 41 | if (value > 0) { 42 | address.areas(citys[$(".userAddress select[name=city] option[value='"+userInfo.city+"']").index()-1].childs); 43 | } else { 44 | $('.userAddress select[name=area]').attr("disabled","disabled"); 45 | } 46 | $(".userAddress select[name='area']").val(userInfo.area); //区 47 | form.render(); 48 | }) 49 | for(key in userInfo){ 50 | if(key.indexOf("like") != -1){ 51 | $(".userHobby input[name='"+key+"']").attr("checked","checked"); 52 | } 53 | } 54 | $(".userEmail").val(userInfo.userEmail); //用户邮箱 55 | $(".myself").val(userInfo.myself); //自我评价 56 | form.render(); 57 | } 58 | }) -------------------------------------------------------------------------------- /src/main/resources/static/js/main.js: -------------------------------------------------------------------------------- 1 | //获取系统时间 2 | var newDate = ''; 3 | getLangDate(); 4 | //值小于10时,在前面补0 5 | function dateFilter(date){ 6 | if(date < 10){return "0"+date;} 7 | return date; 8 | } 9 | function getLangDate(){ 10 | var dateObj = new Date(); //表示当前系统时间的Date对象 11 | var year = dateObj.getFullYear(); //当前系统时间的完整年份值 12 | var month = dateObj.getMonth()+1; //当前系统时间的月份值 13 | var date = dateObj.getDate(); //当前系统时间的月份中的日 14 | var day = dateObj.getDay(); //当前系统时间中的星期值 15 | var weeks = ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]; 16 | var week = weeks[day]; //根据星期值,从数组中获取对应的星期字符串 17 | var hour = dateObj.getHours(); //当前系统时间的小时值 18 | var minute = dateObj.getMinutes(); //当前系统时间的分钟值 19 | var second = dateObj.getSeconds(); //当前系统时间的秒钟值 20 | var timeValue = "" +((hour >= 12) ? (hour >= 18) ? "晚上" : "下午" : "上午" ); //当前时间属于上午、晚上还是下午 21 | newDate = dateFilter(year)+"年"+dateFilter(month)+"月"+dateFilter(date)+"日 "+" "+dateFilter(hour)+":"+dateFilter(minute)+":"+dateFilter(second); 22 | document.getElementById("nowTime").innerHTML = "亲爱的管理员,"+timeValue+"好! 欢迎使用JDataX。当前时间为: "+newDate+" "+week; 23 | setTimeout("getLangDate()",1000); 24 | } 25 | 26 | layui.use(['form','element','layer','jquery'],function(){ 27 | var form = layui.form, 28 | layer = parent.layer === undefined ? layui.layer : top.layer, 29 | element = layui.element; 30 | $ = layui.jquery; 31 | //上次登录时间【此处应该从接口获取,实际使用中请自行更换】 32 | $(".loginTime").html(newDate.split("日")[0]+"日
"+newDate.split("日")[1]); 33 | //icon动画 34 | $(".panel a").hover(function(){ 35 | $(this).find(".layui-anim").addClass("layui-anim-scaleSpring"); 36 | },function(){ 37 | $(this).find(".layui-anim").removeClass("layui-anim-scaleSpring"); 38 | }) 39 | $(".panel a").click(function(){ 40 | parent.addTab($(this)); 41 | }) 42 | //系统基本参数 43 | if(window.sessionStorage.getItem("systemParameter")){ 44 | var systemParameter = JSON.parse(window.sessionStorage.getItem("systemParameter")); 45 | fillParameter(systemParameter); 46 | }else{ 47 | $.ajax({ 48 | url : "../json/systemParameter.json", 49 | type : "get", 50 | dataType : "json", 51 | success : function(data){ 52 | fillParameter(data); 53 | } 54 | }) 55 | } 56 | //填充数据方法 57 | function fillParameter(data){ 58 | //判断字段数据是否存在 59 | function nullData(data){ 60 | if(data == '' || data == "undefined"){ 61 | return "未定义"; 62 | }else{ 63 | return data; 64 | } 65 | } 66 | $(".version").text(nullData(data.version)); //当前版本 67 | $(".author").text(nullData(data.author)); //开发作者 68 | $(".homePage").text(nullData(data.homePage)); //网站首页 69 | $(".server").text(nullData(data.server)); //服务器环境 70 | $(".dataBase").text(nullData(data.dataBase)); //数据库版本 71 | $(".maxUpload").text(nullData(data.maxUpload)); //最大上传限制 72 | $(".userRights").text(nullData(data.userRights));//当前用户权限 73 | } 74 | 75 | //用户数量 76 | $.get("../json/userList.json",function(data){ 77 | $(".userAll span").text(data.count); 78 | }) 79 | 80 | //外部图标 81 | $.get(iconUrl,function(data){ 82 | $(".outIcons span").text(data.split(".icon-").length-1); 83 | }) 84 | 85 | }) 86 | -------------------------------------------------------------------------------- /src/main/resources/static/json/images.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "图片管理", 3 | "id": "Images", 4 | "start": 0, 5 | "data": [ 6 | { 7 | "src": "images/userface1.jpg", 8 | "thumb": "images/userface1.jpg", 9 | "alt": "美女生活照1", 10 | "pid":"1" 11 | }, 12 | { 13 | "src": "images/userface2.jpg", 14 | "thumb": "images/userface2.jpg", 15 | "alt": "美女生活照2", 16 | "pid":"2" 17 | }, 18 | { 19 | "src": "images/userface3.jpg", 20 | "thumb": "images/userface3.jpg", 21 | "alt": "美女生活照3", 22 | "pid":"3" 23 | }, 24 | { 25 | "src": "images/userface4.jpg", 26 | "thumb": "images/userface4.jpg", 27 | "alt": "美女生活照4", 28 | "pid":"4" 29 | }, 30 | { 31 | "src": "images/userface5.jpg", 32 | "thumb": "images/userface5.jpg", 33 | "alt": "美女生活照5", 34 | "pid":"5" 35 | }, 36 | { 37 | "src": "images/userface1.jpg", 38 | "thumb": "images/userface1.jpg", 39 | "alt": "美女生活照6", 40 | "pid":"6" 41 | }, 42 | { 43 | "src": "images/userface2.jpg", 44 | "thumb": "images/userface2.jpg", 45 | "alt": "美女生活照7", 46 | "pid":"7" 47 | }, 48 | { 49 | "src": "images/userface3.jpg", 50 | "thumb": "images/userface3.jpg", 51 | "alt": "美女生活照8", 52 | "pid":"8" 53 | }, 54 | { 55 | "src": "images/userface4.jpg", 56 | "thumb": "images/userface4.jpg", 57 | "alt": "美女生活照9", 58 | "pid":"9" 59 | }, 60 | { 61 | "src": "images/userface5.jpg", 62 | "thumb": "images/userface5.jpg", 63 | "alt": "美女生活照10", 64 | "pid":"10" 65 | }, 66 | { 67 | "src": "images/userface1.jpg", 68 | "thumb": "images/userface1.jpg", 69 | "alt": "美女生活照11", 70 | "pid":"11" 71 | }, 72 | { 73 | "src": "images/userface2.jpg", 74 | "thumb": "images/userface2.jpg", 75 | "alt": "美女生活照12", 76 | "pid":"12" 77 | }, 78 | { 79 | "src": "images/userface3.jpg", 80 | "thumb": "images/userface3.jpg", 81 | "alt": "美女生活照13", 82 | "pid":"13" 83 | }, 84 | { 85 | "src": "images/userface4.jpg", 86 | "thumb": "images/userface4.jpg", 87 | "alt": "美女生活照14", 88 | "pid":"14" 89 | }, 90 | { 91 | "src": "images/userface5.jpg", 92 | "thumb": "images/userface5.jpg", 93 | "alt": "美女生活照15", 94 | "pid":"15" 95 | }, 96 | { 97 | "src": "images/userface1.jpg", 98 | "thumb": "images/userface1.jpg", 99 | "alt": "美女生活照16", 100 | "pid":"16" 101 | }, 102 | { 103 | "src": "images/userface2.jpg", 104 | "thumb": "images/userface2.jpg", 105 | "alt": "美女生活照17", 106 | "pid":"17" 107 | }, 108 | { 109 | "src": "images/userface3.jpg", 110 | "thumb": "images/userface3.jpg", 111 | "alt": "美女生活照18", 112 | "pid":"18" 113 | }, 114 | { 115 | "src": "images/userface4.jpg", 116 | "thumb": "images/userface4.jpg", 117 | "alt": "美女生活照19", 118 | "pid":"19" 119 | }, 120 | { 121 | "src": "images/userface5.jpg", 122 | "thumb": "images/userface5.jpg", 123 | "alt": "美女生活照20", 124 | "pid":"20" 125 | }, 126 | { 127 | "src": "images/userface1.jpg", 128 | "thumb": "images/userface1.jpg", 129 | "alt": "美女生活照21", 130 | "pid":"21" 131 | }, 132 | { 133 | "src": "images/userface2.jpg", 134 | "thumb": "images/userface2.jpg", 135 | "alt": "美女生活照22", 136 | "pid":"22" 137 | }, 138 | { 139 | "src": "images/userface3.jpg", 140 | "thumb": "images/userface3.jpg", 141 | "alt": "美女生活照23", 142 | "pid":"23" 143 | }, 144 | { 145 | "src": "images/userface4.jpg", 146 | "thumb": "images/userface4.jpg", 147 | "alt": "美女生活照24", 148 | "pid":"24" 149 | }, 150 | { 151 | "src": "images/userface5.jpg", 152 | "thumb": "images/userface5.jpg", 153 | "alt": "美女生活照25", 154 | "pid":"25" 155 | }, 156 | { 157 | "src": "images/userface1.jpg", 158 | "thumb": "images/userface1.jpg", 159 | "alt": "美女生活照26", 160 | "pid":"26" 161 | }, 162 | { 163 | "src": "images/userface2.jpg", 164 | "thumb": "images/userface2.jpg", 165 | "alt": "美女生活照27", 166 | "pid":"27" 167 | }, 168 | { 169 | "src": "images/userface3.jpg", 170 | "thumb": "images/userface3.jpg", 171 | "alt": "美女生活照28", 172 | "pid":"28" 173 | }, 174 | { 175 | "src": "images/userface4.jpg", 176 | "thumb": "images/userface4.jpg", 177 | "alt": "美女生活照29", 178 | "pid":"29" 179 | }, 180 | { 181 | "src": "images/userface5.jpg", 182 | "thumb": "images/userface5.jpg", 183 | "alt": "美女生活照30", 184 | "pid":"30" 185 | }, 186 | { 187 | "src": "images/userface3.jpg", 188 | "thumb": "images/userface3.jpg", 189 | "alt": "美女生活照31", 190 | "pid":"31" 191 | } 192 | ] 193 | } -------------------------------------------------------------------------------- /src/main/resources/static/json/linkList.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "msg": "", 4 | "count": 4, 5 | "data": [ 6 | { 7 | "linkId": "1", 8 | "logo": "../../images/layui.png", 9 | "websiteName": "layui - 经典模块化前端框架", 10 | "websiteUrl": "http://www.layui.com", 11 | "masterEmail": "xianxin@layui.com", 12 | "addTime": "2017-05-14", 13 | "showAddress": "checked" 14 | },{ 15 | "linkId": "2", 16 | "logo": "../../images/fly.png", 17 | "websiteName": "fly - 前端框架官方社区", 18 | "websiteUrl": "http://fly.layui.com", 19 | "masterEmail": "xianxin@layui.com", 20 | "addTime": "2017-05-14", 21 | "showAddress": "" 22 | },{ 23 | "linkId": "3", 24 | "logo": "../../images/mayun.png", 25 | "websiteName": "layuicms2.0 - 码云 - 开源中国", 26 | "websiteUrl": "https://gitee.com/layuicms/layuicms2.0", 27 | "masterEmail": "git@oschina.cn", 28 | "addTime": "2017-05-14", 29 | "showAddress": "" 30 | },{ 31 | "linkId": "4", 32 | "logo": "../../images/git.png", 33 | "websiteName": "layuicms2.0 - Github", 34 | "websiteUrl": "https://github.com/BrotherMa/layuiCMS2.0", 35 | "masterEmail": "github@github.cn", 36 | "addTime": "2017-05-14", 37 | "showAddress": "" 38 | } 39 | ] 40 | } -------------------------------------------------------------------------------- /src/main/resources/static/json/linkLogo.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "msg": "", 4 | "data": [ 5 | { 6 | "src": "../../images/fly.png" 7 | },{ 8 | "src": "../../images/git.png" 9 | },{ 10 | "src": "../../images/layui.png" 11 | },{ 12 | "src": "../../images/mayun.png" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /src/main/resources/static/json/logs.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "msg": "", 4 | "count": 15, 5 | "data": [ 6 | { 7 | "logId": "1", 8 | "url": "https://gitee.com/layuicms/layuicms2.0", 9 | "method" : "GET", 10 | "ip": "192.169.39.11", 11 | "timeConsuming":"125", 12 | "isAbnormal": "正常", 13 | "operator": "驊驊龔頾", 14 | "operatingTime": "2017-04-14 00:00:00" 15 | }, 16 | { 17 | "logId": "2", 18 | "url": "https://gitee.com/layuicms/layuicms2.0", 19 | "method" : "POST", 20 | "ip": "192.169.39.11", 21 | "timeConsuming":"89", 22 | "isAbnormal": "异常", 23 | "operator": "驊驊龔頾", 24 | "operatingTime": "2017-04-14 00:00:00" 25 | }, 26 | { 27 | "logId": "3", 28 | "url": "https://gitee.com/layuicms/layuicms2.0", 29 | "method" : "GET", 30 | "ip": "192.169.39.11", 31 | "timeConsuming":"125", 32 | "isAbnormal": "正常", 33 | "operator": "admin", 34 | "operatingTime": "2017-04-14 00:00:00" 35 | }, 36 | { 37 | "logId": "4", 38 | "url": "https://gitee.com/layuicms/layuicms2.0", 39 | "method" : "GET", 40 | "ip": "192.169.39.11", 41 | "timeConsuming":"125", 42 | "isAbnormal": "异常", 43 | "operator": "admin", 44 | "operatingTime": "2017-04-14 00:00:00" 45 | }, 46 | { 47 | "logId": "5", 48 | "url": "https://gitee.com/layuicms/layuicms2.0", 49 | "method" : "POST", 50 | "ip": "192.169.39.11", 51 | "timeConsuming":"55", 52 | "newsLook": "开放浏览", 53 | "isAbnormal": "正常", 54 | "operator": "驊驊龔頾", 55 | "operatingTime": "2017-04-14 00:00:00" 56 | }, 57 | { 58 | "logId": "6", 59 | "url": "https://gitee.com/layuicms/layuicms2.0", 60 | "method": "POST", 61 | "ip": "192.169.39.11", 62 | "timeConsuming":"125", 63 | "isAbnormal": "正常", 64 | "operator": "admin", 65 | "operatingTime": "2017-04-14 00:00:00" 66 | }, 67 | { 68 | "logId": "7", 69 | "url": "https://gitee.com/layuicms/layuicms2.0", 70 | "method" : "GET", 71 | "ip": "192.169.39.11", 72 | "timeConsuming":"125", 73 | "isAbnormal": "异常", 74 | "operator": "驊驊龔頾", 75 | "operatingTime": "2017-04-14 00:00:00" 76 | }, 77 | { 78 | "logId": "8", 79 | "url": "https://gitee.com/layuicms/layuicms2.0", 80 | "method" : "POST", 81 | "ip": "192.169.39.11", 82 | "timeConsuming":"15", 83 | "isAbnormal": "正常", 84 | "operator": "驊驊龔頾", 85 | "operatingTime": "2017-04-14 00:00:00" 86 | }, 87 | { 88 | "logId": "9", 89 | "url": "https://gitee.com/layuicms/layuicms2.0", 90 | "method" : "GET", 91 | "ip": "192.169.39.11", 92 | "timeConsuming":"125", 93 | "isAbnormal": "正常", 94 | "operator": "admin", 95 | "operatingTime": "2017-04-14 00:00:00" 96 | }, 97 | { 98 | "logId": "10", 99 | "url": "https://gitee.com/layuicms/layuicms2.0", 100 | "method" : "GET", 101 | "ip": "192.169.39.11", 102 | "timeConsuming":"25", 103 | "isAbnormal": "异常", 104 | "operator": "admin", 105 | "operatingTime": "2017-04-14 00:00:00" 106 | }, 107 | { 108 | "logId": "11", 109 | "url": "https://gitee.com/layuicms/layuicms2.0", 110 | "method" : "POST", 111 | "ip": "192.169.39.11", 112 | "timeConsuming":"125", 113 | "isAbnormal": "正常", 114 | "operator": "驊驊龔頾", 115 | "operatingTime": "2017-04-14 00:00:00" 116 | }, 117 | { 118 | "logId": "12", 119 | "url": "https://gitee.com/layuicms/layuicms2.0", 120 | "method" : "GET", 121 | "ip": "192.169.39.11", 122 | "timeConsuming":"125", 123 | "isAbnormal": "正常", 124 | "operator": "驊驊龔頾", 125 | "operatingTime": "2017-04-14 00:00:00" 126 | }, 127 | { 128 | "logId": "13", 129 | "url": "https://gitee.com/layuicms/layuicms2.0", 130 | "method" : "GET", 131 | "ip": "192.169.39.11", 132 | "timeConsuming":"12", 133 | "isAbnormal": "正常", 134 | "operator": "admin", 135 | "operatingTime": "2017-04-14 00:00:00" 136 | }, 137 | { 138 | "logId": "14", 139 | "url": "https://gitee.com/layuicms/layuicms2.0", 140 | "method" : "POST", 141 | "ip": "192.169.39.11", 142 | "timeConsuming":"125", 143 | "isAbnormal": "异常", 144 | "operator": "驊驊龔頾", 145 | "operatingTime": "2017-04-14 00:00:00" 146 | }, 147 | { 148 | "logId": "15", 149 | "url": "https://gitee.com/layuicms/layuicms2.0", 150 | "method" : "GET", 151 | "ip": "192.169.39.11", 152 | "timeConsuming":"125", 153 | "isAbnormal": "正常", 154 | "operator": "驊驊龔頾", 155 | "operatingTime": "2017-04-14 00:00:00" 156 | } 157 | ] 158 | } -------------------------------------------------------------------------------- /src/main/resources/static/json/navs.json: -------------------------------------------------------------------------------- 1 | { 2 | "contentManagement": [ 3 | { 4 | "title": "数据表", 5 | "icon": "icon-text", 6 | "href": "page/datax/dataxConfig.html", 7 | "spread": false 8 | }, 9 | { 10 | "title": "创建DataXJSON", 11 | "icon": "", 12 | "href": "page/datax/createDataJsonFile.html", 13 | "spread": false 14 | }, 15 | { 16 | "title": "任务调度", 17 | "icon": "", 18 | "href": "page/datax/", 19 | "spread": false 20 | }, 21 | { 22 | "title": "报警配置", 23 | "icon": "", 24 | "href": "page/datax/", 25 | "spread": false 26 | }, 27 | { 28 | "title": "邮件配置", 29 | "icon": "", 30 | "href": "page/datax/", 31 | "spread": false 32 | }, 33 | { 34 | "title": "日志监控", 35 | "icon": "", 36 | "href": "page/console/index.html", 37 | "spread": false 38 | }, 39 | { 40 | "title": "软件商店", 41 | "icon": "", 42 | "href": "page/soft/", 43 | "spread": false 44 | }, 45 | { 46 | "title": "插件商店", 47 | "icon": "", 48 | "href": "page/plugin/", 49 | "spread": false 50 | } 51 | ] 52 | } 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/main/resources/static/json/newsImg.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "msg": "", 4 | "data":{ 5 | "src": "../../images/userface1.jpg", 6 | "title" : "文章内容图片" 7 | } 8 | } -------------------------------------------------------------------------------- /src/main/resources/static/json/systemParameter.json: -------------------------------------------------------------------------------- 1 | { 2 | "cmsName": "JDataX 数据同步服务", 3 | "version": "v1.0", 4 | "author": "andot", 5 | "homePage": "index.html", 6 | "server": "windows", 7 | "dataBase": "8.00.2039", 8 | "maxUpload": "2M", 9 | "userRights": "超级管理员", 10 | "description": "", 11 | "powerby": "copyright @2018 JDataX", 12 | "record": "京ICP备1", 13 | "keywords": "JDataX, DataX" 14 | } -------------------------------------------------------------------------------- /src/main/resources/static/json/userGrade.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "msg": "", 4 | "count": 1000, 5 | "data": [ 6 | { 7 | "id": 1, 8 | "gradeIcon": "icon-vip1", 9 | "gradeName": "倔强青铜", 10 | "gradePoint": "0", 11 | "gradeGold": "0", 12 | "gradeValue": "0" 13 | }, 14 | { 15 | "id": 2, 16 | "gradeIcon": "icon-vip2", 17 | "gradeName": "秩序白银", 18 | "gradePoint": "100", 19 | "gradeGold": "200", 20 | "gradeValue": "500" 21 | }, 22 | { 23 | "id": 3, 24 | "gradeIcon": "icon-vip3", 25 | "gradeName": "荣耀黄金", 26 | "gradePoint": "300", 27 | "gradeGold": "300", 28 | "gradeValue": "1000" 29 | }, 30 | { 31 | "id": 4, 32 | "gradeIcon": "icon-vip4", 33 | "gradeName": "尊贵铂金", 34 | "gradePoint": "800", 35 | "gradeGold": "400", 36 | "gradeValue": "2000" 37 | }, 38 | { 39 | "id": 5, 40 | "gradeIcon": "icon-vip5", 41 | "gradeName": "永恒钻石", 42 | "gradePoint": "1500", 43 | "gradeGold": "500", 44 | "gradeValue": "5000" 45 | }, 46 | { 47 | "id": 6, 48 | "gradeIcon": "icon-vip6", 49 | "gradeName": "至尊星耀", 50 | "gradePoint": "3000", 51 | "gradeGold": "600", 52 | "gradeValue": "10000" 53 | }, 54 | { 55 | "id": 7, 56 | "gradeIcon": "icon-vip7", 57 | "gradeName": "最强王者", 58 | "gradePoint": "5000", 59 | "gradeGold": "700", 60 | "gradeValue": "35000" 61 | } 62 | ] 63 | } -------------------------------------------------------------------------------- /src/main/resources/static/json/userList.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "msg": "", 4 | "count": 3, 5 | "data": [ 6 | { 7 | "usersId": "1", 8 | "userName": "驊驊龔頾", 9 | "userEmail": "mage@layui.com", 10 | "userSex": "男", 11 | "userStatus": "0", 12 | "userGrade": "4", 13 | "userEndTime": "2018-01-31 10:00", 14 | "userDesc" : "layuiCMS作者,原名‘请叫我马哥’" 15 | },{ 16 | "usersId": "2", 17 | "userName": "贤心", 18 | "userEmail": "xianxin@layui.com", 19 | "userSex": "保密", 20 | "userStatus": "0", 21 | "userGrade": "3", 22 | "userEndTime": "2018-01-14 15:35", 23 | "userDesc" : "layui框架作者,性别至今是个谜。。。" 24 | }, 25 | { 26 | "usersId": "3", 27 | "userName": "纸飞机", 28 | "userEmail": "fly@layui.com", 29 | "userSex": "男", 30 | "userStatus": "1", 31 | "userGrade": "2", 32 | "userEndTime": "2018-01-25 16:25", 33 | "userDesc" : "fly社区管理员,据传与layui作者有奸情,故帐号被封。" 34 | } 35 | ] 36 | } -------------------------------------------------------------------------------- /src/main/resources/static/json/userface.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "msg": "", 4 | "data": [ 5 | { 6 | "src": "../../images/userface1.jpg" 7 | },{ 8 | "src": "../../images/userface2.jpg" 9 | },{ 10 | "src": "../../images/userface3.jpg" 11 | },{ 12 | "src": "../../images/userface4.jpg" 13 | },{ 14 | "src": "../../images/userface5.jpg" 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/font/iconfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/font/iconfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/0.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/1.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/10.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/11.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/12.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/13.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/14.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/15.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/16.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/17.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/18.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/19.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/2.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/20.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/21.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/22.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/23.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/24.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/25.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/26.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/27.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/28.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/29.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/3.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/30.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/31.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/32.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/33.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/34.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/35.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/36.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/37.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/38.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/39.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/4.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/40.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/41.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/42.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/43.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/44.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/45.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/46.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/47.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/48.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/49.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/5.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/50.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/51.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/52.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/53.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/54.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/55.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/56.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/57.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/58.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/59.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/6.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/60.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/61.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/62.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/63.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/64.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/65.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/66.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/67.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/68.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/69.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/7.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/70.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/71.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/8.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andotorg/JDataX/2a2f4b006ebe95726359ce64c9c9cdc16563aad4/src/main/resources/static/layui/images/face/9.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/carousel.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
    ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
"].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a/g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
  1. '+o.replace(/[\r\t\n]+/g,"
  2. ")+"
"),c.find(">.layui-code-h3")[0]||c.prepend('

'+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)}); -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/laypage.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),skip:function(){return['到第','','页',""].join("")}()};return['
',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
"].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)}); -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/tree.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
    '),s=o(["
  • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return r.check?''+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
  • "].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('
    '));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})}); -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.2.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var t=layui.$,i={fixbar:function(e){var i,o,a="layui-fixbar",r="layui-fixbar-top",n=t(document),l=t("body");e=t.extend({showHeight:200},e),e.bar1=e.bar1===!0?"":e.bar1,e.bar2=e.bar2===!0?"":e.bar2,e.bgcolor=e.bgcolor?"background-color:"+e.bgcolor:"";var c=[e.bar1,e.bar2,""],g=t(['
      ',e.bar1?'
    • '+c[0]+"
    • ":"",e.bar2?'
    • '+c[1]+"
    • ":"",'
    • '+c[2]+"
    • ","
    "].join("")),s=g.find("."+r),u=function(){var t=n.scrollTop();t>=e.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};t("."+a)[0]||("object"==typeof e.css&&g.css(e.css),l.append(g),u(),g.find("li").on("click",function(){var i=t(this),o=i.attr("lay-type");"top"===o&&t("html,body").animate({scrollTop:0},200),e.click&&e.click.call(this,o)}),n.on("scroll",function(){clearTimeout(o),o=setTimeout(function(){u()},100)}))},countdown:function(e,t,i){var o=this,a="function"==typeof t,r=new Date(e).getTime(),n=new Date(!t||a?(new Date).getTime():t).getTime(),l=r-n,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];a&&(i=t);var g=setTimeout(function(){o.countdown(e,n+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],t,g),l<=0&&clearTimeout(g),g},timeAgo:function(e,t){var i=this,o=[[],[]],a=(new Date).getTime()-new Date(e).getTime();return a>6912e5?(a=new Date(e),o[0][0]=i.digit(a.getFullYear(),4),o[0][1]=i.digit(a.getMonth()+1),o[0][2]=i.digit(a.getDate()),t||(o[1][0]=i.digit(a.getHours()),o[1][1]=i.digit(a.getMinutes()),o[1][2]=i.digit(a.getSeconds())),o[0].join("-")+" "+o[1].join(":")):a>=864e5?(a/1e3/60/60/24|0)+"天前":a>=36e5?(a/1e3/60/60|0)+"小时前":a>=12e4?(a/1e3/60|0)+"分钟前":a<0?"未来":"刚刚"},digit:function(e,t){var i="";e=String(e),t=t||2;for(var o=e.length;o 2 | 3 | 4 | 5 | 404--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
    17 |
    18 | 19 | 20 |
    21 |
    22 | 23 |

    我勒个去,页面被外星人挟持了!

    24 |
    25 |
    26 | 27 | 28 | -------------------------------------------------------------------------------- /src/main/resources/static/page/console/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | catalina.out 5 | 6 | 18 | 19 | 20 | 21 |
    22 | 23 | 24 | 69 | -------------------------------------------------------------------------------- /src/main/resources/static/page/datax/dataxConfig.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DataX配置 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 21 | 22 |
    23 |
    24 |
    25 | 添加数据源 26 |
    27 |
    28 |
    29 |
    30 | 31 | 66 | 67 | 70 | 71 | 72 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /src/main/resources/static/page/doc/addressDoc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 三级联动使用文档--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
    17 | address模块是封装的一个省市区三级联动的功能,可以和form、layer等模块一样通过模块化引入进行使用。唯一的不同就是模块的存放路径和使用时的配置。下面将对此区别进行详细的描述。 18 |
    19 |
    20 | 模块加载名称:address 21 |
    22 |
    23 | 核心方法 24 |
    25 |

    语法:layui.address()

    26 |
    27 | 		layui.use('address', function(){
    28 | 		  var layui.address();
    29 | 		});
    30 | 	
    31 |

    上面说过,模块相对页面的存放路径不同,使用时也需要进行不同的配置。如果页面和此模块属于同级关系,则不用进行任何配置,直接引入即可使用。如果它们不属于同级关系,则需要通过查找address.js文件相对xx.js文件的相对路径进行配置,如:address.js文件与a文件夹属于同级,而a文件夹中包含b文件夹,b文件夹中包含xx.js,通过xx.js引入address模块则进行下面的配置

    32 |
    33 | 		layui.config({
    34 | 		  base : "../../js/"  //如果a文件夹中直接就是xx.js文件,则为“../js/”
    35 | 		}).extend({
    36 | 		  "address" : "address"
    37 | 		})
    38 | 	
    39 |
    40 | HTML数据格式 41 |
    42 |

    下面是HTML数据格式,其中select的name值和lay-filter值是固定不可改变的,因为模块中是通过查找对应name的select进行的赋值,通过form.on("select(filter)")执行选择的方法,所以这两个值是不可以随意更改的。如果需要改变请将模块源码中对应的值一同修改。另外需要注意的是“市”、“区/县”的select需要添加一个disabled属性,主要是为了避免在没有选择省份的情况下先选择市、区造成错误。

    43 |
    44 | 		//省份select
    45 | 		<select name="province" lay-filter="province">
    46 | 		  <option value="">请选择省</option>
    47 | 		</select>
    48 | 		//市select
    49 | 		<select name="city" lay-filter="city" disabled>
    50 | 		  <option value="">请选择市</option>
    51 | 		</select>
    52 | 		//区/县select
    53 | 		<select name="area" lay-filter="area" disabled>
    54 | 		  <option value="">请选择县/区</option>
    55 | 		</select>
    56 | 	
    57 |
    58 | JSON数据格式 59 |
    60 |

    其中code为地区id,用于给option赋值;name为地区名称,用于设置option的text;childs为当前区域的下级地区。

    61 |
    62 | 		[{
    63 | 		  "code": "11",
    64 | 		  "name": "北京市",
    65 | 		  "childs": [{
    66 | 		      "code": "1101",
    67 | 		      "name": "市辖区",
    68 | 		      "childs": [{
    69 | 		          "code": "110101",
    70 | 		          "name": "东城区"
    71 | 		      }]
    72 | 		  }]
    73 | 		}]
    74 | 	
    75 | 76 | 83 | 84 | -------------------------------------------------------------------------------- /src/main/resources/static/page/doc/navDoc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 三级菜单使用文档--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
    17 | 其实本模版中的三级菜单的展示方式和实际开发中的做法是不一样的,下面将说一下本模版中的做法 18 |
    19 |
    20 | 实际开发 21 |
    22 |

    在实际的开发中,无论是顶部菜单还是左侧菜单都应该是通过接口获取的。首先获取顶部菜单,然后点击顶级菜单通过传参再次访问接口来获取二级、三级菜单。

    23 |
    24 | 本模版的做法 25 |
    26 |

    由于顶部菜单是大分类,不会有太多,所以在本模版中是直接写死的,代码如下【具体请看index.html第25-36行】:

    27 |
    28 | 		<dd data-menu="seraphApi"><a href="javascript:;"><i class="layui-icon" data-icon="&#xe705;">&#xe705;</i><cite>使用文档</cite></a></dd>
    29 | 		请注意这里面的“data-menu”属性,此属性值需要和json中的字段名对应以便能够进行通过此属性查找对应的子菜单
    30 | 	
    31 |

    然后通过index.js中的代码进行循环渲染,就成了当前大家看到的这个样子了,js代码如下【具体请看index.js中的第18-38行】:

    32 |
    33 | 		function getData(json){
    34 | 		    $.get("接口路径",function(data){
    35 | 		        if(json == "contentManagement"){   //此处即实际开发中传递的参数
    36 | 		            dataStr = data.contentManagement;   //获取到当前顶级菜单下的子菜单渲染到左侧
    37 | 		            tab.render();
    38 | 		        }
    39 | 		    })
    40 | 		}
    41 | 	
    42 |
    43 |

    如果不动大框架的前提下,请严格按照菜单数据格式返回数据,菜单数据格式请参考:bodyTab模块去看看菜单数据格式

    44 |
    45 | 46 | 47 | 65 | 66 | -------------------------------------------------------------------------------- /src/main/resources/static/page/img/images.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 图片总数--layui后台管理模板 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
    17 | 28 |
      29 |
      30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/main/resources/static/page/img/images.js: -------------------------------------------------------------------------------- 1 | layui.config({ 2 | base : "../../js/" 3 | }).use(['flow','form','layer','upload'],function(){ 4 | var flow = layui.flow, 5 | form = layui.form, 6 | layer = parent.layer === undefined ? layui.layer : top.layer, 7 | upload = layui.upload, 8 | $ = layui.jquery; 9 | 10 | //流加载图片 11 | var imgNums = 15; //单页显示图片数量 12 | flow.load({ 13 | elem: '#Images', //流加载容器 14 | done: function(page, next){ //加载下一页 15 | $.get("../../json/images.json",function(res){ 16 | //模拟插入 17 | var imgList = [],data = res.data; 18 | var maxPage = imgNums*page < data.length ? imgNums*page : data.length; 19 | setTimeout(function(){ 20 | for(var i=imgNums*(page-1); i'+data[i].alt+'
      '); 22 | } 23 | next(imgList.join(''), page < (data.length/imgNums)); 24 | form.render(); 25 | }, 500); 26 | }); 27 | } 28 | }); 29 | 30 | //设置图片的高度 31 | $(window).resize(function(){ 32 | $("#Images li img").height($("#Images li img").width()); 33 | }) 34 | 35 | //多图片上传 36 | upload.render({ 37 | elem: '.uploadNewImg', 38 | url: '../../json/userface.json', 39 | multiple: true, 40 | before: function(obj){ 41 | //预读本地文件示例,不支持ie8 42 | obj.preview(function(index, file, result){ 43 | $('#Images').prepend('
    • '+ file.name +'
    • ') 44 | //设置图片的高度 45 | $("#Images li img").height($("#Images li img").width()); 46 | form.render("checkbox"); 47 | }); 48 | }, 49 | done: function(res){ 50 | //上传完毕 51 | } 52 | }); 53 | 54 | //弹出层 55 | $("body").on("click","#Images img",function(){ 56 | parent.showImg(); 57 | }) 58 | 59 | //删除单张图片 60 | $("body").on("click",".img_del",function(){ 61 | var _this = $(this); 62 | layer.confirm('确定删除图片"'+_this.siblings().find("input").attr("title")+'"吗?',{icon:3, title:'提示信息'},function(index){ 63 | _this.parents("li").hide(1000); 64 | setTimeout(function(){_this.parents("li").remove();},950); 65 | layer.close(index); 66 | }); 67 | }) 68 | 69 | //全选 70 | form.on('checkbox(selectAll)', function(data){ 71 | var child = $("#Images li input[type='checkbox']"); 72 | child.each(function(index, item){ 73 | item.checked = data.elem.checked; 74 | }); 75 | form.render('checkbox'); 76 | }); 77 | 78 | //通过判断是否全部选中来确定全选按钮是否选中 79 | form.on("checkbox(choose)",function(data){ 80 | var child = $(data.elem).parents('#Images').find('li input[type="checkbox"]'); 81 | var childChecked = $(data.elem).parents('#Images').find('li input[type="checkbox"]:checked'); 82 | if(childChecked.length == child.length){ 83 | $(data.elem).parents('#Images').siblings("blockquote").find('input#selectAll').get(0).checked = true; 84 | }else{ 85 | $(data.elem).parents('#Images').siblings("blockquote").find('input#selectAll').get(0).checked = false; 86 | } 87 | form.render('checkbox'); 88 | }) 89 | 90 | //批量删除 91 | $(".batchDel").click(function(){ 92 | var $checkbox = $('#Images li input[type="checkbox"]'); 93 | var $checked = $('#Images li input[type="checkbox"]:checked'); 94 | if($checkbox.is(":checked")){ 95 | layer.confirm('确定删除选中的图片?',{icon:3, title:'提示信息'},function(index){ 96 | var index = layer.msg('删除中,请稍候',{icon: 16,time:false,shade:0.8}); 97 | setTimeout(function(){ 98 | //删除数据 99 | $checked.each(function(){ 100 | $(this).parents("li").hide(1000); 101 | setTimeout(function(){$(this).parents("li").remove();},950); 102 | }) 103 | $('#Images li input[type="checkbox"],#selectAll').prop("checked",false); 104 | form.render(); 105 | layer.close(index); 106 | layer.msg("删除成功"); 107 | },2000); 108 | }) 109 | }else{ 110 | layer.msg("请选择需要删除的图片"); 111 | } 112 | }) 113 | 114 | }) -------------------------------------------------------------------------------- /src/main/resources/static/page/login/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 登录--layui后台管理模板 2.0 6 | 7 | 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 | 39 |
      40 |
      41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/resources/static/page/login/login.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','jquery'],function(){ 2 | var form = layui.form, 3 | layer = parent.layer === undefined ? layui.layer : top.layer 4 | $ = layui.jquery; 5 | 6 | $(".loginBody .seraph").click(function(){ 7 | layer.msg("这只是做个样式,至于功能,你见过哪个后台能这样登录的?还是老老实实的找管理员去注册吧",{ 8 | time:5000 9 | }); 10 | }) 11 | 12 | //登录按钮 13 | form.on("submit(login)",function(data){ 14 | $(this).text("登录中...").attr("disabled","disabled").addClass("layui-disabled"); 15 | setTimeout(function(){ 16 | window.location.href = "/layuicms2.0"; 17 | },1000); 18 | return false; 19 | }) 20 | 21 | //表单输入效果 22 | $(".loginBody .input-item").click(function(e){ 23 | e.stopPropagation(); 24 | $(this).addClass("layui-input-focus").find(".layui-input").focus(); 25 | }) 26 | $(".loginBody .layui-form-item .layui-input").focus(function(){ 27 | $(this).parent().addClass("layui-input-focus"); 28 | }) 29 | $(".loginBody .layui-form-item .layui-input").blur(function(){ 30 | $(this).parent().removeClass("layui-input-focus"); 31 | if($(this).val() != ''){ 32 | $(this).parent().addClass("layui-input-active"); 33 | }else{ 34 | $(this).parent().removeClass("layui-input-active"); 35 | } 36 | }) 37 | }) 38 | -------------------------------------------------------------------------------- /src/main/resources/static/page/main.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 首页 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
      17 |
      18 |
      19 | 56 |
      57 |

      JDataX 由自主研发的组织架构同步系统和调度DataX为一体的数据同步服务系统。

      58 |
      59 |
      60 |
      61 |
      系统基本参数
      62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 |
      当前版本
      开发作者
      网站首页
      服务器环境
      数据库版本
      最大上传限制
      当前用户权限
      98 |
      99 |
      100 |
      发展历程&更新日志
      101 |
      102 |
        103 |
      • 104 | 105 |
        106 |
        107 |

        JDataX V1.0 正式开始使用! 

        108 | 2018-04-08 109 |
        110 |
        111 |
      • 112 |
      • 113 | 114 |
        115 |
        116 |

        JDataX V1.0 时隔一年进行升级! 

        117 | 2019-7-19 118 |
        119 |
        120 |
      • 121 |
      • 122 | 123 |
        124 |
        125 |

        JDataX V1.1 JDataX第一个升级版本上线! 

        126 | 2019-10-01 127 |
        128 |
        129 |
      • 130 |
      131 |
      132 |
      133 |
      134 | 135 | 136 | 137 | 138 | -------------------------------------------------------------------------------- /src/main/resources/static/page/qrcode/readQrcode.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | DataX配置 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 22 | 23 | 24 |
      25 |
      26 |
      27 | 28 |
      29 | 32 | 33 |
      34 |
      35 | 36 |
      37 | 识别结果: 38 |
      39 | 40 |
      41 |
      42 |
      43 |
      44 | 45 | 46 | 49 | 50 | 51 | 52 | 125 | 126 | -------------------------------------------------------------------------------- /src/main/resources/static/page/systemSetting/basicParameter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 系统基本参数--layui后台管理模板 2.0 6 | 7 | 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 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 |
      参数说明参数值变量名
      网站名称cmsName
      当前版本version
      开发作者author
      网站首页homePage
      服务器环境server
      数据库版本dataBase
      最大上传限制maxUpload
      用户权限userRights
      默认关键字keywords
      版权信息powerby
      网站描述description
      网站备案号record
      93 |
      94 |
      95 | 96 | 97 |
      98 |
      99 |
      100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /src/main/resources/static/page/systemSetting/basicParameter.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','jquery'],function(){ 2 | var form = layui.form, 3 | layer = parent.layer === undefined ? layui.layer : top.layer, 4 | laypage = layui.laypage, 5 | $ = layui.jquery; 6 | 7 | var systemParameter; 8 | form.on("submit(systemParameter)",function(data){ 9 | systemParameter = '{"cmsName":"'+$(".cmsName").val()+'",'; //模版名称 10 | systemParameter += '"version":"'+$(".version").val()+'",'; //当前版本 11 | systemParameter += '"author":"'+$(".author").val()+'",'; //开发作者 12 | systemParameter += '"homePage":"'+$(".homePage").val()+'",'; //网站首页 13 | systemParameter += '"server":"'+$(".server").val()+'",'; //服务器环境 14 | systemParameter += '"dataBase":"'+$(".dataBase").val()+'",'; //数据库版本 15 | systemParameter += '"maxUpload":"'+$(".maxUpload").val()+'",'; //最大上传限制 16 | systemParameter += '"userRights":"'+$(".userRights").val()+'",'; //用户权限 17 | systemParameter += '"description":"'+$(".description").val()+'",'; //站点描述 18 | systemParameter += '"powerby":"'+$(".powerby").val()+'",'; //版权信息 19 | systemParameter += '"record":"'+$(".record").val()+'",'; //网站备案号 20 | systemParameter += '"keywords":"'+$(".keywords").val()+'"}'; //默认关键字 21 | window.sessionStorage.setItem("systemParameter",systemParameter); 22 | //弹出loading 23 | var index = top.layer.msg('数据提交中,请稍候',{icon: 16,time:false,shade:0.8}); 24 | setTimeout(function(){ 25 | layer.close(index); 26 | layer.msg("系统基本参数修改成功!"); 27 | },500); 28 | return false; 29 | }) 30 | 31 | 32 | //加载默认数据 33 | if(window.sessionStorage.getItem("systemParameter")){ 34 | var data = JSON.parse(window.sessionStorage.getItem("systemParameter")); 35 | fillData(data); 36 | }else{ 37 | $.ajax({ 38 | url : "../../json/systemParameter.json", 39 | type : "get", 40 | dataType : "json", 41 | success : function(data){ 42 | fillData(data); 43 | } 44 | }) 45 | } 46 | 47 | //填充数据方法 48 | function fillData(data){ 49 | $(".version").val(data.version); //当前版本 50 | $(".author").val(data.author); //开发作者 51 | $(".homePage").val(data.homePage); //网站首页 52 | $(".server").val(data.server); //服务器环境 53 | $(".dataBase").val(data.dataBase); //数据库版本 54 | $(".maxUpload").val(data.maxUpload); //最大上传限制 55 | $(".userRights").val(data.userRights);//当前用户权限 56 | $(".cmsName").val(data.cmsName); //模版名称 57 | $(".description").val(data.description);//站点描述 58 | $(".powerby").val(data.powerby); //版权信息 59 | $(".record").val(data.record); //网站备案号 60 | $(".keywords").val(data.keywords); //默认关键字 61 | } 62 | 63 | }) 64 | -------------------------------------------------------------------------------- /src/main/resources/static/page/systemSetting/icons.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 图标管理--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
      17 | layuiCMS 2.0当前共引入个外部图标。【点击可复制】此页面并非后台模版需要的,只是为了让大家了解都引入了哪些外部图标,实际应用中可删除。 18 |
      19 | 20 |
        21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/main/resources/static/page/systemSetting/icons.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','jquery'],function(){ 2 | var form = layui.form, 3 | layer = parent.layer === undefined ? layui.layer : top.layer, 4 | element = layui.element; 5 | $ = layui.jquery; 6 | 7 | $.get(iconUrl,function(data){ 8 | var iconHtml = ''; 9 | for(var i=1;i" + 12 | "icon-" + data.split('.icon-')[i].split(':before')[0] + 13 | ""; 14 | } 15 | $(".icons").html(iconHtml); 16 | $(".iconsLength").text(data.split(".icon-").length-1); 17 | }) 18 | 19 | $("body").on("click",".icons li",function(){ 20 | var copyText = document.getElementById("copyText"); 21 | copyText.innerText = $(this).text(); 22 | copyText.select(); 23 | document.execCommand("copy"); 24 | layer.msg("复制成功",{anim: 2}); 25 | }) 26 | }) 27 | -------------------------------------------------------------------------------- /src/main/resources/static/page/systemSetting/linkList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 友情链接--layui后台管理模板 2.0 6 | 7 | 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 | -------------------------------------------------------------------------------- /src/main/resources/static/page/systemSetting/linksAdd.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 文章列表--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
        17 |
        18 | 21 |
        22 |
        23 | 24 |
        25 | 26 |
        27 |
        28 |
        29 | 30 |
        31 | 32 |
        33 |
        34 |
        35 | 36 |
        37 | 38 |
        39 |
        40 |
        41 | 42 |
        43 | 44 |
        45 |
        46 |
        47 | 48 |
        49 |
        50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /src/main/resources/static/page/systemSetting/logs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 系统日志--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
        18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/main/resources/static/page/systemSetting/logs.js: -------------------------------------------------------------------------------- 1 | layui.use(['table'],function(){ 2 | var table = layui.table; 3 | 4 | //系统日志 5 | table.render({ 6 | elem: '#logs', 7 | url : '../../json/logs.json', 8 | cellMinWidth : 95, 9 | page : true, 10 | height : "full-20", 11 | limit : 20, 12 | limits : [10,15,20,25], 13 | id : "systemLog", 14 | cols : [[ 15 | {type: "checkbox", fixed:"left", width:50}, 16 | {field: 'logId', title: '序号', width:60, align:"center"}, 17 | {field: 'url', title: '请求地址', width:350}, 18 | {field: 'method', title: '操作方式', align:'center',templet:function(d){ 19 | if(d.method.toUpperCase() == "GET"){ 20 | return ''+d.method+'' 21 | }else{ 22 | return ''+d.method+'' 23 | } 24 | }}, 25 | {field: 'ip', title: '操作IP', align:'center',minWidth:130}, 26 | {field: 'timeConsuming', title: '耗时', align:'center',templet:function(d){ 27 | return ''+d.timeConsuming+'' 28 | }}, 29 | {field: 'isAbnormal', title: '是否异常', align:'center',templet:function(d){ 30 | if(d.isAbnormal == "正常"){ 31 | return ''+d.isAbnormal+'' 32 | }else{ 33 | return ''+d.isAbnormal+'' 34 | } 35 | }}, 36 | {field: 'operator',title: '操作人', minWidth:100, templet:'#newsListBar',align:"center"}, 37 | {field: 'operatingTime', title: '操作时间', align:'center', width:170} 38 | ]] 39 | }); 40 | 41 | }) 42 | -------------------------------------------------------------------------------- /src/main/resources/static/page/user/changePwd.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 修改密码--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
        17 |
        18 |
        旧密码请输入“123456”,新密码必须两次输入一致才能提交
        19 |
        20 | 21 |
        22 | 23 |
        24 |
        25 |
        26 | 27 |
        28 | 29 |
        30 |
        31 |
        32 | 33 |
        34 | 35 |
        36 |
        37 |
        38 | 39 |
        40 | 41 |
        42 |
        43 |
        44 |
        45 | 46 | 47 |
        48 |
        49 |
        50 |
        51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/main/resources/static/page/user/userAdd.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 文章列表--layui后台管理模板 2.0 6 | 7 | 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 |
        39 | 40 |
        41 | 48 |
        49 |
        50 |
        51 | 52 |
        53 | 57 |
        58 |
        59 |
        60 |
        61 | 62 |
        63 | 64 |
        65 |
        66 |
        67 |
        68 | 69 | 70 |
        71 |
        72 |
        73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/main/resources/static/page/user/userAdd.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer'],function(){ 2 | var form = layui.form 3 | layer = parent.layer === undefined ? layui.layer : top.layer, 4 | $ = layui.jquery; 5 | 6 | form.on("submit(addUser)",function(data){ 7 | //弹出loading 8 | var index = top.layer.msg('数据提交中,请稍候',{icon: 16,time:false,shade:0.8}); 9 | // 实际使用时的提交信息 10 | // $.post("上传路径",{ 11 | // userName : $(".userName").val(), //登录名 12 | // userEmail : $(".userEmail").val(), //邮箱 13 | // userSex : data.field.sex, //性别 14 | // userGrade : data.field.userGrade, //会员等级 15 | // userStatus : data.field.userStatus, //用户状态 16 | // newsTime : submitTime, //添加时间 17 | // userDesc : $(".userDesc").text(), //用户简介 18 | // },function(res){ 19 | // 20 | // }) 21 | setTimeout(function(){ 22 | top.layer.close(index); 23 | top.layer.msg("用户添加成功!"); 24 | layer.closeAll("iframe"); 25 | //刷新父页面 26 | parent.location.reload(); 27 | },2000); 28 | return false; 29 | }) 30 | 31 | //格式化时间 32 | function filterTime(val){ 33 | if(val < 10){ 34 | return "0" + val; 35 | }else{ 36 | return val; 37 | } 38 | } 39 | //定时发布 40 | var time = new Date(); 41 | var submitTime = time.getFullYear()+'-'+filterTime(time.getMonth()+1)+'-'+filterTime(time.getDate())+' '+filterTime(time.getHours())+':'+filterTime(time.getMinutes())+':'+filterTime(time.getSeconds()); 42 | 43 | }) -------------------------------------------------------------------------------- /src/main/resources/static/page/user/userGrade.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 会员等级--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
        17 |
        18 | 新增等级 其实这里应该有些说明性的东西,但是因为语文没有学好,没办法,还是需要的人自己写点描述吧 19 |
        20 |
        21 | 38 | 41 |
        42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/resources/static/page/user/userInfo.js: -------------------------------------------------------------------------------- 1 | var form, $,areaData; 2 | layui.config({ 3 | base : "../../js/" 4 | }).extend({ 5 | "address" : "address" 6 | }) 7 | layui.use(['form','layer','upload','laydate',"address"],function(){ 8 | form = layui.form; 9 | $ = layui.jquery; 10 | var layer = parent.layer === undefined ? layui.layer : top.layer, 11 | upload = layui.upload, 12 | laydate = layui.laydate, 13 | address = layui.address; 14 | 15 | //上传头像 16 | upload.render({ 17 | elem: '.userFaceBtn', 18 | url: '../../json/userface.json', 19 | method : "get", //此处是为了演示之用,实际使用中请将此删除,默认用post方式提交 20 | done: function(res, index, upload){ 21 | var num = parseInt(4*Math.random()); //生成0-4的随机数,随机显示一个头像信息 22 | $('#userFace').attr('src',res.data[num].src); 23 | window.sessionStorage.setItem('userFace',res.data[num].src); 24 | } 25 | }); 26 | 27 | //添加验证规则 28 | form.verify({ 29 | userBirthday : function(value){ 30 | if(!/^(\d{4})[\u4e00-\u9fa5]|[-\/](\d{1}|0\d{1}|1[0-2])([\u4e00-\u9fa5]|[-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/.test(value)){ 31 | return "出生日期格式不正确!"; 32 | } 33 | } 34 | }) 35 | //选择出生日期 36 | laydate.render({ 37 | elem: '.userBirthday', 38 | format: 'yyyy年MM月dd日', 39 | trigger: 'click', 40 | max : 0, 41 | mark : {"0-12-15":"生日"}, 42 | done: function(value, date){ 43 | if(date.month === 12 && date.date === 15){ //点击每年12月15日,弹出提示语 44 | layer.msg('今天是马哥的生日,也是layuicms2.0的发布日,快来送上祝福吧!'); 45 | } 46 | } 47 | }); 48 | 49 | //获取省信息 50 | address.provinces(); 51 | 52 | //提交个人资料 53 | form.on("submit(changeUser)",function(data){ 54 | var index = layer.msg('提交中,请稍候',{icon: 16,time:false,shade:0.8}); 55 | //将填写的用户信息存到session以便下次调取 56 | var key,userInfoHtml = ''; 57 | userInfoHtml = { 58 | 'realName' : $(".realName").val(), 59 | 'sex' : data.field.sex, 60 | 'userPhone' : $(".userPhone").val(), 61 | 'userBirthday' : $(".userBirthday").val(), 62 | 'province' : data.field.province, 63 | 'city' : data.field.city, 64 | 'area' : data.field.area, 65 | 'userEmail' : $(".userEmail").val(), 66 | 'myself' : $(".myself").val() 67 | }; 68 | for(key in data.field){ 69 | if(key.indexOf("like") != -1){ 70 | userInfoHtml[key] = "on"; 71 | } 72 | } 73 | window.sessionStorage.setItem("userInfo",JSON.stringify(userInfoHtml)); 74 | setTimeout(function(){ 75 | layer.close(index); 76 | layer.msg("提交成功!"); 77 | },2000); 78 | return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 79 | }) 80 | 81 | //修改密码 82 | form.on("submit(changePwd)",function(data){ 83 | var index = layer.msg('提交中,请稍候',{icon: 16,time:false,shade:0.8}); 84 | setTimeout(function(){ 85 | layer.close(index); 86 | layer.msg("密码修改成功!"); 87 | $(".pwd").val(''); 88 | },2000); 89 | return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 90 | }) 91 | }) -------------------------------------------------------------------------------- /src/main/resources/static/page/user/userList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 用户中心--layui后台管理模板 2.0 6 | 7 | 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 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/resources/test.bat: -------------------------------------------------------------------------------- 1 | python -V -------------------------------------------------------------------------------- /src/test/java/org/andot/jdatax/BaseTest.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax; 2 | 3 | import org.andot.jdatax.JDataXApplication; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 7 | 8 | @RunWith(SpringJUnit4ClassRunner.class) 9 | @SpringBootTest(classes=JDataXApplication.class) 10 | public class BaseTest { 11 | } 12 | -------------------------------------------------------------------------------- /src/test/java/org/andot/jdatax/DBInfoTest.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import javax.annotation.Resource; 7 | 8 | import org.junit.Test; 9 | 10 | import org.andot.jdatax.entity.DBInfo; 11 | import org.andot.jdatax.service.DBInfoService; 12 | import org.andot.jdatax.service.DataTransferService; 13 | import org.andot.jdatax.utils.DataBaseOperation; 14 | import org.andot.jdatax.vo.ResultJson; 15 | 16 | public class DBInfoTest extends BaseTest { 17 | @Resource 18 | private DBInfoService dbInfoService; 19 | @Resource 20 | private DataTransferService dataTransferService; 21 | 22 | @Test 23 | public void addDBInfo() { 24 | DBInfo dbInfo = new DBInfo(); 25 | dbInfo.setDbName("mysql"); 26 | dbInfo.setDbUser("root"); 27 | dbInfo.setDbPwd("iesapp"); 28 | System.err.println(dbInfoService.addDBInfo(dbInfo)); 29 | } 30 | 31 | @Test 32 | public void getData() throws Exception{ 33 | DBInfo dbInfo = new DBInfo(); 34 | dbInfo.setDbName("test"); 35 | dbInfo.setDbUser("bj"); 36 | dbInfo.setDbPwd("Zd666666"); 37 | dbInfo.setDbClass("com.microsoft.sqlserver.jdbc.SQLServerDriver"); 38 | dbInfo.setDbUrl("jdbc:sqlserver://192.168.10.215:1433;DatabaseName=DynamicDatabase;"); 39 | System.err.println(ResultJson.getJsonMsg(new ResultJson(1, DataBaseOperation.getTableData("CITY", "DICAREA", dbInfo), 0, "success"))); 40 | } 41 | 42 | @Test 43 | public void getCount() throws Exception{ 44 | DBInfo dbInfo = new DBInfo(); 45 | dbInfo.setDbName("test"); 46 | dbInfo.setDbUser("bj"); 47 | dbInfo.setDbPwd("Zd666666"); 48 | dbInfo.setDbClass("com.microsoft.sqlserver.jdbc.SQLServerDriver"); 49 | dbInfo.setDbUrl("jdbc:sqlserver://192.168.10.215:1433;DatabaseName=DynamicDatabase;"); 50 | System.err.println(ResultJson.getJsonMsg(new ResultJson(1, DataBaseOperation.getTableColumDetail("MINE_INFO", dbInfo), 0, "success"))); 51 | } 52 | 53 | 54 | @Test 55 | public void dt() throws Exception{ 56 | List dblist = new ArrayList(); 57 | DBInfo dbInfo1 = new DBInfo(); 58 | dbInfo1.setDbName("DynamicDatabase"); 59 | dbInfo1.setDbUser("bj"); 60 | dbInfo1.setDbPwd("Zd666666"); 61 | dbInfo1.setDbClass("com.microsoft.sqlserver.jdbc.SQLServerDriver"); 62 | dbInfo1.setDbUrl("jdbc:sqlserver://192.168.159.129:1433;DatabaseName=DynamicDatabase;"); 63 | dblist.add(dbInfo1); 64 | DBInfo dbInfo2 = new DBInfo(); 65 | dbInfo2.setDbName("mgeids"); 66 | dbInfo2.setDbUser("root"); 67 | dbInfo2.setDbPwd("andot"); 68 | dbInfo2.setDbClass("com.mysql.jdbc.Driver"); 69 | dbInfo2.setDbUrl("jdbc:mysql://127.0.0.1:3306/mgeids?useUnicode=true&characterEncoding=UTF-8"); 70 | dblist.add(dbInfo2); 71 | List tables = new ArrayList(); 72 | tables.add("ROLE"); 73 | tables.add("MINE_SURVEY_INFO"); 74 | System.err.println(ResultJson.getJsonMsg(new ResultJson(1, dataTransferService.dataTransfer(dblist, tables, null), 0, "success"))); 75 | } 76 | 77 | 78 | @Test 79 | public void getIdMaxValue() { 80 | DBInfo dbInfo2 = new DBInfo(); 81 | dbInfo2.setDbName("mgeids"); 82 | dbInfo2.setDbUser("root"); 83 | dbInfo2.setDbPwd("andot"); 84 | dbInfo2.setDbClass("com.mysql.jdbc.Driver"); 85 | dbInfo2.setDbUrl("jdbc:mysql://127.0.0.1:3306/mgeids?useUnicode=true&characterEncoding=UTF-8"); 86 | List list = DataBaseOperation.getTableDataObject("mine_survey_info.MINE_SURVEY_ID", "mine_survey_info", dbInfo2); 87 | System.err.println(list.get(0)); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/test/java/org/andot/jdatax/DataTransferTest.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax; 2 | 3 | import javax.annotation.Resource; 4 | 5 | import org.junit.Test; 6 | 7 | import org.andot.jdatax.service.DataTransferService; 8 | 9 | public class DataTransferTest extends BaseTest { 10 | @Resource 11 | private DataTransferService dataTransferService; 12 | 13 | @Test 14 | public void dataTransfer(){ 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/test/java/org/andot/jdatax/DataXJsonFileTest.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax; 2 | 3 | import java.io.IOException; 4 | 5 | import javax.annotation.Resource; 6 | import javax.servlet.ServletException; 7 | 8 | import org.junit.Test; 9 | 10 | import org.andot.jdatax.entity.DBInfo; 11 | import org.andot.jdatax.service.DataXJsonFileService; 12 | import org.andot.jdatax.utils.JavaShellUtil; 13 | import org.springframework.beans.factory.annotation.Autowired; 14 | 15 | public class DataXJsonFileTest extends BaseTest { 16 | 17 | @Resource 18 | private DataXJsonFileService dataXJsonFileService; 19 | @Autowired 20 | private JavaShellUtil javaShellUtil; 21 | 22 | @Test 23 | public void createDataXJsonFile() { 24 | DBInfo dbInfo = new DBInfo(); 25 | dbInfo.setDbName("DynamicDatabase"); 26 | dbInfo.setDbUser("bj"); 27 | dbInfo.setDbPwd("Zd666666"); 28 | dbInfo.setDbClass("com.microsoft.sqlserver.jdbc.SQLServerDriver"); 29 | dbInfo.setDbUrl("jdbc:sqlserver://192.168.10.215:1433;DatabaseName=DynamicDatabase;"); 30 | try { 31 | dataXJsonFileService.CreateDataXJsonFile(dbInfo, "dataxJsonTemp.json", "datax/job"); 32 | } catch (ServletException e) { 33 | // TODO Auto-generated catch block 34 | e.printStackTrace(); 35 | } catch (IOException e) { 36 | // TODO Auto-generated catch block 37 | e.printStackTrace(); 38 | } 39 | } 40 | 41 | @Test 42 | public void dataxStart() { 43 | dataXJsonFileService.dataxStart("python", "datax/bin/datax", "D:\\Upload\\datax"); 44 | String cmds[] = {"python", "datax/bin/datax", "D:\\Upload\\datax\\SYS_CONFIGDataX.json"}; 45 | try { 46 | JavaShellUtil.exec(cmds); 47 | } catch (IOException e) { 48 | // TODO Auto-generated catch block 49 | e.printStackTrace(); 50 | } 51 | } 52 | 53 | @Test 54 | public void consolePrint() throws IOException { 55 | javaShellUtil.execDi(new String[]{}); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/test/java/org/andot/jdatax/Test.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax; 2 | 3 | import org.andot.jdatax.utils.JavaShellUtil; 4 | 5 | import java.io.IOException; 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | public class Test { 10 | public static void main(String[] args) throws IOException { 11 | // long a1 = System.currentTimeMillis(); 12 | // List list = new ArrayList<>(); 13 | // for (int i=0; i<99999; i++){ 14 | // list.add(i+""); 15 | // } 16 | // long a2 = System.currentTimeMillis(); 17 | // System.err.println("for====>"+(a2-a1)+"ms"); 18 | // 19 | // long b1 = System.currentTimeMillis(); 20 | // List list1 = new ArrayList<>(); 21 | // list.forEach(item->{ 22 | // String a = item; 23 | // }); 24 | // long b2 = System.currentTimeMillis(); 25 | // System.err.println("stream====>"+(b2-b1)+"ms"); 26 | JavaShellUtil javaShellUtil = new JavaShellUtil(); 27 | 28 | javaShellUtil.execDi(new String[]{"ping baidu.com"}); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/test/java/org/andot/jdatax/ZipTest.java: -------------------------------------------------------------------------------- 1 | package org.andot.jdatax; 2 | 3 | import org.junit.Test; 4 | 5 | import org.andot.jdatax.utils.FileToZip; 6 | 7 | public class ZipTest extends BaseTest { 8 | @Test 9 | public void zip(){ 10 | String filePath = "D:\\Upload\\datax"; 11 | FileToZip.fileToZip(filePath , filePath.substring(0, filePath.lastIndexOf("\\")), "datax-json"); 12 | } 13 | } 14 | --------------------------------------------------------------------------------