wuweihao 3 лет назад
Родитель
Сommit
8214644417
27 измененных файлов с 2884 добавлено и 0 удалено
  1. 53 0
      src/main/resources/application.properties
  2. 126 0
      src/main/resources/db/base.sql
  3. 362 0
      src/main/resources/db/dingdingoa_pro.sql
  4. 70 0
      src/main/resources/ehcache.xml
  5. 422 0
      src/main/resources/ehcache.xsd
  6. BIN
      src/main/resources/font/simhei.ttf
  7. 5 0
      src/main/resources/import.sql
  8. 59 0
      src/main/resources/logback.xml
  9. 85 0
      src/main/resources/templates/admin/dataDictionary/form.ftl
  10. 78 0
      src/main/resources/templates/admin/dataDictionary/index.ftl
  11. 28 0
      src/main/resources/templates/admin/index.ftl
  12. 198 0
      src/main/resources/templates/admin/layout/layout.ftl
  13. 40 0
      src/main/resources/templates/admin/layout/macro.ftl
  14. 85 0
      src/main/resources/templates/admin/login.ftl
  15. 132 0
      src/main/resources/templates/admin/resource/form.ftl
  16. 112 0
      src/main/resources/templates/admin/resource/index.ftl
  17. 85 0
      src/main/resources/templates/admin/role/form.ftl
  18. 89 0
      src/main/resources/templates/admin/role/grant.ftl
  19. 99 0
      src/main/resources/templates/admin/role/index.ftl
  20. 124 0
      src/main/resources/templates/admin/user/form.ftl
  21. 71 0
      src/main/resources/templates/admin/user/grant.ftl
  22. 120 0
      src/main/resources/templates/admin/user/index.ftl
  23. 83 0
      src/main/resources/templates/admin/user/updatePwd.ftl
  24. 225 0
      src/main/resources/templates/dingding/examination/index.ftl
  25. 17 0
      src/main/resources/templates/index.ftl
  26. 69 0
      src/main/resources/templates/pdf.ftl
  27. 47 0
      src/main/resources/templates/template.html

+ 53 - 0
src/main/resources/application.properties

