diff --git a/pom.xml b/pom.xml index 54012613..725c4c86 100644 --- a/pom.xml +++ b/pom.xml @@ -208,6 +208,14 @@ ${ruoyi.version} + + + com.ruoyi + wx-record-order + ${ruoyi.version} + + + com.ruoyi @@ -225,6 +233,7 @@ ruoyi-quartz ruoyi-generator ruoyi-common + wx-record-order pom diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index 58df34fc..4e38444a 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -80,6 +80,25 @@ + + + + local + + local + + + true + + + + + prod + + prod + + + @@ -98,17 +117,48 @@ - - org.apache.maven.plugins - maven-war-plugin - 3.0.0 + + org.apache.maven.plugins + maven-war-plugin + 3.0.0 false ${project.artifactId} - - + + ${project.artifactId} + + src/main/resources/application.yml + + + + src/main/resources + true + + application-*.* + META-INF/** + static/** + template/** + + + + src/main/resources + false + + application-druid.yml + META-INF/** + static/** + template/** + + + + src/main/resources + + application-${active.env}.* + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index d69c66d2..174ff482 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -4,11 +4,6 @@ spring: type: com.alibaba.druid.pool.DruidDataSource driverClassName: com.mysql.cj.jdbc.Driver druid: - # 主库数据源 - master: - url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - username: root - password: password # 从库数据源 slave: # 从数据源开关/默认关闭 diff --git a/ruoyi-admin/src/main/resources/application-local.yml b/ruoyi-admin/src/main/resources/application-local.yml new file mode 100644 index 00000000..ca540a09 --- /dev/null +++ b/ruoyi-admin/src/main/resources/application-local.yml @@ -0,0 +1,14 @@ +# 项目相关配置 +ruoyi: + # 实例演示开关 + demoEnabled: true + # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) + profile: D:/ruoyi/uploadPath +spring: + datasource: + druid: + # 主库数据源 + master: + url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: root + password: docus702 \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/application-prod.yml b/ruoyi-admin/src/main/resources/application-prod.yml new file mode 100644 index 00000000..9cd3ea71 --- /dev/null +++ b/ruoyi-admin/src/main/resources/application-prod.yml @@ -0,0 +1,15 @@ +# 项目相关配置 +ruoyi: + # 实例演示开关 + demoEnabled: false + # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) + profile: C:/wwwroot/wx.docus.cn/uploadPath + +spring: + datasource: + druid: + # 主库数据源 + master: + url: jdbc:mysql://localhost:3306/wx_docus_cn?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: wx_docus_cn + password: Bj87yZBAxECG5kTG \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index d013a3f1..797330d0 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -1,13 +1,11 @@ # 项目相关配置 ruoyi: # 名称 - name: RuoYi + name: Docus # 版本 version: 4.6.0 # 版权年份 copyrightYear: 2021 - # 实例演示开关 - demoEnabled: true # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) profile: D:/ruoyi/uploadPath # 获取ip地址开关 @@ -16,10 +14,11 @@ ruoyi: # 开发环境配置 server: # 服务器的HTTP端口,默认为80 - port: 80 + port: 8080 servlet: # 应用的访问路径 context-path: / + domain: https://wx.docus.cn tomcat: # tomcat的URI编码 uri-encoding: UTF-8 @@ -40,6 +39,16 @@ user: # 密码错误{maxRetryCount}次锁定10分钟 maxRetryCount: 5 +wx: + appid: wxa35fbc494f55cdd1 + appsecret: 81c02b2758b9e9b7c0b41aa01f336353 + +aliyun: + accesskey-id: LTAIANCnxPby45Y8 + accesskey-secret: tMmutQW2J1TkNmmEMXeltepnmr47jh + sms: + sign-name: 嘉时软件 + # Spring配置 spring: # 模板引擎 @@ -56,14 +65,14 @@ spring: time-zone: GMT+8 date-format: yyyy-MM-dd HH:mm:ss profiles: - active: druid + active: druid,@active.env@ # 文件上传 servlet: multipart: # 单个文件大小 - max-file-size: 10MB + max-file-size: 1GB # 设置总上传的文件大小 - max-request-size: 20MB + max-request-size: 20GB # 服务模块 devtools: restart: @@ -127,11 +136,11 @@ xss: # 过滤开关 enabled: true # 排除链接(多个用逗号分隔) - excludes: /system/notice/* + excludes: /system/notice/*,/wx/api/* # 匹配链接 urlPatterns: /system/*,/monitor/*,/tool/* # Swagger配置 swagger: # 是否开启swagger - enabled: true + enabled: false diff --git a/ruoyi-admin/src/main/resources/ehcache/ehcache-shiro.xml b/ruoyi-admin/src/main/resources/ehcache/ehcache-shiro.xml index 8ffd5ed0..2ff7ae4c 100644 --- a/ruoyi-admin/src/main/resources/ehcache/ehcache-shiro.xml +++ b/ruoyi-admin/src/main/resources/ehcache/ehcache-shiro.xml @@ -86,6 +86,19 @@ timeToLiveSeconds="0" timeToIdleSeconds="0" statistics="false"/> - + + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/static/favicon.ico b/ruoyi-admin/src/main/resources/static/favicon.ico index 6f07782a..0408ffe1 100644 Binary files a/ruoyi-admin/src/main/resources/static/favicon.ico and b/ruoyi-admin/src/main/resources/static/favicon.ico differ diff --git a/ruoyi-admin/src/main/resources/templates/index.html b/ruoyi-admin/src/main/resources/templates/index.html index fe089a65..909bca61 100644 --- a/ruoyi-admin/src/main/resources/templates/index.html +++ b/ruoyi-admin/src/main/resources/templates/index.html @@ -4,7 +4,7 @@ - 若依系统首页 + 系统首页 @@ -26,7 +26,7 @@ -
+
+ +
+
-
捐赠
+
用户项目列表
+
-
- 请作者喝杯咖啡(点击图片放大) -
-

- 请使用手机支付宝或者微信扫码支付 - -

- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
状态日期用户
进行中... + 11:20青衣5858 24%
已取消 + 10:40徐子崴 66%
进行中... + 01:30姜岚昕 54%
进行中... + 02:20武汉大兵哥 12%
进行中... + 09:40荆莹儿 22%
已完成 + 04:10栾某某 66%
进行中... + 12:08范范范二妮 23%
-
+ + - + + + diff --git a/ruoyi-admin/src/main/resources/templates/main_readme.html b/ruoyi-admin/src/main/resources/templates/main_readme.html new file mode 100644 index 00000000..e9cbbc4f --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/main_readme.html @@ -0,0 +1,1222 @@ + + + + + + + 若依介绍 + + + + + + + + +
+
+
+ 领取阿里云通用云产品1888优惠券 +
https://www.aliyun.com/minisite/goods?userCode=brki8iof
+ 领取腾讯云通用云产品2860优惠券 +
https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console
+ 阿里云服务器折扣区 ☛☛点我进入☚☚     腾讯云服务器秒杀区 ☛☛点我进入☚☚
+

云产品通用红包,可叠加官网常规优惠使用。(仅限新用户)

+
+ +
+
+
+

Hello,Guest

+ 移动设备访问请扫描以下二维码: +
+
+ +
+
+
+

若依后台管理框架

+

一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适自己的。于是利用空闲休息时间开始自己写一套后台系统。如此有了若依管理系统。,她可以用于所有的Web应用程序,如网站管理后台网站会员中心CMSCRMOA等等,当然,您也可以对她进行深度定制,以做出更强系统。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。

+

+ 当前版本:v[[${version}]] +

+

+ ¥免费开源 +

+
+

+ + 访问码云 + + + 访问主页 + +

+
+
+

技术选型:

+
    +
  1. 核心框架:Spring Boot。
  2. +
  3. 安全框架:Apache Shiro。
  4. +
  5. 模板引擎:Thymeleaf。
  6. +
  7. 持久层框架:MyBatis。
  8. +
  9. 定时任务:Quartz。
  10. +
  11. 数据库连接池:Druid。
  12. +
  13. 工具类:Fastjson。
  14. +
  15. 更多……
  16. +
+
+ +
+
+
+
+ +
+
+
联系信息
+ +
+
+

官网:http://www.ruoyi.vip +

+

QQ群:满1389287 满1679294 满1529866 满1772718 满1366522 满1382251 满1145125 满86752435 满134072510 满210336300 满339522636 满130035985 143151071 +

+

微信:/ *若依 +

+

支付宝:/ *若依 +

+
+
+
+
+
+
+
更新日志
+
+
+
+
+
+
+
+ v4.6.02021.01.01 +
+
+
+
+
    +
  1. 新增缓存监控管理
  2. +
  3. 新增锁定屏幕功能
  4. +
  5. 菜单新增是否刷新页面
  6. +
  7. 删除用户和角色解绑关联
  8. +
  9. 新增密码强度字符范围提示
  10. +
  11. 防止匿名访问进行过滤
  12. +
  13. 升级SpringBoot到最新版本2.2.12
  14. +
  15. 升级poi到最新版本4.1.2
  16. +
  17. 升级bitwalker到最新版本1.21
  18. +
  19. 升级bootstrap-fileinput到最新版本5.1.3
  20. +
  21. 升级bootstrapTable到最新版本v1.18.0
  22. +
  23. 升级bootstrapTable相关组件到最新版本v1.18.0
  24. +
  25. 升级oshi到最新版本v5.3.6
  26. +
  27. 新增示例(标签 & 提示)
  28. +
  29. 添加单据打印示例
  30. +
  31. 修改表格初始参数sortName默认值为undefined
  32. +
  33. 新增表格参数(自定义打印页面模板printPageBuilder)
  34. +
  35. 新增表格参数(是否显示行间隔色striped)
  36. +
  37. 新增表格参数(渲染完成后执行的事件onPostBody)
  38. +
  39. Excel注解支持Image图片导出
  40. +
  41. Excel支持注解align对齐方式
  42. +
  43. Excel支持导入Boolean型数据
  44. +
  45. 主子表操作添加通用addColumn方法
  46. +
  47. 代码生成日期控件区分范围
  48. +
  49. 代码生成数据库文本类型生成表单文本域
  50. +
  51. 修复生成主子表外键名错误
  52. +
  53. 选项卡新增是否刷新属性
  54. +
  55. 修复树表格表头跟表格宽度不同步的问题
  56. +
  57. 表格树加载完成触发tooltip方法
  58. +
  59. 使用widthUnit定义树表格选项单位
  60. +
  61. 修复主子表editColumn序列问题
  62. +
  63. 修复添加全屏在无参数时没有替换url参数问题
  64. +
  65. 弹出层openOptions移动端自适应
  66. +
  67. 防止错误页返回主页出现嵌套问题
  68. +
  69. 设置回显数据字典验证防止空值
  70. +
  71. 其他细节优化
  72. +
+
+
+
+
+
+
+ v4.5.12020.11.18 +
+
+
+
+
    +
  1. 阻止任意文件下载漏洞
  2. +
  3. 升级shiro到最新版1.7.0 阻止权限绕过漏洞
  4. +
  5. 升级druid到最新版本v1.2.2
  6. +
  7. 新增表格行触发事件(onCheck、onUncheck、onCheckAll、onUncheckAll)
  8. +
  9. 修复多页签关闭非当前选项出现空白问题
  10. +
  11. 代码生成预览支持高亮显示
  12. +
  13. mapperLocations配置支持分隔符
  14. +
  15. 权限信息调整
  16. +
  17. 个人中心头像和上传头像增加默认图片
  18. +
  19. 全局配置类保持和其他应用命名相同
  20. +
+
+
+
+
+
+
+ v4.5.02020.10.20 +
+
+
+
+
    +
  1. 新增菜单导航显示风格(default为左侧导航菜单,topnav为顶部导航菜单)
  2. +
  3. 菜单&数据权限新增(展开/折叠 全选/全不选 父子联动)
  4. +
  5. 账号密码支持自定义更新周期
  6. +
  7. 初始密码支持自定义修改策略
  8. +
  9. 新增校验用户修改新密码不能与旧密码相同
  10. +
  11. 添加检查密码范围支持的特殊字符包括:~!@#$%^&*()-=_+
  12. +
  13. 注册账号设置默认用户名称及密码最后更新时间
  14. +
  15. 去除用户手机邮箱部门必填验证
  16. +
  17. 新增日期格式化方法
  18. +
  19. 代码生成添加bit类型
  20. +
  21. 树结构加载添加callBack回调方法
  22. +
  23. 修复用户管理页面滚动返回顶部条失效
  24. +
  25. 修复代码生成模板文件上传组件缺少ctx的问题
  26. +
  27. 限制系统内置参数不允许删除
  28. +
  29. 新增表格列宽拖动插件
  30. +
  31. 新增Ajax局部刷新demo
  32. +
  33. 新增是否开启页脚功能
  34. +
  35. 新增表格参数(通过自定义函数设置标题样式headerStyle)
  36. +
  37. 新增表格参数(通过自定义函数设置页脚样式footerStyle)
  38. +
  39. 修复窗体大小改变后浮动提示框失效问题
  40. +
  41. 生成代码补充必填样式
  42. +
  43. 生成页面时不忽略remark属性
  44. +
  45. 字典数据列表页添加关闭按钮
  46. +
  47. Excel注解支持自动统计数据总和
  48. +
  49. 升级springboot到2.1.17 提升安全性
  50. +
  51. 升级pagehelper到最新版1.3.0
  52. +
  53. 升级druid到最新版本v1.2.1
  54. +
  55. 升级fastjson到最新版1.2.74
  56. +
  57. 升级bootstrap-fileinput到最新版本5.1.2
  58. +
  59. 升级oshi到最新版本v5.2.5
  60. +
  61. 表单向导插件更换为jquery-smartwizard
  62. +
  63. 修改主子表提交示例代码防止渲染失效
  64. +
  65. 添加导入数据弹出窗体自定义宽高
  66. +
  67. 用户信息参数返回忽略掉密码字段
  68. +
  69. 优化关闭窗体添加index参数
  70. +
  71. 回显数据字典(字符串数组)增加空值判断
  72. +
  73. 修改前端密码长度校验和错误提示不符问题
  74. +
  75. AjaxResult重写put方法,以方便链式调用
  76. +
  77. 增强验证码校验的语义,更易懂
  78. +
  79. 导入excel整形值校验优化
  80. +
  81. Excel导出类型NUMERIC支持精度浮点类型
  82. +
  83. 导出Excel调整targetAttr获取值方法,防止get方法不规范
  84. +
  85. 输入框组验证错误后置图标提示颜色
  86. +
  87. 上传媒体类型添加视频格式
  88. +
  89. 数据权限判断参数类型
  90. +
  91. 修正数据库字符串类型nvarchar
  92. +
  93. 优化递归子节点
  94. +
  95. 修复多表格搜索formId无效
  96. +
  97. 其他细节优化
  98. +
+
+
+
+
+
+
+ v4.4.02020.08.24 +
+
+
+
+
    +
  1. 升级bootstrapTable到最新版本1.17.1
  2. +
  3. 升级shiro到最新版1.6.0 阻止权限绕过漏洞
  4. +
  5. 升级fastjson到最新版1.2.73
  6. +
  7. 代码生成支持同步数据库
  8. +
  9. 代码生成支持富文本控件
  10. +
  11. 用户密码支持自定义配置规则
  12. +
  13. 新增表格自动刷新插件
  14. +
  15. 新增表格打印配置插件
  16. +
  17. 更换图片裁剪工具为cropper
  18. +
  19. Excel支持sort导出排序
  20. +
  21. 代码生成支持自定义路径
  22. +
  23. 代码生成支持选择上级菜单
  24. +
  25. 代码生成支持上传控件
  26. +
  27. 新增表格参数(自定义加载文本的字体大小loadingFontSize)
  28. +
  29. Excel注解支持设置BigDecimal精度&舍入规则
  30. +
  31. 操作日志记录排除敏感属性字段
  32. +
  33. 修复不同浏览器附件下载中文名乱码的问题
  34. +
  35. 用户分配角色不允许选择超级管理员角色
  36. +
  37. 更换表格冻结列插件
  38. +
  39. 添加右侧冻结列示例
  40. +
  41. 升级表格行编辑&移动端适应插件
  42. +
  43. 修复更新表格插件后无法设置实例配置问题
  44. +
  45. 修复更新表格插件后导致的主子表错误
  46. +
  47. 修复页面存在多表格,回调函数res数据不正确问题
  48. +
  49. 强退&过期清理登录帐号缓存会话
  50. +
  51. 表格树标题内容支持html语义化标签
  52. +
  53. 修复配置应用的访问路径首页页签重复问题
  54. +
  55. 优化openTab打开时滚动到当前页签
  56. +
  57. 表格请求方式method支持自定义配置
  58. +
  59. 菜单页签联动优化
  60. +
  61. 用户邮箱长度限制修改为50
  62. +
  63. 主子表示例添加日期格式案例
  64. +
  65. 修改表格行内编辑示例旧值参数
  66. +
  67. 操作日志查询方式调整
  68. +
  69. 唯一限制条件只返回单条数据
  70. +
  71. 修改Excel设置STRING单元格类型
  72. +
  73. 添加获取当前的环境配置方法
  74. +
  75. 截取返回参数长度,防止超出异常
  76. +
  77. 定时任务cron表达式验证
  78. +
  79. 拆分表格插件,按需引入
  80. +
  81. 多行文本框补齐必填错误提示背景
  82. +
  83. 其他细节优化
  84. +
+
+
+
+
+
+
+ v4.3.12020.07.05 +
+
+
+
+
    +
  1. 国家信息安全漏洞(请务必保持cipherKey密钥唯一性)
  2. +
  3. 升级shiro到最新版1.5.3 阻止权限绕过漏洞
  4. +
  5. 修改验证码在使用后清除,防止多次使用
  6. +
  7. 检查字符支持小数点&降级改成异常提醒
  8. +
  9. openOptions函数中加入自定义maxmin属性
  10. +
  11. 支持openOptions方法最大化
  12. +
  13. 支持openOptions方法多个按钮回调
  14. +
  15. 新增isLinkage支持页签与菜单联动
  16. +
  17. 修改代码生成导入表结构出现异常页面不提醒问题
  18. +
  19. 优化用户头像发生错误,则显示一个默认头像
  20. +
  21. Excel导出支持字典类型
  22. +
+
+
+
+
+
+
+ v4.3.02020.06.22 +
+
+
+
+
    +
  1. 代码生成模板支持主子表
  2. +
  3. 代码生成显示类型支持复选框
  4. +
  5. 前端表单样式修改成圆角
  6. +
  7. 新增回显数据字典(字符串数组)
  8. +
  9. 修复浏览器手动缩放比例后菜单无法自适应问题
  10. +
  11. 限制用户不允许选择系统管理员角色
  12. +
  13. 用户信息添加输入框组图标&鼠标按下显示密码
  14. +
  15. 升级fastjson到最新版1.2.70 修复高危安全漏洞
  16. +
  17. 升级Bootstrap版本到v3.3.7
  18. +
  19. 修复selectColumns方法获取子对象数据无效问题
  20. +
  21. 修改数据源类型优先级,先根据方法,再根据类
  22. +
  23. 修改上级部门(选择项排除本身和下级)
  24. +
  25. 首页菜单显示调整
  26. +
  27. 添加是否开启swagger配置
  28. +
  29. 新增示例(主子表提交)
  30. +
  31. 新增示例(多级联动下拉示例)
  32. +
  33. 新增示例(表格属性data数据加载)
  34. +
  35. 新增表格列参数(是否列选项可见ignore)
  36. +
  37. 新增表格参数(是否启用显示卡片视图cardView)
  38. +
  39. 新增表格参数(是否显示全屏按钮showFullscreen)
  40. +
  41. 新增表格参数(是否启用分页条无限循环的功能paginationLoop)
  42. +
  43. 新增表格参数(是否显示表头showHeader)
  44. +
  45. 表格添加显示/隐藏所有列方法 showAllColumns/hideAllColumns
  46. +
  47. 修复部分情况节点不展开问题
  48. +
  49. 修复关闭标签页后刷新还是上次地址问题
  50. +
  51. 修复选择菜单后刷新页面,菜单箭头显示不对问题
  52. +
  53. 修复jquery表单序列化时复选框未选中不会序列化到对象中问题
  54. +
  55. Excel支持readConverterExp读取字符串组内容
  56. +
  57. 更换IP地址查询接口
  58. +
  59. 默认关闭获取ip地址
  60. +
  61. 操作处理ajaxSuccess判断修正
  62. +
  63. HttpUtils.sendPost()方法,参数无需拼接参数到url
  64. +
  65. 通用http发送方法增加参数 contentType 编码类型
  66. +
  67. HTML过滤器不替换&实体
  68. +
  69. 代码生成浮点型改用BigDecimal
  70. +
  71. 修复表单构建单选和多选框渲染问题
  72. +
  73. 代码生成模板调整,字段为String并且必填则加空串条件
  74. +
  75. 字典数据查询列表根据dictSort升序排序
  76. +
  77. 修复树表对imageView和tooltip方法无效问题
  78. +
  79. 修复Long类型比较相等问题调整
  80. +
  81. 示例demo页面清除html链接,防止点击后跳转出现404
  82. +
  83. 在线用户强退方法合并
  84. +
  85. 添加校验部门包含未停用的子部门
  86. +
  87. 取消回车自动提交表单
  88. +
  89. 'A','I','BUTTON' 标签忽略clickToSelect事件,防止点击操作按钮时选中
  90. +
  91. 邮箱显示截取部分字符串,防止低分辨率错位
  92. +
  93. 代码生成列属性根据sort排序
  94. +
  95. 修复更多操作部分浏览器不兼容情况
  96. +
  97. 图片预览事件属性修正
  98. +
  99. 修复冻结列排序样式无效问题
  100. +
  101. 修复context-path的情况下个人中心刷新导致样式问题
  102. +
  103. 全屏editFull打开适配表树
  104. +
  105. 其他细节优化
  106. +
+
+
+
+
+
+
+ v4.2.02020.03.23 +
+
+
+
+
    +
  1. 用户管理添加分配角色页面
  2. +
  3. 定时任务添加调度日志按钮
  4. +
  5. 新增是否开启用户注册功能
  6. +
  7. 新增页面滚动显示返回顶部按钮
  8. +
  9. 用户&角色&任务添加更多操作按钮
  10. +
  11. iframe框架页会话过期弹出超时提示
  12. +
  13. 移动端登录不显示左侧菜单
  14. +
  15. 侧边栏添加一套深蓝色主题
  16. +
  17. 首页logo固定,不随菜单滚动
  18. +
  19. 支持mode配置history(表示去掉地址栏的#)
  20. +
  21. 任务分组字典翻译(调度日志详细)
  22. +
  23. 字典管理添加缓存读取
  24. +
  25. 字典数据列表标签显示样式
  26. +
  27. 参数管理支持缓存操作
  28. +
  29. 日期控件清空结束时间设置开始默认值为2099-12-31
  30. +
  31. 表格树添加获取数据后响应回调处理
  32. +
  33. 批量替换表前缀调整
  34. +
  35. 支持表格导入模板的弹窗表单加入其它输入控件
  36. +
  37. 表单重置刷新表格树
  38. +
  39. 新增支持导出数据字段排序
  40. +
  41. 新增表格参数(是否单选checkbox)
  42. +
  43. druid未授权不允许访问
  44. +
  45. 表格树父节点兼容0,'0','',null
  46. +
  47. 表单必填的项添加星号
  48. +
  49. 修复select2不显示校验错误信息
  50. +
  51. 添加自定义HTML过滤器
  52. +
  53. 修复多数据源下开关关闭出现异常问题
  54. +
  55. 修复翻页记住选择项数据问题
  56. +
  57. 用户邮箱长度限制20
  58. +
  59. 修改错误页面返回主页出现嵌套问题
  60. +
  61. 表格浮动提示单双引号转义
  62. +
  63. 支持配置四级菜单
  64. +
  65. 升级shiro到最新版1.4.2 阻止rememberMe漏洞攻击
  66. +
  67. 升级summernote到最新版本v0.8.12
  68. +
  69. 导入Excel根据dateFormat属性格式处理
  70. +
  71. 修复War部署无法正常shutdown,ehcache内存泄漏
  72. +
  73. 修复代码生成短字段无法识别问题
  74. +
  75. 修复serviceImpl模版,修改方法判断日期错误
  76. +
  77. 代码生成模板增加导出功能日志记录
  78. +
  79. 代码生成唯一编号调整为tableId
  80. +
  81. 代码生成查询时忽略大小写
  82. +
  83. 代码生成支持翻页记住选中
  84. +
  85. 代码生成表注释未填写也允许导入
  86. +
  87. Global全局配置类修改为注解,防止多环境配置下读取问题
  88. +
  89. 修复多表格情况下,firstLoad只对第一个表格生效
  90. +
  91. 处理Maven打包出现警告问题
  92. +
  93. 默认主题样式,防止网速慢情况下出现空白
  94. +
  95. 修复文件上传多级目录识别问题
  96. +
  97. 锚链接解码url,防止中文导致页面不能加载问题
  98. +
  99. 修复右键Tab页刷新事件重复请求问题
  100. +
  101. 角色禁用&菜单隐藏不查询权限
  102. +
  103. 其他细节优化
  104. +
+
+
+
+
+
+
+ v4.1.02019.10.22 +
+
+
+
+
    +
  1. 支持多表格实例操作
  2. +
  3. 浮动提示方法tooltip支持弹窗
  4. +
  5. 代码生成&字典数据支持模糊条件查询
  6. +
  7. 增加页签全屏方法
  8. +
  9. 增加清除表单验证错误信息方法
  10. +
  11. 支持iframe局部刷新页面
  12. +
  13. 支持在线切换主题
  14. +
  15. 修改图片预览设置的高宽参数颠倒问题
  16. +
  17. 操作日志新增解锁账户功能
  18. +
  19. 管理员用户&角色不允许操作
  20. +
  21. 去掉jsoup包调用自定义转义工具
  22. +
  23. 添加时间轴示例
  24. +
  25. 修复翻页记住选择时获取指定列值的问题
  26. +
  27. 代码生成sql脚本添加导出按钮
  28. +
  29. 添加表格父子视图示例
  30. +
  31. 添加表格行内编辑示例
  32. +
  33. 升级fastjson到最新版1.2.60 阻止漏洞攻击
  34. +
  35. 升级echarts到最新版4.2.1
  36. +
  37. 操作日志新增返回参数
  38. +
  39. 支持mybatis通配符扫描任意多个包
  40. +
  41. 权限验证多种情况处理
  42. +
  43. 修复树形类型的代码生成的部分必要属性无法显示
  44. +
  45. 修复非表格插件情况下重置出现异常
  46. +
  47. 修复富文本编辑器有序列表冲突
  48. +
  49. 代码生成表前缀配置支持多个
  50. +
  51. 修复自动去除表前缀配置无效问题
  52. +
  53. 菜单列表按钮数据可见不显示(权限标识控制)
  54. +
  55. 修复设置会话超时时间无效问题
  56. +
  57. 新增本地资源通用下载方法
  58. +
  59. 操作日志记录新增请求方式
  60. +
  61. 代码生成单选按钮属性重名修复
  62. +
  63. 优化select2下拉框宽度不会随浏览器改变
  64. +
  65. 修复代码生成树表异常
  66. +
  67. 其他细节优化
  68. +
+
+
+
+
+
+
+ v4.0.02019.08.08 +
+
+
+
+
    +
  1. 代码生成支持预览、编辑,保存方案
  2. +
  3. 新增防止表单重复提交注解
  4. +
  5. 新增后端校验(和前端保持一致)
  6. +
  7. 新增同一个用户最大会话数控制
  8. +
  9. Excel导出子对象支持多个字段
  10. +
  11. 定时任务支持静态调用和多参数
  12. +
  13. 定时任务增加分组条件查询
  14. +
  15. 字典类型增加任务分组数据
  16. +
  17. 新增表格是否首次加载数据
  18. +
  19. 新增parentTab选项卡可在同一页签打开
  20. +
  21. 多数据源支持类注解(允许继承父类的注解)
  22. +
  23. 部门及以下数据权限(调整为以下及所有子节点)
  24. +
  25. 新增角色数据权限配(仅本人数据权限)
  26. +
  27. 修改菜单权限显示问题
  28. +
  29. 上传文件修改路径及返回名称
  30. +
  31. 添加报表插件及示例
  32. +
  33. 添加首页统计模板
  34. +
  35. 添加表格拖拽示例
  36. +
  37. 添加卡片列表示例
  38. +
  39. 添加富文本编辑器示例
  40. +
  41. 添加表格动态增删改查示例
  42. +
  43. 添加用户页面岗位选择框提示
  44. +
  45. 点击菜单操作添加背景高亮显示
  46. +
  47. 表格树新增showSearch是否显示检索信息
  48. +
  49. 解决表格列设置sortName无效问题
  50. +
  51. 表格图片预览支持自定义设置宽高
  52. +
  53. 添加表格列浮动提示(单击文本复制)
  54. +
  55. PC端收起菜单后支持浮动显示
  56. +
  57. 详细操作样式调整
  58. +
  59. 修改用户更新描述空串不更新问题
  60. +
  61. 导入修改为模板渲染
  62. +
  63. 修改菜单及部门排序规则
  64. +
  65. 角色导出数据范围表达式翻译
  66. +
  67. 添加summernote富文本字体大小
  68. +
  69. 优化表格底部下边框防重叠&汇总像素问题
  70. +
  71. 树表格支持属性多层级访问
  72. +
  73. 修复IE浏览器用户管理界面右侧留白问题
  74. +
  75. 重置按钮刷新表格
  76. +
  77. 重置密码更新用户缓存
  78. +
  79. 优化验证码属性参数
  80. +
  81. 支持数据监控配置用户名和密码
  82. +
  83. 文件上传修改按钮背景及加载动画
  84. +
  85. 支持配置一级菜单href跳转
  86. +
  87. 侧边栏添加一套浅色主题
  88. +
  89. 树表格添加回调函数(校验异常状态)
  90. +
  91. 用户个人中心适配手机端显示
  92. +
  93. Excel支持设置导出类型&更换样式
  94. +
  95. 检查属性改变修改为克隆方式(防止热部署强转异常)
  96. +
  97. 其他细节优化
  98. +
+
+
+
+
+
+
+ v3.4.02019.06.03 +
+
+
+
+
    +
  1. 新增实例演示菜单及demo
  2. +
  3. 新增页签右键操作
  4. +
  5. 菜单管理新增打开方式
  6. +
  7. 新增点击某行触发的事件
  8. +
  9. 新增双击某行触发的事件
  10. +
  11. 新增单击某格触发的事件
  12. +
  13. 新增双击某格触发的事件
  14. +
  15. 新增是否启用显示细节视图
  16. +
  17. 支持上传任意格式文件
  18. +
  19. 修复角色权限注解失效问题
  20. +
  21. 左侧的菜单栏宽度调整
  22. +
  23. 新增响应完成后自定义回调函数
  24. +
  25. 支持前端及其他模块直接获取用户信息
  26. +
  27. 升级swagger到最新版2.9.2
  28. +
  29. 升级jquery.slimscroll到最新版1.3.8
  30. +
  31. 升级select2到最新版4.0.7
  32. +
  33. 新增角色配置本部门数据权限
  34. +
  35. 新增角色配置本部门及以下数据权限
  36. +
  37. 优化底部操作防止跳到页面顶端
  38. +
  39. 修改冻结列选框无效及样式问题
  40. +
  41. 修复部门四层级修改祖级无效问题
  42. +
  43. 更换开关切换按钮样式
  44. +
  45. 新增select2-bootstrap美化下拉框
  46. +
  47. 添加表格内图片预览方法
  48. +
  49. 修复权限校验失败跳转页面路径错误
  50. +
  51. 国际化资源文件调整
  52. +
  53. 通知公告布局调整
  54. +
  55. 删除页签操作功能
  56. +
  57. 表格树新增查询指定列值
  58. +
  59. 更改系统接口扫描方式及完善测试案例
  60. +
  61. 表格列浮动提示及字典回显默认去背景
  62. +
  63. 修复启用翻页记住前面的选择check没选中问题
  64. +
  65. 去除监控页面底部的广告
  66. +
  67. 日期控件功问题修复及data功能增强
  68. +
  69. 新增角色权限可见性(前端直接调用)
  70. +
  71. 新增获取当前登录用户方法(前端及子模块调用)
  72. +
  73. 修复热部署重启导致菜单丢失问题
  74. +
  75. 优化业务校验失败普通请求跳转页面
  76. +
  77. 操作日志新增状态条件查询
  78. +
  79. 操作类型支持多选条件查询
  80. +
  81. 通知公告防止滚动触底回弹优化
  82. +
  83. 其他细节优化
  84. +
+
+
+
+
+
+
+ v3.3.02019.04.01 +
+
+
+
+
    +
  1. 新增线程池统一管理
  2. +
  3. 新增支持左右冻结列
  4. +
  5. 新增表格字符超长浮动提示
  6. +
  7. 升级datepicker拓展并汉化
  8. +
  9. 升级druid到最新版本v1.1.14
  10. +
  11. 修复个人头像为图片服务器跨域问题
  12. +
  13. 修改上传文件按日期存储
  14. +
  15. 新增表格客户端分页选项
  16. +
  17. 新增表格的高度参数
  18. +
  19. 新增表格销毁方法
  20. +
  21. 新增表格下拉按钮切换方法
  22. +
  23. 新增表格分页跳转到指定页码
  24. +
  25. 新增表格启用点击选中行参数
  26. +
  27. 修复表格数据重新加载未触发部分按钮禁用
  28. +
  29. 使用jsonview展示操作日志参数
  30. +
  31. 新增方法(addTab、editTab)
  32. +
  33. 修改用户管理界面为Tab打开方式
  34. +
  35. 表单验证代码优化
  36. +
  37. 修复@Excel注解 prompt 属性使用报错
  38. +
  39. 修复combo属性Excel兼容性问题
  40. +
  41. 新增@Excel导入导出支持父类字段
  42. +
  43. 修复关闭最后选项卡无法激活滚动问题
  44. +
  45. 增加日期控件显示类型及回显格式扩展选项
  46. +
  47. 修复定时任务执行失败后入库状态为成功状态
  48. +
  49. 支持定时任务并发开关控制
  50. +
  51. 优化权限校验失败普通请求跳转页面
  52. +
  53. 捕获线程池执行任务抛出的异常
  54. +
  55. 修复IE浏览器导出功能报错
  56. +
  57. 新增角色管理分配用户功能
  58. +
  59. 新增表格翻页记住前面的选择
  60. +
  61. 调整用户个人中心页面
  62. +
  63. 修复界面存在的一些安全问题
  64. +
  65. 其他细节优化
  66. +
+
+
+
+
+
+
+ v3.2.02019.01.18 +
+
+
+
+
    +
  1. 部门修改时不允许选择最后节点
  2. +
  3. 修复部门菜单排序字段无效
  4. +
  5. 修复光驱磁盘导致服务监控异常
  6. +
  7. 登录界面去除check插件
  8. +
  9. 验证码文本字符间距修正
  10. +
  11. 升级SpringBoot到最新版本2.1.1
  12. +
  13. 升级MYSQL驱动
  14. +
  15. 修正登录必填项位置偏移
  16. +
  17. Session会话检查优化
  18. +
  19. Excel注解支持多级获取
  20. +
  21. 新增序列号生成方法
  22. +
  23. 修复WAR部署tomcat退出线程异常
  24. +
  25. 全屏操作增加默认确认/关闭
  26. +
  27. 修复个人信息可能导致漏洞
  28. +
  29. 字典数据根据下拉选择新增类型
  30. +
  31. 升级Summernote到最新版本v0.8.11
  32. +
  33. 新增用户数据导入
  34. +
  35. 首页主题样式更换
  36. +
  37. layer扩展主题更换
  38. +
  39. 用户管理移动端默认隐藏左侧布局
  40. +
  41. 详细信息弹出层显示在顶层
  42. +
  43. 表格支持切换状态(用户/角色/定时任务)
  44. +
  45. Druid数据源支持配置继承
  46. +
  47. 修正部分iPhone手机端表格适配问题
  48. +
  49. 新增防止重复提交表单方法
  50. +
  51. 新增表格数据统计汇总方法
  52. +
  53. 支持富文本上传图片文件
  54. +
+
+
+
+
+
+
+ v3.1.02018.12.03 +
+
+
+
+
    +
  1. 新增内网不获取IP地址
  2. +
  3. 新增cron表达式有效校验
  4. +
  5. 定时任务新增详细信息
  6. +
  7. 定时任务默认策略修改(不触发立即执行)
  8. +
  9. 定时任务显示下一个执行周期
  10. +
  11. 支持前端任意日期格式处理
  12. +
  13. 上传头像删除多余提交按钮
  14. +
  15. 表格增加行间隔色配置项
  16. +
  17. 表格增加转义HTML字符串配置项
  18. +
  19. 表格增加显示/隐藏指定列
  20. +
  21. 代码生成优化
  22. +
  23. 操作日志参数格式化显示
  24. +
  25. 页签新增新增全屏显示
  26. +
  27. 新增一键打包部署
  28. +
  29. Excel注解新增多个参数
  30. +
  31. 新增提交静默更新表格方法
  32. +
  33. 新增服务监控菜单
  34. +
+
+
+
+
+
+
+ v3.0.02018.10.08 +
+
+
+
+
    +
  1. 升级poi到最新版3.17
  2. +
  3. 导出修改临时目录绝对路径
  4. +
  5. 升级laydate到最新版5.0.9
  6. +
  7. 升级SpringBoot到最新版本2.0.5
  8. +
  9. 优化开始/结束时间校验限制
  10. +
  11. 重置密码参数表中获取默认值
  12. +
  13. 修复头像修改显示问题
  14. +
  15. 新增数据权限过滤注解
  16. +
  17. 新增表格检索折叠按钮
  18. +
  19. 新增清空(登录、操作、调度)日志
  20. +
  21. 固定按钮位置(提交/关闭)
  22. +
  23. 部门/菜单支持(展开/折叠)
  24. +
  25. 部分细节调整优化
  26. +
  27. 项目采用分模块
  28. +
+
+
+
+
+
+
+ v2.4.02018.09.03 +
+
+
+
+
    +
  1. 支持部门多级查询
  2. +
  3. 修复菜单状态查询无效
  4. +
  5. 支持IP地址开关
  6. +
  7. 支持XSS开关
  8. +
  9. 记录日志异步处理
  10. +
  11. 字典回显样式更改为下拉框
  12. +
  13. 菜单类型必填校验
  14. +
  15. 修复在线用户排序报错
  16. +
  17. 增加重置按钮
  18. +
  19. 支持注解导入数据
  20. +
  21. 支持弹层外区域关闭
  22. +
  23. 备注更换为文本区域
  24. +
  25. 新增角色逻辑删除
  26. +
  27. 新增部门逻辑删除
  28. +
  29. 支持部门数据权限
  30. +
  31. 管理员默认拥有所有授权
  32. +
  33. 字典数据采用分页
  34. +
  35. 部分细节调整优化
  36. +
+
+
+
+
+
+
+ v2.3.02018.08.06 +
+
+
+
+
    +
  1. 支持表格不分页开关控制
  2. +
  3. 修改字典类型同步修改字典数据
  4. +
  5. 代码生成新增修改后缀处理
  6. +
  7. 代码生成新增实体toString
  8. +
  9. 代码生成非字符串去除!=''
  10. +
  11. 导出数据前加载遮罩层
  12. +
  13. 部门删除校验条件修改
  14. +
  15. 搜索查询下载优化
  16. +
  17. 手机打开弹出层自适应
  18. +
  19. 角色岗位禁用显示置灰
  20. +
  21. 角色禁用不显示菜单
  22. +
  23. 新增导出权限
  24. +
  25. 角色权限唯一校验
  26. +
  27. 岗位名称编码唯一校验
  28. +
  29. TreeTable优化
  30. +
  31. 支持多数据源
  32. +
  33. 其他细节优化
  34. +
+
+
+
+
+
+
+ v2.2.02018.07.23 +
+
+
+
+
    +
  1. 修复批量生成代码异常问题
  2. +
  3. 修复定时器保存失败问题
  4. +
  5. 修复热部署转换问题
  6. +
  7. 支持查询菜单管理,部门管理
  8. +
  9. 大多数功能支持时间查询
  10. +
  11. 自定义导出注解自动匹配column
  12. +
  13. 新增任务执行策略
  14. +
  15. 操作详细动态显示类型
  16. +
  17. 支持动态回显字典数据
  18. +
  19. 后台代码优化调整
  20. +
  21. 其他细节优化
  22. +
+
+
+
+
+
+
+ v2.1.02018.07.10 +
+
+
+
+
    +
  1. 新增登录超时提醒
  2. +
  3. 修复定时器热部署转换问题
  4. +
  5. 修复登录验证码校验无效问题
  6. +
  7. 定时任务新增立即执行一次
  8. +
  9. 存在字典数据不允许删除字典
  10. +
  11. 字典数据支持按名称查询
  12. +
  13. 代码生成增加日志注解&表格优化
  14. +
  15. 修复用户逻辑删除后能登录问题
  16. +
  17. 表格支持多字段动态排序
  18. +
  19. 支持三级菜单显示
  20. +
  21. 新增ry.sh启动程序脚本
  22. +
  23. 其他细节优化
  24. +
+
+
+
+
+
+
+ v2.0.02018.07.02 +
+
+
+
+
    +
  1. 升级SpringBoot到最新版本2.0.3
  2. +
  3. 新增公告管理
  4. +
  5. 表单校验示提体验优化
  6. +
  7. 前端通用方法封装调整
  8. +
  9. 前端去除js文件,合并到html
  10. +
  11. 操作加载遮罩层
  12. +
  13. 支持全屏模式操作
  14. +
  15. 支持注解导出数据
  16. +
  17. 系统支持多查询&下载
  18. +
  19. 系统样式调整
  20. +
+
+
+
+
+
+
+ v1.1.62018.06.04 +
+
+
+
+
    +
  1. 新增用户列表部门列
  2. +
  3. 新增登录地点
  4. +
  5. 新增swagger
  6. +
  7. 修复排序数字校验
  8. +
  9. 优化头像上传文件类型限定为图片
  10. +
  11. 新增XSS过滤
  12. +
  13. 新增热部署提高开发效率
  14. +
  15. 修复treegrid居中无效
  16. +
  17. 角色多条件查询
  18. +
+
+
+
+
+
+
+ v1.1.52018.05.28 +
+
+
+
+
    +
  1. 优化登录失败刷新验证码
  2. +
  3. 新增用户登录地址时间
  4. +
  5. 修复ajax超时退出问题
  6. +
  7. 新增html调用数据字典(若依首创)
  8. +
  9. 调整系统部分样式
  10. +
  11. 新增用户逻辑删除
  12. +
  13. 新增管理员不允许删除修改
  14. +
  15. 升级bootstrapTable到最新版本1.12.1
  16. +
  17. 升级layer到最新版本3.1.1
  18. +
+
+
+
+
+
+
+ v1.1.42018.05.20 +
+
+
+
+
    +
  1. 新增参数管理
  2. +
  3. 修复头像上传bug
  4. +
  5. 手机邮箱唯一校验
  6. +
  7. 支持手机邮箱登录
  8. +
  9. 代码生成优化
  10. +
  11. 支持模糊查询
  12. +
  13. 支持切换主题皮肤
  14. +
  15. 修改权限即时生效
  16. +
  17. 修复页签Tab关闭问题
  18. +
+
+
+
+
+
+
+ v1.1.32018.05.14 +
+
+
+
+
    +
  1. 新增验证码(数组计算、字符验证)
  2. +
  3. 新增cookie记住我
  4. +
  5. 新增头像上传
  6. +
  7. 用户名密码长度限制
  8. +
  9. 通用字段提取
  10. +
  11. 支持自定义条件查询
  12. +
  13. 部门名称必填、时间格式调整
  14. +
  15. 其他细节优化
  16. +
+
+
+
+
+
+
+ v1.1.22018.05.07 +
+
+
+
+
    +
  1. 新增个人信息修改
  2. +
  3. 菜单存在子菜单不允许删除
  4. +
  5. 菜单分配角色不允许删除
  6. +
  7. 角色分配人员不允许删除
  8. +
  9. 岗位使用后不允许删除
  10. +
  11. 保证用户的数据完整性加入事物
  12. +
  13. 新增环境使用手册、数据建模
  14. +
  15. Thymeleaf升级到3.0
  16. +
  17. 支持非ROOT部署
  18. +
+
+
+
+
+
+
+ v1.1.12018.04.23 +
+
+
+
+
    +
  1. 新增表单构建器
  2. +
  3. 代码生成优化
  4. +
  5. 支持新增主部门
  6. +
  7. 支持选择上级部门、上级菜单
  8. +
  9. 新增字典管理单条删除
  10. +
  11. 优化一些其他细节
  12. +
+
+
+
+
+
+
+ v1.1.02018.04.20 +
+
+
+
+
    +
  1. 支持密码盐
  2. +
  3. 支持新增主目录
  4. +
  5. 支持批量生成代码
  6. +
  7. 支持表格导出(csv、txt、doc、excel)
  8. +
  9. 自动适应宽高模式窗体
  10. +
  11. 重复校验(角色名、菜单名、部门名)
  12. +
  13. 优化一些其他细节
  14. +
+
+
+
+
+
+
+ v1.0.92018.04.14 +
+
+
+
+
    +
  1. 新增代码生成(生成包括 java、html、js、xml、sql)
  2. +
  3. 新增按钮权限控制隐藏(若依首创)
  4. +
+
+
+
+
+
+
+ v1.0.82018.04.08 +
+
+
+
+
    +
  1. 新增定时任务(新增、修改、删除、查询、启动/暂停)
  2. +
  3. 新增调度日志(查询、删除)
  4. +
+
+
+
+
+
+
+ v1.0.72018.04.04 +
+
+
+
+
    +
  1. 新增岗位管理(新增、修改、删除、查询)
  2. +
  3. 优化用户管理,菜单管理部分细节
  4. +
+
+
+
+
+
+
+ v1.0.62018.03.15 +
+
+
+
+
    +
  1. 新增字典管理(新增、删除、修改、查询、数据选择)
  2. +
  3. 新增用户密码重置
  4. +
  5. 优化一些其他细节
  6. +
+
+
+
+
+
+
+ v1.0.52018.03.12 +
+
+
+
+
    +
  1. 新增菜单管理(新增、删除、修改、查询、图标选择)
  2. +
  3. 部门管理优化(添加责任人、联系电话、邮箱、修改者)
  4. +
+
+
+
+
+
+
+ v1.0.42018.03.11 +
+
+
+
+
    +
  1. 新增角色管理(新增、删除、修改、查询、菜单选择)
  2. +
+
+
+
+
+
+
+ v1.0.32018.03.08 +
+
+
+
+
    +
  1. 新增用户管理(新增、删除、修改、查询、部门选择)
  2. +
+
+
+
+
+
+
+ v1.0.22018.03.04 +
+
+
+
+
    +
  1. 新增部门管理 (新增、删除、修改、查询)
  2. +
+
+
+
+
+
+
+ v1.0.12018.03.03 +
+
+
+
+
    +
  1. 新增在线用户 (批量强退、单条强退、查询)
  2. +
  3. 新增登录日志 (批量删除、查询)
  4. +
  5. 新增操作日志 (批量删除、查询、详细)
  6. +
  7. 新增数据监控 (监控DB池连接和SQL的执行)
  8. +
+
+
+
+
+
+

+ v1.0.02018.03.01 +

+
+
+
+
    +
  1. 若依管理系统正式发布。
  2. +
+
+
+
+
+
+
+
+
+
+
+
+
捐赠
+
+
+
+ 请作者喝杯咖啡(点击图片放大) +
+

+ 请使用手机支付宝或者微信扫码支付 + +

+ +
+
+
+
+
+ + + + + + diff --git a/ruoyi-admin/src/main/resources/templates/main_v1.html b/ruoyi-admin/src/main/resources/templates/main_v1.html deleted file mode 100644 index f0e434bc..00000000 --- a/ruoyi-admin/src/main/resources/templates/main_v1.html +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - 统计 - - - - - - - - -
- -
-
-
-
- -
收入
-
-
-

40 886,200

-
98% -
- 总收入 -
-
-
-
-
-
- 全年 -
订单
-
-
-

275,800

-
20% -
- 新订单 -
-
-
-
-
-
- 今天 -
访客
-
-
-

106,120

-
44% -
- 新访客 -
-
-
-
-
-
- 最近一个月 -
活跃用户
-
-
-

80,600

-
38% -
- 12月 -
-
-
-
- -
-
-
-
-
订单
-
-
- - - -
-
-
-
-
-
-
-
-
-
-
-
    -
  • -

    2,346

    - 订单总数 -
    48% -
    -
    -
    -
    -
  • -
  • -

    4,422

    - 最近一个月订单 -
    60% -
    -
    -
    -
    -
  • -
  • -

    9,180

    - 最近一个月销售额 -
    22% -
    -
    -
    -
    -
  • -
-
-
-
-
-
-
- -
-
-
-
-
用户项目列表
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
状态日期用户
进行中... - 11:20青衣5858 24%
已取消 - 10:40徐子崴 66%
进行中... - 01:30姜岚昕 54%
进行中... - 02:20武汉大兵哥 12%
进行中... - 09:40荆莹儿 22%
已完成 - 04:10栾某某 66%
进行中... - 12:08范范范二妮 23%
-
-
-
-
-
- - - - - - - - - diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml index 7148fca3..a7622fb8 100644 --- a/ruoyi-common/pom.xml +++ b/ruoyi-common/pom.xml @@ -34,7 +34,7 @@ org.apache.shiro shiro-core - + org.apache.shiro @@ -101,6 +101,13 @@ javax.servlet-api + + + cn.hutool + hutool-json + 5.4.0 + + \ No newline at end of file diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java index ebd301ea..74377b14 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java @@ -30,6 +30,8 @@ public class AjaxResult extends HashMap SUCCESS(0), /** 警告 */ WARN(301), + /** 未登录或无权限 */ + FORBIDDEN(403), /** 错误 */ ERROR(500); private final int value; @@ -193,4 +195,8 @@ public class AjaxResult extends HashMap { return new AjaxResult(Type.ERROR, msg, data); } + + public static AjaxResult notLogin(){ + return new AjaxResult(Type.FORBIDDEN, "未登录或权限不足"); + } } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/exception/wx/NotLoginException.java b/ruoyi-common/src/main/java/com/ruoyi/common/exception/wx/NotLoginException.java new file mode 100644 index 00000000..9c3ff2bd --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/exception/wx/NotLoginException.java @@ -0,0 +1,8 @@ +package com.ruoyi.common.exception.wx; + +/** + * 未登录异常 + */ +public class NotLoginException extends RuntimeException{ + +} diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/exception/wx/WxBusinessException.java b/ruoyi-common/src/main/java/com/ruoyi/common/exception/wx/WxBusinessException.java new file mode 100644 index 00000000..143e04ca --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/exception/wx/WxBusinessException.java @@ -0,0 +1,9 @@ +package com.ruoyi.common.exception.wx; + +import com.ruoyi.common.exception.base.BaseException; + +public class WxBusinessException extends BaseException { + public WxBusinessException(String defaultMessage) { + super(defaultMessage); + } +} diff --git a/ruoyi-framework/pom.xml b/ruoyi-framework/pom.xml index 9287ec41..c422304c 100644 --- a/ruoyi-framework/pom.xml +++ b/ruoyi-framework/pom.xml @@ -77,6 +77,12 @@ ruoyi-system + + + com.ruoyi + wx-record-order + + \ No newline at end of file diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java index 4a1c6310..61b7c9d8 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java @@ -3,10 +3,7 @@ package com.ruoyi.framework.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; -import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; -import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import org.springframework.web.servlet.config.annotation.*; import com.ruoyi.common.config.RuoYiConfig; import com.ruoyi.common.constant.Constants; import com.ruoyi.framework.interceptor.RepeatSubmitInterceptor; @@ -56,4 +53,13 @@ public class ResourcesConfig implements WebMvcConfigurer { registry.addInterceptor(repeatSubmitInterceptor).addPathPatterns("/**"); } + @Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/wx/api/**") + .allowedOrigins("*") + .allowedMethods("OPTIONS", "POST", "GET", "DELETE") + .allowedHeaders("Origin", "Content-Type", "Accept", "token") + .allowCredentials(true) + .maxAge(3600); + } } \ No newline at end of file diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java index d6feedb8..b8d351a8 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java @@ -279,6 +279,10 @@ public class ShiroConfig filterChainDefinitionMap.put("/js/**", "anon"); filterChainDefinitionMap.put("/ruoyi/**", "anon"); filterChainDefinitionMap.put("/captcha/captchaImage**", "anon"); + + filterChainDefinitionMap.put("/wx/api/**", "anon"); + filterChainDefinitionMap.put("/s/**", "anon"); + // 退出 logout地址,shiro去清除session filterChainDefinitionMap.put("/logout", "logout"); // 不需要拦截的访问 diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java index 2ff35774..15336058 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java @@ -1,6 +1,12 @@ package com.ruoyi.framework.web.exception; -import javax.servlet.http.HttpServletRequest; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.exception.BusinessException; +import com.ruoyi.common.exception.DemoModeException; +import com.ruoyi.common.exception.wx.NotLoginException; +import com.ruoyi.common.exception.wx.WxBusinessException; +import com.ruoyi.common.utils.ServletUtils; +import com.ruoyi.common.utils.security.PermissionUtils; import org.apache.shiro.authz.AuthorizationException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -9,35 +15,27 @@ import org.springframework.web.HttpRequestMethodNotSupportedException; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; import org.springframework.web.servlet.ModelAndView; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.exception.BusinessException; -import com.ruoyi.common.exception.DemoModeException; -import com.ruoyi.common.utils.ServletUtils; -import com.ruoyi.common.utils.security.PermissionUtils; + +import javax.servlet.http.HttpServletRequest; /** * 全局异常处理器 - * + * * @author ruoyi */ @RestControllerAdvice -public class GlobalExceptionHandler -{ +public class GlobalExceptionHandler { private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class); /** * 权限校验失败 如果请求为ajax返回json,普通请求跳转页面 */ @ExceptionHandler(AuthorizationException.class) - public Object handleAuthorizationException(HttpServletRequest request, AuthorizationException e) - { + public Object handleAuthorizationException(HttpServletRequest request, AuthorizationException e) { log.error(e.getMessage(), e); - if (ServletUtils.isAjaxRequest(request)) - { + if (ServletUtils.isAjaxRequest(request)) { return AjaxResult.error(PermissionUtils.getMsg(e.getMessage())); - } - else - { + } else { ModelAndView modelAndView = new ModelAndView(); modelAndView.setViewName("error/unauth"); return modelAndView; @@ -47,9 +45,8 @@ public class GlobalExceptionHandler /** * 请求方式不支持 */ - @ExceptionHandler({ HttpRequestMethodNotSupportedException.class }) - public AjaxResult handleException(HttpRequestMethodNotSupportedException e) - { + @ExceptionHandler({HttpRequestMethodNotSupportedException.class}) + public AjaxResult handleException(HttpRequestMethodNotSupportedException e) { log.error(e.getMessage(), e); return AjaxResult.error("不支持' " + e.getMethod() + "'请求"); } @@ -58,8 +55,7 @@ public class GlobalExceptionHandler * 拦截未知的运行时异常 */ @ExceptionHandler(RuntimeException.class) - public AjaxResult notFount(RuntimeException e) - { + public AjaxResult notFount(RuntimeException e) { log.error("运行时异常:", e); return AjaxResult.error("运行时异常:" + e.getMessage()); } @@ -68,8 +64,7 @@ public class GlobalExceptionHandler * 系统异常 */ @ExceptionHandler(Exception.class) - public AjaxResult handleException(Exception e) - { + public AjaxResult handleException(Exception e) { log.error(e.getMessage(), e); return AjaxResult.error("服务器错误,请联系管理员"); } @@ -78,15 +73,11 @@ public class GlobalExceptionHandler * 业务异常 */ @ExceptionHandler(BusinessException.class) - public Object businessException(HttpServletRequest request, BusinessException e) - { + public Object businessException(HttpServletRequest request, BusinessException e) { log.error(e.getMessage(), e); - if (ServletUtils.isAjaxRequest(request)) - { + if (ServletUtils.isAjaxRequest(request)) { return AjaxResult.error(e.getMessage()); - } - else - { + } else { ModelAndView modelAndView = new ModelAndView(); modelAndView.addObject("errorMessage", e.getMessage()); modelAndView.setViewName("error/business"); @@ -98,8 +89,7 @@ public class GlobalExceptionHandler * 自定义验证异常 */ @ExceptionHandler(BindException.class) - public AjaxResult validatedBindException(BindException e) - { + public AjaxResult validatedBindException(BindException e) { log.error(e.getMessage(), e); String message = e.getAllErrors().get(0).getDefaultMessage(); return AjaxResult.error(message); @@ -109,8 +99,20 @@ public class GlobalExceptionHandler * 演示模式异常 */ @ExceptionHandler(DemoModeException.class) - public AjaxResult demoModeException(DemoModeException e) - { + public AjaxResult demoModeException(DemoModeException e) { return AjaxResult.error("演示模式,不允许操作"); } + + /** + * 小程序未登录异常 + */ + @ExceptionHandler(NotLoginException.class) + public AjaxResult notLoginException() { + return AjaxResult.notLogin(); + } + + @ExceptionHandler(WxBusinessException.class) + public AjaxResult wxBusinessException(WxBusinessException e) { + return AjaxResult.error(e.getMessage()); + } } diff --git a/wx-record-order/doc/docus.cn.csr b/wx-record-order/doc/docus.cn.csr new file mode 100644 index 00000000..e69de29b diff --git a/wx-record-order/doc/docus.cn.key b/wx-record-order/doc/docus.cn.key new file mode 100644 index 00000000..e69de29b diff --git a/wx-record-order/doc/docus.cn.pem b/wx-record-order/doc/docus.cn.pem new file mode 100644 index 00000000..e69de29b diff --git a/wx-record-order/doc/wx.docus.cn.csr b/wx-record-order/doc/wx.docus.cn.csr new file mode 100644 index 00000000..e69de29b diff --git a/wx-record-order/doc/wx.docus.cn.key b/wx-record-order/doc/wx.docus.cn.key new file mode 100644 index 00000000..e69de29b diff --git a/wx-record-order/doc/wx.docus.cn.pem b/wx-record-order/doc/wx.docus.cn.pem new file mode 100644 index 00000000..e69de29b diff --git a/wx-record-order/doc/小程序表设计.xlsx b/wx-record-order/doc/小程序表设计.xlsx new file mode 100644 index 00000000..37f14f5f Binary files /dev/null and b/wx-record-order/doc/小程序表设计.xlsx differ diff --git a/wx-record-order/doc/病案室审核.xmind b/wx-record-order/doc/病案室审核.xmind new file mode 100644 index 00000000..0e3233ac Binary files /dev/null and b/wx-record-order/doc/病案室审核.xmind differ diff --git a/wx-record-order/doc/病案调用.xmind b/wx-record-order/doc/病案调用.xmind new file mode 100644 index 00000000..90d220d3 Binary files /dev/null and b/wx-record-order/doc/病案调用.xmind differ diff --git a/wx-record-order/doc/短信通知模板.txt b/wx-record-order/doc/短信通知模板.txt new file mode 100644 index 00000000..257dcaad --- /dev/null +++ b/wx-record-order/doc/短信通知模板.txt @@ -0,0 +1,6 @@ +SMS_212471722 +老师您好,您需要的电子扫描资料已上传,小程序中可查看下载地址,解压密码${pwd}。请您及时查收,如有问题,随时联系。 + + +SMS_212476711 +老师您好,您需要的原件资料已顺丰帮您发出,顺丰单号${nu},请您及时关注物流信息。 \ No newline at end of file diff --git a/wx-record-order/pom.xml b/wx-record-order/pom.xml new file mode 100644 index 00000000..b435462a --- /dev/null +++ b/wx-record-order/pom.xml @@ -0,0 +1,44 @@ + + + + ruoyi + com.ruoyi + 4.6.0 + + 4.0.0 + + wx-record-order + + + 8 + 8 + + + + + com.ruoyi + ruoyi-common + + + + + com.github.binarywang + weixin-java-miniapp + 4.0.0 + + + + com.aliyun + dysmsapi20170525 + 2.0.1 + + + com.aliyun + tea + 1.1.8 + + + + \ No newline at end of file diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/controller/ApiRestController.java b/wx-record-order/src/main/java/com/ruoyi/wx/controller/ApiRestController.java new file mode 100644 index 00000000..22e8c5d4 --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/controller/ApiRestController.java @@ -0,0 +1,63 @@ +package com.ruoyi.wx.controller; + +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.wx.domain.MrRecordOrder; +import com.ruoyi.wx.dto.req.OrderListReqDTO; +import com.ruoyi.wx.dto.req.UserSignInfo; +import com.ruoyi.wx.service.IMrRecordOrderService; +import com.ruoyi.wx.service.IWxUserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +@RestController +@RequestMapping("wx/api/") +public class ApiRestController { + @Autowired + private IWxUserService wxUserService; + + @Autowired + private IMrRecordOrderService mrRecordOrderService; + + /** + * 小程序授权时调用 + */ + @PostMapping("autoLogin") + public AjaxResult autoLogin(String wxCode) { + return AjaxResult.success(wxUserService.login(wxCode)); + } + + /** + * 小程序提交审核时发起 + * 更新用户的基本信息 + */ + @PostMapping("signIn") + public AjaxResult signIn(@RequestBody UserSignInfo userSignInfo) { + wxUserService.signIn(userSignInfo); + return AjaxResult.success(); + } + + /** + * 获取用户审核状态,并更新用户资料 + */ + @PostMapping("info") + public AjaxResult info(@RequestBody UserSignInfo userSignInfo) { + return AjaxResult.success(wxUserService.info(userSignInfo)); + } + + /** + * 提交申请 + */ + @PostMapping("order") + public AjaxResult order(@RequestBody MrRecordOrder order) { + mrRecordOrderService.createOrder(order); + return AjaxResult.success(); + } + + /** + * 查询申请列表 + */ + @PostMapping("orderList") + public AjaxResult orderList(@RequestBody OrderListReqDTO orderListReqDTO) { + return AjaxResult.success(mrRecordOrderService.list(orderListReqDTO)); + } +} diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/controller/MrRecordOrderController.java b/wx-record-order/src/main/java/com/ruoyi/wx/controller/MrRecordOrderController.java new file mode 100644 index 00000000..fee075e4 --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/controller/MrRecordOrderController.java @@ -0,0 +1,151 @@ +package com.ruoyi.wx.controller; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.config.RuoYiConfig; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.file.FileUploadUtils; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.wx.domain.MrRecordOrder; +import com.ruoyi.wx.service.IMrRecordOrderService; +import com.ruoyi.wx.util.ShortUrlUtils; +import org.apache.commons.lang3.RandomStringUtils; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; +import java.util.List; + +/** + * 病案申请Controller + * + * @author ruoyi + * @date 2021-02-24 + */ +@Controller +@RequestMapping("/wx/order") +public class MrRecordOrderController extends BaseController { + private String prefix = "wx/order"; + + @Value("${server.servlet.domain}") + private String domain; + + @Autowired + private IMrRecordOrderService mrRecordOrderService; + + @RequiresPermissions("wx:order:view") + @GetMapping() + public String order() { + return prefix + "/order"; + } + + /** + * 查询病案申请列表 + */ + @RequiresPermissions("wx:order:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(MrRecordOrder mrRecordOrder) { + startPage(); + List list = mrRecordOrderService.selectMrRecordOrderList(mrRecordOrder); + return getDataTable(list); + } + + /** + * 导出病案申请列表 + */ + @RequiresPermissions("wx:order:export") + @Log(title = "病案申请", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(MrRecordOrder mrRecordOrder) { + List list = mrRecordOrderService.selectMrRecordOrderList(mrRecordOrder); + ExcelUtil util = new ExcelUtil(MrRecordOrder.class); + return util.exportExcel(list, "order"); + } + + /** + * 新增病案申请 + */ + @GetMapping("/add") + public String add() { + return prefix + "/add"; + } + + /** + * 新增保存病案申请 + */ + @RequiresPermissions("wx:order:add") + @Log(title = "病案申请", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(MrRecordOrder mrRecordOrder) { + return toAjax(mrRecordOrderService.insertMrRecordOrder(mrRecordOrder)); + } + + /** + * 修改病案申请 + */ + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") Long id, ModelMap mmap) { + MrRecordOrder mrRecordOrder = mrRecordOrderService.selectMrRecordOrderById(id); + mmap.put("mrRecordOrder", mrRecordOrder); + return prefix + "/edit"; + } + + /** + * 修改保存病案申请 + */ + @RequiresPermissions("wx:order:edit") + @Log(title = "病案申请", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(MrRecordOrder mrRecordOrder) { + return toAjax(mrRecordOrderService.updateMrRecordOrder(mrRecordOrder)); + } + + /** + * 删除病案申请 + */ + @RequiresPermissions("wx:order:remove") + @Log(title = "病案申请", businessType = BusinessType.DELETE) + @PostMapping("/remove") + @ResponseBody + public AjaxResult remove(String ids) { + return toAjax(mrRecordOrderService.deleteMrRecordOrderByIds(ids)); + } + + @GetMapping("/sendView/{id}") + public String sendView(@PathVariable("id") Long id, ModelMap mmap) { + MrRecordOrder mrRecordOrder = mrRecordOrderService.selectMrRecordOrderById(id); + mmap.put("mrRecordOrder", mrRecordOrder); + mmap.put("randomCode", RandomStringUtils.random(8,true,true)); + return prefix + "/sendView"; + } + + @Log(title = "发送病案处理短信", businessType = BusinessType.UPDATE) + @PostMapping("/sendSms") + @ResponseBody + public AjaxResult sendSms(MrRecordOrder mrRecordOrder) { + return toAjax(mrRecordOrderService.sendSms(mrRecordOrder)); + } + + @PostMapping("/upload") + @ResponseBody + public AjaxResult upload(@RequestParam("file_data") MultipartFile file) throws IOException { + // 上传文件路径 + String filePath = RuoYiConfig.getUploadPath(); + // 上传并返回新文件名称 + String fileName = FileUploadUtils.upload(filePath, file); + // 保存短网址对应关系 + String code=mrRecordOrderService.randomCode(fileName,file.getOriginalFilename()); + return AjaxResult.success("上传成功", domain+"/s/"+code); + } +} diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/controller/ShortUrlController.java b/wx-record-order/src/main/java/com/ruoyi/wx/controller/ShortUrlController.java new file mode 100644 index 00000000..9529bb1f --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/controller/ShortUrlController.java @@ -0,0 +1,30 @@ +package com.ruoyi.wx.controller; + +import cn.hutool.json.JSONObject; +import cn.hutool.json.JSONUtil; +import com.ruoyi.wx.service.IMrRecordOrderService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; + +import javax.servlet.http.HttpServletResponse; +import java.util.Map; + +@Controller +@RequestMapping("s") +public class ShortUrlController { + @Autowired + private IMrRecordOrderService mrRecordOrderService; + + @RequestMapping("{code}") + public String redirectTo(@PathVariable String code, HttpServletResponse response) { + Map urlHeaders = mrRecordOrderService.getUrlHeaders(code); + String headers = urlHeaders.get("headers"); + JSONObject jsonObject = JSONUtil.parseObj(headers); + jsonObject.forEach((k, v) -> { + response.setHeader(k, (String) v); + }); + return "forward:" + urlHeaders.get("url"); + } +} diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/controller/WxUserController.java b/wx-record-order/src/main/java/com/ruoyi/wx/controller/WxUserController.java new file mode 100644 index 00000000..a633b047 --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/controller/WxUserController.java @@ -0,0 +1,141 @@ +package com.ruoyi.wx.controller; + +import java.util.List; + +import com.ruoyi.wx.domain.WxUser; +import com.ruoyi.wx.service.IWxUserService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 微信小程序用户Controller + * + * @author ruoyi + * @date 2021-02-24 + */ +@Controller +@RequestMapping("/wx/user") +public class WxUserController extends BaseController +{ + private String prefix = "wx/user"; + + @Autowired + private IWxUserService wxUserService; + + @RequiresPermissions("wx:user:view") + @GetMapping() + public String user() + { + return prefix + "/user"; + } + + /** + * 查询微信小程序用户列表 + */ + @RequiresPermissions("wx:user:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(WxUser wxUser) + { + startPage(); + List list = wxUserService.selectWxUserList(wxUser); + return getDataTable(list); + } + + /** + * 导出微信小程序用户列表 + */ + @RequiresPermissions("wx:user:export") + @Log(title = "微信小程序用户", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(WxUser wxUser) + { + List list = wxUserService.selectWxUserList(wxUser); + ExcelUtil util = new ExcelUtil(WxUser.class); + return util.exportExcel(list, "user"); + } + + /** + * 新增微信小程序用户 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存微信小程序用户 + */ + @RequiresPermissions("wx:user:add") + @Log(title = "微信小程序用户", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(WxUser wxUser) + { + return toAjax(wxUserService.insertWxUser(wxUser)); + } + + /** + * 修改微信小程序用户 + */ + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") Long id, ModelMap mmap) + { + WxUser wxUser = wxUserService.selectWxUserById(id); + mmap.put("wxUser", wxUser); + return prefix + "/edit"; + } + + /** + * 修改保存微信小程序用户 + */ + @RequiresPermissions("wx:user:edit") + @Log(title = "微信小程序用户", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(WxUser wxUser) + { + return toAjax(wxUserService.updateWxUser(wxUser)); + } + + /** + * 删除微信小程序用户 + */ + @RequiresPermissions("wx:user:remove") + @Log(title = "微信小程序用户", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(wxUserService.deleteWxUserByIds(ids)); + } + + @Log(title = "审核微信小程序用户", businessType = BusinessType.UPDATE) + @PostMapping( "/checkUser") + @ResponseBody + public AjaxResult checkUser(Long id){ + return toAjax(wxUserService.checkUser(id)); + } + + @Log(title = "修改微信小程序用户状态", businessType = BusinessType.UPDATE) + @PostMapping( "/triggerStatus") + @ResponseBody + public AjaxResult triggerStatus(Long id){ + return toAjax(wxUserService.triggerStatus(id)); + } +} diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/domain/MrRecordOrder.java b/wx-record-order/src/main/java/com/ruoyi/wx/domain/MrRecordOrder.java new file mode 100644 index 00000000..5b343b63 --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/domain/MrRecordOrder.java @@ -0,0 +1,216 @@ +package com.ruoyi.wx.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 病案申请对象 mr_record_order + * + * @author ruoyi + * @date 2021-02-24 + */ +public class MrRecordOrder extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 申请类型:0原件寄回,1电子扫描件 */ + @Excel(name = "申请类型:") + private Integer type; + + /** 病案号 */ + @Excel(name = "病案号") + private String mrNumber; + + /** 患者姓名 */ + @Excel(name = "患者姓名") + private String patientName; + + /** 出院日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "出院日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date dischargeDate; + + /** 住院次数 */ + @Excel(name = "住院次数") + private Long times; + + /** 申请人申请人 对应wx_user表id */ + @Excel(name = "申请人") + private Long applicantId; + + /** 医院名称 */ + @Excel(name = "医院名称") + private String hospital; + + /** 寄送地址 */ + @Excel(name = "寄送地址") + private String address; + @Excel(name = "快递公司") + private String delivery; + @Excel(name = "运单号") + private String trackingNumber; + + /** 下载地址 */ + @Excel(name = "下载地址") + private String downloadUrl; + + /** 解压密码 */ + @Excel(name = "解压密码") + private String unzipPwd; + + /** 申请状态 0 申请中 1 已完成 */ + @Excel(name = "申请状态") + private Integer status; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setType(Integer type) + { + this.type = type; + } + + public Integer getType() + { + return type; + } + public void setMrNumber(String mrNumber) + { + this.mrNumber = mrNumber; + } + + public String getMrNumber() + { + return mrNumber; + } + public void setPatientName(String patientName) + { + this.patientName = patientName; + } + + public String getPatientName() + { + return patientName; + } + public void setDischargeDate(Date dischargeDate) + { + this.dischargeDate = dischargeDate; + } + + public Date getDischargeDate() + { + return dischargeDate; + } + public void setTimes(Long times) + { + this.times = times; + } + + public Long getTimes() + { + return times; + } + public void setApplicantId(Long applicantId) + { + this.applicantId = applicantId; + } + + public Long getApplicantId() + { + return applicantId; + } + public void setHospital(String hospital) + { + this.hospital = hospital; + } + + public String getHospital() + { + return hospital; + } + public void setAddress(String address) + { + this.address = address; + } + + public String getAddress() + { + return address; + } + public void setDownloadUrl(String downloadUrl) + { + this.downloadUrl = downloadUrl; + } + + public String getDownloadUrl() + { + return downloadUrl; + } + public void setUnzipPwd(String unzipPwd) + { + this.unzipPwd = unzipPwd; + } + + public String getUnzipPwd() + { + return unzipPwd; + } + public void setStatus(Integer status) + { + this.status = status; + } + + public Integer getStatus() + { + return status; + } + + public String getDelivery() { + return delivery; + } + + public void setDelivery(String delivery) { + this.delivery = delivery; + } + + public String getTrackingNumber() { + return trackingNumber; + } + + public void setTrackingNumber(String trackingNumber) { + this.trackingNumber = trackingNumber; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("type", getType()) + .append("mrNumber", getMrNumber()) + .append("patientName", getPatientName()) + .append("dischargeDate", getDischargeDate()) + .append("times", getTimes()) + .append("applicantId", getApplicantId()) + .append("hospital", getHospital()) + .append("address", getAddress()) + .append("downloadUrl", getDownloadUrl()) + .append("unzipPwd", getUnzipPwd()) + .append("status", getStatus()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/domain/WxUser.java b/wx-record-order/src/main/java/com/ruoyi/wx/domain/WxUser.java new file mode 100644 index 00000000..f5aecd1b --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/domain/WxUser.java @@ -0,0 +1,196 @@ +package com.ruoyi.wx.domain; + +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 微信小程序用户对象 wx_user + * + * @author ruoyi + * @date 2021-02-24 + */ +public class WxUser extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private Long id; + + /** + * 用户姓名 + */ + @Excel(name = "用户姓名") + private String name; + /** + * 手机号码 + */ + @Excel(name = "手机号码") + private String phone; + + private String openid; + + /** + * 用户状态 0正常 1停用 + */ + @Excel(name = "用户状态") + private Integer status; + + /** + * 审核状态 0审核中 1审核成功 + */ + @Excel(name = "审核状态") + private Integer flag; + + /** + * 医院名称 + */ + @Excel(name = "医院名称") + private String hospital; + + /** + * 收货地址 + */ + @Excel(name = "收货地址") + private String address; + + /** + * 微信昵称 + */ + @Excel(name = "微信昵称") + private String nickname; + + /** + * 微信头像 + */ + @Excel(name = "微信头像") + private String avatar; + + /** + * 性别 + */ + private String gender; + + /** + * 登录token + */ + private String token; + + public void setId(Long id) { + this.id = id; + } + + public String getToken() { + return token; + } + + public void setToken(String token) { + this.token = token; + } + + public Long getId() { + return id; + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setOpenid(String openid) { + this.openid = openid; + } + + public String getOpenid() { + return openid; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getStatus() { + return status; + } + + public void setFlag(Integer flag) { + this.flag = flag; + } + + public Integer getFlag() { + return flag; + } + + public void setHospital(String hospital) { + this.hospital = hospital; + } + + public String getHospital() { + return hospital; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getAddress() { + return address; + } + + public void setNickname(String nickname) { + this.nickname = nickname; + } + + public String getNickname() { + return nickname; + } + + public void setAvatar(String avatar) { + this.avatar = avatar; + } + + public String getAvatar() { + return avatar; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("name", getName()) + .append("openid", getOpenid()) + .append("status", getStatus()) + .append("flag", getFlag()) + .append("hospital", getHospital()) + .append("address", getAddress()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("nickname", getNickname()) + .append("avatar", getAvatar()) + .append("phone", getPhone()) + .append("token", getToken()) + .append("gender", getGender()) + .toString(); + } +} diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/dto/RecordOrderDTO.java b/wx-record-order/src/main/java/com/ruoyi/wx/dto/RecordOrderDTO.java new file mode 100644 index 00000000..dabf9bb5 --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/dto/RecordOrderDTO.java @@ -0,0 +1,129 @@ +package com.ruoyi.wx.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.util.Date; + +public class RecordOrderDTO { + /** + * 主键 + */ + private Long id; + + private String type; + + /** + * 病案号 + */ + private String mrNumber; + + /** + * 患者姓名 + */ + private String patientName; + + /** + * 出院日期 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + private Date dischargeDate; + + /** + * 住院次数 + */ + private Long times; + + /** + * 医院名称 + */ + private String hospital; + + /** + * 寄送地址 + */ + private String address; + + private String status; + + private String downUrl; + + public String getDownUrl() { + return downUrl; + } + + public void setDownUrl(String downUrl) { + this.downUrl = downUrl; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getMrNumber() { + return mrNumber; + } + + public void setMrNumber(String mrNumber) { + this.mrNumber = mrNumber; + } + + public String getPatientName() { + return patientName; + } + + public void setPatientName(String patientName) { + this.patientName = patientName; + } + + public Date getDischargeDate() { + return dischargeDate; + } + + public void setDischargeDate(Date dischargeDate) { + this.dischargeDate = dischargeDate; + } + + public Long getTimes() { + return times; + } + + public void setTimes(Long times) { + this.times = times; + } + + public String getHospital() { + return hospital; + } + + public void setHospital(String hospital) { + this.hospital = hospital; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } +} diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/dto/WxUserDTO.java b/wx-record-order/src/main/java/com/ruoyi/wx/dto/WxUserDTO.java new file mode 100644 index 00000000..76f9e34a --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/dto/WxUserDTO.java @@ -0,0 +1,112 @@ +package com.ruoyi.wx.dto; + +import com.ruoyi.common.annotation.Excel; + +/** + * 用户登录对象 + */ +public class WxUserDTO { + /** + * 主键 + */ + private Long id; + + /** + * 用户姓名 + */ + @Excel(name = "用户姓名") + private String name; + /** + * 手机号码 + */ + @Excel(name = "手机号码") + private String phone; + /** + * 用户状态 0正常 1停用 + */ + @Excel(name = "用户状态") + private Integer status; + /** + * 审核状态 0审核中 1审核成功 + */ + @Excel(name = "审核状态") + private Integer flag; + + /** + * 医院名称 + */ + @Excel(name = "医院名称") + private String hospital; + + /** + * 收货地址 + */ + @Excel(name = "收货地址") + private String address; + + private String token; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getFlag() { + return flag; + } + + public void setFlag(Integer flag) { + this.flag = flag; + } + + public String getHospital() { + return hospital; + } + + public void setHospital(String hospital) { + this.hospital = hospital; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getToken() { + return token; + } + + public void setToken(String token) { + this.token = token; + } +} diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/dto/req/OrderListReqDTO.java b/wx-record-order/src/main/java/com/ruoyi/wx/dto/req/OrderListReqDTO.java new file mode 100644 index 00000000..fd8cdea6 --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/dto/req/OrderListReqDTO.java @@ -0,0 +1,31 @@ +package com.ruoyi.wx.dto.req; + +public class OrderListReqDTO { + private String keyword; + private Integer page; + private Integer status; + + public String getKeyword() { + return keyword; + } + + public void setKeyword(String keyword) { + this.keyword = keyword; + } + + public Integer getPage() { + return page; + } + + public void setPage(Integer page) { + this.page = page; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } +} diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/dto/req/UserSignInfo.java b/wx-record-order/src/main/java/com/ruoyi/wx/dto/req/UserSignInfo.java new file mode 100644 index 00000000..d209fd1f --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/dto/req/UserSignInfo.java @@ -0,0 +1,58 @@ +package com.ruoyi.wx.dto.req; + +public class UserSignInfo { + private String nickName; + private String gender; + private String avatar; + private String name; + private String phone; + private String hospital; + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public String getAvatar() { + return avatar; + } + + public void setAvatar(String avatar) { + this.avatar = avatar; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getHospital() { + return hospital; + } + + public void setHospital(String hospital) { + this.hospital = hospital; + } +} diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/mapper/MrRecordOrderMapper.java b/wx-record-order/src/main/java/com/ruoyi/wx/mapper/MrRecordOrderMapper.java new file mode 100644 index 00000000..9a89ed30 --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/mapper/MrRecordOrderMapper.java @@ -0,0 +1,71 @@ +package com.ruoyi.wx.mapper; + +import java.util.List; +import java.util.Map; + +import com.ruoyi.wx.domain.MrRecordOrder; +import com.ruoyi.wx.dto.RecordOrderDTO; +import org.apache.ibatis.annotations.Param; + +/** + * 病案申请Mapper接口 + * + * @author ruoyi + * @date 2021-02-24 + */ +public interface MrRecordOrderMapper +{ + /** + * 查询病案申请 + * + * @param id 病案申请ID + * @return 病案申请 + */ + public MrRecordOrder selectMrRecordOrderById(Long id); + + /** + * 查询病案申请列表 + * + * @param mrRecordOrder 病案申请 + * @return 病案申请集合 + */ + public List selectMrRecordOrderList(MrRecordOrder mrRecordOrder); + + /** + * 新增病案申请 + * + * @param mrRecordOrder 病案申请 + * @return 结果 + */ + public int insertMrRecordOrder(MrRecordOrder mrRecordOrder); + + /** + * 修改病案申请 + * + * @param mrRecordOrder 病案申请 + * @return 结果 + */ + public int updateMrRecordOrder(MrRecordOrder mrRecordOrder); + + /** + * 删除病案申请 + * + * @param id 病案申请ID + * @return 结果 + */ + public int deleteMrRecordOrderById(Long id); + + /** + * 批量删除病案申请 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteMrRecordOrderByIds(String[] ids); + + List searchList(@Param("userId")Long userId,@Param("keyword") String keyword,@Param("status") Integer status,@Param("startRow") Integer startRow,@Param("endRow") Integer endRow); + + Map getUrlHeaders(String code); + + boolean saveCodeUrl(@Param("code") String code, @Param("url") String url, @Param("headers") String headers); +} diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/mapper/WxUserMapper.java b/wx-record-order/src/main/java/com/ruoyi/wx/mapper/WxUserMapper.java new file mode 100644 index 00000000..fe2ddee2 --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/mapper/WxUserMapper.java @@ -0,0 +1,70 @@ +package com.ruoyi.wx.mapper; + +import java.util.List; +import com.ruoyi.wx.domain.WxUser; + +/** + * 微信小程序用户Mapper接口 + * + * @author ruoyi + * @date 2021-02-24 + */ +public interface WxUserMapper +{ + /** + * 查询微信小程序用户 + * + * @param id 微信小程序用户ID + * @return 微信小程序用户 + */ + public WxUser selectWxUserById(Long id); + + /** + * 查询微信小程序用户列表 + * + * @param wxUser 微信小程序用户 + * @return 微信小程序用户集合 + */ + public List selectWxUserList(WxUser wxUser); + + /** + * 新增微信小程序用户 + * + * @param wxUser 微信小程序用户 + * @return 结果 + */ + public int insertWxUser(WxUser wxUser); + + /** + * 修改微信小程序用户 + * + * @param wxUser 微信小程序用户 + * @return 结果 + */ + public int updateWxUser(WxUser wxUser); + + /** + * 删除微信小程序用户 + * + * @param id 微信小程序用户ID + * @return 结果 + */ + public int deleteWxUserById(Long id); + + /** + * 批量删除微信小程序用户 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteWxUserByIds(String[] ids); + + /** + * 根据token获取用户信息 + * @param token + * @return + */ + WxUser selectWxUserByToken(String token); + + WxUser selectWxUserByOpenid(String openid); +} diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/service/IMrRecordOrderService.java b/wx-record-order/src/main/java/com/ruoyi/wx/service/IMrRecordOrderService.java new file mode 100644 index 00000000..10384c5f --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/service/IMrRecordOrderService.java @@ -0,0 +1,75 @@ +package com.ruoyi.wx.service; + +import java.util.List; +import java.util.Map; + +import com.ruoyi.wx.domain.MrRecordOrder; +import com.ruoyi.wx.dto.RecordOrderDTO; +import com.ruoyi.wx.dto.req.OrderListReqDTO; + +/** + * 病案申请Service接口 + * + * @author ruoyi + * @date 2021-02-24 + */ +public interface IMrRecordOrderService +{ + /** + * 查询病案申请 + * + * @param id 病案申请ID + * @return 病案申请 + */ + public MrRecordOrder selectMrRecordOrderById(Long id); + + /** + * 查询病案申请列表 + * + * @param mrRecordOrder 病案申请 + * @return 病案申请集合 + */ + public List selectMrRecordOrderList(MrRecordOrder mrRecordOrder); + + /** + * 新增病案申请 + * + * @param mrRecordOrder 病案申请 + * @return 结果 + */ + public int insertMrRecordOrder(MrRecordOrder mrRecordOrder); + + /** + * 修改病案申请 + * + * @param mrRecordOrder 病案申请 + * @return 结果 + */ + public int updateMrRecordOrder(MrRecordOrder mrRecordOrder); + + /** + * 批量删除病案申请 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteMrRecordOrderByIds(String ids); + + /** + * 删除病案申请信息 + * + * @param id 病案申请ID + * @return 结果 + */ + public int deleteMrRecordOrderById(Long id); + + void createOrder(MrRecordOrder order); + + List list(OrderListReqDTO orderListReqDTO); + + boolean sendSms(MrRecordOrder mrRecordOrder); + + Map getUrlHeaders(String code); + + String randomCode(String url, String filename); +} diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/service/IWxUserService.java b/wx-record-order/src/main/java/com/ruoyi/wx/service/IWxUserService.java new file mode 100644 index 00000000..94f11437 --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/service/IWxUserService.java @@ -0,0 +1,82 @@ +package com.ruoyi.wx.service; + +import java.util.List; + +import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; +import com.ruoyi.wx.domain.WxUser; +import com.ruoyi.wx.dto.WxUserDTO; +import com.ruoyi.wx.dto.req.UserSignInfo; + +/** + * 微信小程序用户Service接口 + * + * @author ruoyi + * @date 2021-02-24 + */ +public interface IWxUserService +{ + /** + * 查询微信小程序用户 + * + * @param id 微信小程序用户ID + * @return 微信小程序用户 + */ + public WxUser selectWxUserById(Long id); + + /** + * 查询微信小程序用户列表 + * + * @param wxUser 微信小程序用户 + * @return 微信小程序用户集合 + */ + public List selectWxUserList(WxUser wxUser); + + /** + * 新增微信小程序用户 + * + * @param wxUser 微信小程序用户 + * @return 结果 + */ + public int insertWxUser(WxUser wxUser); + + /** + * 修改微信小程序用户 + * + * @param wxUser 微信小程序用户 + * @return 结果 + */ + public int updateWxUser(WxUser wxUser); + + /** + * 批量删除微信小程序用户 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteWxUserByIds(String ids); + + /** + * 删除微信小程序用户信息 + * + * @param id 微信小程序用户ID + * @return 结果 + */ + public int deleteWxUserById(Long id); + + /** + * 根据token获取用户资料 + * @param token + * @return + */ + WxUser selectWxUserByToken(String token); + + WxUserDTO login(String wxCode); + + void signIn(UserSignInfo userSignInfo); + + WxUserDTO info(UserSignInfo userSignInfo); + + boolean checkUser(Long id); + + boolean triggerStatus(Long id); +} diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/service/impl/MrRecordOrderServiceImpl.java b/wx-record-order/src/main/java/com/ruoyi/wx/service/impl/MrRecordOrderServiceImpl.java new file mode 100644 index 00000000..2db0e61e --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/service/impl/MrRecordOrderServiceImpl.java @@ -0,0 +1,218 @@ +package com.ruoyi.wx.service.impl; + +import com.ruoyi.common.core.text.Convert; +import com.ruoyi.common.exception.BusinessException; +import com.ruoyi.common.exception.wx.WxBusinessException; +import com.ruoyi.common.json.JSONObject; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.html.EscapeUtil; +import com.ruoyi.wx.domain.MrRecordOrder; +import com.ruoyi.wx.domain.WxUser; +import com.ruoyi.wx.dto.RecordOrderDTO; +import com.ruoyi.wx.dto.WxUserDTO; +import com.ruoyi.wx.dto.req.OrderListReqDTO; +import com.ruoyi.wx.mapper.MrRecordOrderMapper; +import com.ruoyi.wx.mapper.WxUserMapper; +import com.ruoyi.wx.service.IMrRecordOrderService; +import com.ruoyi.wx.util.SmsUtils; +import com.ruoyi.wx.util.WxServiceUtils; +import com.ruoyi.wx.util.WxUserUtils; +import org.apache.commons.lang3.RandomStringUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.net.URLEncoder; +import java.nio.charset.Charset; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * 病案申请Service业务层处理 + * + * @author ruoyi + * @date 2021-02-24 + */ +@Service +public class MrRecordOrderServiceImpl implements IMrRecordOrderService { + @Autowired + private MrRecordOrderMapper mrRecordOrderMapper; + + /** + * 查询病案申请 + * + * @param id 病案申请ID + * @return 病案申请 + */ + @Override + public MrRecordOrder selectMrRecordOrderById(Long id) { + return mrRecordOrderMapper.selectMrRecordOrderById(id); + } + + /** + * 查询病案申请列表 + * + * @param mrRecordOrder 病案申请 + * @return 病案申请 + */ + @Override + public List selectMrRecordOrderList(MrRecordOrder mrRecordOrder) { + return mrRecordOrderMapper.selectMrRecordOrderList(mrRecordOrder); + } + + /** + * 新增病案申请 + * + * @param mrRecordOrder 病案申请 + * @return 结果 + */ + @Override + public int insertMrRecordOrder(MrRecordOrder mrRecordOrder) { + mrRecordOrder.setCreateTime(DateUtils.getNowDate()); + return mrRecordOrderMapper.insertMrRecordOrder(mrRecordOrder); + } + + /** + * 修改病案申请 + * + * @param mrRecordOrder 病案申请 + * @return 结果 + */ + @Override + public int updateMrRecordOrder(MrRecordOrder mrRecordOrder) { + mrRecordOrder.setUpdateTime(DateUtils.getNowDate()); + return mrRecordOrderMapper.updateMrRecordOrder(mrRecordOrder); + } + + /** + * 删除病案申请对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteMrRecordOrderByIds(String ids) { + return mrRecordOrderMapper.deleteMrRecordOrderByIds(Convert.toStrArray(ids)); + } + + /** + * 删除病案申请信息 + * + * @param id 病案申请ID + * @return 结果 + */ + @Override + public int deleteMrRecordOrderById(Long id) { + return mrRecordOrderMapper.deleteMrRecordOrderById(id); + } + + @Autowired + private WxUserUtils wxUserUtils; + @Autowired + private WxUserMapper wxUserMapper; + + @Transactional(rollbackFor = Exception.class) + @Override + public void createOrder(MrRecordOrder order) { + // 判断参数是否遗漏 + if (StringUtils.isBlank(order.getMrNumber())) { + throw new WxBusinessException("病案号必填"); + } + if (StringUtils.isBlank(order.getPatientName())) { + throw new WxBusinessException("患者姓名必填"); + } + if (Objects.isNull(order.getDischargeDate())) { + throw new WxBusinessException("出院时间必填"); + } + if (Objects.isNull(order.getTimes())) { + throw new WxBusinessException("就诊次数必填"); + } + if (order.getType() == 0) { + if (Objects.isNull(order.getAddress())) { + throw new WxBusinessException("配送地址必填"); + } + } + + // 判断是否已有相同订单 + MrRecordOrder searchOrder = new MrRecordOrder(); + searchOrder.setMrNumber(order.getMrNumber()); + searchOrder.setType(order.getType()); + searchOrder.setStatus(0); + List mrRecordOrders = mrRecordOrderMapper.selectMrRecordOrderList(searchOrder); + if (mrRecordOrders != null && !mrRecordOrders.isEmpty()) { + throw new WxBusinessException("已有相同申请!"); + } + + WxUserDTO userInfo = wxUserUtils.getUserInfo(); + order.setApplicantId(userInfo.getId()); + order.setHospital(userInfo.getHospital()); + + if (StringUtils.isNotBlank(order.getAddress())) { + WxUser wxUser = new WxUser(); + wxUser.setId(userInfo.getId()); + wxUser.setAddress(order.getAddress()); + wxUserMapper.updateWxUser(wxUser); + } + + order.setCreateTime(new Date()); + order.setUpdateTime(new Date()); + order.setStatus(0); + mrRecordOrderMapper.insertMrRecordOrder(order); + } + + @Override + public List list(OrderListReqDTO orderListReqDTO) { + int rowCount = 10; + int startRow = rowCount * (orderListReqDTO.getPage() - 1); + int endRow = rowCount * orderListReqDTO.getPage(); + return mrRecordOrderMapper.searchList(wxUserUtils.getUserInfo().getId(), orderListReqDTO.getKeyword(), orderListReqDTO.getStatus(), startRow, endRow); + } + + @Override + public boolean sendSms(MrRecordOrder mrRecordOrder) { + MrRecordOrder mrRecordOrder1 = mrRecordOrderMapper.selectMrRecordOrderById(mrRecordOrder.getId()); + if (Objects.nonNull(mrRecordOrder1)) { + WxUser wxUser = wxUserMapper.selectWxUserById(mrRecordOrder1.getApplicantId()); + // 发送短信 + if (mrRecordOrder.getType() == 1) { + SmsUtils.sendSms(SmsUtils.TemplateType.DOWN, wxUser.getPhone(), mrRecordOrder.getUnzipPwd()); + } else if (mrRecordOrder.getType() == 0) { + SmsUtils.sendSms(SmsUtils.TemplateType.Express, wxUser.getPhone(), mrRecordOrder.getTrackingNumber()); + } + // 更新订单 + mrRecordOrder.setStatus(1); + mrRecordOrder.setUpdateTime(new Date()); + mrRecordOrderMapper.updateMrRecordOrder(mrRecordOrder); + } + return true; + } + + @Override + public Map getUrlHeaders(String code) { + return mrRecordOrderMapper.getUrlHeaders(code); + } + + @Override + public String randomCode(String url, String filename) { + return saveUrl(url, filename, 1); + } + + private String saveUrl(String url, String filename, int times) { + try { + String code = RandomStringUtils.random(4, true, true); + JSONObject jsonObject = new JSONObject(); + jsonObject.set("Content-Disposition", "attachment;filename=" + URLEncoder.encode(filename, Charset.defaultCharset().displayName())); + mrRecordOrderMapper.saveCodeUrl(code, url, jsonObject.toCompactString()); + return code; + } catch (Exception e) { + // code为唯一建,失败了就重试,最多重试5次 + if (times > 5) { + throw new BusinessException("创建短网址失败"); + } + return saveUrl(url, filename, ++times); + } + } +} \ No newline at end of file diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/service/impl/WxUserServiceImpl.java b/wx-record-order/src/main/java/com/ruoyi/wx/service/impl/WxUserServiceImpl.java new file mode 100644 index 00000000..d7653433 --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/service/impl/WxUserServiceImpl.java @@ -0,0 +1,207 @@ +package com.ruoyi.wx.service.impl; + +import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; +import cn.binarywang.wx.miniapp.bean.WxMaUserInfo; +import com.ruoyi.common.core.text.Convert; +import com.ruoyi.common.exception.BusinessException; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.bean.BeanUtils; +import com.ruoyi.wx.domain.WxUser; +import com.ruoyi.wx.dto.WxUserDTO; +import com.ruoyi.wx.dto.req.UserSignInfo; +import com.ruoyi.wx.mapper.WxUserMapper; +import com.ruoyi.wx.service.IWxUserService; +import com.ruoyi.wx.util.WxServiceUtils; +import com.ruoyi.wx.util.WxUserUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; +import java.util.Objects; + +/** + * 微信小程序用户Service业务层处理 + * + * @author ruoyi + * @date 2021-02-24 + */ +@Service +public class WxUserServiceImpl implements IWxUserService { + @Autowired + private WxUserMapper wxUserMapper; + @Autowired + private WxServiceUtils wxServiceUtils; + @Autowired + private WxUserUtils wxUserUtils; + + /** + * 查询微信小程序用户 + * + * @param id 微信小程序用户ID + * @return 微信小程序用户 + */ + @Override + public WxUser selectWxUserById(Long id) { + return wxUserMapper.selectWxUserById(id); + } + + /** + * 查询微信小程序用户列表 + * + * @param wxUser 微信小程序用户 + * @return 微信小程序用户 + */ + @Override + public List selectWxUserList(WxUser wxUser) { + return wxUserMapper.selectWxUserList(wxUser); + } + + /** + * 新增微信小程序用户 + * + * @param wxUser 微信小程序用户 + * @return 结果 + */ + @Override + public int insertWxUser(WxUser wxUser) { + wxUser.setCreateTime(DateUtils.getNowDate()); + return wxUserMapper.insertWxUser(wxUser); + } + + /** + * 修改微信小程序用户 + * + * @param wxUser 微信小程序用户 + * @return 结果 + */ + @Override + public int updateWxUser(WxUser wxUser) { + wxUser.setUpdateTime(DateUtils.getNowDate()); + return wxUserMapper.updateWxUser(wxUser); + } + + /** + * 删除微信小程序用户对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteWxUserByIds(String ids) { + return wxUserMapper.deleteWxUserByIds(Convert.toStrArray(ids)); + } + + /** + * 删除微信小程序用户信息 + * + * @param id 微信小程序用户ID + * @return 结果 + */ + @Override + public int deleteWxUserById(Long id) { + return wxUserMapper.deleteWxUserById(id); + } + + @Override + public WxUser selectWxUserByToken(String token) { + return wxUserMapper.selectWxUserByToken(token); + } + + @Override + public WxUserDTO login(String wxCode) { + WxUserDTO wxUserDTO = new WxUserDTO(); + WxMaJscode2SessionResult login = wxServiceUtils.login(wxCode); + // 根据openid查询用户 + WxUser wxUser = wxUserMapper.selectWxUserByOpenid(login.getOpenid()); + + if (Objects.nonNull(wxUser)) { + wxUser.setToken(login.getSessionKey()); + wxUser.setUpdateTime(new Date()); + wxUserMapper.updateWxUser(wxUser); + } else { + wxUser = new WxUser(); + wxUser.setToken(login.getSessionKey()); + wxUser.setOpenid(login.getOpenid()); + wxUser.setStatus(2); + wxUser.setFlag(0); + wxUser.setCreateTime(new Date()); + wxUserMapper.insertWxUser(wxUser); + } + BeanUtils.copyProperties(wxUser, wxUserDTO); + return wxUserDTO; + } + + @Override + public void signIn(UserSignInfo userSignInfo) { + WxUserDTO userInfo = wxUserUtils.getUserInfo(); + + WxUser wxUser = wxUserMapper.selectWxUserById(userInfo.getId()); + wxUser.setUpdateTime(new Date()); + wxUser.setAvatar(userSignInfo.getAvatar()); + wxUser.setNickname(userSignInfo.getNickName()); + String gender = "未知"; + if (StringUtils.equals("1", userSignInfo.getGender())) { + gender = "男"; + } else if (StringUtils.equals("2", userSignInfo.getGender())) { + gender = "女"; + } + wxUser.setGender(gender); + wxUser.setHospital(userSignInfo.getHospital()); + wxUser.setName(userSignInfo.getName()); + wxUser.setPhone(userSignInfo.getPhone()); + + wxUser.setStatus(0); + + wxUserMapper.updateWxUser(wxUser); + wxUserUtils.clearCache(); + } + + @Override + public WxUserDTO info(UserSignInfo userSignInfo) { + WxUserDTO userInfo = wxUserUtils.getUserInfo(); + + WxUser wxUser = wxUserMapper.selectWxUserById(userInfo.getId()); + if (!wxUser.getStatus().equals(userInfo.getStatus()) || !wxUser.getFlag().equals(userInfo.getFlag())) {// 状态变更时更新用户信息 + wxUser.setUpdateTime(new Date()); + wxUser.setAvatar(userSignInfo.getAvatar()); + wxUser.setNickname(userSignInfo.getNickName()); + String gender = "未知"; + if (StringUtils.equals("1", userSignInfo.getGender())) { + gender = "男"; + } else if (StringUtils.equals("2", userSignInfo.getGender())) { + gender = "女"; + } + wxUser.setGender(gender); + + wxUserMapper.updateWxUser(wxUser); + wxUserUtils.clearCache(); + BeanUtils.copyProperties(wxUser, userInfo); + } + + return userInfo; + } + + @Override + public boolean checkUser(Long id) { + WxUser wxUser=new WxUser(); + wxUser.setId(id); + wxUser.setFlag(1); + updateWxUser(wxUser); + return true; + } + + @Override + public boolean triggerStatus(Long id) { + WxUser wxUser=selectWxUserById(id); + if(wxUser.getStatus()==1){ + wxUser.setStatus(0); + updateWxUser(wxUser); + }else if(wxUser.getStatus()==0){ + wxUser.setStatus(1); + updateWxUser(wxUser); + } + return true; + } +} diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/util/ShortUrlUtils.java b/wx-record-order/src/main/java/com/ruoyi/wx/util/ShortUrlUtils.java new file mode 100644 index 00000000..b04f993d --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/util/ShortUrlUtils.java @@ -0,0 +1,22 @@ +package com.ruoyi.wx.util; + +import com.alibaba.fastjson.JSONObject; +import com.ruoyi.common.utils.http.HttpUtils; + +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.nio.charset.Charset; + +public class ShortUrlUtils { + private static final String API_PATH = "http://www.uc4.cn/ajax.php"; + + public static String getShortUrl(String url) throws UnsupportedEncodingException { + String resp = HttpUtils.sendGet(API_PATH, "act=creat1&url=" + URLEncoder.encode(url, Charset.defaultCharset().displayName()) + "&pattern=1&type=c4icn"); + JSONObject obj = JSONObject.parseObject(resp); + return obj.getString("dwz"); + } + + public static void main(String[] args) throws UnsupportedEncodingException { + System.out.println(getShortUrl("https://wx.docus.cn/profile/upload/2021/03/01/dad2a531-b3bf-4ede-8f41-26d611053c73.zip")); + } +} diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/util/SmsUtils.java b/wx-record-order/src/main/java/com/ruoyi/wx/util/SmsUtils.java new file mode 100644 index 00000000..538bcc21 --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/util/SmsUtils.java @@ -0,0 +1,119 @@ +package com.ruoyi.wx.util; + +import com.aliyun.dysmsapi20170525.Client; +import com.aliyun.dysmsapi20170525.models.SendSmsRequest; +import com.aliyun.dysmsapi20170525.models.SendSmsResponse; +import com.aliyun.teaopenapi.models.Config; +import com.ruoyi.common.exception.BusinessException; +import com.ruoyi.common.json.JSONObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +import javax.annotation.PostConstruct; + +@Component +public class SmsUtils { + private static final Logger log = LoggerFactory.getLogger(SmsUtils.class); + + private static String accessKeyId; + private static String accessKeySecret; + private static String signName; + + @Value("${aliyun.accesskey-id}") + String aliAccessKeyId; + @Value("${aliyun.accesskey-secret}") + String aliAccessKeySecret; + @Value("${aliyun.sms.sign-name}") + String pSignName; + + @PostConstruct + private void initialization() { + accessKeyId = aliAccessKeyId; + accessKeySecret = aliAccessKeySecret; + signName = pSignName; + } + + /** + * 使用AK&SK初始化账号Client + * + * @return Client + * @throws Exception + */ + public static Client getClient() throws Exception { + Config config = new Config() + // 您的AccessKey ID + .setAccessKeyId(accessKeyId) + // 您的AccessKey Secret + .setAccessKeySecret(accessKeySecret); + // 访问的域名 + config.endpoint = "dysmsapi.aliyuncs.com"; + return new Client(config); + } + + /** + * 发送短信 + * + * @param type 模板类型 + * @param telephone 手机号码 + * @param objs 参数值数组,对应模板参数数组传入 + */ + public static void sendSms(TemplateType type, String telephone, Object... objs) { + // 组装请求对象-具体描述见控制台-文档部分内容 + SendSmsRequest request = new SendSmsRequest(); + // 必填:待发送手机号 + request.setPhoneNumbers(telephone); + //必填:短信签名-可在短信控制台中找到 + request.setSignName(signName); + // 必填:短信模板-可在短信控制台中找到 + request.setTemplateCode(type.code); + if (type.args != null && type.args.length > 0) { + JSONObject jsonObject = new JSONObject(); + for (int i = 0; i < type.args.length; i++) { + jsonObject.put(type.args[i], objs[i]); + } + request.setTemplateParam(jsonObject.toCompactString()); + } + //请求失败这里会抛ClientException异常 + SendSmsResponse sendSmsResponse = null; + try { + sendSmsResponse = getClient().sendSms(request); + } catch (Exception e) { + e.printStackTrace(); + } + if (sendSmsResponse != null && "OK".equals(sendSmsResponse.getBody().getCode())) { + log.debug("send Message to [{}] successful", telephone); + } else { + if (null != sendSmsResponse) { + throw new BusinessException("发送短信失败," + sendSmsResponse.getBody().getMessage()); + } else { + throw new BusinessException("发送短信失败"); + } + } + } + + public enum TemplateType { + /** + * 下载扫描件通知模板 + */ + DOWN("SMS_212471722", "pwd"), + /** + * 快递单通知模板 + */ + Express("SMS_212476711", "nu"); + /** + * 参数名称数组 + */ + private final String[] args; + /** + * 模板id + */ + private final String code; + + TemplateType(String code, String... args) { + this.args = args; + this.code = code; + } + } +} diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/util/WxServiceUtils.java b/wx-record-order/src/main/java/com/ruoyi/wx/util/WxServiceUtils.java new file mode 100644 index 00000000..786d0cbc --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/util/WxServiceUtils.java @@ -0,0 +1,76 @@ +package com.ruoyi.wx.util; + +import cn.binarywang.wx.miniapp.api.WxMaService; +import cn.binarywang.wx.miniapp.api.WxMaUserService; +import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl; +import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; +import cn.binarywang.wx.miniapp.bean.WxMaKefuMessage; +import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl; +import com.ruoyi.common.exception.base.BaseException; +import com.ruoyi.common.utils.CacheUtils; +import me.chanjar.weixin.common.error.WxErrorException; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +import javax.annotation.PostConstruct; +import java.util.Objects; + +@Component +public class WxServiceUtils { + @Value("${wx.appid}") + private String appid; + @Value("${wx.appsecret}") + private String appsecret; + + private static WxMaService wxMaService; + + private static final String CACHE_NAME ="wx-accessCache"; + + @PostConstruct + private void init() { + WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl(); + config.setAppid(appid); + config.setSecret(appsecret); + wxMaService = new WxMaServiceImpl(); + wxMaService.setWxMaConfig(config); +// config.setAccessToken(getAccessToken()); + } + +// private String getAccessToken(){ +// Object accessToken = CacheUtils.get(CACHE_NAME, "access_token"); +// if(Objects.isNull(accessToken)){ +// try { +// accessToken=wxMaService.getAccessToken(); +// } catch (WxErrorException e) { +// return null; +// } +// CacheUtils.put(CACHE_NAME,"access_token",accessToken); +// } +// return (String)accessToken; +// } + + public WxMaJscode2SessionResult login(String code) { + try { + return wxMaService.getUserService().getSessionInfo(code); + } catch (WxErrorException e) { + throw new BaseException("小程序登录失败!" + e.getMessage()); + } + } + + public WxMaUserService getUserService() { + return wxMaService.getUserService(); + } + +// public static void sendKefuMsg(String content,String openid){ +// WxMaKefuMessage wxMaKefuMessage=new WxMaKefuMessage(); +// wxMaKefuMessage.setToUser(openid); +// wxMaKefuMessage.setMsgType("text"); +// WxMaKefuMessage.KfText text=new WxMaKefuMessage.KfText(content); +// wxMaKefuMessage.setText(text); +// try { +// wxMaService.getMsgService().sendKefuMsg(wxMaKefuMessage); +// } catch (WxErrorException e) { +// e.printStackTrace(); +// } +// } +} diff --git a/wx-record-order/src/main/java/com/ruoyi/wx/util/WxUserUtils.java b/wx-record-order/src/main/java/com/ruoyi/wx/util/WxUserUtils.java new file mode 100644 index 00000000..7c544697 --- /dev/null +++ b/wx-record-order/src/main/java/com/ruoyi/wx/util/WxUserUtils.java @@ -0,0 +1,48 @@ +package com.ruoyi.wx.util; + +import com.ruoyi.common.exception.wx.NotLoginException; +import com.ruoyi.common.utils.CacheUtils; +import com.ruoyi.common.utils.bean.BeanUtils; +import com.ruoyi.wx.domain.WxUser; +import com.ruoyi.wx.dto.WxUserDTO; +import com.ruoyi.wx.service.IWxUserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import javax.servlet.http.HttpServletRequest; +import java.util.Objects; + +@Component +public class WxUserUtils { + @Autowired + private HttpServletRequest request; + @Autowired + private IWxUserService wxUserService; + private final String cacheName = "wx-userCache"; + + private String getToken() { + return request.getHeader("token"); + } + + public WxUserDTO getUserInfo() { + String token = getToken(); + Object userCache = CacheUtils.get(cacheName, "wx-token:" + token); + if (Objects.nonNull(userCache)) { + return (WxUserDTO) userCache; + } else { + WxUser wxUser = wxUserService.selectWxUserByToken(getToken()); + if (Objects.nonNull(wxUser)) { + WxUserDTO wxUserDTO = new WxUserDTO(); + BeanUtils.copyProperties(wxUser, wxUserDTO); + CacheUtils.put(cacheName, "wx-token:" + token, wxUserDTO); + return wxUserDTO; + } else { + throw new NotLoginException(); + } + } + } + + public void clearCache() { + CacheUtils.remove(cacheName, "wx-token:" + getToken()); + } +} diff --git a/wx-record-order/src/main/resources/mapper/wx/MrRecordOrderMapper.xml b/wx-record-order/src/main/resources/mapper/wx/MrRecordOrderMapper.xml new file mode 100644 index 00000000..6b483fa9 --- /dev/null +++ b/wx-record-order/src/main/resources/mapper/wx/MrRecordOrderMapper.xml @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select id, type, mr_number, patient_name, delivery, tracking_number, discharge_date, times, applicant_id, hospital, address, download_url, unzip_pwd, status, create_time, update_time from mr_record_order + + + + + + + + + + insert into mr_record_order + + type, + mr_number, + patient_name, + discharge_date, + times, + applicant_id, + hospital, + address, + download_url, + unzip_pwd, + status, + create_time, + update_time, + delivery, + tracking_number, + + + #{type}, + #{mrNumber}, + #{patientName}, + #{dischargeDate}, + #{times}, + #{applicantId}, + #{hospital}, + #{address}, + #{downloadUrl}, + #{unzipPwd}, + #{status}, + #{createTime}, + #{updateTime}, + #{delivery}, + #{trackingNumber} + + + + + update mr_record_order + + type = #{type}, + mr_number = #{mrNumber}, + patient_name = #{patientName}, + discharge_date = #{dischargeDate}, + times = #{times}, + applicant_id = #{applicantId}, + hospital = #{hospital}, + address = #{address}, + download_url = #{downloadUrl}, + unzip_pwd = #{unzipPwd}, + status = #{status}, + create_time = #{createTime}, + update_time = #{updateTime}, + delivery = #{delivery}, + tracking_number = #{trackingNumber}, + + where id = #{id} + + + + delete from mr_record_order where id = #{id} + + + + delete from mr_record_order where id in + + #{id} + + + + + + + + insert into code_url (code,url,headers)values(#{code},#{url},#{headers}) + + + \ No newline at end of file diff --git a/wx-record-order/src/main/resources/mapper/wx/WxUserMapper.xml b/wx-record-order/src/main/resources/mapper/wx/WxUserMapper.xml new file mode 100644 index 00000000..8cbdab15 --- /dev/null +++ b/wx-record-order/src/main/resources/mapper/wx/WxUserMapper.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + select id, name, phone, openid, status, flag, hospital, address, create_time, update_time, nickname, avatar, token from wx_user + + + + + + + + + + + + + insert into wx_user + + name, + phone, + openid, + status, + flag, + hospital, + address, + create_time, + update_time, + nickname, + avatar, + token, + + + #{name}, + #{phone}, + #{openid}, + #{status}, + #{flag}, + #{hospital}, + #{address}, + #{createTime}, + #{updateTime}, + #{nickname}, + #{avatar}, + #{token}, + + + + + update wx_user + + name = #{name}, + phone = #{phone}, + openid = #{openid}, + status = #{status}, + flag = #{flag}, + hospital = #{hospital}, + address = #{address}, + create_time = #{createTime}, + update_time = #{updateTime}, + nickname = #{nickname}, + avatar = #{avatar}, + token = #{token}, + + where id = #{id} + + + + delete from wx_user where id = #{id} + + + + delete from wx_user where id in + + #{id} + + + + \ No newline at end of file diff --git a/wx-record-order/src/main/resources/templates/wx/order/add.html b/wx-record-order/src/main/resources/templates/wx/order/add.html new file mode 100644 index 00000000..b06fc6a6 --- /dev/null +++ b/wx-record-order/src/main/resources/templates/wx/order/add.html @@ -0,0 +1,135 @@ + + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+
+ +
+ + +
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/wx-record-order/src/main/resources/templates/wx/order/edit.html b/wx-record-order/src/main/resources/templates/wx/order/edit.html new file mode 100644 index 00000000..670b970c --- /dev/null +++ b/wx-record-order/src/main/resources/templates/wx/order/edit.html @@ -0,0 +1,81 @@ + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/wx-record-order/src/main/resources/templates/wx/order/order.html b/wx-record-order/src/main/resources/templates/wx/order/order.html new file mode 100644 index 00000000..f90dbdf6 --- /dev/null +++ b/wx-record-order/src/main/resources/templates/wx/order/order.html @@ -0,0 +1,171 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/wx-record-order/src/main/resources/templates/wx/order/sendView.html b/wx-record-order/src/main/resources/templates/wx/order/sendView.html new file mode 100644 index 00000000..4d27763c --- /dev/null +++ b/wx-record-order/src/main/resources/templates/wx/order/sendView.html @@ -0,0 +1,69 @@ + + + + + + + + +
+
+ + +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + + + \ No newline at end of file diff --git a/wx-record-order/src/main/resources/templates/wx/user/add.html b/wx-record-order/src/main/resources/templates/wx/user/add.html new file mode 100644 index 00000000..6d9f6670 --- /dev/null +++ b/wx-record-order/src/main/resources/templates/wx/user/add.html @@ -0,0 +1,76 @@ + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/wx-record-order/src/main/resources/templates/wx/user/edit.html b/wx-record-order/src/main/resources/templates/wx/user/edit.html new file mode 100644 index 00000000..4daae263 --- /dev/null +++ b/wx-record-order/src/main/resources/templates/wx/user/edit.html @@ -0,0 +1,44 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/wx-record-order/src/main/resources/templates/wx/user/user.html b/wx-record-order/src/main/resources/templates/wx/user/user.html new file mode 100644 index 00000000..0aee9990 --- /dev/null +++ b/wx-record-order/src/main/resources/templates/wx/user/user.html @@ -0,0 +1,159 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file