@@ -0,0 +1,53 @@
+#springboot_config
+server.port=8077
+
+logging.config=classpath:logback.xml
+
+# jdbc_config
+spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+#spring.datasource.url=jdbc:mysql://127.0.0.1:3306/dingdingoa?characterEncoding=utf8
+#spring.datasource.username=root
+#spring.datasource.password=123456
+
+spring.datasource.url=jdbc:mysql://127.0.0.1:3306/dingdingoa_pro?characterEncoding=utf8
+spring.datasource.username=root
+spring.datasource.password=root
+
+
+# jpa
+spring.jpa.show-sql=true
+spring.jpa.properties.jadira.usertype.autoRegisterUserTypes=true
+spring.jpa.hibernate.ddl-auto=update
+
+# freemarker config
+spring.freemarker.allow-request-override=false
+spring.freemarker.allow-session-override=false
+spring.freemarker.cache=false
+spring.freemarker.charset=UTF-8
+spring.freemarker.check-template-location=true
+spring.freemarker.content-type=text/html
+spring.freemarker.enabled=true
+spring.freemarker.expose-request-attributes=false
+spring.freemarker.expose-session-attributes=false
+spring.freemarker.expose-spring-macro-helpers=true
+spring.freemarker.prefer-file-system-access=true
+spring.freemarker.suffix=.ftl
+spring.freemarker.template-loader-path=classpath:/templates/
+spring.freemarker.settings.template_update_delay=0
+spring.freemarker.settings.default_encoding=UTF-8
+spring.freemarker.settings.classic_compatible=true
+spring.freemarker.settings.date_format=yyyy-MM-dd
+spring.freemarker.settings.time_format=HH:mm:ss
+spring.freemarker.settings.datetime_format=yyyy-MM-dd HH:mm:ss
+
+#windows path
+#web.pdf.file.path=D:/4dseeshow/pdf/
+
+#linux path
+web.pdf.file.path=D:/dingding_oa_file/pdf/
+
+spring.mvc.static-path-pattern=/**
+spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:${web.pdf.file.path}
+
+

Разница между файлами не показана из-за своего большого размера
+ 126 - 0
src/main/resources/db/base.sql


+ 362 - 0
src/main/resources/db/dingdingoa_pro.sql

@@ -0,0 +1,362 @@
+/*
+Navicat MySQL Data Transfer
+
+Source Server         : 111
+Source Server Version : 80012
+Source Host           : 127.0.0.1:3306
+Source Database       : dingdingoa
+
+Target Server Type    : MYSQL
+Target Server Version : 80012
+File Encoding         : 65001
+
+Date: 2022-02-24 09:14:50
+*/
+
+SET FOREIGN_KEY_CHECKS=0;
+
+-- ----------------------------
+-- Table structure for `tb_data_dictionary`
+-- ----------------------------
+DROP TABLE IF EXISTS `tb_data_dictionary`;
+CREATE TABLE `tb_data_dictionary` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `code` varchar(24) DEFAULT NULL,
+  `data_key` varchar(255) NOT NULL,
+  `data_value` varchar(255) DEFAULT NULL,
+  `description` varchar(255) DEFAULT NULL,
+  `param1` varchar(255) DEFAULT NULL,
+  `param2` varchar(255) DEFAULT NULL,
+  `param3` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tb_data_dictionary
+-- ----------------------------
+INSERT INTO `tb_data_dictionary` VALUES ('1', 'dingding_corp_code', 'ding80fe28c19ff5653b35c2f4657eb6378f', 'FpFSX7YpcznEGCwgIBmCUciG9cf3ghpxDXifElPhHdTS4KQZxJOWJWkCDIJ0x1Hn', '钉钉corpid和corpsecret', 'zh', null, null);
+INSERT INTO `tb_data_dictionary` VALUES ('2', 'corp_code', 'zh', '珠海市四维时代网络科技有限公司', '企业名称', null, null, null);
+INSERT INTO `tb_data_dictionary` VALUES ('3', 'company', '1', '珠海市四维时代网络科技有限公司', null, null, null, null);
+INSERT INTO `tb_data_dictionary` VALUES ('4', 'company', '2', '中德(珠海)人工智能研究院有限公司', null, null, null, null);
+INSERT INTO `tb_data_dictionary` VALUES ('5', 'company', '3', '芜湖:中德人工智能研究院有限公司', null, null, null, null);
+INSERT INTO `tb_data_dictionary` VALUES ('6', 'company', '4', '芜湖四维时代智能科技有限公司', null, null, null, null);
+INSERT INTO `tb_data_dictionary` VALUES ('7', 'company', '5', '中德(江门)人工智能研究院有限公司', null, null, null, null);
+INSERT INTO `tb_data_dictionary` VALUES ('8', 'company', '6', '广东四维看看智能设备有限公司', null, null, null, null);
+
+-- ----------------------------
+-- Table structure for `tb_department`
+-- ----------------------------
+DROP TABLE IF EXISTS `tb_department`;
+CREATE TABLE `tb_department` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `dept_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
+  `dept_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
+  `parent_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
+  `rec_status` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
+  `region` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=109 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
+
+-- ----------------------------
+-- Records of tb_department
+-- ----------------------------
+INSERT INTO `tb_department` VALUES ('1', '1', '珠海市四维时代网络科技有限公司', null, 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('2', '53153761', '人力资源部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('3', '65038807', '平面美术部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('4', '65038808', '市场部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('5', '65038809', 'web开发部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('6', '65038810', '图像算法部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('7', '65038811', '行政部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('8', '65038812', '应用程序研发部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('9', '65038813', '三维项目部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('10', '65038814', '硬件部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('11', '65038815', '三维创意部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('12', '65038816', '应用程序项目部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('13', '65038817', '知识产权部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('14', '65120876', '财务部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('15', '65120877', '品牌策划部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('16', '68250008', '对外合作部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('17', '71767501', '项目部', '1', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('18', '101225060', 'UI设计部', '1', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('19', '155689133', '测试部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('20', '339830996', '硬件部团队', '65038814', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('21', '340357226', '产品部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('22', '340368176', '供应链管理部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('23', '393690411', 'A01. 四维看看 app、网页展示、网页编辑及后台算法', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('24', '393546765', 'ZHS999999_1 其他市场项目', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('25', '393614656', 'A02. 四目看看四目相机硬件开发', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('26', '393445930', 'ZHS190205_1 江门市政务服务数据管理局_智慧城市建设', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('27', '393627781', 'ZYS190305_1 五邑大学_学习馆建设', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('28', '393475849', 'A03. 四维看展平台开发', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('29', '393576629', 'A04. 指房宝及类似四维看看周边app的开发', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('30', '393492650', 'JYS191006_1 五邑大学_工业4.0智慧工厂标准化技术开发', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('31', '393550628', 'ZHS200102_1 数字江门网络科技有限公司_智慧城市GIS平台一期建设', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('32', '393460967', 'ZHS200303_1 五邑大学_自动测温设备', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('33', '393715233', 'ZHS2006013_1 江门市人才岛指挥部_三维采集数字化', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('34', '393449933', 'ZHS2007024_1  五邑大学_退役军人馆', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('35', '393487844', 'ZHS191235_1 宁波博物馆固定陈列数字展厅制作', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('36', '393407892', 'ZHS191004_1 上海市历史博物馆_线上展览数字化', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('37', '393495963', 'ZHS191001_1 上海市历史博物馆新馆古建筑整体保护与数据采集', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('38', '393578622', 'ZHS2006020_1 上海原圈网络科技有限公司_四维带看软件功能开发', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('39', '393540603', 'ZHS2006021_1 广州市例外服饰有限公司_大场景建模及导览', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('40', '393736214', 'ZHS2005001_1 成都名人馆_成都全搜索', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('41', '393643517', 'ZHS2006010_1 成都全搜索科技有限责任公司_虚拟展厅及网页制作', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('42', '393511840', 'WYS2006019_1 芜湖圣美孚科技_数字展厅服务', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('43', '393766207', 'ZHS191002_1 中国(海南)南海博物馆_三维建模等', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('44', '393578620', 'WSS2006014_1 南海博物馆_做海_南海渔家文化展', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('45', '393535938', 'ZHS2007038_1  海南省博物馆_文物数字化保护', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('46', '393567568', 'ZHS191110_1 深圳消安科技有限公司_四维看看pro', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('47', '393771126', 'ZHS200403_1 珠海港信_九江展厅硬件采购及安装', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('48', '393588707', 'ZHS200409_1 中共珠海纪律检查委员会_杨鲍安纪念馆(二期)', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('49', '393610574', 'ZHS2005006_1 淇澳端午祈福巡游线上体验_珠海中视瑞达', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('50', '393653430', 'ZHS2005007_1 校园大场景三维数字化_北京师范大学_香港浸会大学联合学院', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('51', '393497885', 'ZHS2006009_1 公益长城', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('52', '393630608', 'ZHS2007023_1  珠海市自然资源局_改革开放历史建筑数字化', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('53', '393731339', 'ZHS2007033_1  珠海市横琴新区综合执法局_律道公园三期项目', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('54', '393540601', 'WSS2006015_1 李鸿章故居陈列馆_大场景三维数字化服务', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('55', '393648411', 'ZHS2006012_1 广东鸿威国际会展有限公司_四维看看pro深度合作', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('56', '393690429', 'ZHS2006011_1 郑州32738部队_数字史馆项目', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('57', '393627782', 'ZHS2006017_1 源度度(上海)数据科技有限公司_餐饮业万物墙', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('58', '393638492', 'WYS191210_1 智慧博物馆建设_义乌市文化和广电旅游体育局', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('59', '393784079', 'ZHS191203_1 南京市高淳区博物馆_三维文物建模', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('60', '393729246', 'ZHS200305_1 鸦片战争博物馆_三维建模', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('61', '393678370', 'WSS2006018_1 义乌市博物馆_海丝绝响_馆藏清代广东十三行外销艺术品特展三维数字化', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('62', '393790073', 'WSS2006016_1 台州市黄岩区博物馆_大场景及文物三维数字化服务', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('63', '393748184', 'ZHS200404_1 深圳市易尚展示股份有限公司_家具展厅三维数字化(二期)', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('64', '393471680', 'ZHS2005002_1 深圳市易尚_公寓样板间模型', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('65', '393463857', 'ZHS2005005_1 深圳市易尚_梵华怡居(北京)家居大场景', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('66', '393795048', 'ZHS200402_1 上海明酷VR全景拍摄和UI设计(一期)', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('67', '393799040', 'ZHS200410_1 上海明酷VR全景拍摄和UI设计(二期)', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('68', '393471678', 'ZHS2005003_1 上海明酷VR全景拍摄和UI设计(三期)', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('69', '393550630', 'ZHS2005008_1 上海明酷VR全景拍摄和UI设计(四期)', '393453991', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('70', '393406971', '珠海四维', '1', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('71', '393407887', 'A23. 四维时代、中德研究院、开发者平台网站维护升级', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('72', '393422994', 'A25. 看房小程序', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('73', '393450945', '市场部', '393786073', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('74', '393453991', '市场项目号', '1', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('75', '393456982', '市场部', '393786074', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('76', '393528774', 'A21. 四维AR的维护升级及迭代', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('77', '393529600', 'A19. 4DMODEL 平台的升级及建设', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('78', '393571727', '人事行政部', '393786073', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('79', '393571754', 'A09. 人像数字化及展示系统研发', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('80', '393594645', 'A14. AR类开发项目', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('81', '393598683', 'A08. 可交互式小物体(文物、商品)展示 (playcanvers)', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('82', '393611491', 'A15. 四维时代展厅维护升级及相关项目', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('83', '393613568', '行政部', '393786074', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('84', '393627780', 'A24. AR Base', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('85', '393635529', 'A11. 工业机器手臂光栅扫描及控制研发', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('86', '393644572', 'A07. 可交互式大场景项目 (类似武侯祠)', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('87', '393660532', 'A28. 四维看看Sketch', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('88', '393665479', 'A10. 人脸数字化及展示系统研发', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('89', '393667413', 'A17. 画风迁移系统项目', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('90', '393675422', 'A12. 博物馆大场景、小物体数字化及app等周边开发项目', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('91', '393681425', '研发项目号', '1', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('92', '393706280', '技术部', '393786073', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('93', '393715232', 'A18. 互动桌面系统开发', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('94', '393727356', 'A27. 一键换装', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('95', '393728218', 'A06. 智慧城市项目', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('96', '393748179', 'A13. 虚拟场景及虚拟博物馆的建设展示项目', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('97', '393755190', 'A22. 四维时刻', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('98', '393761226', 'A26. 看店小程序', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('99', '393770181', 'A20. 三维物体可交互式编辑web平台建设', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('100', '393774086', '项目部', '393786073', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('101', '393786073', '芜湖四维', '1', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('102', '393786074', '厦门四维', '1', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('103', '393788078', 'A16. 万物墙系统项目', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('104', '393811015', 'A05. 四维看看网站、众筹等宣传推广', '393681425', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('105', '423185504', '供应链采购团队', '340368176', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('106', '426036379', '项目策划部', '393406971', 'A', 'zh');
+INSERT INTO `tb_department` VALUES ('107', '473169925', '项目实施部', '393406971', 'A', 'ZH');
+INSERT INTO `tb_department` VALUES ('108', '517576516', '智慧城市事业部', '393406971', 'A', 'ZH');
+
+-- ----------------------------
+-- Table structure for `tb_process`
+-- ----------------------------
+DROP TABLE IF EXISTS `tb_process`;
+CREATE TABLE `tb_process` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `process_code` varchar(255) DEFAULT NULL,
+  `process_name` varchar(255) DEFAULT NULL,
+  `region` varchar(50) DEFAULT NULL,
+  `rec_status` varchar(2) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tb_process
+-- ----------------------------
+INSERT INTO `tb_process` VALUES ('1', 'PROC-A31BACD1-A69C-486A-9784-B2B9562AE69D', '付款申请', 'zh', 'A');
+INSERT INTO `tb_process` VALUES ('2', 'PROC-668226E8-D604-4973-B795-281F91C12B8E', '报销申请', 'zh', 'A');
+INSERT INTO `tb_process` VALUES ('3', 'PROC-FF6YRLE1N2-ZOVLONQNOOFLM28F2Z1Q1-I8U0S74J-B2', '差旅报销', 'zh', 'A');
+INSERT INTO `tb_process` VALUES ('4', 'PROC-WIYJMNZV-33KMTARNMFA100GWIZME3-EMXD535J-M', '支付宝付款', 'zh', 'A');
+INSERT INTO `tb_process` VALUES ('5', 'PROC-22B450C8-7F73-4648-8CC7-2C054772F74B', '个人借支', 'zh', 'A');
+INSERT INTO `tb_process` VALUES ('6', 'PROC-3KYJ33FV-D8IQYR8ZSQP90UKB7P1O1-NCCUCMAJ-G', '资金调拨', 'zh', 'A');
+INSERT INTO `tb_process` VALUES ('7', 'PROC-LV8LHSDV-YUTU511YP19NO0ZWCUO33-211SSOGJ-6', '采购申请', 'zh', 'A');
+INSERT INTO `tb_process` VALUES ('8', 'PROC-0CC0B727-5792-4794-B40D-D5AB40D8DC3A', '请假', 'zh', 'I');
+INSERT INTO `tb_process` VALUES ('9', 'PROC-HFMKHA3W-24QM2K0HT342HS0VEU6M1-SD4SAC5J-01', '请假申请', 'zh', 'I');
+INSERT INTO `tb_process` VALUES ('10', 'PROC-3KYJ23FV-TU4NMJ3ZRN8B5YBIKYSX1-UVFT6W5J-R', '出差申请', 'zh', 'I');
+INSERT INTO `tb_process` VALUES ('11', 'PROC-64CE5980-50BD-4A09-97C7-4A22ED7EB0C3', '通用审批', 'zh', 'I');
+INSERT INTO `tb_process` VALUES ('12', 'PROC-FD2C131D-D38D-4048-8E55-E31E79F5324B', '用印申请', 'zh', 'I');
+INSERT INTO `tb_process` VALUES ('13', 'PROC-TXEKLZ3V-MI1T44UCOCULP311QSAN3-NQEUF6EJ-9', '用车申请', 'zh', 'I');
+INSERT INTO `tb_process` VALUES ('14', 'PROC-EF6YJX2TL2-F4WLDFZZPRRD2F3R3OFX1-SQX8484J-13', '市场立项', 'zh', 'I');
+INSERT INTO `tb_process` VALUES ('15', 'PROC-3KYJ13FV-SBVMCF0HR9DV7HWFN32S1-NIF5BJ5J-R', '市场项目任务书', 'zh', 'I');
+INSERT INTO `tb_process` VALUES ('16', 'PROC-FF6YRLE1N2-84WL2KI6UK6SF7NFMLBR1-0K2X284J-A3', '开票申请', 'zh', 'A');
+INSERT INTO `tb_process` VALUES ('17', 'PROC-A26C0D31-61BF-4DB2-B6FC-C503681A9D2D', '付款申请(供应链采购)', 'zh', 'A');
+
+-- ----------------------------
+-- Table structure for `tb_resource`
+-- ----------------------------
+DROP TABLE IF EXISTS `tb_resource`;
+CREATE TABLE `tb_resource` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `create_time` datetime DEFAULT NULL,
+  `description` varchar(255) DEFAULT NULL,
+  `icon` varchar(255) DEFAULT NULL,
+  `is_hide` int(11) DEFAULT NULL,
+  `level` int(11) DEFAULT NULL,
+  `name` varchar(255) DEFAULT NULL,
+  `sort` int(11) DEFAULT NULL,
+  `source_key` varchar(255) DEFAULT NULL,
+  `source_url` varchar(255) DEFAULT NULL,
+  `type` int(11) DEFAULT NULL,
+  `update_time` datetime DEFAULT NULL,
+  `parent_id` int(11) DEFAULT NULL,
+  PRIMARY KEY (`id`),
+  KEY `FKf5ra2gn0xedeida2op8097sr5` (`parent_id`),
+  CONSTRAINT `FKf5ra2gn0xedeida2op8097sr5` FOREIGN KEY (`parent_id`) REFERENCES `tb_resource` (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tb_resource
+-- ----------------------------
+INSERT INTO `tb_resource` VALUES ('1', '2017-01-10 13:56:51', '用户管理', null, '0', '2', '用户管理', '1', 'system:user:index', '/admin/user/index', '1', '2017-01-10 13:59:01', '0');
+INSERT INTO `tb_resource` VALUES ('2', '2017-01-10 13:56:51', '用户编辑', null, '0', '3', '用户编辑', '1', 'system:user:edit', '/admin/user/edit*', '2', '2017-01-10 16:26:42', '1');
+INSERT INTO `tb_resource` VALUES ('3', '2017-01-11 16:48:48', '用户添加', null, '0', '3', '用户添加', '2', 'system:user:add', '/admin/user/add', '2', '2017-01-11 16:49:26', '1');
+INSERT INTO `tb_resource` VALUES ('4', '2017-01-11 16:48:48', '用户删除', null, '0', '3', '用户删除', '3', 'system:user:deleteBatch', '/admin/user/deleteBatch', '2', '2017-01-18 14:11:41', '1');
+INSERT INTO `tb_resource` VALUES ('5', '2017-01-11 16:48:48', '角色分配', null, '0', '3', '角色分配', '4', 'system:user:grant', '/admin/user/grant/**', '2', '2017-01-18 14:11:51', '1');
+INSERT INTO `tb_resource` VALUES ('6', '2017-01-12 16:45:10', '角色管理', null, '0', '2', '角色管理', '2', 'system:role:index', '/admin/role/index', '1', '2017-01-12 16:46:52', '0');
+INSERT INTO `tb_resource` VALUES ('7', '2017-01-12 16:47:02', '角色编辑', null, '0', '3', '角色编辑', '1', 'system:role:edit', '/admin/role/edit*', '2', '2017-01-18 10:24:06', '1');
+INSERT INTO `tb_resource` VALUES ('8', '2017-01-12 16:47:23', '角色添加', null, '0', '3', '角色添加', '2', 'system:role:add', '/admin/role/add', '2', '2017-01-12 16:49:16', '6');
+INSERT INTO `tb_resource` VALUES ('9', '2017-01-12 16:47:23', '角色删除', null, '0', '3', '角色删除', '3', 'system:role:deleteBatch', '/admin/role/deleteBatch', '2', '2017-01-18 14:12:03', '6');
+INSERT INTO `tb_resource` VALUES ('10', '2017-01-12 16:47:23', '资源分配', null, '0', '3', '资源分配', '4', 'system:role:grant', '/admin/role/grant/**', '2', '2017-01-18 14:12:11', '6');
+INSERT INTO `tb_resource` VALUES ('11', '2017-01-17 11:21:12', '资源管理', null, '0', '2', '资源管理', '3', 'system:resource:index', '/admin/resource/index', '1', '2017-01-17 11:21:42', '0');
+INSERT INTO `tb_resource` VALUES ('12', '2017-01-17 11:21:52', '资源编辑', null, '0', '3', '资源编辑', '1', 'system:resource:edit', '/admin/resource/edit*', '2', '2017-01-17 11:22:36', '11');
+INSERT INTO `tb_resource` VALUES ('13', '2017-01-17 11:21:54', '资源添加', null, '0', '3', '资源添加', '2', 'system:resource:add', '/admin/resource/add', '2', '2017-01-17 11:22:39', '11');
+INSERT INTO `tb_resource` VALUES ('14', '2017-01-17 11:21:54', '资源删除', null, '0', '3', '资源删除', '3', 'system:resource:deleteBatch', '/admin/resource/deleteBatch', '2', '2017-01-18 14:12:31', '11');
+INSERT INTO `tb_resource` VALUES ('15', '2018-05-04 18:04:05', '钉钉管理', null, '0', '1', '钉钉管理', '4', 'dingding', 'javascript:void(0);', '1', '2018-05-04 18:05:33', null);
+INSERT INTO `tb_resource` VALUES ('16', '2018-05-09 11:38:58', '审批', null, '0', '2', '审批', '1', 'dingding:examination:index', '/dingding/examination/index', '1', '2018-05-09 11:39:30', '15');
+INSERT INTO `tb_resource` VALUES ('17', '2018-05-09 11:44:43', '审批查看', null, '0', '3', '审批查看', '1', 'dingding:examination:detail', '/dingding/examination/detail', '2', '2018-05-09 11:46:30', '16');
+INSERT INTO `tb_resource` VALUES ('18', '2018-05-09 11:44:43', '审批下载', null, '0', '3', '审批查看', '2', 'dingding:examination:download', '/dingding/examination/download', '2', '2018-05-09 11:46:30', '16');
+INSERT INTO `tb_resource` VALUES ('19', '2017-01-10 13:56:51', '系统管理', null, '0', '1', '系统管理', '1', 'system', 'javascript:void(0);', '1', '2017-01-10 13:59:01', null);
+
+-- ----------------------------
+-- Table structure for `tb_role`
+-- ----------------------------
+DROP TABLE IF EXISTS `tb_role`;
+CREATE TABLE `tb_role` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `create_time` datetime DEFAULT NULL,
+  `description` varchar(255) DEFAULT NULL,
+  `name` varchar(255) DEFAULT NULL,
+  `role_key` varchar(255) DEFAULT NULL,
+  `status` int(11) DEFAULT NULL,
+  `update_time` datetime DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tb_role
+-- ----------------------------
+INSERT INTO `tb_role` VALUES ('1', '2017-01-09 17:25:30', '超级管理员', 'administrator', 'administrator', '0', '2017-01-09 17:26:25');
+INSERT INTO `tb_role` VALUES ('2', '2018-05-09 11:33:51', '普通管理员', 'manager', 'manager', '0', '2018-05-09 11:33:51');
+
+-- ----------------------------
+-- Table structure for `tb_role_resource`
+-- ----------------------------
+DROP TABLE IF EXISTS `tb_role_resource`;
+CREATE TABLE `tb_role_resource` (
+  `role_id` int(11) NOT NULL,
+  `resource_id` int(11) NOT NULL,
+  PRIMARY KEY (`role_id`,`resource_id`),
+  KEY `FK868kc8iic48ilv5npa80ut6qo` (`resource_id`),
+  CONSTRAINT `FK7ffc7h6obqxflhj1aq1mk20jk` FOREIGN KEY (`role_id`) REFERENCES `tb_role` (`id`),
+  CONSTRAINT `FK868kc8iic48ilv5npa80ut6qo` FOREIGN KEY (`resource_id`) REFERENCES `tb_resource` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tb_role_resource
+-- ----------------------------
+INSERT INTO `tb_role_resource` VALUES ('1', '0');
+INSERT INTO `tb_role_resource` VALUES ('1', '1');
+INSERT INTO `tb_role_resource` VALUES ('1', '2');
+INSERT INTO `tb_role_resource` VALUES ('1', '3');
+INSERT INTO `tb_role_resource` VALUES ('1', '4');
+INSERT INTO `tb_role_resource` VALUES ('1', '5');
+INSERT INTO `tb_role_resource` VALUES ('1', '6');
+INSERT INTO `tb_role_resource` VALUES ('1', '7');
+INSERT INTO `tb_role_resource` VALUES ('1', '8');
+INSERT INTO `tb_role_resource` VALUES ('1', '9');
+INSERT INTO `tb_role_resource` VALUES ('1', '10');
+INSERT INTO `tb_role_resource` VALUES ('1', '11');
+INSERT INTO `tb_role_resource` VALUES ('1', '12');
+INSERT INTO `tb_role_resource` VALUES ('1', '13');
+INSERT INTO `tb_role_resource` VALUES ('1', '14');
+INSERT INTO `tb_role_resource` VALUES ('1', '15');
+INSERT INTO `tb_role_resource` VALUES ('2', '15');
+INSERT INTO `tb_role_resource` VALUES ('2', '16');
+INSERT INTO `tb_role_resource` VALUES ('2', '17');
+INSERT INTO `tb_role_resource` VALUES ('2', '18');
+
+-- ----------------------------
+-- Table structure for `tb_user`
+-- ----------------------------
+DROP TABLE IF EXISTS `tb_user`;
+CREATE TABLE `tb_user` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `address` varchar(255) DEFAULT NULL,
+  `avatar` varchar(255) DEFAULT NULL,
+  `birthday` datetime DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `delete_status` int(11) DEFAULT NULL,
+  `description` varchar(255) DEFAULT NULL,
+  `email` varchar(255) DEFAULT NULL,
+  `locked` int(11) DEFAULT NULL,
+  `nick_name` varchar(255) DEFAULT NULL,
+  `password` varchar(255) DEFAULT NULL,
+  `sex` int(11) DEFAULT NULL,
+  `telephone` varchar(255) DEFAULT NULL,
+  `update_time` datetime DEFAULT NULL,
+  `user_name` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tb_user
+-- ----------------------------
+INSERT INTO `tb_user` VALUES ('1', 'zh', '/assets/img/homepage_logo.png', '2017-01-09 17:26:39', '2017-01-09 17:26:41', '0', '超级管理员', 'whoismy8023@163.com', '0', 'admin', '3931MUEQD1939MQMLM4AISPVNE', '1', '15923930000', '2017-01-09 17:27:11', 'admin');
+INSERT INTO `tb_user` VALUES ('2', 'zh', '/assets/img/homepage_logo.png', '2018-05-09 12:06:11', '2018-05-09 11:32:35', '0', '财务总监', '13115784152@qq.com', '0', '潘韬', '3931MUEQD1939MQMLM4AISPVNE', '1', '13115784152', '2018-05-09 11:32:35', 'pantao');
+INSERT INTO `tb_user` VALUES ('3', 'zh', '/assets/img/homepage_logo.png', null, '2018-05-16 16:04:11', '0', '财务部-林振滨', '14578452044@qq.com', '0', '林振滨', '3I4C0CAVOBSTHLSDHB4RUJODNN', '1', '14578452044', '2018-05-16 16:06:01', 'linzhenbin');
+INSERT INTO `tb_user` VALUES ('4', 'zh', '/assets/img/homepage_logo.png', null, '2018-05-16 16:04:42', '0', '财务部-肖双宇', '14578452044@qq.com', '0', '肖双宇', '3931MUEQD1939MQMLM4AISPVNE', '0', '14578452044', '2018-05-16 16:06:09', 'xiaoshuangyu');
+INSERT INTO `tb_user` VALUES ('5', 'ZH', '/assets/img/homepage_logo.png', null, '2021-02-24 17:25:41', '0', '财务部-葛凡荻', '14578452044@qq.com', '0', '葛凡荻', '3931MUEQD1939MQMLM4AISPVNE', '0', '14578452044', '2021-02-24 18:39:16', 'gefandi');
+
+-- ----------------------------
+-- Table structure for `tb_user_role`
+-- ----------------------------
+DROP TABLE IF EXISTS `tb_user_role`;
+CREATE TABLE `tb_user_role` (
+  `user_id` int(11) NOT NULL,
+  `role_id` int(11) NOT NULL,
+  PRIMARY KEY (`user_id`,`role_id`),
+  KEY `FKea2ootw6b6bb0xt3ptl28bymv` (`role_id`),
+  CONSTRAINT `FK7vn3h53d0tqdimm8cp45gc0kl` FOREIGN KEY (`user_id`) REFERENCES `tb_user` (`id`),
+  CONSTRAINT `FKea2ootw6b6bb0xt3ptl28bymv` FOREIGN KEY (`role_id`) REFERENCES `tb_role` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of tb_user_role
+-- ----------------------------
+INSERT INTO `tb_user_role` VALUES ('1', '1');
+INSERT INTO `tb_user_role` VALUES ('2', '2');
+INSERT INTO `tb_user_role` VALUES ('3', '2');
+INSERT INTO `tb_user_role` VALUES ('4', '2');
+INSERT INTO `tb_user_role` VALUES ('5', '2');

+ 70 - 0
src/main/resources/ehcache.xml

@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:noNamespaceSchemaLocation="ehcache.xsd">
+
+    <diskStore path="java.io.tmpdir"/>
+
+    <!--
+    Mandatory Default Cache configuration. These settings will be applied to caches
+    created programmtically using CacheManager.add(String cacheName)
+    -->
+    <!--
+       name:缓存名称。
+       maxElementsInMemory:缓存最大个数。
+       eternal:对象是否永久有效,一但设置了,timeout将不起作用。
+       timeToIdleSeconds:设置对象在失效前的允许闲置时间(单位:秒)。仅当eternal=false对象不是永久有效时使用,可选属性,默认值是0,也就是可闲置时间无穷大。
+       timeToLiveSeconds:设置对象在失效前允许存活时间(单位:秒)。最大时间介于创建时间和失效时间之间。仅当eternal=false对象不是永久有效时使用,默认是0.,也就是对象存活时间无穷大。
+       overflowToDisk:当内存中对象数量达到maxElementsInMemory时,Ehcache将会对象写到磁盘中。
+       diskSpoolBufferSizeMB:这个参数设置DiskStore(磁盘缓存)的缓存区大小。默认是30MB。每个Cache都应该有自己的一个缓冲区。
+       maxElementsOnDisk:硬盘最大缓存个数。
+       diskPersistent:是否缓存虚拟机重启期数据 Whether the disk store persists between restarts of the Virtual Machine. The default value is false.
+       diskExpiryThreadIntervalSeconds:磁盘失效线程运行时间间隔,默认是120秒。
+       memoryStoreEvictionPolicy:当达到maxElementsInMemory限制时,Ehcache将会根据指定的策略去清理内存。默认策略是LRU(最近最少使用)。你可以设置为FIFO(先进先出)或是LFU(较少使用)。
+       clearOnFlush:内存数量最大时是否清除。
+    -->
+
+    <defaultCache
+            maxElementsInMemory="10000"
+            eternal="false"
+            timeToIdleSeconds="120"
+            timeToLiveSeconds="120"
+            overflowToDisk="true"
+            maxElementsOnDisk="10000000"
+            diskPersistent="true"
+            diskExpiryThreadIntervalSeconds="120"
+            memoryStoreEvictionPolicy="LRU"
+    />
+    <cache name="resourceCache"
+           maxEntriesLocalHeap="10000"
+           maxEntriesLocalDisk="100000"
+           eternal="false"
+           overflowToDisk="true"
+           diskSpoolBufferSizeMB="20"
+           timeToIdleSeconds="300"
+           timeToLiveSeconds="600"
+           memoryStoreEvictionPolicy="LFU"
+           transactionalMode="off"
+            />
+	<!-- access token 1.5h-->
+    <cache name="accessToken"
+           maxEntriesLocalHeap="10000"
+           maxEntriesLocalDisk="100000"
+           eternal="false"
+           overflowToDisk="true"
+           diskSpoolBufferSizeMB="20"
+           timeToIdleSeconds="5400"
+           timeToLiveSeconds="5400"
+           memoryStoreEvictionPolicy="LFU"
+            />
+	<!-- processCode 1.5h-->
+    <cache name="processCodeCache"
+           maxEntriesLocalHeap="10000"
+           maxEntriesLocalDisk="100000"
+           eternal="false"
+           overflowToDisk="true"
+           diskSpoolBufferSizeMB="20"
+           timeToIdleSeconds="5400"
+           timeToLiveSeconds="5400"
+           memoryStoreEvictionPolicy="LFU"
+            />
+</ehcache>

+ 422 - 0
src/main/resources/ehcache.xsd

@@ -0,0 +1,422 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="1.7">
+
+    <xs:element name="ehcache">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element maxOccurs="1" minOccurs="0" ref="diskStore"/>
+                <xs:element maxOccurs="1" minOccurs="0" ref="sizeOfPolicy"/>
+                <xs:element maxOccurs="1" minOccurs="0" ref="transactionManagerLookup"/>
+                <xs:element maxOccurs="1" minOccurs="0" ref="cacheManagerEventListenerFactory"/>
+                <xs:element maxOccurs="1" minOccurs="0" ref="managementRESTService"/>
+                <xs:element maxOccurs="unbounded" minOccurs="0" ref="cacheManagerPeerProviderFactory"/>
+                <xs:element maxOccurs="unbounded" minOccurs="0" ref="cacheManagerPeerListenerFactory"/>
+                <xs:element maxOccurs="1" minOccurs="0" ref="terracottaConfig"/>
+                <xs:element maxOccurs= "1" minOccurs="0" ref="defaultCache"/>
+                <xs:element maxOccurs="unbounded" minOccurs="0" ref="cache"/>
+            </xs:sequence>
+            <xs:attribute name="name" use="optional"/>
+            <xs:attribute default="true" name="updateCheck" type="xs:boolean" use="optional"/>
+            <xs:attribute default="autodetect" name="monitoring" type="monitoringType" use="optional"/>
+            <xs:attribute default="true" name="dynamicConfig" type="xs:boolean" use="optional"/>
+            <xs:attribute default="15" name="defaultTransactionTimeoutInSeconds" type="xs:integer" use="optional"/>
+            <xs:attribute default="0" name="maxBytesLocalHeap" type="memoryUnitOrPercentage" use="optional"/>
+            <xs:attribute default="0" name="maxBytesLocalOffHeap" type="memoryUnit" use="optional"/>
+            <xs:attribute default="0" name="maxBytesLocalDisk" type="memoryUnit" use="optional"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="managementRESTService">
+        <xs:complexType>
+            <xs:attribute name="enabled" type="xs:boolean" use="optional"/>
+            <xs:attribute name="bind" use="optional"/>
+            <xs:attribute name="securityServiceLocation" use="optional"/>
+            <xs:attribute name="securityServiceTimeout" use="optional" type="xs:integer"/>
+            <xs:attribute name="sslEnabled" use="optional" type="xs:boolean"/>
+            <xs:attribute name="needClientAuth" use="optional" type="xs:boolean"/>
+            <xs:attribute name="sampleHistorySize" use="optional" type="xs:integer"/>
+            <xs:attribute name="sampleIntervalSeconds" use="optional" type="xs:integer"/>
+            <xs:attribute name="sampleSearchIntervalSeconds" use="optional" type="xs:integer"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="diskStore">
+        <xs:complexType>
+            <xs:attribute name="path" use="optional"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="transactionManagerLookup">
+        <xs:complexType>
+            <xs:attribute name="class" use="required"/>
+            <xs:attribute name="properties" use="optional"/>
+            <xs:attribute name="propertySeparator" use="optional"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="cacheManagerEventListenerFactory">
+        <xs:complexType>
+            <xs:attribute name="class" use="required"/>
+            <xs:attribute name="properties" use="optional"/>
+            <xs:attribute name="propertySeparator" use="optional"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="cacheManagerPeerProviderFactory">
+        <xs:complexType>
+            <xs:attribute name="class" use="required"/>
+            <xs:attribute name="properties" use="optional"/>
+            <xs:attribute name="propertySeparator" use="optional"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="cacheManagerPeerListenerFactory">
+        <xs:complexType>
+            <xs:attribute name="class" use="required"/>
+            <xs:attribute name="properties" use="optional"/>
+            <xs:attribute name="propertySeparator" use="optional"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="terracottaConfig">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element maxOccurs="1" minOccurs="0" name="tc-config">
+                    <xs:complexType>
+                        <xs:sequence>
+                            <xs:any maxOccurs="unbounded" minOccurs="0" processContents="skip"/>
+                        </xs:sequence>
+                    </xs:complexType>
+                </xs:element>
+            </xs:sequence>
+            <xs:attribute default="localhost:9510" name="url" use="optional"/>
+            <xs:attribute name="rejoin" type="xs:boolean" use="optional" default="false"/>
+            <xs:attribute name="wanEnabledTSA" type="xs:boolean" use="optional" default="false"/>
+        </xs:complexType>
+    </xs:element>
+    <!-- add clone support for addition of cacheExceptionHandler. Important! -->
+    <xs:element name="defaultCache">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" maxOccurs="unbounded" ref="cacheEventListenerFactory"/>
+                <xs:element minOccurs="0" maxOccurs="unbounded" ref="cacheExtensionFactory"/>
+                <xs:element minOccurs="0" maxOccurs="unbounded" ref="cacheLoaderFactory"/>
+                <xs:element minOccurs="0" maxOccurs="unbounded" ref="cacheDecoratorFactory"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="bootstrapCacheLoaderFactory"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="cacheExceptionHandlerFactory"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="pinning"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="terracotta"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="cacheWriter"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="copyStrategy"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="elementValueComparator"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="sizeOfPolicy"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="persistence"/>
+            </xs:sequence>
+            <xs:attribute name="diskExpiryThreadIntervalSeconds" type="xs:integer" use="optional"/>
+            <xs:attribute name="diskSpoolBufferSizeMB" type="xs:integer" use="optional"/>
+            <xs:attribute name="diskPersistent" type="xs:boolean" use="optional"/>
+            <xs:attribute name="diskAccessStripes" type="xs:integer" use="optional" default="1"/>
+            <xs:attribute name="eternal" type="xs:boolean" use="optional" default="false"/>
+            <xs:attribute name="maxElementsInMemory" type="xs:nonNegativeInteger" use="optional"/>
+            <xs:attribute name="maxEntriesLocalHeap" type="xs:nonNegativeInteger" use="optional"/>
+            <xs:attribute name="clearOnFlush" type="xs:boolean" use="optional"/>
+            <xs:attribute name="memoryStoreEvictionPolicy" type="xs:string" use="optional"/>
+            <xs:attribute name="overflowToDisk" type="xs:boolean" use="optional"/>
+            <xs:attribute name="timeToIdleSeconds" type="xs:nonNegativeInteger" use="optional"/>
+            <xs:attribute name="timeToLiveSeconds" type="xs:nonNegativeInteger" use="optional"/>
+            <xs:attribute name="maxElementsOnDisk" type="xs:nonNegativeInteger" use="optional"/>
+            <xs:attribute name="maxEntriesLocalDisk" type="xs:nonNegativeInteger" use="optional"/>
+            <xs:attribute name="transactionalMode" type="transactionalMode" use="optional" default="off"/>
+            <xs:attribute name="statistics" type="xs:boolean" use="optional" default="false"/>
+            <xs:attribute name="copyOnRead" type="xs:boolean" use="optional" default="false"/>
+            <xs:attribute name="copyOnWrite" type="xs:boolean" use="optional" default="false"/>
+            <xs:attribute name="cacheLoaderTimeoutMillis" type="xs:integer" use="optional" default="0"/>
+            <xs:attribute name="overflowToOffHeap" type="xs:boolean" use="optional" default="false"/>
+            <xs:attribute name="maxMemoryOffHeap" type="xs:string" use="optional"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="cache">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" maxOccurs="unbounded" ref="cacheEventListenerFactory"/>
+                <xs:element minOccurs="0" maxOccurs="unbounded" ref="cacheExtensionFactory"/>
+                <xs:element minOccurs="0" maxOccurs="unbounded" ref="cacheLoaderFactory"/>
+                <xs:element minOccurs="0" maxOccurs="unbounded" ref="cacheDecoratorFactory"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="bootstrapCacheLoaderFactory"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="cacheExceptionHandlerFactory"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="pinning"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="terracotta"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="cacheWriter"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="copyStrategy"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="searchable"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="elementValueComparator"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="sizeOfPolicy"/>
+                <xs:element minOccurs="0" maxOccurs="1" ref="persistence"/>
+            </xs:sequence>
+            <xs:attribute name="diskExpiryThreadIntervalSeconds" type="xs:integer" use="optional"/>
+            <xs:attribute name="diskSpoolBufferSizeMB" type="xs:integer" use="optional"/>
+            <xs:attribute name="diskPersistent" type="xs:boolean" use="optional"/>
+            <xs:attribute name="diskAccessStripes" type="xs:integer" use="optional" default="1"/>
+            <xs:attribute name="eternal" type="xs:boolean" use="optional" default="false"/>
+            <xs:attribute name="maxElementsInMemory" type="xs:nonNegativeInteger" use="optional"/>
+            <xs:attribute name="maxEntriesLocalHeap" type="xs:nonNegativeInteger" use="optional"/>
+            <xs:attribute name="memoryStoreEvictionPolicy" type="xs:string" use="optional"/>
+            <xs:attribute name="clearOnFlush" type="xs:boolean" use="optional"/>
+            <xs:attribute name="name" type="xs:string" use="required"/>
+            <xs:attribute name="overflowToDisk" type="xs:boolean" use="optional"/>
+            <xs:attribute name="timeToIdleSeconds" type="xs:nonNegativeInteger" use="optional"/>
+            <xs:attribute name="timeToLiveSeconds" type="xs:nonNegativeInteger" use="optional"/>
+            <xs:attribute name="maxElementsOnDisk" type="xs:nonNegativeInteger" use="optional"/>
+            <xs:attribute name="maxEntriesLocalDisk" type="xs:nonNegativeInteger" use="optional"/>
+            <xs:attribute name="maxEntriesInCache" type="xs:nonNegativeInteger" use="optional"/>
+            <xs:attribute name="transactionalMode" type="transactionalMode" use="optional" default="off" />
+            <xs:attribute name="statistics" type="xs:boolean" use="optional" default="false"/>
+            <xs:attribute name="copyOnRead" type="xs:boolean" use="optional" default="false"/>
+            <xs:attribute name="copyOnWrite" type="xs:boolean" use="optional" default="false"/>
+            <xs:attribute name="logging" type="xs:boolean" use="optional" default="false"/>
+            <xs:attribute name="cacheLoaderTimeoutMillis" type="xs:integer" use="optional" default="0"/>
+            <xs:attribute name="overflowToOffHeap" type="xs:boolean" use="optional" default="false"/>
+            <xs:attribute name="maxMemoryOffHeap" type="xs:string" use="optional"/>
+            <xs:attribute default="0" name="maxBytesLocalHeap" type="memoryUnitOrPercentage" use="optional"/>
+            <xs:attribute default="0" name="maxBytesLocalOffHeap" type="memoryUnitOrPercentage" use="optional"/>
+            <xs:attribute default="0" name="maxBytesLocalDisk" type="memoryUnitOrPercentage" use="optional"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="cacheEventListenerFactory">
+        <xs:complexType>
+            <xs:attribute name="class" use="required"/>
+            <xs:attribute name="properties" use="optional"/>
+            <xs:attribute name="propertySeparator" use="optional"/>
+            <xs:attribute name="listenFor" use="optional" type="notificationScope" default="all"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="bootstrapCacheLoaderFactory">
+        <xs:complexType>
+            <xs:attribute name="class" use="required"/>
+            <xs:attribute name="properties" use="optional"/>
+            <xs:attribute name="propertySeparator" use="optional"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="cacheExtensionFactory">
+        <xs:complexType>
+            <xs:attribute name="class" use="required"/>
+            <xs:attribute name="properties" use="optional"/>
+            <xs:attribute name="propertySeparator" use="optional"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="cacheExceptionHandlerFactory">
+        <xs:complexType>
+            <xs:attribute name="class" use="required"/>
+            <xs:attribute name="properties" use="optional"/>
+            <xs:attribute name="propertySeparator" use="optional"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="cacheLoaderFactory">
+        <xs:complexType>
+            <xs:attribute name="class" use="required"/>
+            <xs:attribute name="properties" use="optional"/>
+            <xs:attribute name="propertySeparator" use="optional"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="cacheDecoratorFactory">
+        <xs:complexType>
+            <xs:attribute name="class" use="required"/>
+            <xs:attribute name="properties" use="optional"/>
+            <xs:attribute name="propertySeparator" use="optional"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="searchAttribute">
+        <xs:complexType>
+        	<xs:attribute name="name" use="required" type="xs:string" />
+        	<xs:attribute name="expression" type="xs:string" />
+        	<xs:attribute name="class" type="xs:string" />
+        	<xs:attribute name="type" type="xs:string" use="optional"/>
+        	<xs:attribute name="properties" use="optional" />
+        	<xs:attribute name="propertySeparator" use="optional" />
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="searchable">
+      <xs:complexType>
+        <xs:sequence>
+          <xs:element minOccurs="0" maxOccurs="unbounded" ref="searchAttribute"/>
+        </xs:sequence>
+        <xs:attribute name="keys" use="optional" type="xs:boolean" default="true"/>
+        <xs:attribute name="values" use="optional" type="xs:boolean" default="true"/>
+        <xs:attribute name="allowDynamicIndexing" use="optional" type="xs:boolean" default="false"/>
+      </xs:complexType>
+    </xs:element>
+
+    <xs:element name="pinning">
+        <xs:complexType>
+            <xs:attribute name="store" use="required" type="pinningStoreType"/>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="terracotta">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" maxOccurs="1" ref="nonstop"/>
+            </xs:sequence>
+            <xs:attribute name="clustered" use="optional" type="xs:boolean" default="true"/>
+            <xs:attribute name="coherentReads" use="optional" type="xs:boolean" default="true"/>
+            <xs:attribute name="localKeyCache" use="optional" type="xs:boolean" default="false"/>
+            <xs:attribute name="localKeyCacheSize" use="optional" type="xs:positiveInteger" default="300000"/>
+            <xs:attribute name="orphanEviction" use="optional" type="xs:boolean" default="true"/>
+            <xs:attribute name="orphanEvictionPeriod" use="optional" type="xs:positiveInteger" default="4"/>
+            <xs:attribute name="copyOnRead" use="optional" type="xs:boolean" default="false"/>
+            <xs:attribute name="coherent" use="optional" type="xs:boolean" default="false"/>
+            <xs:attribute name="consistency" use="optional" type="consistencyType" default="eventual"/>
+            <xs:attribute name="synchronousWrites" use="optional" type="xs:boolean" default="false"/>
+            <xs:attribute name="concurrency" use="optional" type="xs:nonNegativeInteger" default="0"/>
+            <xs:attribute name="localCacheEnabled" use="optional" type="xs:boolean" default="true"/>
+            <xs:attribute name="compressionEnabled" use="optional" type="xs:boolean" default="false"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:simpleType name="consistencyType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="strong" />
+            <xs:enumeration value="eventual" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:element name="nonstop">
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element minOccurs="0" maxOccurs="1" ref="timeoutBehavior"/>
+            </xs:sequence>
+            <xs:attribute name="enabled" use="optional" type="xs:boolean" default="true"/>
+            <xs:attribute name="immediateTimeout" use="optional" type="xs:boolean" default="false"/>
+            <xs:attribute name="timeoutMillis" use="optional" type="xs:positiveInteger" default="30000"/>
+            <xs:attribute name="searchTimeoutMillis" use="optional" type="xs:positiveInteger" default="30000"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="timeoutBehavior">
+        <xs:complexType>
+            <xs:attribute name="type" use="optional" type="timeoutBehaviorType" default="exception"/>
+            <xs:attribute name="properties" use="optional" default=""/>
+            <xs:attribute name="propertySeparator" use="optional" default=","/>
+        </xs:complexType>
+    </xs:element>
+    <xs:simpleType name="timeoutBehaviorType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="noop" />
+            <xs:enumeration value="exception" />
+            <xs:enumeration value="localReads" />
+            <xs:enumeration value="localReadsAndExceptionOnWrite" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="monitoringType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="autodetect"/>
+            <xs:enumeration value="on"/>
+            <xs:enumeration value="off"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="pinningStoreType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="localMemory" />
+            <xs:enumeration value="inCache" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="terracottaCacheValueType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="serialization" />
+            <xs:enumeration value="identity" />
+        </xs:restriction>
+    </xs:simpleType>
+
+    <xs:simpleType name="transactionalMode">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="off"/>
+            <xs:enumeration value="xa_strict"/>
+            <xs:enumeration value="xa"/>
+            <xs:enumeration value="local"/>
+        </xs:restriction>
+    </xs:simpleType>
+
+    <xs:element name="cacheWriter">
+        <xs:complexType>
+            <xs:sequence >
+                <xs:element minOccurs="0" maxOccurs="1" ref="cacheWriterFactory"/>
+            </xs:sequence>
+            <xs:attribute name="writeMode" use="optional" type="writeModeType" default="write-through"/>
+            <xs:attribute name="notifyListenersOnException" use="optional" type="xs:boolean" default="false"/>
+            <xs:attribute name="minWriteDelay" use="optional" type="xs:nonNegativeInteger" default="1"/>
+            <xs:attribute name="maxWriteDelay" use="optional" type="xs:nonNegativeInteger" default="1"/>
+            <xs:attribute name="rateLimitPerSecond" use="optional" type="xs:nonNegativeInteger" default="0"/>
+            <xs:attribute name="writeCoalescing" use="optional" type="xs:boolean" default="false"/>
+            <xs:attribute name="writeBatching" use="optional" type="xs:boolean" default="false"/>
+            <xs:attribute name="writeBatchSize" use="optional" type="xs:positiveInteger" default="1"/>
+            <xs:attribute name="retryAttempts" use="optional" type="xs:nonNegativeInteger" default="0"/>
+            <xs:attribute name="retryAttemptDelaySeconds" use="optional" type="xs:nonNegativeInteger" default="1"/>
+            <xs:attribute name="writeBehindConcurrency" use="optional" type="xs:nonNegativeInteger" default="1"/>
+            <xs:attribute name="writeBehindMaxQueueSize" use="optional" type="xs:nonNegativeInteger" default="0"/>
+        </xs:complexType>
+    </xs:element>
+    <xs:simpleType name="writeModeType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="write-through" />
+            <xs:enumeration value="write-behind" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:element name="cacheWriterFactory">
+        <xs:complexType>
+            <xs:attribute name="class" use="required"/>
+            <xs:attribute name="properties" use="optional"/>
+            <xs:attribute name="propertySeparator" use="optional"/>
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="copyStrategy">
+        <xs:complexType>
+            <xs:attribute name="class" use="required" type="xs:string" />
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="elementValueComparator">
+        <xs:complexType>
+            <xs:attribute name="class" use="required" type="xs:string" />
+        </xs:complexType>
+    </xs:element>
+
+    <xs:element name="sizeOfPolicy">
+        <xs:complexType>
+            <xs:attribute name="maxDepth" use="required" type="xs:integer" />
+            <xs:attribute name="maxDepthExceededBehavior" use="optional" default="continue" type="maxDepthExceededBehavior" />
+        </xs:complexType>
+    </xs:element>
+
+	<xs:element name="persistence">
+	    <xs:complexType>
+            <xs:attribute name="strategy" use="required" type="persistenceStrategy"/>
+            <xs:attribute name="synchronousWrites" use="optional" default="false" type="xs:boolean"/>
+	    </xs:complexType>
+	</xs:element>
+	
+	<xs:simpleType name="persistenceStrategy">
+	    <xs:restriction base="xs:string">
+	        <xs:enumeration value="localTempSwap"/>
+	        <xs:enumeration value="localRestartable"/>
+	        <xs:enumeration value="none"/>
+	        <xs:enumeration value="distributed"/>
+	    </xs:restriction>
+	</xs:simpleType>
+	
+    <xs:simpleType name="maxDepthExceededBehavior">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="continue"/>
+            <xs:enumeration value="abort"/>
+        </xs:restriction>
+    </xs:simpleType>
+
+    <xs:simpleType name="notificationScope">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="local"/>
+            <xs:enumeration value="remote"/>
+            <xs:enumeration value="all"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="memoryUnit">
+        <xs:restriction base="xs:token">
+            <xs:pattern value="[0-9]+[bBkKmMgG]?"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="memoryUnitOrPercentage">
+        <xs:restriction base="xs:token">
+            <xs:pattern value="([0-9]+[bBkKmMgG]?|100%|[0-9]{1,2}%)"/>
+        </xs:restriction>
+    </xs:simpleType>
+</xs:schema>

BIN
src/main/resources/font/simhei.ttf


Разница между файлами не показана из-за своего большого размера
+ 5 - 0
src/main/resources/import.sql


+ 59 - 0
src/main/resources/logback.xml

@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+	<!--======================================= 本地变量 ======================================== -->
+	<!--在没有定义${LOG_HOME}系统变量的时候,可以设置此本地变量。提交测试、上线时,要将其注释掉,使用系统变量。 -->
+	<!-- <property name="LOG_HOME" value="D:/data/logs" /> -->
+
+	<!-- 应用名称:和统一配置中的项目代码保持一致(小写) -->
+	<property name="APP_NAME" value="base" />
+	<!--日志文件保留天数 -->
+	<property name="LOG_MAX_HISTORY" value="30" />
+	<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径 -->
+	<!--应用日志文件保存路径 -->
+	<property name="LOG_APP_HOME" value="${APP_NAME}/app" />
+
+	<!--=========================== 按照每天生成日志文件:默认配置=================================== -->
+	<!-- 控制台输出 -->
+	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+		<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+			<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 -->
+			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
+		</encoder>
+	</appender>
+	<!-- 按照每天生成日志文件:主项目日志 -->
+	<appender name="APP"
+		class="ch.qos.logback.core.rolling.RollingFileAppender">
+		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+			<!--日志文件输出的文件名 -->
+			<FileNamePattern>${LOG_APP_HOME}/base.%d{yyyy-MM-dd}.log
+			</FileNamePattern>
+			<!--日志文件保留天数 -->
+			<MaxHistory>${LOG_MAX_HISTORY}</MaxHistory>
+		</rollingPolicy>
+		<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+			<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 -->
+			<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{500} - %msg%n</pattern>
+		</encoder>
+	</appender>
+	<!--=============================== 日志输出: 默认主业务日志 ====================================== -->
+	<logger name="org.springframework">
+		<level value="WARN" />
+	</logger>
+	<logger name="org.apache.shiro">
+		<level value="WARN" />
+	</logger>
+	<logger name="freemarker">
+		<level value="WARN" />
+	</logger>
+	<logger name="org.hibernate">
+		<level value="WARN" />
+	</logger>
+	<logger name="org.hibernate.SQL">
+		<level value="DEBUG" />
+	</logger>
+	
+	<root level="DEBUG">
+		<appender-ref ref="APP" />
+		<appender-ref ref="STDOUT" />
+	</root>
+</configuration>

+ 85 - 0
src/main/resources/templates/admin/dataDictionary/form.ftl

@@ -0,0 +1,85 @@
+<#include "/admin/layout/layout.ftl">
+<#import "/admin/layout/macro.ftl" as macro>
+<#assign css>
+
+</#assign>
+<#assign js>
+<script>
+    $(".btn-submit").click(function () {
+        $.ajax({
+            type: "POST",
+            url: "${ctx!}/admin/dataDictionary/edit",
+            data: $(".form-edit").serialize(),
+            dataType: "JSON",
+            success: function(res){
+                layer.msg(res.message, {time: 2000
+                }, function(){
+                    location.reload();
+                });
+            }
+        });
+    });
+</script>
+</#assign>
+<@layout title="数据字典编辑" active="dataDictionary">
+<!-- Content Header (Page header) -->
+<section class="content-header">
+    <h1>
+        数据字典编辑
+        <small>编辑数据字典详细信息</small>
+    </h1>
+    <ol class="breadcrumb">
+        <li><a href="#"><i class="fa fa-cog"></i> 系统</a></li>
+        <li><a href="#"><i class="fa fa-list-ul"></i> 数据字典管理</a></li>
+        <li class="active"><i class="fa fa-table"></i> 数据字典列表</li>
+    </ol>
+</section>
+<!-- Main content -->
+<section class="content">
+    <div class="row">
+        <div class="col-md-10">
+            <!-- Default box -->
+            <div class="box  box-primary">
+                <form class="form-horizontal form-edit" method="post" action="${ctx!}/admin/dataDictionary/edit">
+                    <div class="box-body">
+                    	<#if (dataDictionary.id)??>
+                        <input type="hidden" id="id" name="id" value="${dataDictionary.id?c}">
+                        </#if>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">数据类型代码:</label>
+                            <div class="col-sm-8">
+                                <input id="code" name="code" class="form-control" type="text" value="${dataDictionary.code}" />
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">数据键:</label>
+                            <div class="col-sm-8">
+                                <input id="dataKey" name="dataKey" class="form-control" type="text" value="${dataDictionary.dataKey}" />
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">数据值:</label>
+                            <div class="col-sm-8">
+                                <input id="dataValue" name="dataValue" class="form-control" type="text" value="${dataDictionary.dataValue}" />
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">描述:</label>
+                            <div class="col-sm-8">
+                                <input id="description" name="description" class="form-control" type="text" value="${dataDictionary.description}" />
+                            </div>
+                        </div>
+                    </div>
+                    <div class="box-footer">
+                        <button type="button" class="btn btn-default btn-back">返回</button>
+                        <button type="button" class="btn btn-info pull-right btn-submit">提交</button>
+                    </div>
+                </form>
+            </div>
+            <!-- /.box -->
+        </div>
+    </div>
+</section>
+<!-- /.content -->
+</@layout>
+

+ 78 - 0
src/main/resources/templates/admin/dataDictionary/index.ftl

@@ -0,0 +1,78 @@
+<#include "/admin/layout/layout.ftl">
+<#import "/admin/layout/macro.ftl" as macro>
+<#assign css>
+<style>
+</style>
+</#assign>
+<#assign js>
+<script>
+    function del(id) {
+        layer.confirm('确定删除吗?', {icon: 3, title: '提示'}, function (index) {
+            $.ajax({
+                type: "POST",
+                dataType: "json",
+                url: "${ctx!}/admin/dataDictionary/delete/" + id,
+                success: function (res) {
+                    layer.msg(res.message, {time: 2000}, function () {
+                    	location.reload();
+                    });
+                }
+            });
+        });
+    }
+</script>
+</#assign>
+<@layout title="数据字典管理" active="dataDictionary">
+<!-- Content Header (Page header) -->
+<section class="content-header">
+    <h1>
+        数据字典列表
+        <small>一切从这里开始</small>
+    </h1>
+    <ol class="breadcrumb">
+        <li><a href="#"><i class="fa fa-cog"></i> 系统</a></li>
+        <li><a href="#"><i class="fa fa-list-ul"></i> 数据字典管理</a></li>
+        <li class="active"><i class="fa fa-table"></i> 数据字典列表</li>
+    </ol>
+</section>
+
+<!-- Main content -->
+<section class="content">
+    <!-- Default box -->
+    <div class="box box-primary">
+        <div class="box-header">
+            <a class="btn btn-sm btn-success" href="${ctx!}/admin/dataDictionary/add">新增</a>
+        </div>
+        <div class="box-body">
+            <table class="table table-striped">
+                <tr>
+                    <th>ID</th>
+                    <th>数据类型代码</th>
+                    <th>数据键</th>
+                    <th>数据值</th>
+                    <th>操作</th>
+                </tr>
+                <#list pageInfo.content as dataDictionaryInfo>
+                <tr>
+                    <td>${dataDictionaryInfo.id}</td>
+                    <td>${dataDictionaryInfo.code}</td>
+                    <td>${dataDictionaryInfo.dataKey}</td>
+                    <td>${dataDictionaryInfo.dataValue}</td>
+                    <td>
+                        <a class="btn btn-sm btn-primary" href="${ctx!}/admin/dataDictionary/edit/${dataDictionaryInfo.id?c}">编辑</a>
+                        <button class="btn btn-sm btn-danger" onclick="del(${dataDictionaryInfo.id?c})">删除</button>
+                    </td>
+                </tr>
+                </#list>
+            </table>
+        </div>
+        <!-- /.box-body -->
+        <div class="box-footer clearfix">
+            <@macro.page pageInfo=pageInfo url="${ctx!}/admin/dataDictionary/index?" />
+        </div>
+    </div>
+    <!-- /.box -->
+</section>
+
+<!-- /.content -->
+</@layout>

+ 28 - 0
src/main/resources/templates/admin/index.ftl

@@ -0,0 +1,28 @@
+<#include "/admin/layout/layout.ftl">
+<@layout title="主页" active="home">
+<!-- Content Header (Page header) -->
+<section class="content-header">
+    <h1>
+        首页
+        <small>一切从这里开始</small>
+    </h1>
+    <ol class="breadcrumb">
+        <li><a href="#"><i class="fa fa-cog"></i> 系统</a></li>
+        <li class="active"><i class="fa fa-home"></i> 首页</li>
+    </ol>
+</section>
+
+<!-- Main content -->
+<section class="content">
+    <!-- Default box -->
+    <div class="box box-primary">
+        <div class="box-body">
+            欢迎使用
+        </div>
+        <!-- /.box-body -->
+    </div>
+    <!-- /.box -->
+
+</section>
+<!-- /.content -->
+</@layout>

+ 198 - 0
src/main/resources/templates/admin/layout/layout.ftl

@@ -0,0 +1,198 @@
+<#macro layout title="" active="">
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="utf-8">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <title>钉钉OA管理系统 - ${title!}</title>
+  <!-- Tell the browser to be responsive to screen width -->
+  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
+    <!-- Tell the browser to be responsive to screen width -->
+    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
+    <!-- Bootstrap 3.3.7 -->
+    <link rel="stylesheet" href="/assets/plugins/bootstarp/css/bootstrap.css">
+    <!-- Font Awesome -->
+    <link rel="stylesheet" href="/assets/plugins/font-awesome/css/font-awesome.css">
+    <!-- Ionicons -->
+    <link rel="stylesheet" href="/assets/plugins/Ionicons/css/ionicons.css">
+    <!-- Theme style -->
+    <link rel="stylesheet" href="/assets/css/AdminLTE.css">
+    <!-- AdminLTE Skins. Choose a skin from the css/skins
+       folder instead of downloading all of them to reduce the load. -->
+    <link rel="stylesheet" href="/assets/css/_all-skins.css">
+    <!-- layer -->
+    <link rel="stylesheet" href="/assets/plugins/layer/theme/default/layer.css">
+    <link rel="stylesheet" href="/assets/plugins/layui-v2.2.5/css/layui.css">
+    
+    <link rel="shortcut icon" href="/assets/img/favicon.ico" type="image/x-icon">
+    ${css!}
+
+  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
+  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
+  <!--[if lt IE 9]>
+  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+  <![endif]-->
+
+  <!-- Google Font -->
+  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
+</head>
+<body class="hold-transition skin-blue sidebar-mini">
+<!-- Site wrapper -->
+<div class="wrapper">
+
+  <header class="main-header">
+    <!-- Logo -->
+    <a href="../../index2.html" class="logo">
+      <!-- mini logo for sidebar mini 50x50 pixels -->
+      <span class="logo-mini"><b>A</b>dmin</span>
+      <!-- logo for regular state and mobile devices -->
+      <span class="logo-lg"><b>DingDingOA</b></span>
+    </a>
+    <!-- Header Navbar: style can be found in header.less -->
+    <nav class="navbar navbar-static-top">
+      <!-- Sidebar toggle button-->
+      <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
+        <span class="sr-only">Toggle navigation</span>
+        <span class="icon-bar"></span>
+        <span class="icon-bar"></span>
+        <span class="icon-bar"></span>
+      </a>
+
+      <div class="navbar-custom-menu">
+          <ul class="nav navbar-nav">
+
+              <!-- User Account: style can be found in dropdown.less -->
+              <li class="dropdown user user-menu">
+                  <a href="#" class="dropdown-toggle" data-toggle="dropdown">
+                      <img src="<@shiro.principal property="avatar"/>" class="user-image" alt="User Image">
+                      <span class="hidden-xs"><@shiro.principal property="nickName"/></span>
+                  </a>
+                  <ul class="dropdown-menu">
+                      <!-- User image -->
+                      <li class="user-header">
+                          <img src="<@shiro.principal property="avatar"/>" class="img-circle" alt="User Image">
+
+                          <p>
+                              <@shiro.principal property="description"/>
+                              <small><@shiro.principal property="createTime"/></small>
+                          </p>
+                      </li>
+                      <!-- Menu Footer-->
+                      <li class="user-footer">
+                          <div class="pull-left">
+                              <a href="${ctx!}/admin/user/updatePwd" class="btn btn-default btn-flat">Change pass</a>
+                          </div>
+                          <div class="pull-right">
+                              <a href="${ctx!}/admin/logout" class="btn btn-default btn-flat">Sign out</a>
+                          </div>
+                      </li>
+                  </ul>
+              </li>
+          </ul>
+      </div>
+    </nav>
+  </header>
+
+  <!-- =============================================== -->
+
+  <!-- Left side column. contains the sidebar -->
+  <aside class="main-sidebar">
+    <!-- sidebar: style can be found in sidebar.less -->
+    <section class="sidebar">
+      <!-- Sidebar user panel -->
+      <div class="user-panel">
+        <div class="pull-left image">
+          <img src="<@shiro.principal property="avatar"/>" class="img-circle" alt="User Image">
+        </div>
+        <div class="pull-left info">
+          <p><@shiro.principal property="nickName"/></p>
+          <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
+        </div>
+      </div>
+
+      <!-- sidebar menu: : style can be found in sidebar.less -->
+      <ul class="sidebar-menu" data-widget="tree">
+        <li <#if active = "home">class="active" </#if>><a href="${ctx!}/admin/index"><i class="fa fa-home"></i> <span>主页</span></a></li>
+        <li class="treeview <#if active=="user" || active=="role" || active=="resource" >active</#if>">
+          <a href="#">
+            <i class="fa fa-cog"></i> <span>系统管理</span>
+            <span class="pull-right-container">
+              <i class="fa fa-angle-left pull-right"></i>
+            </span>
+          </a>
+          <ul class="treeview-menu">
+            <@shiro.hasPermission name="system:user:index">
+                <li <#if active=="user">class="active"</#if>><a href="${ctx!}/admin/user/index"><i class="fa fa-user-o"></i> 用户管理</a></li>
+            </@shiro.hasPermission>
+            <@shiro.hasPermission name="system:role:index">
+                <li <#if active=="role">class="active"</#if>><a href="${ctx!}/admin/role/index"><i class="fa fa-user-circle-o"></i> 角色管理</a></li>
+            </@shiro.hasPermission>
+            <@shiro.hasPermission name="system:resource:index">
+                <li <#if active=="resource">class="active"</#if>><a href="${ctx!}/admin/resource/index"><i class="fa fa-file-o"></i> 资源管理</a></li>
+            </@shiro.hasPermission>
+          </ul>
+        </li>
+
+		<li class="treeview <#if active=="examination">active</#if>">
+          <a href="#">
+            <i class="fa fa-cog"></i> <span>钉钉管理</span>
+            <span class="pull-right-container">
+              <i class="fa fa-angle-left pull-right"></i>
+            </span>
+          </a>
+          <ul class="treeview-menu">
+            <@shiro.hasPermission name="dingding:examination:index">
+                <li <#if active=="examination">class="active"</#if>><a href="${ctx!}/dingding/examination/index"><i class="fa fa-print"></i> 审批</a></li>
+            </@shiro.hasPermission>
+          </ul>
+        </li>
+
+      </ul>
+    </section>
+    <!-- /.sidebar -->
+  </aside>
+
+  <!-- =============================================== -->
+
+  <!-- Content Wrapper. Contains page content -->
+  <div class="content-wrapper">
+      <#nested >
+  </div>
+  <!-- /.content-wrapper -->
+
+  <footer class="main-footer">
+    <div class="pull-right hidden-xs">
+      <b>Version</b> 1.0.0
+    </div>
+    <strong>Copyright &copy; 2018.</strong> All rights
+    reserved.
+  </footer>
+</div>
+<!-- ./wrapper -->
+
+<!-- jQuery 3 -->
+<script src="/assets/plugins/jquery/jquery.min.js"></script>
+<!-- Bootstrap 3.3.7 -->
+<script src="/assets/plugins/bootstarp/js/bootstrap.js"></script>
+<!-- SlimScroll -->
+<script src="/assets/plugins/jquery-slimscroll/jquery.slimscroll.js"></script>
+<!-- FastClick -->
+<script src="/assets/plugins/fastclick/fastclick.js"></script>
+<!-- AdminLTE App -->
+<script src="/assets/js/adminlte.js"></script>
+<!-- layer -->
+<script src="/assets/plugins/layer/layer.js"></script>
+<script src="/assets/plugins/layui-v2.2.5/layui.js"></script>
+<script>
+    $(document).ready(function () {
+        $('.sidebar-menu').tree();
+        $(".btn-back").click(function () {
+            window.history.back();
+        });
+    })
+</script>
+${js!}
+</body>
+</html>
+</#macro>

+ 40 - 0
src/main/resources/templates/admin/layout/macro.ftl

@@ -0,0 +1,40 @@
+<#macro page pageInfo url>
+    <#local pageNo = pageInfo.number + 1>
+    <#local totalPage = pageInfo.totalPages>
+    <#local showPages = 6>
+    <ul class="pagination pagination-sm no-margin pull-right">
+        <#if pageNo!=1 && totalPage gt 1>
+            <li><a href="${url!}&pageNumber=1">首页</a></li>
+            <li><a href="${url!}&pageNumber=${pageNo - 1}">上一页</a></li>
+        </#if>
+        <#if pageNo-showPages/2 gt 0>
+            <#assign start = pageNo-(showPages-1)/2/>
+            <#if showPages gt totalPage>
+                <#assign start = 1/>
+            </#if>
+        <#else>
+            <#assign start = 1/>
+        </#if>
+        <#if totalPage gt showPages>
+            <#assign end = (start+showPages-1)/>
+            <#if end gt totalPage>
+                <#assign start = totalPage-showPages+1/>
+                <#assign end = totalPage/>
+            </#if>
+        <#else>
+            <#assign end = totalPage/>
+        </#if>
+        <#assign pages=start..end/>
+        <#list pages as page>
+            <#if page==pageNo>
+                <li class="active"><a href="${url!}&pageNumber=${page}">${page}</a></li>
+            <#else>
+                <li><a href="${url!}&pageNumber=${page}">${page}</a></li>
+            </#if>
+        </#list>
+        <#if pageNo!=totalPage && pageNo lt totalPage>
+            <li><a href="${url!}&pageNumber=${pageNo + 1}">下一页</a></li>
+            <li><a href="${url!}&pageNumber=${totalPage}">尾页</a></li>
+        </#if>
+    </ul>
+</#macro>

+ 85 - 0
src/main/resources/templates/admin/login.ftl

@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>钉钉OA管理系统 | Log in</title>
+    <!-- Tell the browser to be responsive to screen width -->
+    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
+    <!-- Bootstrap 3.3.7 -->
+    <link rel="stylesheet" href="/assets/plugins/bootstarp/css/bootstrap.css">
+    <!-- Font Awesome -->
+    <link rel="stylesheet" href="/assets/plugins/font-awesome/css/font-awesome.css">
+    <!-- Ionicons -->
+    <link rel="stylesheet" href="/assets/plugins/Ionicons/css/ionicons.css">
+    <!-- Theme style -->
+    <link rel="stylesheet" href="/assets/css/AdminLTE.css">
+    <!-- iCheck -->
+    <link rel="stylesheet" href="/assets/plugins/iCheck/square/blue.css">
+    
+    <link rel="shortcut icon" href="/assets/img/favicon.ico" type="image/x-icon">
+
+    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
+    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
+    <!--[if lt IE 9]>
+    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
+    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+    <![endif]-->
+
+    <!-- Google Font -->
+    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
+</head>
+<body class="hold-transition login-page">
+<div class="login-box" id="app">
+    <div class="login-logo">
+        <a href="../../index2.html"><b>钉钉OA管理系统</b></a>
+    </div>
+    <!-- /.login-logo -->
+    <div class="login-box-body">
+        <#--<p class="login-box-msg"></p>-->
+        <#if message??>
+        <div class="alert alert-danger alert-dismissible">
+            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
+            <h4><i class="icon fa fa-ban"></i> Error!</h4>
+            ${message}
+        </div>
+        </#if>
+        <form id="form-login" action="${ctx!}/admin/login" method="post">
+            <div class="form-group has-feedback">
+                <input type="username" name="username" class="form-control" placeholder="username">
+                <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
+            </div>
+            <div class="form-group has-feedback">
+                <input type="password" name="password" class="form-control" placeholder="password">
+                <span class="glyphicon glyphicon-lock form-control-feedback"></span>
+            </div>
+            <div class="row">
+                <!-- /.col -->
+                <div class="col-xs-4 col-xs-offset-8">
+                    <button type="submit" class="btn btn-primary btn-block btn-flat btn-sign">Sign In</button>
+                </div>
+                <!-- /.col -->
+            </div>
+        </form>
+    </div>
+    <!-- /.login-box-body -->
+</div>
+<!-- /.login-box -->
+
+<!-- jQuery 3 -->
+<script src="/assets/plugins/jquery/jquery.min.js"></script>
+<!-- Bootstrap 3.3.7 -->
+<script src="/assets/plugins/bootstarp/js/bootstrap.js"></script>
+<!-- iCheck -->
+<script src="/assets/plugins/iCheck/icheck.js"></script>
+<script>
+    $(function () {
+        $('input').iCheck({
+            checkboxClass: 'icheckbox_square-blue',
+            radioClass: 'iradio_square-blue',
+            increaseArea: '20%' // optional
+        });
+    });
+</script>
+</body>
+</html>

+ 132 - 0
src/main/resources/templates/admin/resource/form.ftl

@@ -0,0 +1,132 @@
+<#include "/admin/layout/layout.ftl">
+<#import "/admin/layout/macro.ftl" as macro>
+<#assign css>
+
+</#assign>
+<#assign js>
+<script>
+    $(".btn-submit").click(function () {
+        $.ajax({
+            type: "POST",
+            url: "${ctx!}/admin/resource/edit",
+            data: $(".form-edit").serialize(),
+            dataType: "JSON",
+            success: function(res){
+                layer.msg(res.message, {time: 2000
+                }, function(){
+                    location.reload();
+                });
+            }
+        });
+    });
+</script>
+</#assign>
+<@layout title="资源编辑" active="resource">
+<!-- Content Header (Page header) -->
+<section class="content-header">
+    <h1>
+        资源编辑
+        <small>编辑资源详细信息</small>
+    </h1>
+    <ol class="breadcrumb">
+        <li><a href="#"><i class="fa fa-cog"></i> 系统</a></li>
+        <li><a href="#"><i class="fa fa-list-ul"></i> 资源管理</a></li>
+        <li class="active"><i class="fa fa-edit"></i> 资源编辑</li>
+    </ol>
+</section>
+<!-- Main content -->
+<section class="content">
+    <div class="row">
+        <div class="col-md-10">
+            <!-- Default box -->
+            <div class="box  box-primary">
+                <form class="form-horizontal form-edit" method="post" action="${ctx!}/admin/resource/edit">
+                    <div class="box-body">
+                        <input type="hidden" id="id" name="id" value="${resource.id}">
+                        <div class="form-group">
+                            <label class="col-sm-3 control-label">上级资源:</label>
+                            <div class="col-sm-8">
+                                <select name="parentId" class="form-control">
+                                    <option value="">菜单</option>
+                                    <#list list as r>
+                                        <option value="${r.id}" <#if resource.parent.id == r.id>selected="selected"</#if>>
+                                            <#if r.level == 1>|-<#elseif  r.level == 2> |-<#else>  |-</#if>${r.name}
+                                        </option>
+                                    </#list>
+                                </select>
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-3 control-label">资源名称:</label>
+                            <div class="col-sm-8">
+                                <input id="name" name="name" class="form-control" type="text" value="${resource.name}">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-3 control-label">唯一标识:</label>
+                            <div class="col-sm-8">
+                                <input id="sourceKey" name="sourceKey" class="form-control" type="text" value="${resource.sourceKey}">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-3 control-label">资源类型:</label>
+                            <div class="col-sm-8">
+                                <select name="type" class="form-control">
+                                    <option value="0" <#if resource.type == 0>selected="selected"</#if>>目录</option>
+                                    <option value="1" <#if resource.type == 1>selected="selected"</#if>>菜单</option>
+                                    <option value="2" <#if resource.type == 2>selected="selected"</#if>>按钮</option>
+                                </select>
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-3 control-label">资源url:</label>
+                            <div class="col-sm-8">
+                                <input id="sourceUrl" name="sourceUrl" class="form-control" value="${resource.sourceUrl}">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-3 control-label">层级:</label>
+                            <div class="col-sm-8">
+                                <input id="level" name="level" class="form-control" value="${resource.level}" placeholder="目录:1,菜单:2,按钮:3">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-3 control-label">排序:</label>
+                            <div class="col-sm-8">
+                                <input id="sort" name="sort" class="form-control" value="${resource.sort}">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-3 control-label">图标:</label>
+                            <div class="col-sm-8">
+                                <input id="icon" name="icon" class="form-control" value="${resource.icon}">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-3 control-label">状态:</label>
+                            <div class="col-sm-8">
+                                <select name="isHide" class="form-control">
+                                    <option value="0" <#if resource.locked == 0>selected="selected"</#if>>显示</option>
+                                    <option value="1" <#if resource.locked == 1>selected="selected"</#if>>隐藏</option>
+                                </select>
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-3 control-label">描述:</label>
+                            <div class="col-sm-8">
+                                <textarea id="description" name="description" class="form-control" rows="6">${resource.description}</textarea>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="box-footer">
+                        <button type="button" class="btn btn-default btn-back">返回</button>
+                        <button type="button" class="btn btn-info pull-right btn-submit">提交</button>
+                    </div>
+                </form>
+            </div>
+            <!-- /.box -->
+        </div>
+    </div>
+</section>
+<!-- /.content -->
+</@layout>

+ 112 - 0
src/main/resources/templates/admin/resource/index.ftl

@@ -0,0 +1,112 @@
+<#include "/admin/layout/layout.ftl">
+<#import "/admin/layout/macro.ftl" as macro>
+<#assign css>
+<style>
+</style>
+</#assign>
+<#assign js>
+<script>
+    function del(id){
+        layer.confirm('确定删除吗?', {icon: 3, title:'提示'}, function(index){
+            $.ajax({
+                type: "POST",
+                dataType: "json",
+                url: "${ctx!}/admin/resource/delete/" + id,
+                success: function(res){
+                    layer.msg(res.message, {time: 2000}, function () {
+                        location.reload();
+                    });
+                }
+            });
+        });
+    }
+</script>
+</#assign>
+<@layout title="资源管理" active="resource">
+<!-- Content Header (Page header) -->
+<section class="content-header">
+    <h1>
+        资源列表
+        <small>一切从这里开始</small>
+    </h1>
+    <ol class="breadcrumb">
+        <li><a href="#"><i class="fa fa-cog"></i> 系统</a></li>
+        <li><a href="#"><i class="fa fa-list-ul"></i> 资源管理</a></li>
+        <li class="active"><i class="fa fa-table"></i> 资源列表</li>
+    </ol>
+</section>
+
+<!-- Main content -->
+<section class="content">
+    <!-- Default box -->
+    <div class="box box-primary">
+        <div class="box-header">
+		<@shiro.hasPermission name="system:resource:add">
+			<a class="btn btn-sm btn-success" href="${ctx!}/admin/resource/add">新增</a>
+		</@shiro.hasPermission>
+        </div>
+        <div class="box-body">
+            <table class="table table-striped">
+                <tr>
+                    <th>ID</th>
+                    <th>资源名称</th>
+                    <th>资源key</th>
+                    <th>类型</th>
+                    <th>资源url</th>
+                    <th>层级</th>
+                    <th>排序</th>
+                    <th>icon</th>
+                    <th>状态</th>
+                    <th>描述</th>
+                    <th>更新时间</th>
+                    <th>操作</th>
+                </tr>
+                <#list pageInfo.content as resourceInfo>
+                <tr>
+                    <td>${resourceInfo.id}</td>
+                    <td>${resourceInfo.name}</td>
+                    <td>${resourceInfo.sourceKey}</td>
+                    <td>
+                        <#if resourceInfo.type == 0>
+                            <span class="label label-info">目录</span>
+                        <#elseif resourceInfo.type == 1>
+                            <span class="label label-danger">菜单</span>
+                        <#else >
+                            <span class="label label-warning">按钮</span>
+                        </#if>
+                    </td>
+                    <td>${resourceInfo.sourceUrl}</td>
+                    <td>${resourceInfo.level}</td>
+                    <td>${resourceInfo.sort}</td>
+                    <td>${resourceInfo.icon}</td>
+                    <td>
+                    <#if resourceInfo.isHide == 1>
+                            <span class="label label-danger">隐藏</span>
+                    <#else>
+                            <span class="label label-info">显示</span>
+                    </#if>
+                    </td>
+                    <td>${resourceInfo.description}</td>
+                    <td>${resourceInfo.updateTime}</td>
+                    <td>
+					<@shiro.hasPermission name="system:resource:edit">
+					<a class="btn btn-sm btn-primary" href="${ctx!}/admin/resource/edit/${resourceInfo.id}">编辑</a>
+					</@shiro.hasPermission>
+                    <@shiro.hasPermission name="system:resource:deleteBatch">
+                        <button class="btn btn-sm btn-danger" onclick="del(${resourceInfo.id})">删除</button>
+					</@shiro.hasPermission>
+					</td>
+                </tr>
+				</#list>
+            </table>
+        </div>
+        <!-- /.box-body -->
+        <div class="box-footer clearfix">
+            <@macro.page pageInfo=pageInfo url="${ctx!}/admin/resource/index?" />
+        </div>
+    </div>
+    <!-- /.box -->
+
+</section>
+<!-- /.content -->
+</@layout>

+ 85 - 0
src/main/resources/templates/admin/role/form.ftl

@@ -0,0 +1,85 @@
+<#include "/admin/layout/layout.ftl">
+<#import "/admin/layout/macro.ftl" as macro>
+<#assign css>
+
+</#assign>
+<#assign js>
+<script>
+    $(".btn-submit").click(function () {
+        $.ajax({
+            type: "POST",
+            dataType: "json",
+            url: "${ctx!}/admin/role/edit",
+            data: $(".form-edit").serialize(),
+            success: function(res){
+                layer.msg(res.message, {time: 2000
+                }, function(){
+                    location.reload();
+                });
+            }
+        });
+    });
+</script>
+</#assign>
+<@layout title="角色编辑" active="role">
+<!-- Content Header (Page header) -->
+<section class="content-header">
+    <h1>
+        角色编辑
+        <small>编辑角色详细信息</small>
+    </h1>
+    <ol class="breadcrumb">
+        <li><a href="#"><i class="fa fa-cog"></i> 系统</a></li>
+        <li><a href="#"><i class="fa fa-list-ul"></i> 角色管理</a></li>
+        <li class="active"><i class="fa fa-edit"></i> 角色编辑</li>
+    </ol>
+</section>
+<!-- Main content -->
+<section class="content">
+    <div class="row">
+        <div class="col-md-10">
+            <!-- Default box -->
+            <div class="box  box-primary">
+                <form class="form-horizontal form-edit" id="frm" method="post" action="${ctx!}/admin/role/edit">
+                    <div class="box-body">
+                        <input type="hidden" id="id" name="id" value="${role.id}">
+                        <div class="form-group">
+                            <label class="col-sm-3 control-label">角色key:</label>
+                            <div class="col-sm-8">
+                                <input id="roleKey" name="roleKey" class="form-control" type="text" value="${role.roleKey}" <#if role?exists> readonly="readonly"</#if> >
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-3 control-label">角色名称:</label>
+                            <div class="col-sm-8">
+                                <input id="name" name="name" class="form-control" type="text" value="${role.name}">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-3 control-label">状态:</label>
+                            <div class="col-sm-8">
+                                <select name="status" class="form-control">
+                                    <option value="0" <#if role.status == 0>selected="selected"</#if>>正常</option>
+                                    <option value="1" <#if role.status == 1>selected="selected"</#if>>禁用</option>
+                                </select>
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-3 control-label">描述:</label>
+                            <div class="col-sm-8">
+                                <textarea id="description" name="description" class="form-control" rows="6">${role.description}</textarea>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="box-footer">
+                        <button type="button" class="btn btn-default btn-back">返回</button>
+                        <button type="button" class="btn btn-info pull-right btn-submit">提交</button>
+                    </div>
+                </form>
+            </div>
+            <!-- /.box -->
+        </div>
+    </div>
+</section>
+<!-- /.content -->
+</@layout>

+ 89 - 0
src/main/resources/templates/admin/role/grant.ftl

@@ -0,0 +1,89 @@
+<#include "/admin/layout/layout.ftl">
+<#import "/admin/layout/macro.ftl" as macro>
+<#assign css>
+<link href="${ctx!}/assets/plugins/zTree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet">
+</#assign>
+<#assign js>
+<script src="${ctx!}/assets/plugins/zTree/jquery.ztree.all.min.js"></script>
+<script>
+    var setting = {
+        check : {
+            enable : true
+        },
+        data : {
+            simpleData : {
+                enable : true
+            }
+        }
+    };
+    setting.check.chkboxType = {
+        "Y" : "ps",
+        "N" : "s"
+    };
+    $.ajax({
+        type : "POST",
+        url : "${ctx!}/admin/resource/tree/" + ${role.id},
+        dataType : 'json',
+        success : function(msg) {
+            $.fn.zTree.init($("#tree"), setting, msg);
+        }
+    });
+
+
+    $(".btn-submit").click(function () {
+        var treeObj = $.fn.zTree.getZTreeObj("tree");
+        var nodes = treeObj.getCheckedNodes(true);
+        var selectIds="";
+        for(var index in nodes){
+            var item=nodes[index];
+            selectIds+=item.id+",";
+        }
+        $.ajax({
+            url : "${ctx!}/admin/role/grant/${role.id}?t=" + Math.random(),
+            type : "post",
+            dataType : "json",
+            data : {"resourceIds":selectIds},
+            success : function(msg) {
+                layer.msg(msg.message, {time: 2000},function(){
+                    var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
+                    parent.layer.close(index);
+                });
+            },
+            error : function(r,s,m) {
+            }
+        });
+    });
+</script>
+</#assign>
+<@layout title="资源分配" active="role">
+<!-- Content Header (Page header) -->
+<section class="content-header">
+    <h1>
+        资源分配
+        <small>分配角色关联资源</small>
+    </h1>
+    <ol class="breadcrumb">
+        <li><a href="#"><i class="fa fa-cog"></i> 系统</a></li>
+        <li><a href="#"><i class="fa fa-list-ul"></i> 角色管理</a></li>
+        <li class="active"><i class="fa fa-edit"></i> 资源分配</li>
+    </ol>
+</section>
+<!-- Main content -->
+<section class="content">
+    <div class="row">
+        <div class="col-md-10">
+            <!-- Default box -->
+            <div class="box  box-primary">
+				<div class="box-body">
+                    <ul id="tree" class="ztree"></ul>
+				</div>
+				<div class="box-footer">
+					<button type="button" class="btn btn-default btn-back">返回</button>
+					<button type="button" class="btn btn-info pull-right btn-submit">提交</button>
+				</div>
+            </div>
+        </div>
+    </div>
+</section>
+<!-- /.content -->
+</@layout>

+ 99 - 0
src/main/resources/templates/admin/role/index.ftl

@@ -0,0 +1,99 @@
+<#include "/admin/layout/layout.ftl">
+<#import "/admin/layout/macro.ftl" as macro>
+<#assign css>
+<style>
+</style>
+</#assign>
+<#assign js>
+<script>
+    function del(id){
+        layer.confirm('确定删除吗?', {icon: 3, title:'提示'}, function(index){
+            $.ajax({
+                type: "POST",
+                dataType: "json",
+                url: "${ctx!}/admin/role/delete/" + id,
+                success: function(res){
+                    layer.msg(res.message, {time: 2000}, function () {
+                        location.reload();
+                    });
+                }
+            });
+        });
+    }
+</script>
+</#assign>
+<@layout title="角色管理" active="role">
+<!-- Content Header (Page header) -->
+<section class="content-header">
+    <h1>
+        角色列表
+        <small>一切从这里开始</small>
+    </h1>
+    <ol class="breadcrumb">
+        <li><a href="#"><i class="fa fa-cog"></i> 系统</a></li>
+        <li><a href="#"><i class="fa fa-list-ul"></i> 角色管理</a></li>
+        <li class="active"><i class="fa fa-table"></i> 角色列表</li>
+    </ol>
+</section>
+
+<!-- Main content -->
+<section class="content">
+    <!-- Default box -->
+    <div class="box box-primary">
+        <div class="box-header">
+        <@shiro.hasPermission name="system:role:add">
+            <a class="btn btn-sm btn-success" href="${ctx!}/admin/role/add">新增</a>
+        </@shiro.hasPermission>
+        </div>
+        <div class="box-body">
+            <table class="table table-striped">
+                <tr>
+                    <th>ID</th>
+                    <th>角色名称</th>
+                    <th>角色key</th>
+                    <th>角色状态</th>
+                    <th>角色描述</th>
+                    <th>创建时间</th>
+                    <th>更新时间</th>
+                    <th>操作</th>
+                </tr>
+                <#list pageInfo.content as roleInfo>
+                <tr>
+					<td>${roleInfo.id}</td>
+					<td>${roleInfo.name}</td>
+					<td>${roleInfo.roleKey}</td>
+                    <td>
+                        <#if roleInfo.status == 1>
+                            <span class="label label-danger">已删除</span>
+						<#else>
+                            <span class="label label-info">未删除</span>
+						</#if>
+                    </td>
+					<td>${roleInfo.description}</td>
+					<td>${roleInfo.createTime}</td>
+					<td>${roleInfo.updateTime}</td>
+                    <td>
+                    <@shiro.hasPermission name="system:role:edit">
+                        <a class="btn btn-sm btn-primary" href="${ctx!}/admin/role/edit/${roleInfo.id}">编辑</a>
+					</@shiro.hasPermission>
+                    <@shiro.hasPermission name="system:role:grant">
+                        <a class="btn btn-sm btn-warning" href="${ctx!}/admin/role/grant/${roleInfo.id}">分配资源</a>
+					</@shiro.hasPermission>
+                    <@shiro.hasPermission name="system:role:deleteBatch">
+                        <button class="btn btn-sm btn-danger" onclick="del(${roleInfo.id})">删除</button>
+					</@shiro.hasPermission>
+                    </td>
+                </tr>
+				</#list>
+            </table>
+        </div>
+        <!-- /.box-body -->
+        <div class="box-footer clearfix">
+            <@macro.page pageInfo=pageInfo url="${ctx!}/admin/role/index?" />
+        </div>
+    </div>
+    <!-- /.box -->
+
+</section>
+<!-- /.content -->
+</@layout>

+ 124 - 0
src/main/resources/templates/admin/user/form.ftl

@@ -0,0 +1,124 @@
+<#include "/admin/layout/layout.ftl">
+<#import "/admin/layout/macro.ftl" as macro>
+<#assign css>
+
+</#assign>
+<#assign js>
+<script>
+    $(".btn-submit").click(function () {
+        $.ajax({
+            type: "POST",
+            url: "${ctx!}/admin/user/edit",
+            data: $(".form-edit").serialize(),
+            dataType: "JSON",
+            success: function(res){
+                layer.msg(res.message, {time: 2000
+                }, function(){
+                    location.reload();
+                });
+            }
+        });
+    });
+</script>
+</#assign>
+<@layout title="用户编辑" active="user">
+<!-- Content Header (Page header) -->
+<section class="content-header">
+    <h1>
+        用户编辑
+        <small>编辑用户详细信息</small>
+    </h1>
+    <ol class="breadcrumb">
+        <li><a href="#"><i class="fa fa-cog"></i> 系统</a></li>
+        <li><a href="#"><i class="fa fa-list-ul"></i> 用户管理</a></li>
+        <li class="active"><i class="fa fa-edit"></i> 用户编辑</li>
+    </ol>
+</section>
+<!-- Main content -->
+<section class="content">
+    <div class="row">
+        <div class="col-md-10">
+            <!-- Default box -->
+            <div class="box  box-primary">
+                <form class="form-horizontal form-edit" method="post" action="${ctx!}/admin/user/edit">
+                    <div class="box-body">
+                        <input type="hidden" id="id" name="id" value="${user.id}">
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">账户名:</label>
+                            <div class="col-sm-10">
+                                <input id="userName" name="userName" class="form-control" type="text" value="${user.userName}" <#if user?exists> readonly="readonly"</#if> >
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">昵称:</label>
+                            <div class="col-sm-10">
+                                <input id="nickName" name="nickName" class="form-control" type="text" value="${user.nickName}">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">头像URL:</label>
+                            <div class="col-sm-10">
+                                <input id="avatar" name="avatar" class="form-control" type="url" value="${user.avatar}">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">性别:</label>
+                            <div class="col-sm-10">
+                                <select name="sex" class="form-control">
+                                    <option value="0" <#if user.sex == 0>selected="selected"</#if>>女</option>
+                                    <option value="1" <#if user.sex == 1>selected="selected"</#if>>男</option>
+                                </select>
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">出生日期:</label>
+                            <div class="col-sm-10">
+                                <input id="birthday" name="birthday" readonly="readonly" class="laydate-icon form-control layer-date" value="${user.birthday}">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">电话:</label>
+                            <div class="col-sm-10">
+                                <input id="telephone" name="telephone" class="form-control" value="${user.telephone}">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">E-mail:</label>
+                            <div class="col-sm-10">
+                                <input id="email" name="email" class="form-control" value="${user.email}">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">地址:</label>
+                            <div class="col-sm-10">
+                                <input id="address" name="address" class="form-control" value="${user.address}">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">状态:</label>
+                            <div class="col-sm-10">
+                                <select name="locked" class="form-control">
+                                    <option value="0" <#if user.locked == 0>selected="selected"</#if>>未锁定</option>
+                                    <option value="1" <#if user.locked == 1>selected="selected"</#if>>锁定</option>
+                                </select>
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-2 control-label">描述:</label>
+                            <div class="col-sm-10">
+                                <textarea id="description" name="description" class="form-control" rows="6">${user.description}</textarea>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="box-footer">
+                        <button type="button" class="btn btn-default btn-back">返回</button>
+                        <button type="button" class="btn btn-info pull-right btn-submit">提交</button>
+                    </div>
+                </form>
+            </div>
+            <!-- /.box -->
+        </div>
+    </div>
+</section>
+<!-- /.content -->
+</@layout>

+ 71 - 0
src/main/resources/templates/admin/user/grant.ftl

@@ -0,0 +1,71 @@
+<#include "/admin/layout/layout.ftl">
+<#import "/admin/layout/macro.ftl" as macro>
+<#assign css>
+
+</#assign>
+<#assign js>
+<script>
+    $(".btn-submit").click(function () {
+        $.ajax({
+            type: "POST",
+            dataType: "json",
+            url: "${ctx!}/admin/user/grant/" + ${user.id},
+            data: $(".form-grant").serialize(),
+            success: function (res) {
+                layer.msg(res.message, {time: 2000}, function () {
+                    location.reload();
+                });
+            }
+        });
+    });
+</script>
+</#assign>
+<@layout title="角色分配" active="user">
+<!-- Content Header (Page header) -->
+<section class="content-header">
+    <h1>
+        角色分配
+        <small>分配用户关联角色</small>
+    </h1>
+    <ol class="breadcrumb">
+        <li><a href="#"><i class="fa fa-cog"></i> 系统</a></li>
+        <li><a href="#"><i class="fa fa-list-ul"></i> 用户管理</a></li>
+        <li class="active"><i class="fa fa-edit"></i> 角色分配</li>
+    </ol>
+</section>
+<!-- Main content -->
+<section class="content">
+    <div class="row">
+        <div class="col-md-10">
+            <!-- Default box -->
+            <div class="box  box-primary">
+                <form class="form-horizontal form-grant" method="post" action="${ctx!}/admin/user/save">
+                    <div class="box-body">
+                        <input type="hidden" id="id" name="id" value="${user.id}">
+                        <div class="form-group">
+                            <#list roles as role>
+                                <div class="col-sm-12">
+                                    <div class="checkbox i-checks">
+                                        <label>
+                                        <#if roleIds?seq_contains(role.id)>
+                                            <input type="checkbox" value="${role.id}" name="roleIds" checked="checked"> <i></i> ${role.name}
+                                        <#else>
+                                            <input type="checkbox" value="${role.id}" name="roleIds"> <i></i> ${role.name}
+                                        </#if>
+                                        </label>
+                                    </div>
+                                </div>
+                            </#list>
+                        </div>
+                    </div>
+                    <div class="box-footer">
+                        <button type="button" class="btn btn-default btn-back">返回</button>
+                        <button type="button" class="btn btn-info pull-right btn-submit">提交</button>
+                    </div>
+                </form>
+            </div>
+        </div>
+    </div>
+</section>
+<!-- /.content -->
+</@layout>

+ 120 - 0
src/main/resources/templates/admin/user/index.ftl

@@ -0,0 +1,120 @@
+<#include "/admin/layout/layout.ftl">
+<#import "/admin/layout/macro.ftl" as macro>
+<#assign css>
+<style>
+</style>
+</#assign>
+<#assign js>
+<script>
+    function del(id) {
+        layer.confirm('确定删除吗?', {icon: 3, title: '提示'}, function (index) {
+            $.ajax({
+                type: "POST",
+                dataType: "json",
+                url: "${ctx!}/admin/user/delete/" + id,
+                success: function (res) {
+                    layer.msg(res.message, {time: 2000}, function () {
+                        location.reload();
+                    });
+                }
+            });
+        });
+    }
+</script>
+</#assign>
+<@layout title="用户管理" active="user">
+<!-- Content Header (Page header) -->
+<section class="content-header">
+    <h1>
+        用户列表
+        <small>一切从这里开始</small>
+    </h1>
+    <ol class="breadcrumb">
+        <li><a href="#"><i class="fa fa-cog"></i> 系统</a></li>
+        <li><a href="#"><i class="fa fa-list-ul"></i> 用户管理</a></li>
+        <li class="active"><i class="fa fa-table"></i> 用户列表</li>
+    </ol>
+</section>
+
+<!-- Main content -->
+<section class="content">
+    <!-- Default box -->
+    <div class="box box-primary">
+        <div class="box-header">
+        <@shiro.hasPermission name="system:user:add">
+            <a class="btn btn-sm btn-success" href="${ctx!}/admin/user/add">新增</a>
+        </@shiro.hasPermission>
+        </div>
+        <div class="box-body">
+            <table class="table table-striped">
+                <tr>
+                    <th>ID</th>
+                    <th>账户名</th>
+                    <th>昵称</th>
+                    <th>性别</th>
+                    <th>电话</th>
+                    <th>邮箱</th>
+                    <th>住址</th>
+                    <th>删除状态</th>
+                    <th>锁定</th>
+                    <th>创建时间</th>
+                    <th>操作</th>
+                </tr>
+                <#list pageInfo.content as userInfo>
+                <tr>
+                    <td>${userInfo.id}</td>
+                    <td>${userInfo.userName}</td>
+                    <td>${userInfo.nickName}</td>
+                    <td>
+                        <#if userInfo.sex == 1>
+                            <span class="label label-info">男</span>
+                        <#elseif userInfo.sex == 0>
+                            <span class="label label-danger">女</span>
+                        <#else >
+                            <span class="label label-warning">未知</span>
+                        </#if>
+                    </td>
+                    <td>${userInfo.telephone}</td>
+                    <td>${userInfo.email}</td>
+                    <td>${userInfo.address}</td>
+                    <td>
+                        <#if userInfo.deleteStatus == 1>
+                            <span class="label label-danger">已删除</span>
+                        <#else>
+                            <span class="label label-info">未删除</span>
+                        </#if>
+                    </td>
+                    <td>
+                        <#if userInfo.locked == 1>
+                            <span class="label label-danger">已锁定</span>
+                        <#else>
+                            <span class="label label-info">未锁定</span>
+                        </#if>
+
+                    </td>
+                    <td>${userInfo.createTime}</td>
+                    <td>
+                    <@shiro.hasPermission name="system:user:edit">
+                        <a class="btn btn-sm btn-primary" href="${ctx!}/admin/user/edit/${userInfo.id}">编辑</a>
+                    </@shiro.hasPermission>
+                    <@shiro.hasPermission name="system:user:grant">
+                        <a class="btn btn-sm btn-warning" href="${ctx!}/admin/user/grant/${userInfo.id}">分配角色</a>
+                    </@shiro.hasPermission>
+                    <@shiro.hasPermission name="system:user:deleteBatch">
+                        <button class="btn btn-sm btn-danger" onclick="del(${userInfo.id})">删除</button>
+                    </@shiro.hasPermission>
+                    </td>
+                </tr>
+                </#list>
+            </table>
+        </div>
+        <!-- /.box-body -->
+        <div class="box-footer clearfix">
+            <@macro.page pageInfo=pageInfo url="${ctx!}/admin/user/index?" />
+        </div>
+    </div>
+    <!-- /.box -->
+
+</section>
+<!-- /.content -->
+</@layout>

+ 83 - 0
src/main/resources/templates/admin/user/updatePwd.ftl

@@ -0,0 +1,83 @@
+<#include "/admin/layout/layout.ftl">
+<#import "/admin/layout/macro.ftl" as macro>
+<#assign css>
+</#assign>
+<#assign js>
+<script>
+    $(".btn-submit").click(function () {
+        $.ajax({
+            type: "POST",
+            dataType: "json",
+            url: "${ctx!}/admin/user/updatePwd",
+            data: $(".form-edit").serialize(),
+            success: function(msg){
+                layer.msg(msg.message, {time: 2000},function(){
+                    if(msg.code ==0){
+                        window.location.href = "${ctx!}/admin/logout";
+                    } else {
+                        location.reload();
+                    }
+                });
+            }
+        });
+    });
+</script>
+</#assign>
+
+<@layout title="修改密码" active="user">
+<!-- Content Header (Page header) -->
+<section class="content-header">
+    <h1>
+        修改密码
+        <small>修改当前登录用户密码</small>
+    </h1>
+    <ol class="breadcrumb">
+        <li><a href="#"><i class="fa fa-cog"></i> 系统</a></li>
+        <li><a href="#"><i class="fa fa-list-ul"></i> 用户管理</a></li>
+        <li class="active"><i class="fa fa-edit"></i> 修改密码</li>
+    </ol>
+</section>
+<!-- Main content -->
+<section class="content">
+    <div class="row">
+        <div class="col-md-10">
+            <!-- Default box -->
+            <div class="box  box-primary">
+                <form class="form-horizontal form-edit" method="post" action="${ctx!}/admin/user/updatePwd">
+                    <div class="box-body">
+                        <div class="form-group">
+                            <label class="col-sm-3 control-label">原始密码:</label>
+                            <div class="col-sm-8">
+                                <input id="oldPassword" name="oldPassword" class="form-control" type="password">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-3 control-label">新 密 码:</label>
+                            <div class="col-sm-8">
+                                <input id="password1" name="password1" class="form-control" type="password">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <label class="col-sm-3 control-label">重复密码:</label>
+                            <div class="col-sm-8">
+                                <input id="password2" name="password2" class="form-control" type="password">
+                            </div>
+                        </div>
+                        <div class="form-group">
+                            <div class="col-sm-8 col-sm-offset-3">
+                                <button class="btn btn-primary" type="submit">提交</button>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="box-footer">
+                        <button type="button" class="btn btn-default btn-back">返回</button>
+                        <button type="button" class="btn btn-info pull-right btn-submit">提交</button>
+                    </div>
+                </form>
+            </div>
+            <!-- /.box -->
+        </div>
+    </div>
+</section>
+<!-- /.content -->
+</@layout>

+ 225 - 0
src/main/resources/templates/dingding/examination/index.ftl

@@ -0,0 +1,225 @@
+<#include "/admin/layout/layout.ftl">
+<#assign css>
+<style>
+</style>
+</#assign>
+<#assign js>
+<script>
+$(function(){ 
+	layui.use(['laypage', 'layer', 'table', 'laydate'], function(){
+		var table = layui.table;
+		var laydate = layui.laydate;
+		var index = layer.load(1, {shade: [0.5,'#fff']}); 
+		var tableVar = table.render({
+			id: 'businessId',
+			height: 550,
+			elem: '#test',
+			url: '${ctx!}/dingding/examination/list?datetime='+$('#datetime').val()+'&processCodeId='+$('#searchType').val()+"&businessNum="+$('#businessNum').val()+"&applyDate="+$('#applyDate').val()+"&companyId="+$('#searchCompany').val(),
+			cols: [[{type:'checkbox'},
+			{field:'businessId', title: '流程实例业务编号', sort: true},
+			{field:'title', title: '标题', sort: true},
+			{field:'createTime', title: '开始时间', sort: true},
+			{field:'finishTime', title: '结束时间', sort: true},
+			{field:'status', title: '审批状态', sort: true, templet: function(d){ if (d.status == 'NEW') return '刚新建'; else if (d.status == 'RUNNING') return '运行中'; else if (d.status == 'TERMINATED') return '被终止'; else if (d.status == 'COMPLETED') return '完成';else if (d.status == 'CANCELED') return '取消';else return ""}},
+			{field:'result', title: '审批结果', sort: true, templet: function(d){ if (d.result == 'agree') return '同意'; else if (d.result == 'refuse') return '退回';else return ""}},
+			{fixed: 'right', width:178, align:'center', toolbar: '#barDemo'}
+    		]],
+    		done: function(res, curr, count){
+    			layer.close(index); 
+    		}
+  		});
+  		
+		table.on('tool(test)', function(obj){
+			var index3 = layer.load(1, {shade: [0.5,'#fff']}); 
+		    var data = obj.data;
+		    if(obj.event === 'detail'){
+			    $.ajax({
+	                type: "GET",
+	                dataType: "json",
+	                url: "${ctx!}/dingding/examination/detail",
+	                data : {processInstanceId : data.processInstanceId, processCodeId : $('#searchType').val(), title: data.title, businessId :data.businessId},
+	                success: function (res) {
+	                	layer.close(index3);
+	                    layer.open({
+  							type: 2,
+  							title:false,
+  							area: ['800px', '800px'],
+							skin: 'layui-layer-demo', 
+							closeBtn: 0, 
+							anim: 2,
+							shadeClose: true, 
+  							content: "/" + res.message
+						});
+	                },
+            		error : function(r,s,m) {
+            			layer.close(index3); 
+            			layer.msg(r.message, {time: 2000}, function () {
+	                    });
+            		}
+	            });
+		    } else if(obj.event === 'down'){
+		    	window.location.href = "${ctx!}/dingding/examination/download?processInstanceId=" + data.processInstanceId + "&processCodeId=" + $('#searchType').val() +"&title="+data.title+"&businessId="+data.businessId;
+		    	layer.close(index3); 
+		    } 
+		});
+  		
+  		var today = new Date();
+  		today.setTime(today.getTime());
+		var dayRange = today.getFullYear()+"-" + (today.getMonth()+1) + "-" + today.getDate() + " 00:00:00" +  " - " + today.getFullYear()+"-" + (today.getMonth()+1) + "-" + today.getDate() + " 23:59:59";
+		
+		today.setDate(1);
+		var monthFirstDay = today.getFullYear()+"-" + (today.getMonth()+1) + "-" + today.getDate() + " 00:00:00" ;
+		
+		<!-- 审批结束时间段-->
+		laydate.render({elem: '#datetime',type: 'datetime',range: true, value: dayRange, done: function(value, date, endDate){
+    			$('#datetime').val(value);
+  			}});
+  			
+  		<!-- 申报开始时间 -->	
+		laydate.render({elem: '#applyDate',type: 'datetime', value: monthFirstDay, done: function(value, date, endDate){
+    			$('#applyDate').val(value);
+  			}});
+  		
+		$("#search").click(function(){
+			if ($('#datetime').val() == "" || $('#datetime').val() == null){
+				layer.msg("请选择审批结束时间", {time: 2000}, function () {});
+				return;
+			}
+			var index2 = layer.load(1, {shade: [0.5,'#fff']}); 
+			tableVar.reload({
+				url: '${ctx!}/dingding/examination/list?datetime='+$('#datetime').val()+'&processCodeId='+$('#searchType').val()+"&businessNum="+$('#businessNum').val()+"&applyDate="+$('#applyDate').val()+"&companyId="+$('#searchCompany').val(),
+				done: function(res, curr, count){
+    				layer.close(index2); 
+    			}
+			});
+		});
+		
+		$("#download").click(function(){
+			var checkStatus = table.checkStatus('businessId');
+			if(checkStatus.data.length == 0){
+				layer.msg("请选中数据", {time: 2000}, function () {});
+                return;
+			}
+			
+			var index4 = layer.msg('这需要一点时间,请稍后,您可以喝杯咖啡', {icon: 16, shade: 0.5, time:0});
+			var processInstanceIds = new Array();
+			for (var i = 0; i < checkStatus.data.length; i++){
+				processInstanceIds.push(checkStatus.data[i].processInstanceId);
+			}
+			$.ajax({
+			    type: "POST",
+			    dataType: "json",
+			    url: "${ctx!}/dingding/examination/downloadAll",
+			    data : {processInstanceIds : processInstanceIds.join(","), processCodeId : $('#searchType').val() },
+			    success: function (res) {
+					layer.close(index4); 
+	                var path = res.message;
+	                window.location.href = "${ctx!}/dingding/examination/downloadFile?filePath=" + res.data.filePath + "&fileName=" + res.data.fileName;
+			    },
+				error : function(r,s,m) {
+					layer.close(index4); 
+					layer.msg(r.message, {time: 2000}, function () {});
+				}
+			});
+		});
+	});
+	
+	
+	
+});
+</script>
+<script type="text/html" id="barDemo">
+ <@shiro.hasPermission name="dingding:examination:detail">
+  <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
+ </@shiro.hasPermission>
+ <@shiro.hasPermission name="dingding:examination:download">
+  <a class="layui-btn layui-btn-xs" lay-event="down">下载</a>
+  </@shiro.hasPermission>
+</script>
+
+</#assign>
+<@layout title="审批管理" active="examination">
+<!-- Content Header (Page header) -->
+<section class="content-header">
+    <h1>
+        审批列表
+        <small>一切从这里开始</small>
+    </h1>
+    <ol class="breadcrumb">
+        <li><a href="#"><i class="fa fa-cog"></i> 系统</a></li>
+        <li><a href="#"><i class="fa fa-list-ul"></i> 审批管理</a></li>
+        <li class="active"><i class="fa fa-table"></i> 审批列表</li>
+    </ol>
+</section>
+
+<!-- Main content -->
+<section class="content">
+    <!-- Default box -->
+    <div class="box box-primary">
+		<div class="box-header layui-form  form-horizontal">
+			<div class="form-group">
+				<div class="layui-col-md4">
+	       			<label class="col-sm-4 control-label">申报开始时间:</label>
+	       			<div class="col-sm-8">
+	       				<input id="applyDate" name="applyDate" class="form-control" type="text" value="${applyDate}" placeholder="yyyy-MM-dd HH:mm:ss"/>
+	       			</div>
+        		</div>
+			    <div class="layui-col-md4">
+	       			<label class="col-sm-4 control-label">审批结束时间:</label>
+	       			<div class="col-sm-8">
+	       				<input id="datetime" name="datetime" class="form-control" type="text" value="${datetime}" placeholder="yyyy-MM-dd HH:mm:ss"/>
+	       			</div>
+        		</div>
+			</div>
+			<div class="form-group">
+				<div class="layui-col-md4">
+	          		<label class="col-sm-4 control-label">选择审批类型:</label>
+	          		<div class="col-sm-8">
+		           		<select id="searchType" name="searchType" style="width:50%;">
+		           			<#list process as pro>
+								<option value="${pro.id}" >${pro.processName}</option>
+							</#list>
+				        </select>
+		  			</div>
+	  			</div>
+			    <div class="layui-col-md4">
+	       			<label class="col-sm-4 control-label">流程实例业务编号:</label>
+	       			<div class="col-sm-8">
+	       				<input id="businessNum" name="businessNum" class="form-control" type="text" value="${businessNum}" placeholder="支持模糊查询" />
+	       			</div>
+        		</div>
+			</div>
+			<div class="form-group">
+				<div class="layui-col-md4">
+	          		<label class="col-sm-4 control-label">选择单位:</label>
+	          		<div class="col-sm-8">
+		           		<select id="searchCompany" name="searchCompany" style="width:50%;">
+		           			<option value="" >请选择</option>
+		           			<#list companys as company>
+								<option value="${company.id}" >${company.dataValue}</option>
+							</#list>
+				        </select>
+		  			</div>
+	  			</div>
+			</div>
+			 <@shiro.hasPermission name="dingding:examination:detail">
+			<a id="search" class="btn btn-sm btn-success" href="#">查找</a>
+			 </@shiro.hasPermission>
+			 <@shiro.hasPermission name="dingding:examination:download">
+			<a id="download" class="btn btn-sm btn-success" href="#">下载审批单</a>
+			 </@shiro.hasPermission>
+		</div>
+        <div class="box-body">
+        	<table class="layui-hide" id="test" lay-filter="test"></table>
+        </div>
+        <!-- /.box-body -->
+    </div>
+    <!-- /.box -->
+
+</section>
+<!-- /.content -->
+</@layout>
+
+
+
+

+ 17 - 0
src/main/resources/templates/index.ftl

@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <title></title>
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+</head>
+<body>
+
+<div>
+
+
+</div>
+<!-- 你的HTML代码 -->
+index
+</body>
+</html>

+ 69 - 0
src/main/resources/templates/pdf.ftl

@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<html lang="en">
+    <head>
+        <meta charset="UTF-8" />
+        <style>
+        	body{font-family:SimHei} 
+        	h2{text-align:center;} 
+			table {
+				table-layout:fixed; 
+				margin:15px 0;
+			}
+        	table td {
+				height: 28px;
+				padding: 2px 15px;
+				position: relative;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				box-sizing: border-box;
+			}
+			table td p{
+				height: 10px;
+			}
+        	
+        	.content{width: 100%; margin: 0 auto; margin-top: 30px;} 
+        	.fr{float: right;}
+			
+			
+        </style>
+    </head>
+    <body>
+        <div class="content">
+            <h2>${title}</h2>
+            <span>${corpName}</span>
+            <span class="fr">申请日期:${applyDate}</span>
+            <!-- <span class="mgrl-10" style="color: red;">审批状态:${status}</span>-->
+            <table border="1" cellspacing="0" width="100%">
+                <tbody>
+                    <tr>
+                        <td style="width:150px;">审批编码</td>
+                        <td style="width:600px;">${businessId}</td>
+                    </tr>
+                    <tr>
+                        <td>申请人</td>
+                        <td>${applyUserName}</td>
+                    </tr>
+                    <tr>
+                        <td>申请人部门</td>
+                        <td>${org}</td>
+                    </tr>
+                    
+                    <!-- 模板表单 -->
+                    ${form}
+                    <!-- 模板表单 -->
+                    
+                    <!-- 审批人 -->
+                    ${operations}
+                    <!-- 审批人 -->
+                </tbody>
+            </table>
+			<#if (printDate)??>
+				<span >打印时间:${printDate}</span>
+			</#if>
+			<#if (printer)??>
+				<span class="fr">打印人:${printer}</span>
+			</#if>
+        </div>
+    </body>
+
+</html>

+ 47 - 0
src/main/resources/templates/template.html

@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html lang="en">
+  
+  <head>
+    <meta charset="UTF-8" />
+    <style>body{font-family:SimHei;} .content{width: 100%; margin: 0 auto; margin-top: 30px;} h2{text-align:center;} .mgrl-10{margin-left:30px;} table tr{height: 30px;} table td {word-wrap:break-word;word-break:break-all;}</style></head>
+  
+  <body>
+    <div class="content">
+      <h2>报销申请</h2>
+      <span>珠海市四维时代网络科技有限公司</span>
+      <span class="mgrl-10">申请日期:2018-05-04 18:33:01</span>
+      <table border="1" cellspacing="0" width=100%>
+        <tr>
+          <td style="width:20%">审批编码</td>
+          <td>201805041833000007623</td></tr>
+        <tr>
+          <td>申请人</td>
+          <td>罗美玲</td></tr>
+        <tr>
+          <td>申请人部门</td>
+          <td>行政后勤中心</td></tr>
+        <tr>
+          <td>项目号</td>
+          <td></td>
+        </tr>
+        <tr>
+          <td>报销明细</td>
+          <td>
+            <li>报销类别:福利费</li>
+            <li>金额(元):-2500</li>
+            <li>报销说明:用于4.16-4.22日的晚餐及周末用餐。</li>
+            <li>报销类别:福利费</li>
+            <li>金额(元):3260.38</li>
+            <li>报销说明:用于4.16-4.22日的晚餐及周末用餐。 PS:其他的是电话下单,没有菜单</li></td>
+        </tr>
+        <tr>
+          <td rowspan="2">审批人</td>
+          <td>020128146032322641 &nbsp;&nbsp;NONE &nbsp;&nbsp;</td></tr>
+        <tr>
+          <td>020128146032322641 &nbsp;&nbsp;NONE &nbsp;&nbsp;</td></tr>
+      </table>
+      <span>打印时间:2018-05-09 10:17</span>
+      <span class="mgrl-10">打印人:潘韬</span></div>
+  </body>
+
+</html>