306 Commits
Author SHA1 Message Date
lishilin c52b3986e5 脚手架工程模板提交 2026-03-07 19:31:53 +08:00
lishilin 66025b661d docs: 添加脚手架抽离总结报告 2026-03-07 18:42:52 +08:00
lishilin 74d99e6b60 refactor: 抽离企业级微服务脚手架
- 删除业务特定模块(device-center, order-center, coupon-center, msg-center)
- 保留核心通用模块(user-center, file-center, search-center, code-generator)
- 创建 demo-center 示例模块
- 清理业务特定文档和前端项目
- 创建数据库初始化脚本
- 更新 README 和快速开始文档
- 保留所有 zlt-commons 公共组件库
2026-03-07 18:41:49 +08:00
duzhichao c6dfad912d Merge pull request 'test' (#79) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/79
2026-03-04 12:54:21 +00:00
duzhichao ce17f6ec90 Merge pull request 'feat: 中科低空一键成片推送2' (#78) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/78
2026-03-04 12:53:59 +00:00
duzhichao 5581ec5a8f feat: 中科低空一键成片推送2 2026-03-04 20:53:15 +08:00
duzhichao ad3190c850 Merge pull request 'test' (#77) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/77
2026-03-04 12:42:47 +00:00
duzhichao b8c25eccd7 Merge pull request 'feat: 1:中科低空一键成片推送' (#76) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/76
2026-03-04 12:42:18 +00:00
duzhichao 4d991e6efd feat: 1:中科低空一键成片推送 2026-03-04 20:40:52 +08:00
duzhichao c429d14d43 Merge pull request 'test' (#75) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/75
2026-03-01 13:50:24 +00:00
duzhichao 7b4a5b52e7 Merge pull request 'feat: 1:订单列表添加排队信息' (#74) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/74
2026-03-01 13:49:49 +00:00
duzhichao fb1ab7fe46 feat: 1:订单列表添加排队信息
2:订单超时短信告警
      3:中科低空订单完成通知
2026-03-01 21:48:19 +08:00
duzhichao efea836e50 Merge pull request 'test' (#73) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/73
2026-02-26 11:58:49 +00:00
duzhichao c2fabdfbe4 Merge pull request 'feat: 海南携程以及中科低空订单统计' (#72) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/72
2026-02-26 11:58:17 +00:00
duzhichao 4faad34c49 feat: 海南携程以及中科低空订单统计 2026-02-26 19:16:41 +08:00
duzhichao 9a27919956 Merge pull request 'test' (#71) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/71
2026-02-19 16:34:29 +00:00
duzhichao 3faedcb033 Merge pull request 'feat: 创建订单接口排除中科低空待支付与排队中的订单状态检查' (#70) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/70
2026-02-19 16:32:45 +00:00
duzhichao 16071c2a33 feat: 创建订单接口排除中科低空待支付与排队中的订单状态检查 2026-02-20 00:32:04 +08:00
duzhichao 4cf7ea7768 Merge pull request 'test' (#69) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/69
2026-02-19 10:55:15 +00:00
duzhichao 56cfffbee4 Merge pull request 'feat: 视频剪辑推送中科低空' (#68) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/68
2026-02-19 10:54:47 +00:00
duzhichao 31a04ab73b feat: 视频剪辑推送中科低空 2026-02-19 18:52:50 +08:00
duzhichao 0ae7b493f7 Merge pull request 'test' (#67) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/67
2026-02-11 13:05:28 +00:00
duzhichao 9326b0e5e9 Merge pull request 'feat: 剪辑视频添加参数2' (#66) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/66
2026-02-11 13:04:50 +00:00
duzhichao 520f1eaa6a feat: 剪辑视频添加参数2 2026-02-11 21:03:39 +08:00
duzhichao a9d2711532 Merge pull request 'test' (#65) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/65
2026-02-11 11:51:22 +00:00
duzhichao 515792a2f8 Merge pull request 'feat: 剪辑视频添加参数' (#64) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/64
2026-02-11 11:50:43 +00:00
duzhichao ede065a25b feat: 剪辑视频添加参数 2026-02-11 19:49:33 +08:00
duzhichao bc66fab897 Merge pull request 'test' (#63) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/63
2026-02-05 12:45:31 +00:00
duzhichao 0bdfeed86c Merge pull request 'feat: 携程后台退款3' (#62) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/62
2026-02-05 12:43:57 +00:00
duzhichao fd320ffd22 feat: 携程后台退款3 2026-02-05 20:42:26 +08:00
duzhichao fe24d44834 Merge pull request 'test' (#61) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/61
2026-02-05 12:12:26 +00:00
duzhichao 78337a0cc0 Merge pull request 'feat: 携程后台退款2' (#60) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/60
2026-02-05 12:12:09 +00:00
duzhichao 855d89df21 feat: 携程后台退款2 2026-02-05 20:11:30 +08:00
duzhichao 9c56e54f69 Merge pull request 'test' (#59) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/59
2026-02-05 11:36:56 +00:00
duzhichao 31e87a98d5 Merge pull request 'feat: 携程后台退款' (#58) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/58
2026-02-05 11:36:41 +00:00
duzhichao eda152c6f5 feat: 携程后台退款 2026-02-05 19:35:42 +08:00
duzhichao 527e591619 Merge pull request 'test' (#57) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/57
2026-02-05 10:48:05 +00:00
duzhichao d7e5802979 Merge pull request 'feat: 修改天气风速为m/s' (#56) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/56
2026-02-05 09:20:35 +00:00
duzhichao 94afee5bb6 feat: 修改天气风速为m/s 2026-02-05 17:19:43 +08:00
duzhichao 0a3721f35e Merge pull request 'feat: 1:调用携程退款接口 2:新增携程订单查询页面 3:新增携程退款订单页面' (#55) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/55
2026-02-05 08:49:03 +00:00
duzhichao 8f0c40add1 feat: 1:调用携程退款接口 2:新增携程订单查询页面 3:新增携程退款订单页面 2026-02-05 16:46:58 +08:00
duzhichao 273c34b44a Merge pull request 'test' (#53) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/53
2026-01-30 10:14:14 +00:00
duzhichao 527a12fd30 Merge pull request 'feat: 获取任务列表及图片根据当前登录人查询' (#54) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/54
2026-01-30 10:14:01 +00:00
duzhichao fe199a2a37 feat: 获取任务列表及图片根据当前登录人查询 2026-01-30 18:13:39 +08:00
duzhichao 8a4b710bce Merge pull request 'feat: 获取任务列表及图片根据当前登录人查询' (#52) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/52
2026-01-30 10:13:02 +00:00
duzhichao 06ec7b7706 feat: 获取任务列表及图片根据当前登录人查询 2026-01-30 18:12:33 +08:00
duzhichao 971a0d4817 Merge pull request 'test' (#51) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/51
2026-01-30 09:47:00 +00:00
duzhichao 8113e1a7c3 Merge pull request 'feat: 获取任务列表及图片根据当前登录人查询' (#50) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/50
2026-01-30 09:46:46 +00:00
duzhichao 7ad224ee4c feat: 获取任务列表及图片根据当前登录人查询 2026-01-30 17:45:53 +08:00
duzhichao 84bd74d324 Merge pull request 'test' (#49) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/49
2026-01-29 08:58:41 +00:00
duzhichao f135d5fc3c Merge pull request 'feat: 天气系统规则引擎2' (#48) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/48
2026-01-29 08:58:25 +00:00
duzhichao 39d0c4f83f feat: 天气系统规则引擎2 2026-01-29 16:57:31 +08:00
duzhichao 2b730a00c5 Merge pull request 'test' (#47) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/47
2026-01-28 09:37:01 +00:00
duzhichao e82389d2dc Merge pull request 'feat: 天气系统规则引擎' (#46) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/46
2026-01-28 09:35:16 +00:00
duzhichao ad41a38620 feat: 天气系统规则引擎 2026-01-28 17:30:34 +08:00
duzhichao b7e75456ef Merge pull request 'test' (#45) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/45
2026-01-26 07:23:26 +00:00
duzhichao a358522d4e Merge pull request 'feat: 删除没用的项目' (#44) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/44
2026-01-26 07:22:06 +00:00
duzhichao d1e340af83 feat: 删除没用的项目 2026-01-26 15:19:56 +08:00
duzhichao e6e99a5ea6 Merge pull request 'test' (#43) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/43
2026-01-26 05:24:43 +00:00
duzhichao 30510653a0 Merge pull request 'feat: 无人机产品id改为AutoDock3' (#42) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/42
2026-01-26 05:24:16 +00:00
duzhichao 607c13c77c feat: 无人机产品id改为AutoDock3 2026-01-26 13:21:42 +08:00
duzhichao abf1e93ae3 Merge pull request 'test' (#41) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/41
2026-01-22 10:49:33 +00:00
duzhichao df9ac8a574 Merge pull request 'feat: 1:根据登录人获取任务以及图片' (#40) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/40
2026-01-22 10:49:16 +00:00
duzhichao 763d60651d feat: 1:根据登录人获取任务以及图片 2026-01-22 18:48:36 +08:00
duzhichao 118145ab54 Merge pull request '合并到生产环境' (#39) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/39
2026-01-22 09:40:27 +00:00
duzhichao 5119989f2e Merge pull request 'feature_dzc' (#38) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/38
2026-01-22 08:21:06 +00:00
duzhichao 8d8ec86a8a feat: 1:手机号发送验证码
2:手机号验证码登录
2026-01-22 16:10:32 +08:00
duzhichao 98304d27b7 feat: 短信服务 2026-01-19 17:12:43 +08:00
duzhichao ed6a331e6e Merge pull request 'test' (#37) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/37
2026-01-15 08:47:05 +00:00
duzhichao 39ec2e3f59 Merge pull request 'feat: 根据租户获取景区二维码内容' (#36) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/36
2026-01-15 08:46:37 +00:00
duzhichao f7a5a20549 feat: 根据租户获取景区二维码内容 2026-01-15 16:46:15 +08:00
duzhichao e8eeed90fb Merge pull request 'test' (#35) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/35
2026-01-15 08:17:17 +00:00
duzhichao 1a862c3e2b Merge pull request 'feat: 根据租户获取景区二维码内容' (#34) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/34
2026-01-15 08:17:03 +00:00
duzhichao c773ff8823 feat: 根据租户获取景区二维码内容 2026-01-15 16:16:20 +08:00
duzhichao 29b2e743ab Merge pull request 'test' (#33) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/33
2026-01-15 08:08:45 +00:00
duzhichao e7d40a658c Merge pull request 'feat: 根据租户获取景区二维码内容' (#32) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/32
2026-01-15 08:08:31 +00:00
duzhichao 6fb8c71ee2 feat: 根据租户获取景区二维码内容 2026-01-15 16:06:23 +08:00
duzhichao cc96117b7d Merge pull request 'test' (#31) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/31
2026-01-15 07:35:49 +00:00
duzhichao caa4ec68c0 Merge pull request 'feat: 根据租户获取景区二维码内容' (#30) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/30
2026-01-15 07:35:28 +00:00
duzhichao 7f9e4e8034 feat: 根据租户获取景区二维码内容 2026-01-15 15:34:44 +08:00
duzhichao 08f8f19178 Merge pull request 'test' (#29) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/29
2026-01-15 06:35:32 +00:00
duzhichao 79d517d24c Merge pull request 'feat: 根据租户获取景区二维码内容' (#28) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/28
2026-01-15 06:34:35 +00:00
duzhichao 90dd340bad feat: 根据租户获取景区二维码内容 2026-01-14 15:04:04 +08:00
duzhichao f4f8771378 Merge pull request 'test' (#27) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/27
2026-01-09 13:35:28 +00:00
duzhichao c684905484 Merge pull request 'feat: 获取当前租户' (#26) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/26
2026-01-09 13:35:11 +00:00
duzhichao d0f00d1504 feat: 获取当前租户 2026-01-09 21:34:29 +08:00
duzhichao 9043e8d698 Merge pull request 'test' (#25) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/25
2026-01-09 13:21:04 +00:00
duzhichao b3bd36be60 Merge pull request 'feat: 获取当前租户' (#24) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/24
2026-01-09 13:20:41 +00:00
duzhichao d8d0e4fc9f feat: 获取当前租户 2026-01-09 21:19:40 +08:00
duzhichao e035219ed1 Merge pull request 'test' (#23) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/23
2026-01-09 12:27:41 +00:00
duzhichao a83edf6a05 Merge pull request 'feature_dzc' (#22) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/22
2026-01-09 12:24:38 +00:00
duzhichao 2b61492b15 feat: 1:二维码统计明细 2:航线规划 2026-01-08 23:12:25 +08:00
duzhichao a9f1e1f4d4 feat: 航线规划以及水域边界标绘 2026-01-06 18:09:20 +08:00
duzhichao 89de206bcb Merge pull request 'test' (#21) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/21
2026-01-04 13:29:02 +00:00
duzhichao ab6aff8671 Merge pull request 'feature_dzc' (#20) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/20
2026-01-04 13:28:28 +00:00
duzhichao 9a50476c62 feat: 去掉无用项目 2026-01-04 21:27:53 +08:00
duzhichao 1579a9a31c Merge pull request 'feat: 设备管理添加经纬度以及高度和租户' (#19) from feature_dzc into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/19
2026-01-04 13:16:42 +00:00
duzhichao 9b4c9854d5 feat: 设备管理添加经纬度以及高度和租户 2026-01-04 21:14:32 +08:00
duzhichao d6996a20fc Merge pull request 'test' (#18) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/18
2026-01-04 12:39:05 +00:00
duzhichao 1c72dba543 Merge pull request 'feature_dzc' (#17) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/17
2026-01-04 12:35:13 +00:00
duzhichao 2e1b887d66 feat: 设备管理添加经纬度以及高度和租户 2026-01-04 20:31:04 +08:00
duzhichao f88c1c9836 feat: 设备管理添加经纬度以及高度和租户 2026-01-04 20:17:44 +08:00
duzhichao 8465bcd1c4 Merge pull request 'test' (#16) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/16
2025-12-30 09:15:56 +00:00
duzhichao 7fc388d049 Merge pull request 'feature_dzc' (#15) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/15
2025-12-30 09:15:24 +00:00
duzhichao fb40fce9cd feat: 可视化大屏展示 2025-12-30 17:14:17 +08:00
duzhichao 02f9b46b22 feat: 可视化大屏展示 2025-12-26 19:50:46 +08:00
duzhichao 2a70b54435 Merge pull request 'test' (#14) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/14
2025-12-25 09:17:53 +00:00
duzhichao 0bf4d47bf6 Merge pull request 'feat: 下任务推流地址修改' (#13) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/13
2025-12-25 09:17:22 +00:00
duzhichao 9fd7e0c656 feat: 下任务推流地址修改 2025-12-25 17:16:30 +08:00
duzhichao 2a4f2cbc69 Merge pull request 'test' (#12) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/12
2025-12-24 11:05:26 +00:00
duzhichao 54c5a33658 Merge pull request 'feat: 优化webSocket的连接问题' (#11) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/11
2025-12-24 11:05:01 +00:00
duzhichao b731476302 feat: 优化webSocket的连接问题 2025-12-24 19:01:24 +08:00
duzhichao 1872025c95 Merge pull request 'test' (#10) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/10
2025-12-24 08:12:38 +00:00
duzhichao 3fabed19f2 Merge pull request 'feat: 通过接口获取机库和无人机数据' (#9) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/9
2025-12-24 08:12:08 +00:00
duzhichao 68e2084f57 feat: 通过接口获取机库和无人机数据 2025-12-24 16:09:46 +08:00
duzhichao 5e004678b6 Merge pull request 'test' (#8) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/8
2025-12-23 11:45:07 +00:00
duzhichao 80afc4045e Merge pull request 'feat: 航线任务与一键起飞任务' (#7) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/7
2025-12-23 11:44:24 +00:00
duzhichao c939713379 feat: 航线任务与一键起飞任务 2025-12-23 19:40:50 +08:00
duzhichao 2697eac46b Merge pull request 'test' (#6) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/6
2025-12-21 06:30:47 +00:00
duzhichao b86def053c Merge pull request 'feat: 航线解析以及websocket订阅不关闭bug修复' (#5) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/5
2025-12-21 06:25:05 +00:00
duzhichao 5ee8c03671 feat: 航线解析以及websocket订阅不关闭bug修复 2025-12-21 14:15:44 +08:00
duzhichao fe8636ada2 Merge pull request 'test' (#4) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/4
2025-12-17 14:18:45 +00:00
duzhichao a74ad64109 Merge pull request 'feature_dzc' (#3) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/3
2025-12-17 03:48:46 +00:00
duzhichao 17bed2438f feat: 无人机控制指令 2025-12-17 11:45:15 +08:00
duzhichao 8990daf861 feat: 无人机视频播放 2025-12-16 11:44:00 +08:00
duzhichao cb912a8c60 feat: 3d控制指令 2025-12-16 11:43:37 +08:00
duzhichao 4921ab15ce feat: 3d控制指令 2025-12-11 12:11:48 +08:00
duzhichao 358639a8ac feat: 3d模型 2025-12-09 17:13:20 +08:00
duzhichao 0611f17b21 Merge pull request '合并到生产' (#2) from test into prod
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/2
2025-12-01 11:58:06 +00:00
duzhichao e119517d79 Merge pull request 'feature_dzc' (#1) from feature_dzc into test
Reviewed-on: http://220.205.16.27:18081/goflytec/GoFly-platform-services/pulls/1
2025-11-28 05:19:09 +00:00
duzhichao 5f603bc69d 删除 zlt-web/react-web-next/dist.zip 2025-11-28 05:15:25 +00:00
duzhichao 7ce0185974 feat: 1:地图仪表盘 2:获取设备消息 2025-11-28 12:38:53 +08:00
duzhichao 5102461a4c feat: 定时任务放开 2025-11-13 10:52:03 +08:00
duzhichao 9702534db7 !72 !71 feat: 首页查询景区返回二维码code
Merge pull request !72 from 鸭先知/test
2025-11-12 08:07:52 +00:00
duzhichao f0d50d53a9 !71 feat: 首页查询景区返回二维码code
Merge pull request !71 from 鸭先知/feature_dzc
2025-11-12 08:05:56 +00:00
duzhichao f782c1fefb feat: 首页查询景区返回二维码code 2025-11-12 16:02:54 +08:00
duzhichao d62be7adc2 !70 !69 feat: 1:视频剪辑模板管理
Merge pull request !70 from 鸭先知/test
2025-11-11 04:11:14 +00:00
duzhichao 4f41f51def !69 feat: 1:视频剪辑模板管理
Merge pull request !69 from 鸭先知/feature_dzc
2025-11-11 04:00:45 +00:00
duzhichao 5e7f983624 feat: 1:视频剪辑模板管理
2:视频剪辑任务管理
      3:设备管理
2025-11-11 11:58:59 +08:00
duzhichao 46178e1a0e !68 !67 feat: 优惠券打包
Merge pull request !68 from 鸭先知/test
2025-11-07 10:39:32 +00:00
duzhichao 96ee918cb1 !67 feat: 优惠券打包
Merge pull request !67 from 鸭先知/feature_dzc
2025-11-07 10:30:46 +00:00
duzhichao 3b4e8eb02c feat: 优惠券打包 2025-11-07 18:30:01 +08:00
duzhichao c0746dfd0c !66 feat: 打包
Merge pull request !66 from 鸭先知/feature_dzc
2025-11-07 10:24:32 +00:00
duzhichao dfacbdd72f feat: 打包 2025-11-07 18:23:55 +08:00
duzhichao 4f7e4bf27f !65 feat: 优惠券
Merge pull request !65 from 鸭先知/feature_dzc
2025-11-07 09:30:33 +00:00
duzhichao c910fc1916 feat: 优惠券 2025-11-07 17:29:59 +08:00
duzhichao 464c166a70 !64 !63 feat: 1:优化景区素材,查询景区素材从套餐中获取
Merge pull request !64 from 鸭先知/test
2025-11-07 08:39:00 +00:00
duzhichao 68fe9c8e41 !63 feat: 1:优化景区素材,查询景区素材从套餐中获取
Merge pull request !63 from 鸭先知/feature_dzc
2025-11-07 08:33:56 +00:00
duzhichao 31001df0a7 feat: 1:优化景区素材,查询景区素材从套餐中获取
2:二维码列表添加描述
2025-11-07 16:31:14 +08:00
duzhichao e8434bd0ef feat: 1:资源列表下载所有添加批量单个下载以及批量下载zip 2025-11-06 20:09:03 +08:00
duzhichao a05dc8cda3 !62 !61 feat: 1:资源列表批量下载优化,可以下载为zip
Merge pull request !62 from 鸭先知/test
2025-11-06 11:36:34 +00:00
duzhichao 7ba5689e48 !61 feat: 1:资源列表批量下载优化,可以下载为zip
Merge pull request !61 from 鸭先知/feature_dzc
2025-11-06 11:30:05 +00:00
duzhichao 51bc53b1bf feat: 1:资源列表批量下载优化,可以下载为zip
2:添加删除某个图片或者视频功能
2025-11-06 19:28:10 +08:00
duzhichao 586c792e1e !60 feat: 资源列表批量下载优化
Merge pull request !60 from 鸭先知/feature_dzc
2025-11-06 09:07:42 +00:00
duzhichao cb66f9f7e1 feat: 资源列表批量下载优化 2025-11-06 17:05:33 +08:00
duzhichao 3ed189ca6c !59 feat: 资源列表批量下载优化
Merge pull request !59 from 鸭先知/feature_dzc
2025-11-04 09:33:16 +00:00
duzhichao 33177a56ac feat: 资源列表批量下载优化 2025-11-04 17:32:28 +08:00
duzhichao 811b405ef3 !58 !57 feat: 航线管理页面优化
Merge pull request !58 from 鸭先知/test
2025-11-04 07:00:03 +00:00
duzhichao 680972f7c1 !57 feat: 航线管理页面优化
Merge pull request !57 from 鸭先知/feature_dzc
2025-11-04 06:50:03 +00:00
duzhichao 46c0976fdf feat: 航线管理页面优化 2025-11-04 14:47:50 +08:00
duzhichaoandClaude 1e6b799a51 fix: 修复订单管理页面操作按钮权限控制
- 为"创建退款"、"退款审核"、"退款查看"按钮添加权限检查
- 这些按钮现在只有在 webApp 租户下才会显示
- "资源列表"按钮保持对所有租户可见

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 13:18:30 +08:00
duzhichao e23eecdbfd feat: 航线管理页面优化 2025-11-04 11:53:35 +08:00
duzhichao e106e09fa5 docs: 添加首页轮播图修复报告,详细说明所有问题的修复方案 2025-10-30 18:42:48 +08:00
duzhichaoandClaude ed7fc3fecc fix: 修复首页轮播图表单和按钮响应问题
修复内容:
- 在表格中添加标题、类型、描述字段显示
- 更新表单类型定义,添加 type 字段支持
- 修复 CreateForm 和 HomeCarouselForm 组件,添加完整的表单字段
- 改进操作列按钮,使用 array 渲染方式确保点击响应
- 改进新增按钮交互,使用 Link 样式优化视觉效果
- 添加 console.log 便于调试按钮点击事件
- 优化搜索栏字段,支持标题和状态搜索

现在支持显示和编辑以下字段:
- 标题 (title)
- 图片 (imageUrl)
- 跳转链接 (linkUrl)
- 类型 (type)
- 描述 (description)
- 排序 (sort)
- 状态 (status)

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 18:41:40 +08:00
duzhichaoandClaude 636003a8ea feat: 优化首页轮播图组件,采用 Pro Components 规范和组件化架构
主要优化内容:
- 采用标准 Pro Components 替代自定义 UI 组件
- 重构表格列配置,支持图片预览和链接点击
- 分离创建和编辑表单为独立组件 (CreateForm, HomeCarouselForm)
- 创建 CreateForm 组件支持图片上传和实时预览
- 改进搜索功能,使用标准 QueryFilter 组件
- 新增规范的样式文件 (index.less),美化页面展示
- 提取常量定义 (constants.ts),便于维护和国际化
- 完善表单验证规则和错误提示
- 优化状态管理和变量命名规范
- 使用 ActionRef 管理表格刷新

优化对标 react-web 中的最佳实践,提升代码质量和可维护性。

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 18:31:39 +08:00
duzhichao 490f3a65cc !56 !55 feat: 暂时去掉定时任务,等小程序正式使用后再放开,现在还是用以前的服务定时任务
Merge pull request !56 from 鸭先知/test
2025-10-30 09:05:37 +00:00
duzhichao caa112b0bd !55 feat: 暂时去掉定时任务,等小程序正式使用后再放开,现在还是用以前的服务定时任务
Merge pull request !55 from 鸭先知/feature_dzc
2025-10-30 09:04:56 +00:00
duzhichao 6a4af34561 feat: 暂时去掉定时任务,等小程序正式使用后再放开,现在还是用以前的服务定时任务 2025-10-30 17:03:58 +08:00
duzhichao a98eb63bcf !54 !53 feat: 优化退款审核页面
Merge pull request !54 from 鸭先知/test
2025-10-30 08:50:19 +00:00
duzhichao 7f75f35db0 !53 feat: 优化退款审核页面
Merge pull request !53 from 鸭先知/feature_dzc
2025-10-30 08:45:05 +00:00
duzhichao a56e9c0ef7 feat: 优化退款审核页面 2025-10-30 16:42:06 +08:00
duzhichao cc500ccb1b !52 !51 feat: 优化退款审核页面
Merge pull request !52 from 鸭先知/test
2025-10-30 07:17:18 +00:00
duzhichao 030ab15cc2 !51 feat: 优化退款审核页面
Merge pull request !51 from 鸭先知/feature_dzc
2025-10-30 07:09:57 +00:00
duzhichao 2cb8fcf1e4 feat: 优化退款审核页面 2025-10-30 15:06:20 +08:00
duzhichao 7ab9d15761 feat: 添加订单状态(10)为部分退款 2025-10-30 14:39:51 +08:00
duzhichao 9f72363638 !50 !49 feat: 退款订单与订单列表整合5
Merge pull request !50 from 鸭先知/test
2025-10-29 10:14:48 +00:00
duzhichao 8a25b120e3 !49 feat: 退款订单与订单列表整合5
Merge pull request !49 from 鸭先知/feature_dzc
2025-10-29 10:08:15 +00:00
duzhichao 3c664413b9 feat: 退款订单与订单列表整合5 2025-10-29 18:05:57 +08:00
duzhichao 40a240206b feat: 退款订单与订单列表整合4 2025-10-29 17:48:47 +08:00
duzhichao a15a0e7111 feat: 退款订单与订单列表整合 2025-10-29 17:39:25 +08:00
duzhichao e44dd4496a !48 !47 feat: 退款订单与订单列表整合
Merge pull request !48 from 鸭先知/test
2025-10-29 08:05:27 +00:00
duzhichao 4ba0457073 !47 feat: 退款订单与订单列表整合
Merge pull request !47 from 鸭先知/feature_dzc
2025-10-29 07:01:38 +00:00
duzhichao e226bd11c2 feat: 退款订单与订单列表整合 2025-10-29 15:00:32 +08:00
duzhichao e419ed10f1 feat: 退款订单与订单列表整合 2025-10-28 11:21:31 +08:00
duzhichao 40e972572f feat: 登录时保存当前登录用户的tenentId 2025-10-27 17:55:36 +08:00
duzhichao cce34d8f06 feat: 任务列表优化 2025-10-27 17:25:32 +08:00
duzhichao 6518a80148 !46 !45 feat: 二维码新增或者编辑绑定景区素材
Merge pull request !46 from 鸭先知/test
2025-10-26 09:00:55 +00:00
duzhichao 9998468d2a !45 feat: 二维码新增或者编辑绑定景区素材
Merge pull request !45 from 鸭先知/feature_dzc
2025-10-26 08:50:26 +00:00
duzhichao c4fc11fd34 feat: 二维码新增或者编辑绑定景区素材 2025-10-26 16:39:26 +08:00
duzhichao 77beed2331 feat: 二维码新增或者编辑绑定景区素材 2025-10-26 15:11:52 +08:00
duzhichao 7da24748fb feat: 二维码新增或者编辑绑定景区素材 2025-10-26 14:41:26 +08:00
duzhichao 10a8e2a1ea feat: 优化景区素材 2025-10-25 18:04:01 +08:00
duzhichao 839f682ca8 feat: 1:景区二维码列表增删改查修改,去掉单独的二维码列表管理 2025-10-25 11:09:56 +08:00
duzhichao 7aa0e6a32f feat: 1:优化token查询页 2:用户管理页面新增修改密码功能 3:调整景区与二维码关系 2025-10-23 18:02:39 +08:00
duzhichao 1a0669e385 feat: 1:优化token查询页 2:用户管理页面新增修改密码功能 3:调整景区与二维码关系 2025-10-23 12:13:03 +08:00
duzhichao 84db79fb22 feat: 1:优化token查询页 2:用户管理页面新增修改密码功能 3:调整景区与二维码关系 2025-10-23 12:12:39 +08:00
duzhichao eae7264ab9 !44 !43 feat: 修改首页,添加景区订单列表统计
Merge pull request !44 from 鸭先知/test
2025-10-22 07:42:08 +00:00
duzhichao 4d8a02d45f !43 feat: 修改首页,添加景区订单列表统计
Merge pull request !43 from 鸭先知/feature_dzc
2025-10-22 07:34:07 +00:00
duzhichao e11fee3f53 feat: 修改首页,添加景区订单列表统计 2025-10-22 15:30:26 +08:00
duzhichao 97b8ac1263 feat: 修改首页,添加景区订单列表统计 2025-10-22 14:00:51 +08:00
duzhichao 37d15d17ef feat: 修改首页,添加景区订单列表统计 2025-10-21 19:05:26 +08:00
duzhichaoandClaude 57ce4301fa feat: 重新优化首页布局结构
- 将景区订单数量统计移至分账计算栏右侧
- 左侧显示分账统计,右侧显示景区订单数量条形图
- 订单趋势折线图单独占据一整列,充分利用空间
- 优化折线图尺寸和响应式布局
- 增加年视图显示标签数量,避免数据密集问题
- 调整图表坐标系以适应新布局

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-21 16:48:35 +08:00
duzhichao cf12bc56cd feat: 修改首页 2025-10-21 12:37:44 +08:00
duzhichaoandClaude 84ddcac0ac fix: 移除Slider不支持的属性,依靠全局样式设置tooltip样式
- 移除不支持的 overlayStyle 和 overlayInnerStyle 属性
- 保留 formatter 用于显示百分比格式
- 由全局样式中的 .ant-slider-tooltip-inner 设置深色背景和白色文字

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 19:27:59 +08:00
duzhichaoandClaude a0ef9e2334 fix: 优化Slider拖动时tooltip文字颜色,确保可见性
- 设置 Slider tooltip 背景为深色 rgba(0, 0, 0, 0.75)
- 设置 tooltip 文字颜色为白色,确保在任何背景下都清晰可见
- 添加全局样式规则,覆盖Antd默认样式

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 19:26:47 +08:00
duzhichaoandClaude c6a779310d fix: 修复首页分账计算模块显示问题
- 显示被隐藏的分账计算模块(移除 display: 'none')
- 调整 platformSharePercent 状态变量定义顺序
- 优化 Slider 组件:
  - 设置标记文字颜色为深灰色 (#666),避免看不清
  - 添加 tooltip 提示框,拖动时显示当前百分比
  - 设置 tooltip 背景为深色,文字为白色,确保清晰可见
- 移除重复的 90% 标记,只保留 0%、50%、100%

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 19:25:41 +08:00
duzhichao 8e05e1335d !42 feat: 修改生产环境的配置文件
Merge pull request !42 from 鸭先知/feature_dzc
2025-10-20 04:39:03 +00:00
duzhichao d1169f4ffb feat: 修改生产环境的配置文件 2025-10-20 12:36:46 +08:00
duzhichao 35a8d33053 !41 feat: 日志更新
Merge pull request !41 from 鸭先知/feature_dzc
2025-10-20 03:51:55 +00:00
duzhichao 5afade11fa feat: 日志更新 2025-10-20 11:51:13 +08:00
duzhichao 0ce6c412ae !40 feat: 1:文件访问分oss和s3 2:去掉定时任务去同步每天的数据
Merge pull request !40 from 鸭先知/feature_dzc
2025-10-20 03:37:08 +00:00
duzhichao fee28d98ef feat: 1:文件访问分oss和s3 2:去掉定时任务去同步每天的数据 2025-10-20 11:35:49 +08:00
duzhichao a7f9338a71 Merge branch 'feature_lsl' of gitee.com:L-Shilin/go-fly-platform-services into feature_dzc 2025-10-16 08:59:46 +08:00
lishilin 69d784c70d fix(文件中心):冷热数据切换逻辑完善,已实现时间窗口查询各自的存储服务 2025-10-15 19:04:14 +08:00
duzhichao 78362e738c Merge branch 'feature_lsl' of gitee.com:L-Shilin/go-fly-platform-services into feature_dzc
# Conflicts:
#	zlt-business/file-center/src/main/resources/application.yml
2025-10-15 12:35:29 +08:00
lishilin 3de774517e fix(文件中心):冷热数据切换逻辑完善,已实现时间窗口查询各自的存储服务 2025-10-15 12:32:45 +08:00
duzhichao 2e4162a250 Merge branch 'feature_lsl' of gitee.com:L-Shilin/go-fly-platform-services into feature_dzc 2025-10-15 01:26:54 +08:00
duzhichao d27ea69389 1:首页时间选择优化 2:用户管理页面查询优化 2025-10-15 01:26:25 +08:00
lishilin 7299cc0777 fix(文件中心):冷热数据切换逻辑完善,已实现时间窗口查询各自的存储服务 2025-10-14 23:21:02 +08:00
duzhichao ba366587f4 1:首页优化 2:首页适配手机 2025-10-14 16:27:25 +08:00
duzhichao af5438e1bc !39 1:用户管理页面优化 2:角色管理页面优化 3:分配角色权限优化
Merge pull request !39 from 鸭先知/feature_dzc
2025-10-13 09:12:02 +00:00
duzhichao f6b02a9bd9 1:用户管理页面优化 2:角色管理页面优化 3:分配角色权限优化 2025-10-13 16:35:40 +08:00
duzhichao 3a27f05122 !38 1:用户管理页面优化 2:角色管理页面优化 3:分配角色权限优化
Merge pull request !38 from 鸭先知/feature_dzc
2025-10-11 04:24:22 +00:00
duzhichao 96da469bef 1:用户管理页面优化 2:角色管理页面优化 3:分配角色权限优化 2025-10-11 12:19:34 +08:00
duzhichao 1235f019e4 !37 Merge branch 'feature_lsl' of gitee.com:L-Shilin/go-fly-platform-servi…
Merge pull request !37 from 鸭先知/feature_dzc
2025-10-10 07:52:13 +00:00
duzhichao 65e2d4b92f Merge branch 'feature_lsl' of gitee.com:L-Shilin/go-fly-platform-services into feature_dzc 2025-10-10 15:49:54 +08:00
lishilin ac0d185ae2 fix(订单中心):新增支付类型为第三方渠道 2025-10-10 15:48:39 +08:00
duzhichao 5cafcd3f43 !36 1:首页多租户查询优化 2:景点列表查询优化
Merge pull request !36 from 鸭先知/feature_dzc
2025-10-09 13:22:54 +00:00
duzhichao a96b775e01 1:首页多租户查询优化 2:景点列表查询优化 2025-10-09 21:08:01 +08:00
duzhichao ff47d983e3 多租户层级查询优化 2025-10-09 19:17:46 +08:00
duzhichao 6bfc01d2fc 多租户层级查询优化 2025-10-09 14:33:15 +08:00
lishilin 621f3be143 fix(订单中心):优化增加设备素材上传完成状态,定时任务检查状态自动更新为已完成的逻辑 2025-10-05 17:16:00 +08:00
lishilin 7782b350c9 fix(订单中心):增加设备素材上传完成状态,定时任务检查状态自动更新为已完成 2025-10-03 18:58:57 +08:00
duzhichao eaef798aef !35 首页统计
Merge pull request !35 from 鸭先知/feature_dzc
2025-09-30 21:12:07 +00:00
duzhichao da9bf97667 首页统计 2025-10-01 05:05:23 +08:00
duzhichao 66d09ef19c 首页统计 2025-10-01 03:51:53 +08:00
duzhichao dbd4d4d198 多租户与景区关系 2025-09-29 19:29:41 +08:00
lishilin b133788f01 fix(设备中心):增加设备执行任务接口幂等性配置,已修复问题 2025-09-29 13:21:55 +08:00
lishilin c65bdaae47 fix(设备中心):增加设备执行任务接口幂等性配置 2025-09-27 13:51:28 +08:00
lishilin 9ca13415ee fix(设备中心):增加设备执行任务接口幂等性配置 2025-09-27 12:03:24 +08:00
duzhichao 4c154ec746 修复页面bug 2025-09-26 18:42:41 +08:00
duzhichao 3c604be299 Merge branch 'develop_temp' of gitee.com:L-Shilin/go-fly-platform-services into feature_dzc
# Conflicts:
#	zlt-business/order-center/src/main/java/com/central/order/service/impl/OrderServiceImpl.java
2025-09-25 17:17:07 +08:00
lishilin 7f3ebdaa5d Merge branch 'develop_temp' of gitee.com:L-Shilin/go-fly-platform-services into feature_lsl 2025-09-25 17:13:46 +08:00
duzhichao 23bb330f43 修复页面bug 2025-09-25 16:43:59 +08:00
duzhichao 52d38807a7 feat_withplan_dto 2025-09-23 18:41:36 +08:00
duzhichao 6af0ab37d4 feat_crud 2025-09-23 17:24:11 +08:00
duzhichao f475d940be feat 2025-09-23 17:17:13 +08:00
duzhichao 84b6a87ca8 修复页面bug 2025-09-23 16:12:43 +08:00
duzhichao 02175cad3f !33 feat(react-web-next): 新增.editorconfig和.prettierrc配置文件,添加public/.gitkeep占位文件
Merge pull request !33 from 鸭先知/feature_dzc
2025-09-23 07:15:44 +00:00
duzhichao 408b500b6a feat(react-web-next): 新增.editorconfig和.prettierrc配置文件,添加public/.gitkeep占位文件 2025-09-23 10:32:35 +08:00
duzhichao 10ddfd6f75 Merge branch 'develop' of gitee.com:L-Shilin/go-fly-platform-services into feature_dzc 2025-09-16 10:37:53 +08:00
lishilin df5e94886a fix(订单中心):一键成片逻辑优化,兼容素材数量为4个的订单 2025-09-10 09:13:54 +08:00
lishilin af242be601 !32 fix(订单中心):需要将携程官方的jar加载到本地maven仓库中
Merge pull request !32 from Iamasoldier/feature_lsl
2025-09-06 02:39:54 +00:00
lishilin 13d7a7acc5 fix(订单中心):需要将携程官方的jar加载到本地maven仓库中 2025-09-06 10:38:54 +08:00
lishilin de0cfd81f3 !31 fix(订单中心):事件处理逻辑问题优化修复
Merge pull request !31 from Iamasoldier/feature_lsl
2025-09-06 02:32:48 +00:00
duzhichao 8ab20c7c9d Merge branch 'develop' of gitee.com:L-Shilin/go-fly-platform-services into feature_dzc 2025-09-04 12:08:04 +08:00
duzhichao 01a7c33df2 fix(优惠券中心):移除tourop依赖 2025-09-04 12:07:36 +08:00
lishilin e8fc85177a fix(订单中心):事件处理逻辑问题优化修复 2025-09-03 14:18:18 +08:00
lishilin d4dd6426ce fix(优惠券中心):携程优惠券上线后问题修复,核销逻辑优化 2025-09-03 00:09:10 +08:00
lishilin ee78b4030e fix(优惠券中心) 2025-09-02 17:40:31 +08:00
duzhichao bdd08300eb docs:完善多租户架构并添加机构管理功能
- 新增机构管理模块,实现租户下多机构的创建和管理
- 在业务表中添加机构ID字段,实现数据隔离
- 更新用户体系,支持机构级别的权限控制
- 优化数据库结构,增加必要的索引和约束
- 实现机构数据迁移和兼容性方案
- 添加前端机构管理界面和相关API
2025-09-02 16:43:54 +08:00
lishilin 41a471de37 fix(优惠券中心):用户查询优惠券逻辑优化,回调更新订单状态 2025-09-02 03:05:12 +08:00
lishilin 451a6488e0 fix(优惠券中心):用户查询优惠券逻辑优化,回调更新订单状态 2025-09-01 16:58:30 +08:00
lishilin 186c8acd59 !30 fix(优惠券中心):用户查询优惠券逻辑优化,直接通过二维码id进行查询
Merge pull request !30 from Iamasoldier/feature_lsl
2025-09-01 08:15:17 +00:00
lishilin d262269862 fix(优惠券中心):用户查询优惠券逻辑优化,直接通过二维码id进行查询 2025-09-01 16:13:56 +08:00
duzhichao dee8c01c99 Merge branch 'develop' of https://gitee.com/L-Shilin/go-fly-platform-services into feature_dzc 2025-09-01 15:57:04 +08:00
lishilin 717858fad1 fix(优惠券中心):新增订单支付类型后,优惠券查询逻辑优化 2025-09-01 15:25:07 +08:00
lishilin b477c5913b fix(订单中心):新增订单支付类型后,订单列表显示和首页统计添加筛选条件 2025-09-01 14:35:49 +08:00
lishilin 094b763cfe !29 fix(订单中心):新增订单支付类型
Merge pull request !29 from Iamasoldier/feature_lsl
2025-09-01 06:15:03 +00:00
lishilin 925c915a9b fix(订单中心):新增订单支付类型 2025-09-01 14:13:39 +08:00
lishilin 20fa3ddd23 fix(优惠券中心):新增用户查询优惠券逻辑接口,和用户核销优惠券逻辑 2025-09-01 12:26:48 +08:00
lishilin 3175832c31 fix(优惠券中心):携程所有测试用例全部测试通过,提取配置文件,标准化上线生产环境 2025-09-01 01:54:14 +08:00
lishilin f1222850d8 fix(优惠券中心):携程所有测试用例全部测试通过 2025-09-01 01:39:22 +08:00
lishilin 45bea6622b fix(优惠券中心):携程个测试用例调试优化 2025-08-31 21:24:42 +08:00
lishilin d13d177ff8 fix(优惠券中心):携程个测试用例调试优化 2025-08-30 16:51:39 +08:00
lishilin b2abe0e761 fix(优惠券中心):用 2025-08-30 16:20:25 +08:00
lishilin 7cae10800d !28 fix(优惠券中心):用户订单新增是否展示一键成片字段,数据库时间格式设置
Merge pull request !28 from Iamasoldier/feature_lsl
2025-08-29 16:29:55 +00:00
lishilin d3a2f1c053 fix(优惠券中心):用户订单新增是否展示一键成片字段,数据库时间格式设置 2025-08-29 14:14:10 +08:00
lishilin 6999bb79a5 fix(优惠券中心):携程接口优化 2025-08-28 15:58:08 +08:00
lishilin fd8d2f936f fix(优惠券中心):携程接口优化 2025-08-26 20:10:38 +08:00
lishilin f58c38ae53 fix(优惠券中心):携程接口优化 2025-08-26 20:09:48 +08:00
lishilin 3b763b2e7f fix(优惠券中心):携程接口优化 2025-08-26 02:17:03 +08:00
lishilin 90a0dd6308 !27 fix(设备运维中心):新增自定义指令下发
Merge pull request !27 from Iamasoldier/feature_lsl
2025-08-25 16:57:57 +00:00
lishilin fcfa905a22 fix(设备中心):设备一键起飞接口逻辑优化 2025-08-26 00:55:51 +08:00
lishilin c4d74f9d21 fix(订单中心):新增二维码是否只显示一键成片的属性字段,v2接口根据该属性进行素材的显示 2025-08-26 00:05:07 +08:00
lishilin 7a75f7278d fix(优惠券中心):携程全链路调试完成 2025-08-25 12:20:17 +08:00
lishilin 6d9d9f2124 fix(优惠券中心):携程全链路调试完成,调试对接逻辑优化,新增设备一键起飞的指令接口,二维码新增类型字段来区分二维码中航线的的用途等逻辑 2025-08-24 11:32:07 +08:00
lishilin 4b850d35ea fix(优惠券中心):携程全链路调试完成 2025-08-23 20:10:07 +08:00
lishilin cec9adbd88 fix(设备运维中心):新增自定义指令下发,携程个接口对接,加密方式修改为官方sdk, 2025-08-23 11:43:28 +08:00
duzhichao d9f3691f6b Merge branch 'develop' of https://gitee.com/L-Shilin/go-fly-platform-services into feature_dzc
# Conflicts:
#	zlt-doc/TOURISM_WITH_DISTANCE_FIX.md
#	zlt-doc/优惠券管理功能说明.md
#	zlt-doc/微信平台证书配置说明.md
#	zlt-doc/携程优惠券对接接口文档.md
#	zlt-doc/服务商模式配置说明.md
2025-08-20 19:11:34 +08:00
duzhichao 9cdc3ea908 chore: 更新 .gitignore并删除无用的日志文件- 在 .gitignore 中添加 Claude Code 相关的忽略项- 删除项目根目录下的 hs_err_pid8960.log 文件 2025-08-20 19:09:01 +08:00
lishilin 4a9d625944 fix(设备运维中心):新增自定义指令下发 2025-08-19 19:00:14 +08:00
lishilin cf9f0f05d0 fix(优惠券中心):携程订单接口对接第一版完成对接,新增加密请求体方法 2025-08-19 18:59:37 +08:00
lishilin 993fcc2fa4 fix(优惠券中心):携程订单接口对接第一版完成对接,新增加密请求体方法 2025-08-14 20:17:29 +08:00
lishilin 8dc6298ee0 !26 fix(优惠券中心):携程订单接口对接第一版完成对接
Merge pull request !26 from Iamasoldier/feature_lsl
2025-08-07 18:02:28 +00:00
lishilin 31c62956e8 fix(优惠券中心):携程订单接口对接第一版完成对接 2025-08-08 02:01:49 +08:00
lishilin 626f2707fa fix(优惠券中心):携程订单接口对接第一版完成对接 2025-08-07 16:13:04 +08:00
lishilin 6a0161e1dd fix(设备中心):航线文件md5查询接口返回格式bug修复 2025-08-07 15:44:27 +08:00
duzhichao 42be26d9f5 Merge branch 'develop' of https://gitee.com/L-Shilin/go-fly-platform-services into feature_dzc
# Conflicts:
#	zlt-config/src/main/resources/application-prod.properties
2025-08-04 14:14:27 +08:00
lishilin f203666186 !24 fix(订单中心):首页统计临时演示修复,二维码租户Id修改
Merge pull request !24 from Iamasoldier/feature_lsl
2025-08-03 04:33:56 +00:00
lishilin 44a4611736 !23 fix(订单中心):首页统计优化
Merge pull request !23 from Iamasoldier/feature_lsl
2025-07-30 12:11:30 +00:00
duzhichao 3ca3ee35fc fix(order): 修复订单列表中用户手机号空指针异常
- 在 OrderServiceImpl 中增加了对用户对象的非空判断,避免空指针异常
- 移除了 react-web 项目中的 NODE_OPTIONS环境变量设置,简化构建过程
2025-07-26 19:09:51 +08:00
duzhichao 9f6f6a1ce5 Merge branch 'develop' of https://gitee.com/L-Shilin/go-fly-platform-services into test
# Conflicts:
#	zlt-config/src/main/resources/bootstrap.properties
2025-07-23 19:44:23 +08:00
duzhichao 60f777b400 refactor(config): 调整配置文件及服务端口,注释敏感信息并优化Nacos配置 2025-07-23 18:36:24 +08:00
duzhichao f9e472e0b6 Merge branch 'develop' of https://gitee.com/L-Shilin/go-fly-platform-services into feature_dzc 2025-07-23 18:00:51 +08:00
duzhichao d3ac51e988 refactor(config): 重构配置文件并添加环境变量支持
- 在 application-test.properties 文件中,将所有配置项前添加 "#" 注释符,暂时禁用这些配置
- 在 bootstrap.properties 文件中:
  - 添加 profiles_active 环境变量,用于动态设置 Spring Profile - 更新 nacos server-addr配置,使用环境变量 ${nacos_server_addr},默认值为 81.70.164.178:8848
  - 优化 nacos 配置相关设置,引入 namespace 概念
  - 添加 nacos discovery 相关配置
  - 更新 spring-boot-actuator 相关配置的注释
  - 修改允许 bean 定义覆盖的配置项注释
2025-07-23 17:59:49 +08:00
1042 changed files with 10918 additions and 124207 deletions
+89
View File
@@ -0,0 +1,89 @@
{
"permissions": {
"allow": [
"Read(/F:\\project\\go-fly-platform-services\\zlt-doc/**)",
"Read(/F:\\project\\go-fly-platform-services\\zlt-doc/**)",
"Read(/F:\\project\\go-fly-platform-services\\zlt-doc/**)",
"Read(/F:\\project\\go-fly-platform-services\\zlt-doc/**)",
"Read(/F:\\project\\go-fly-platform-services\\zlt-doc/**)",
"Read(/F:\\project\\go-fly-platform-services\\zlt-doc/**)",
"Read(/F:\\project\\go-fly-platform-services\\zlt-doc/**)",
"Read(/F:\\project\\go-fly-platform-services\\zlt-doc/**)",
"Bash(mvn compile:*)",
"Bash(java:*)",
"Bash(mvn spring-boot:run:*)",
"Bash(mvn clean:*)",
"Bash(npm install:*)",
"Bash(lsof:*)",
"Bash(findstr:*)",
"Bash(npm run start:*)",
"Bash(npm start)",
"Bash(npm run build:*)",
"Bash(dir:*)",
"Bash(git add:*)",
"Bash(git commit -m \"$(cat <<''EOF''\nfix: 修复首页分账计算模块显示问题\n\n- 显示被隐藏的分账计算模块(移除 display: ''none'')\n- 调整 platformSharePercent 状态变量定义顺序\n- 优化 Slider 组件:\n - 设置标记文字颜色为深灰色 (#666),避免看不清\n - 添加 tooltip 提示框,拖动时显示当前百分比\n - 设置 tooltip 背景为深色,文字为白色,确保清晰可见\n- 移除重复的 90% 标记,只保留 0%、50%、100%\n\n🤖 Generated with Claude Code\n\nCo-Authored-By: Claude <noreply@anthropic.com>\nEOF\n)\")",
"Bash(git commit:*)",
"Read(//f/**)",
"Bash(git checkout:*)",
"Bash(git diff:*)",
"Bash(grep:*)",
"Bash(npm run tsc:*)",
"Bash(node:*)",
"Bash(javac:*)",
"WebFetch(domain:github.com)",
"WebFetch(domain:gitee.com)",
"Bash(mkdir:*)",
"Bash(rd /s /q scenic-3d-visualization)",
"Bash(git clone:*)",
"Bash(pnpm:*)",
"Bash(npx tsc:*)",
"WebSearch",
"Bash(del srcmainjavacomcentraldevicewebsocketclientDeviceWebSocketClient.java)",
"Bash(del \"F:\\project\\go-fly-platform-services\\zlt-business\\device-center\\src\\main\\java\\com\\central\\device\\websocket\\client\\DeviceWebSocketClient.java\")",
"Bash(mvn dependency:resolve:*)",
"Bash(mvn dependency:tree:*)",
"Bash(ren:*)",
"Bash(move FireAlarmEventMessage.java DeviceStateEventMessage.java)",
"Bash(del TourismDevices.tsx TourismDevices.less DeviceDetail.tsx DeviceDetail.less)",
"Bash(find:*)",
"Bash(cat:*)",
"Bash(cd:*)",
"Bash(xcopy:*)",
"Bash(robocopy:*)",
"Bash(powershell:*)",
"Bash(curl:*)",
"Bash(del \"F:\\project\\go-fly-platform-services\\zlt-business\\device-center\\src\\main\\java\\com\\central\\device\\service\\MinioModelUploadService.java\")",
"Bash(cmd /c \"dir /s /b \"\"D:\\模型\\新建模型重建-2025-09-29 20_24_08 (UTC+08)\\model\\download\"\"\")",
"Bash(cmd /c \"dir \"\"D:\\模型\\新建模型重建-2025-09-29 20_24_08 (UTC+08)\\model\\download\"\"\")",
"Bash(del \"F:\\project\\go-fly-platform-services\\zlt-business\\device-center\\src\\main\\java\\com\\central\\device\\websocket\\config\\DeviceControlWebSocketConfig.java\")",
"Bash(del \"F:\\project\\go-fly-platform-services\\zlt-web\\react-web-next\\src\\services\\deviceControlWs.ts\")",
"Bash(del:*)",
"Bash(cmd /c del \"F:\\project\\go-fly-platform-services\\zlt-business\\device-center\\src\\main\\java\\com\\central\\device\\controller\\CdnProxyController.java\")",
"Bash(cmd /c del \"F:\\project\\go-fly-platform-services\\zlt-business\\device-center\\src\\main\\java\\com\\central\\device\\websocket\\config\\DeviceControlWebSocketConfig.java\")",
"Bash(cmd /c del \"F:\\project\\go-fly-platform-services\\zlt-business\\device-center\\src\\main\\java\\com\\central\\device\\websocket\\handler\\DeviceControlWebSocketHandler.java\")",
"Bash(tree:*)",
"Bash(move \"F:\\\\project\\\\go-fly-platform-services\\\\zlt-business\\\\order-center\\\\src\\\\main\\\\resources\\\\mapper\\\\mission\\\\MissionMapper.xml\" \"F:\\\\project\\\\go-fly-platform-services\\\\zlt-business\\\\order-center\\\\src\\\\main\\\\resources\\\\mapper\\\\MissionMapper.xml\")",
"Bash(cmd /c move:*)",
"Bash(set:*)",
"Bash(copy \"F:\\\\project\\\\go-fly-platform-services\\\\zlt-web\\\\react-web-next\\\\src\\\\assets\\\\logo.png\" \"F:\\\\project\\\\go-fly-platform-services\\\\zlt-web\\\\yingyan\\\\src\\\\assets\\\\logo.png\")",
"Bash(cmd /c copy \"F:\\\\project\\\\go-fly-platform-services\\\\zlt-web\\\\react-web-next\\\\src\\\\assets\\\\logo.png\" \"F:\\\\project\\\\go-fly-platform-services\\\\zlt-web\\\\yingyan\\\\src\\\\assets\\\\logo.png\")",
"Bash(xargs find)",
"Bash(for file in RouteToolbar.tsx RoutePreview.tsx WaypointEditor.tsx)",
"Bash(do if [ -f \"$file\" ])",
"Bash(else echo \"✗ $file NOT FOUND\")",
"Bash(fi)",
"Bash(done)",
"Bash(tasklist:*)",
"Bash(test:*)",
"WebFetch(domain:dev.qweather.com)",
"Bash(unzip:*)",
"Bash(pip install:*)",
"Bash(python3:*)",
"Bash(npx:*)",
"Bash(xargs head:*)",
"Bash(rm:*)"
],
"deny": [],
"ask": []
}
}
+4
View File
@@ -6,3 +6,7 @@ nacos/
*.iml
*.versionsBackup
# Claude Code specific
.claude/agents/
.claude/team-collaboration-matrix.md
+104
View File
@@ -0,0 +1,104 @@
# Central Platform - 企业级微服务脚手架 AI 开发指南
## 项目概述
**项目类型**: 企业级Spring Cloud微服务脚手架
**主要功能**: 用户权限管理 + 文件存储 + 全文搜索 + 微服务基础设施
**技术栈**: Java 17 + Spring Cloud + React + MySQL + Redis + Elasticsearch
**定位**: 通用后台管理系统脚手架
## 核心模块
### 🏗️ 基础设施层
- **API网关** - Spring Cloud Gateway + Sentinel 限流熔断
- **认证中心** - OAuth2 + JWT + Spring Security
- **配置中心** - Nacos Config 集中配置管理
- **监控中心** - Spring Boot Admin 应用监控
### 📦 公共组件库
- **通用工具** - 核心工具类、通用配置
- **数据库集成** - MyBatis Plus + 多数据源
- **缓存集成** - Redis + Redisson 分布式锁
- **日志集成** - 集中式日志收集
- **搜索集成** - Elasticsearch 全文搜索
- **存储集成** - 多云对象存储(OSS、MinIO)
### 💼 业务模块
- **用户中心** - 用户、角色、权限、租户管理
- **文件中心** - 文件上传下载、多云存储
- **搜索中心** - 全文搜索服务
- **代码生成器** - 基于数据库表的代码生成
## 开发工作流
### 🎯 新功能开发
```bash
# 示例: 添加新的业务模块
参考 demo-center 示例模块创建新的业务服务
1. 创建模块目录结构
2. 配置 pom.xml 依赖
3. 实现业务逻辑
4. 注册到 Nacos
```
### 🔧 系统优化
```bash
# 示例: 微服务性能优化
1. 分析服务调用链路
2. 优化数据库查询
3. 添加缓存策略
4. 配置限流规则
```
### 🚨 问题排查
```bash
# 示例: 服务异常排查
1. 查看 Nacos 服务注册状态
2. 检查日志中心日志
3. 查看监控中心指标
4. 验证配置中心配置
```
## 技术规范
### 📋 开发标准
- **后端**: Spring Boot 3.1.6 + MyBatis Plus 3.5.4 + Java 17
- **前端**: React 17 + Ant Design 4.20 + UmiJS 3.5
- **数据库**: MySQL 8.0 + Redis 7.0 + Elasticsearch 7.13
- **部署**: Docker + Kubernetes + Nacos
### 🔒 安全要求
- OAuth2 + JWT 认证授权
- 多租户数据隔离
- API 访问频率限制
- 敏感数据加密存储
### 📊 性能指标
- 服务响应时间 < 200ms
- 数据库查询优化(避免 N+1 问题)
- 缓存命中率 > 80%
- 服务可用性 > 99.9%
## 快速开始
### 环境准备
1. JDK 17+
2. Maven 3.6+
3. MySQL 8.0+
4. Redis 7.0+
5. Nacos 2.0+
### 启动步骤
1. 初始化数据库: `mysql < zlt-doc/database/init.sql`
2. 启动 Nacos
3. 启动网关 (9900)
4. 启动认证中心 (8000)
5. 启动用户中心 (7000)
6. 启动文件中心 (5000)
### 默认账号
- 用户名: `admin`
- 密码: `admin123`
---
**🚀 企业级微服务脚手架,快速构建你的业务系统!**
+168
View File
@@ -0,0 +1,168 @@
# 快速开始指南
本指南将帮助你快速搭建和运行 Central Platform 微服务脚手架。
## 前置准备
### 1. 安装必要软件
- **JDK 17**: [下载地址](https://www.oracle.com/java/technologies/downloads/)
- **Maven 3.6+**: [下载地址](https://maven.apache.org/download.cgi)
- **MySQL 8.0+**: [下载地址](https://dev.mysql.com/downloads/mysql/)
- **Redis 7.0+**: [下载地址](https://redis.io/download)
- **Nacos 2.0+**: [下载地址](https://github.com/alibaba/nacos/releases)
### 2. 验证安装
```bash
java -version # 应显示 Java 17
mvn -version # 应显示 Maven 3.6+
mysql --version # 应显示 MySQL 8.0+
redis-server --version # 应显示 Redis 7.0+
```
## 第一步:数据库初始化
### 1. 创建数据库
```bash
mysql -u root -p
```
### 2. 执行初始化脚本
```bash
mysql -u root -p < zlt-doc/database/init.sql
```
脚本会自动创建:
- 数据库 `central_platform`
- 核心表(用户、角色、菜单等)
- 默认管理员账号(admin/admin123)
## 第二步:启动 Nacos
### 1. 下载并解压 Nacos
```bash
wget https://github.com/alibaba/nacos/releases/download/2.2.0/nacos-server-2.2.0.tar.gz
tar -xvf nacos-server-2.2.0.tar.gz
cd nacos
```
### 2. 单机模式启动
```bash
# Linux/Mac
sh bin/startup.sh -m standalone
# Windows
cmd bin/startup.cmd -m standalone
```
### 3. 访问控制台
- 地址: http://localhost:8848/nacos
- 账号: nacos
- 密码: nacos
## 第三步:启动 Redis
```bash
# Linux/Mac
redis-server
# Windows
redis-server.exe
```
## 第四步:编译项目
```bash
cd central-platform
mvn clean install -DskipTests
```
## 第五步:启动服务
### 方式一:IDE 启动(推荐开发环境)
按以下顺序启动:
1. **网关服务** - `zlt-gateway/sc-gateway/src/main/java/com/central/gateway/GatewayApp.java`
2. **认证中心** - `zlt-uaa/src/main/java/com/central/oauth/UaaServerApplication.java`
3. **用户中心** - `zlt-business/user-center/src/main/java/com/central/user/UserCenterApplication.java`
4. **文件中心** - `zlt-business/file-center/src/main/java/com/central/file/FileCenterApplication.java`
### 方式二:命令行启动
```bash
# 启动网关
cd zlt-gateway/sc-gateway
mvn spring-boot:run
# 启动认证中心
cd zlt-uaa
mvn spring-boot:run
# 启动用户中心
cd zlt-business/user-center
mvn spring-boot:run
# 启动文件中心
cd zlt-business/file-center
mvn spring-boot:run
```
## 第六步:验证服务
### 1. 检查 Nacos 服务注册
访问 http://localhost:8848/nacos,在"服务管理 > 服务列表"中应该看到:
- sc-gateway
- uaa-server
- user-center
- file-center
### 2. 访问 API 文档
http://localhost:9900/doc.html
### 3. 测试登录接口
```bash
curl -X POST "http://localhost:9900/api-uaa/oauth/token" \
-H "Authorization: Basic d2ViQXBwOndlYkFwcA==" \
-d "username=admin&password=admin123&grant_type=password"
```
## 常见问题
### 1. 端口被占用
修改各服务的 `application.yml` 中的 `server.port` 配置。
### 2. Nacos 连接失败
检查 `bootstrap.yml` 中的 Nacos 地址配置:
```yaml
spring:
cloud:
nacos:
discovery:
server-addr: localhost:8848
```
### 3. 数据库连接失败
检查 Nacos 配置中心的数据库配置。
## 下一步
- 查看 [开发指南](./DEVELOPMENT.md)
- 了解 [架构设计](./ARCHITECTURE.md)
- 参考 [API 文档](http://localhost:9900/doc.html)
## 获取帮助
- GitHub Issues: https://github.com/zlt2000/microservices-platform/issues
+123 -52
View File
@@ -1,52 +1,123 @@
&nbsp;
## 1. 模块说明
```lua
central-platform -- 父项目,公共依赖
│ ├─zlt-business -- 业务模块一级工程
│ │ ├─user-center -- 用户中心[7000]
│ │ ├─file-center -- 文件中心[5000]
│ │ ├─code-generator -- 代码生成器[7300]
│ │ ├─search-center -- 搜索中心
│ │ │ ├─search-client -- 搜索中心客户端
│ │ │ ├─search-server -- 搜索中心服务端[7100]
│ │─zlt-commons -- 通用工具一级工程
│ │ ├─zlt-auth-client-spring-boot-starter -- 封装spring security client端的通用操作逻辑
│ │ ├─zlt-common-core -- 封装通用操作逻辑
│ │ ├─zlt-common-spring-boot-starter -- 封装通用操作逻辑
│ │ ├─zlt-db-spring-boot-starter -- 封装数据库通用操作逻辑
│ │ ├─zlt-log-spring-boot-starter -- 封装log通用操作逻辑
│ │ ├─zlt-redis-spring-boot-starter -- 封装Redis通用操作逻辑
│ │ ├─zlt-loadbalancer-spring-boot-starter -- 封装Loadbalancer和Feign的通用操作逻辑
│ │ ├─zlt-sentinel-spring-boot-starter -- 封装Sentinel的通用操作逻辑
│ │ ├─zlt-elasticsearch-spring-boot-starter -- 封装Elasticsearch通用操作逻辑
│ │ ├─zlt-oss-spring-boot-starter -- 封装对象存储通用操作逻辑
│ │ ├─zlt-zookeeper-spring-boot-starter -- 封装Zookeeper通用操作逻辑
│ ├─zlt-config -- 配置中心
│ ├─zlt-doc -- 项目文档
│ ├─zlt-gateway -- api网关一级工程
│ │ ├─sc-gateway -- spring-cloud-gateway[9900]
│ ├─zlt-monitor -- 监控一级工程
│ │ ├─sc-admin -- 应用监控[6500]
│ │ ├─log-center -- 日志中心[7200]
│ ├─zlt-uaa -- spring-security认证中心[8000]
│ ├─zlt-register -- 注册中心Nacos[8848]
│ ├─zlt-web -- 前端一级工程
│ │ ├─layui-web -- layui前端[8066]
│ │ ├─react-web -- react前端[8066]
│ ├─zlt-demo -- demo一级工程
│ │ ├─dubbo-demo -- dubbo服务demo
│ │ ├─resource-server-demo -- 资源服务器demo
│ │ ├─seata-demo -- seata分布式事务demo
│ │ ├─sharding-jdbc-demo -- sharding-jdbc分库分表demo
│ │ ├─rocketmq-demo -- rocketmq和mq事务demo
│ │ ├─sso-demo -- 单点登录demo
│ │ ├─websocket-demo -- websocket demo
```
项目亮点:
1.全网唯一使用JavaAgent实现Http、MQ、Job全链路灰度
2.全网唯一支持JavaAgent接入Sentinel
# Central Platform - 企业级微服务脚手架
[![Java](https://img.shields.io/badge/Java-17-orange.svg)](https://www.oracle.com/java/)
[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-3.1.6-brightgreen.svg)](https://spring.io/projects/spring-boot)
[![Spring Cloud](https://img.shields.io/badge/Spring%20Cloud-2022.0.4-blue.svg)](https://spring.io/projects/spring-cloud)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
## 项目简介
Central Platform 是一个基于 Spring Cloud 的企业级微服务脚手架,提供完整的微服务基础设施和通用业务模块,帮助快速构建企业级应用。
### 核心特性
- ✅ **微服务架构** - 基于 Spring Cloud 2022.0.4
- ✅ **服务治理** - Nacos 服务注册发现与配置中心
- ✅ **API 网关** - Spring Cloud Gateway + Sentinel 限流熔断
- ✅ **认证授权** - OAuth2 + JWT + Spring Security
- ✅ **多租户支持** - 完整的多租户数据隔离方案
- ✅ **分布式缓存** - Redis + Redisson 分布式锁
- ✅ **数据库** - MyBatis Plus + 多数据源
- ✅ **全文搜索** - Elasticsearch 集成
- ✅ **文件存储** - 多云存储支持(阿里云OSS、七牛云、MinIO)
- ✅ **监控中心** - Spring Boot Admin 应用监控
- ✅ **代码生成** - 基于数据库表的代码生成器
## 技术栈
| 技术 | 版本 | 说明 |
|------|------|------|
| Java | 17 | 编程语言 |
| Spring Boot | 3.1.6 | 应用框架 |
| Spring Cloud | 2022.0.4 | 微服务框架 |
| Spring Cloud Alibaba | 2022.0.0.0 | 阿里云组件 |
| MyBatis Plus | 3.5.4.1 | ORM 框架 |
| MySQL | 8.0+ | 关系数据库 |
| Redis | 7.0+ | 缓存数据库 |
| Elasticsearch | 7.13.4 | 搜索引擎 |
| Nacos | Latest | 注册中心/配置中心 |
| Sentinel | Latest | 限流熔断 |
## 模块说明
```lua
central-platform -- 父项目,公共依赖
│ ├─zlt-business -- 业务模块一级工程
│ │ ├─user-center -- 用户中心[7000]
│ │ ├─file-center -- 文件中心[5000]
│ │ ├─search-center -- 搜索中心
│ │ │ ├─search-client -- 搜索中心客户端
│ │ │ ├─search-server -- 搜索中心服务端[7100]
│ │ ├─code-generator -- 代码生成器[7300]
│ │ └─demo-center -- 示例模块[8100]
│ ├─zlt-commons -- 通用工具一级工程
│ │ ├─zlt-common-core -- 核心工具类
│ │ ├─zlt-common-spring-boot-starter -- 通用配置
│ │ ├─zlt-db-spring-boot-starter -- 数据库集成
│ │ ├─zlt-redis-spring-boot-starter -- Redis集成
│ │ ├─zlt-log-spring-boot-starter -- 日志集成
│ │ ├─zlt-auth-client-spring-boot-starter -- 认证客户端
│ │ ├─zlt-loadbalancer-spring-boot-starter -- 负载均衡
│ │ ├─zlt-sentinel-spring-boot-starter -- 限流熔断
│ │ ├─zlt-elasticsearch-spring-boot-starter -- 搜索引擎
│ │ ├─zlt-oss-spring-boot-starter -- 对象存储
│ │ ├─zlt-sms-spring-boot-starter -- 短信集成
│ │ ├─zlt-zookeeper-spring-boot-starter -- Zookeeper集成
│ │ ├─zlt-wechat-common-core -- 微信通用核心
│ │ └─zlt-wechat-spring-boot-starter -- 微信集成
│ ├─zlt-gateway -- API网关[9900]
│ ├─zlt-uaa -- 认证授权中心[8000]
│ ├─zlt-config -- 配置中心
│ ├─zlt-monitor -- 监控中心
│ │ ├─sc-admin -- 应用监控[6500]
│ │ └─log-center -- 日志中心[7200]
│ └─zlt-doc -- 项目文档
└─database -- 数据库脚本
```
## 快速开始
### 环境要求
- JDK 17+
- Maven 3.6+
- MySQL 8.0+
- Redis 7.0+
- Nacos 2.0+
### 数据库初始化
```bash
mysql -u root -p < zlt-doc/database/init.sql
```
### 启动 Nacos
```bash
# 单机模式启动
sh nacos/bin/startup.sh -m standalone
```
访问: http://localhost:8848/nacos (账号: nacos/nacos)
### 编译项目
```bash
mvn clean install -DskipTests
```
### 启动服务
1. 启动网关 (9900)
2. 启动认证中心 (8000)
3. 启动用户中心 (7000)
4. 启动文件中心 (5000)
### 默认账号
- 用户名: `admin`
- 密码: `admin123`
## 许可证
Apache License 2.0
+269
View File
@@ -0,0 +1,269 @@
# 企业级微服务脚手架抽离总结报告
## 项目信息
- **原项目**: Go-Fly Platform Services (旅游景区管理平台)
- **新项目**: Central Platform (企业级微服务脚手架)
- **版本**: 6.0.0
- **分支**: scaffold-base
- **提交**: 74d99e6b
## 抽离概述
成功将业务特定的旅游平台项目抽离为通用的企业级微服务脚手架,保留了完整的微服务基础设施和核心通用功能。
## 一、保留的核心模块
### 1. 基础设施层 ✅
```
zlt-gateway/ # API网关 (Spring Cloud Gateway + Sentinel)
zlt-uaa/ # 认证授权中心 (OAuth2 + JWT)
zlt-config/ # 配置中心 (Nacos Config)
zlt-monitor/ # 监控中心 (Spring Boot Admin)
```
### 2. 公共组件库 ✅ (完整保留)
```
zlt-commons/
├── zlt-common-core/ # 核心工具类
├── zlt-common-spring-boot-starter/ # 通用配置
├── zlt-redis-spring-boot-starter/ # Redis集成
├── zlt-db-spring-boot-starter/ # 数据库集成
├── zlt-log-spring-boot-starter/ # 日志集成
├── zlt-auth-client-spring-boot-starter/ # 认证客户端
├── zlt-loadbalancer-spring-boot-starter/ # 负载均衡
├── zlt-sentinel-spring-boot-starter/ # 限流熔断
├── zlt-elasticsearch-spring-boot-starter/# 搜索引擎
├── zlt-oss-spring-boot-starter/ # 对象存储
├── zlt-sms-spring-boot-starter/ # 短信集成
├── zlt-zookeeper-spring-boot-starter/ # Zookeeper集成
├── zlt-wechat-common-core/ # 微信通用核心
└── zlt-wechat-spring-boot-starter/ # 微信集成
```
### 3. 核心业务模块 ✅
```
zlt-business/
├── user-center/ # 用户中心 (用户、角色、权限、租户)
├── file-center/ # 文件中心 (多云存储)
├── search-center/ # 搜索中心 (Elasticsearch)
├── code-generator/ # 代码生成器
└── demo-center/ # 示例模块 (新增)
```
### 4. 前端项目 ✅
```
zlt-web/
├── layui-web/ # Layui 管理后台
└── react-web/ # React + Ant Design Pro 管理后台
```
## 二、删除的业务模块
### 1. 业务特定模块 ❌
```
zlt-business/
├── device-center/ # 设备中心 (IoT设备、大疆无人机)
├── device-ops-center/ # 设备运维中心
├── order-center/ # 订单中心 (景区门票、旅游产品)
├── coupon-center/ # 优惠券中心 (携程对接)
└── msg-center/ # 消息中心 (邮件、短信、推送)
```
### 2. 业务前端项目 ❌
```
zlt-web/
├── react-web-next/ # 旅游业务前端
└── yingyan/ # 鹰眼系统前端
```
### 3. 业务文档 ❌
```
zlt-doc/
├── device_ops_requirements.md
├── MAP_DASHBOARD_ANALYSIS.md
├── third-party-aerial-photography-flow.md
├── TOURISM_WITH_DISTANCE_FIX.md
├── yingyan-design.md
├── 优惠券管理功能说明.md
├── 携程优惠券对接接口文档.md
├── 多租户层级使用指南.md
├── 租户组织机构重构计划.md
└── ... (共24个业务文档)
```
## 三、新增内容
### 1. 示例模块
- **demo-center**: 完整的示例业务模块,展示如何创建新的微服务
### 2. 数据库脚本
- **zlt-doc/database/init.sql**: 核心表初始化脚本
- sys_user (用户表)
- sys_role (角色表)
- sys_menu (菜单表)
- sys_user_role (用户角色关联)
- sys_role_menu (角色菜单关联)
- sys_tenant (租户表)
- sys_file (文件表)
- sys_log (操作日志表)
- 默认管理员账号 (admin/admin123)
### 3. 项目文档
- **README.md**: 项目介绍和快速开始
- **QUICK_START.md**: 详细的快速开始指南
- **CLAUDE.md**: AI 开发指南 (更新为脚手架版本)
## 四、技术栈
### 后端技术
| 技术 | 版本 | 说明 |
|------|------|------|
| Java | 17 | 编程语言 |
| Spring Boot | 3.1.6 | 应用框架 |
| Spring Cloud | 2022.0.4 | 微服务框架 |
| Spring Cloud Alibaba | 2022.0.0.0 | 阿里云组件 |
| MyBatis Plus | 3.5.4.1 | ORM 框架 |
| MySQL | 8.0+ | 关系数据库 |
| Redis | 7.0+ | 缓存数据库 |
| Elasticsearch | 7.13.4 | 搜索引擎 |
| Nacos | Latest | 注册中心/配置中心 |
| Sentinel | Latest | 限流熔断 |
### 前端技术
| 技术 | 版本 | 说明 |
|------|------|------|
| React | 17 | UI 框架 |
| Ant Design | 4.20 | UI 组件库 |
| UmiJS | 3.5 | 应用框架 |
| TypeScript | 4.x | 编程语言 |
## 五、核心功能
### 1. 用户中心
- ✅ 用户管理 (CRUD、状态管理)
- ✅ 角色管理 (RBAC权限)
- ✅ 菜单管理 (动态路由)
- ✅ 权限管理 (按钮级权限)
- ✅ 租户管理 (多租户隔离)
- ✅ 登录日志
- ✅ 操作日志
### 2. 文件中心
- ✅ 文件上传下载
- ✅ 多云存储支持 (阿里云OSS、七牛云、MinIO)
- ✅ 图片预览
- ✅ CDN加速
### 3. 搜索中心
- ✅ 全文搜索
- ✅ 数据索引管理
- ✅ 搜索结果排序
### 4. 代码生成器
- ✅ 基于数据库表生成代码
- ✅ 支持自定义模板
## 六、项目结构
```
central-platform/
├── zlt-commons/ # 公共组件库 (13个模块)
├── zlt-gateway/ # API网关
├── zlt-uaa/ # 认证授权中心
├── zlt-config/ # 配置中心
├── zlt-monitor/ # 监控中心
├── zlt-business/ # 业务模块
│ ├── user-center/ # 用户中心
│ ├── file-center/ # 文件中心
│ ├── search-center/ # 搜索中心
│ ├── code-generator/ # 代码生成器
│ └── demo-center/ # 示例模块
├── zlt-web/ # 前端项目
│ ├── layui-web/ # Layui 管理后台
│ └── react-web/ # React 管理后台
├── zlt-doc/ # 项目文档
│ ├── database/ # 数据库脚本
│ └── sql/ # SQL脚本
├── README.md # 项目说明
├── QUICK_START.md # 快速开始
└── CLAUDE.md # AI 开发指南
```
## 七、统计数据
### 代码变更
- **删除文件**: 1879 个
- **删除代码行**: 293,423 行
- **新增代码行**: 609 行
- **净减少**: 292,814 行
### 模块统计
- **保留模块**: 9 个 (基础设施 4 + 业务 5)
- **删除模块**: 5 个 (业务特定)
- **新增模块**: 1 个 (demo-center)
- **公共组件**: 13 个 (全部保留)
### 文档清理
- **删除业务文档**: 24 个
- **保留配置文档**: 3 个
- **新增文档**: 2 个
## 八、快速开始
### 环境要求
- JDK 17+
- Maven 3.6+
- MySQL 8.0+
- Redis 7.0+
- Nacos 2.0+
### 启动步骤
1. 初始化数据库: `mysql < zlt-doc/database/init.sql`
2. 启动 Nacos (单机模式)
3. 启动网关 (9900)
4. 启动认证中心 (8000)
5. 启动用户中心 (7000)
6. 启动文件中心 (5000)
### 默认账号
- 用户名: `admin`
- 密码: `admin123`
## 九、后续建议
### 1. 可选扩展模块
- 消息中心 (邮件、短信、站内信)
- 工作流引擎 (Activiti/Flowable)
- 报表中心 (JasperReports/ECharts)
- 定时任务 (XXL-Job)
- 第三方登录 (OAuth2社交登录)
### 2. 文档完善
- 架构设计文档
- 开发规范文档
- 部署运维文档
- API 接口文档
### 3. 示例完善
- 更多业务场景示例
- 最佳实践示例
- 性能优化示例
## 十、总结
成功将业务特定的旅游平台抽离为通用的企业级微服务脚手架:
✅ **保留完整的微服务基础设施**
✅ **保留所有公共组件库**
✅ **保留核心通用业务模块**
✅ **删除所有业务特定代码**
✅ **创建完整的示例模块**
✅ **提供详细的文档和快速开始指南**
该脚手架可作为企业级后台管理系统的基础框架,支持快速开发各类业务系统。
---
**抽离完成时间**: 2026-03-07
**Git 分支**: scaffold-base
**Git 提交**: 74d99e6b
-127
View File
@@ -1,127 +0,0 @@
-- 微信配置表服务商模式字段迁移脚本
-- 执行时间:2024-01-XX
-- 说明:为wechat_config表添加服务商模式相关字段
-- 1. 添加服务商模式标识字段
ALTER TABLE wechat_config ADD COLUMN is_service_mode TINYINT(1) DEFAULT 0 COMMENT '是否服务商模式:0-普通商户,1-服务商';
-- 2. 添加服务商相关字段
ALTER TABLE wechat_config ADD COLUMN service_app_id VARCHAR(64) COMMENT '服务商应用ID';
ALTER TABLE wechat_config ADD COLUMN service_mch_id VARCHAR(32) COMMENT '服务商商户号';
-- 3. 添加子商户相关字段
ALTER TABLE wechat_config ADD COLUMN sub_mch_id VARCHAR(32) COMMENT '子商户号';
ALTER TABLE wechat_config ADD COLUMN sub_app_id VARCHAR(64) COMMENT '子商户应用ID';
ALTER TABLE wechat_config ADD COLUMN sub_mch_name VARCHAR(128) COMMENT '子商户名称';
ALTER TABLE wechat_config ADD COLUMN sub_mch_description VARCHAR(255) COMMENT '子商户描述';
-- 4. 创建索引以提高查询性能
CREATE INDEX idx_wechat_config_service_mode ON wechat_config(is_service_mode);
CREATE INDEX idx_wechat_config_service_mch_id ON wechat_config(service_mch_id);
CREATE INDEX idx_wechat_config_sub_mch_id ON wechat_config(sub_mch_id);
-- 5. 添加注释说明
-- 服务商模式下的字段使用说明:
-- - is_service_mode = 1 时,使用 service_app_id、service_mch_id、sub_mch_id 等字段
-- - is_service_mode = 0 时,使用 app_id、merchant_id 等字段
-- - 一个服务商可以对应多个子商户,通过 service_mch_id 关联
-- 6. 示例数据(可选)
-- 插入服务商配置示例
-- INSERT INTO wechat_config (
-- tenant_id, type, is_service_mode, service_app_id, service_mch_id,
-- sub_mch_id, sub_app_id, sub_mch_name, sub_mch_description,
-- mch_serial_no, private_key, api_v3_key, notify_url, status
-- ) VALUES (
-- 'webApp', 'PAY', 1, 'wx1234567890abcdef', '1900000109',
-- '1900000109', 'wx1234567890abcdef', '测试子商户', '测试子商户描述',
-- '1234567890ABCDEF', '-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----',
-- 'your_api_v3_key', 'https://your.domain.com/notify', 1
-- );
-- ========== 二维码素材数量字段迁移脚本 ==========
-- 执行时间:2024-01-XX
-- 说明:为qrcodes表添加素材数量字段
-- 1. 添加素材数量字段
ALTER TABLE qrcodes ADD COLUMN material_count INT DEFAULT 1 COMMENT '素材数量(该二维码所包含的视频图片数量)';
-- 2. 创建索引以提高查询性能
CREATE INDEX idx_qrcodes_material_count ON qrcodes(material_count);
-- 3. 更新现有二维码的素材数量(默认为1)
UPDATE qrcodes SET material_count = 1 WHERE material_count IS NULL;
-- 4. 添加注释说明
-- 素材数量字段说明:
-- - material_count > 0:表示该二维码需要上传的素材数量
-- - 当订单的文件数量达到或超过此数量时,订单状态将自动更新为"素材上传完成"
-- - 默认值为1,表示每个二维码至少需要1个素材文件
-- ========== 微信平台证书序列号字段迁移脚本 ==========
-- 执行时间:2024-01-XX
-- 说明:为sys_wechat_config表添加微信平台证书序列号字段
-- 1. 添加微信平台证书序列号字段
ALTER TABLE sys_wechat_config ADD COLUMN serial_number VARCHAR(64) COMMENT '微信平台证书序列号(用于回调验证)';
-- 2. 创建索引以提高查询性能
CREATE INDEX idx_wechat_config_serial_number ON sys_wechat_config(serial_number);
-- 3. 添加注释说明
-- 微信平台证书序列号字段说明:
-- - serial_number:微信平台证书的序列号,用于验证回调请求的签名
-- - 在微信支付回调时,通过此字段可以快速定位对应的配置信息
-- - 与回调请求头中的 Wechatpay-Serial 字段对应
-- - 支持一个商户配置多个平台证书,通过序列号区分
-- ========== wechat_config表微信平台证书序列号字段迁移脚本 ==========
-- 执行时间:2024-01-XX
-- 说明:为wechat_config表添加微信平台证书序列号字段
-- 1. 添加微信平台证书序列号字段
ALTER TABLE wechat_config ADD COLUMN serial_number VARCHAR(64) COMMENT '微信平台证书序列号(用于回调验证)';
-- 2. 创建索引以提高查询性能
CREATE INDEX idx_wechat_config_serial_number_2 ON wechat_config(serial_number);
-- 3. 添加注释说明
-- 微信平台证书序列号字段说明:
-- - serial_number:微信平台证书的序列号,用于验证回调请求的签名
-- - 在微信支付回调时,通过此字段可以快速定位对应的配置信息
-- - 与回调请求头中的 Wechatpay-Serial 字段对应
-- - 支持一个商户配置多个平台证书,通过序列号区分
-- 创建优惠券表
CREATE TABLE IF NOT EXISTS `t_coupon` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`coupon_no` varchar(64) NOT NULL COMMENT '优惠券编号',
`coupon_name` varchar(128) NOT NULL COMMENT '优惠券名称',
`coupon_type` int(11) NOT NULL COMMENT '优惠券类型:1-满减券,2-折扣券,3-免费券',
`amount` decimal(10,2) DEFAULT NULL COMMENT '优惠券面额',
`min_amount` decimal(10,2) DEFAULT NULL COMMENT '使用门槛金额',
`discount_rate` int(11) DEFAULT NULL COMMENT '折扣率(0-100,折扣券时使用)',
`status` int(11) NOT NULL DEFAULT '0' COMMENT '优惠券状态:0-未使用,1-已使用,2-已过期,3-已作废',
`user_phone` varchar(20) NOT NULL COMMENT '用户手机号',
`user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
`source` int(11) NOT NULL DEFAULT '2' COMMENT '来源:1-携程,2-高飞自建',
`ctrip_coupon_id` varchar(64) DEFAULT NULL COMMENT '携程优惠券ID(来源为携程时使用)',
`valid_start_time` datetime NOT NULL COMMENT '有效期开始时间',
`valid_end_time` datetime NOT NULL COMMENT '有效期结束时间',
`used_time` datetime DEFAULT NULL COMMENT '使用时间',
`used_order_no` varchar(64) DEFAULT NULL COMMENT '使用订单号',
`cancel_time` datetime DEFAULT NULL COMMENT '退券时间',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`create_by` varchar(64) DEFAULT NULL COMMENT '创建人',
`update_by` varchar(64) DEFAULT NULL COMMENT '更新人',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
`tenant_id` varchar(64) DEFAULT NULL COMMENT '租户ID',
PRIMARY KEY (`id`),
UNIQUE KEY `uk_coupon_no` (`coupon_no`),
UNIQUE KEY `uk_ctrip_coupon_id` (`ctrip_coupon_id`),
KEY `idx_user_phone` (`user_phone`),
KEY `idx_status` (`status`),
KEY `idx_valid_end_time` (`valid_end_time`),
KEY `idx_create_time` (`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='优惠券表';
-241
View File
@@ -1,241 +0,0 @@
# 设备运维管理系统需求报告
## 1. 项目概述
设备运维管理系统是一个面向文旅行业的 SaaS 平台,旨在实现设备状态管理、设备作业情况、景区设备分布、设备订单完成情况、设备盈利等维度的数据展示、统计和管理功能。
## 2. 功能模块
### 2.1 设备状态管理模块
- **功能**:实时监控设备状态,包括在线/离线状态、电量、信号强度、固件版本等。
- **实现**:
- 设备状态实时展示:通过 WebSocket 或 MQTT 协议实时推送设备状态数据。
- 设备状态历史记录:记录设备状态变更历史,支持时间范围查询。
- 设备状态告警:当设备状态异常(如离线、电量低、信号弱)时,触发告警通知。
### 2.2 设备作业情况模块
- **功能**:展示设备当前作业状态、历史作业记录、作业成功率等。
- **实现**:
- 当前作业状态:展示设备当前执行的航线任务、任务进度、预计完成时间等。
- 历史作业记录:记录设备历史作业数据,支持按时间、任务类型、成功率等维度筛选。
- 作业统计分析:统计设备作业成功率、平均作业时间、故障率等指标,生成报表或图表。
### 2.3 景区设备分布模块
- **功能**:展示景区内设备的分布情况,包括设备数量、类型、状态等。
- **实现**:
- 设备分布地图:通过地图展示景区内设备的分布位置,支持点击查看设备详情。
- 设备分类统计:按设备类型、状态等维度统计景区内设备数量,生成统计图表。
- 设备详情展示:点击设备可查看设备详细信息,包括状态、作业记录、维护记录等。
### 2.4 设备订单完成情况模块
- **功能**:展示设备关联订单的完成情况,包括订单数量、完成率、平均完成时间等。
- **实现**:
- 订单完成统计:统计设备关联订单的完成数量、完成率、平均完成时间等指标。
- 订单详情展示:支持查看设备关联订单的详细信息,包括订单状态、支付情况、完成时间等。
- 订单趋势分析:分析设备订单完成情况的趋势,生成趋势图表。
### 2.5 设备盈利模块
- **功能**:展示设备的盈利情况,包括收入、成本、利润等。
- **实现**:
- 盈利统计:统计设备的收入、成本、利润等指标,支持按时间范围查询。
- 盈利趋势分析:分析设备盈利情况的趋势,生成趋势图表。
- 盈利报表:生成设备盈利报表,支持导出为 Excel 或 PDF 格式。
### 2.6 系统管理模块
- **功能**:管理系统用户、权限、配置等。
- **实现**:
- 用户管理:管理系统的用户账号,包括添加、删除、修改用户信息等。
- 权限管理:管理用户的权限,确保用户只能访问其权限范围内的功能。
- 系统配置:管理系统的基本配置,如告警阈值、数据保留时间等。
### 2.7 数据展示与统计模块
- **功能**:通过图表、报表等形式展示设备运维数据。
- **实现**:
- 数据可视化:使用图表(如折线图、柱状图、饼图等)展示设备状态、作业情况、订单完成情况、盈利情况等数据。
- 数据导出:支持将数据导出为 Excel、PDF 等格式,方便用户离线分析。
- 数据筛选:支持按时间、设备、景区等维度筛选数据,生成定制化报表。
### 2.8 告警与通知模块
- **功能**:当设备状态异常或作业失败时,触发告警并通知相关人员。
- **实现**:
- 告警规则配置:配置告警规则,如设备离线、电量低、信号弱、作业失败等。
- 告警通知:通过短信、邮件、微信等方式通知相关人员。
- 告警历史记录:记录告警历史,支持按时间、告警类型等维度查询。
## 3. 流程图
### 3.1 设备状态管理流程
```
用户登录系统
↓
查看设备状态
↓
实时监控设备状态
↓
设备状态异常
↓
触发告警通知
↓
用户处理告警
```
### 3.2 设备作业情况流程
```
用户登录系统
↓
查看设备作业情况
↓
展示当前作业状态
↓
查看历史作业记录
↓
统计分析作业数据
↓
生成作业报表
```
### 3.3 景区设备分布流程
```
用户登录系统
↓
查看景区设备分布
↓
展示设备分布地图
↓
点击设备查看详情
↓
展示设备详细信息
```
### 3.4 设备订单完成情况流程
```
用户登录系统
↓
查看设备订单完成情况
↓
统计订单完成数据
↓
展示订单详情
↓
分析订单趋势
↓
生成订单报表
```
### 3.5 设备盈利流程
```
用户登录系统
↓
查看设备盈利情况
↓
统计盈利数据
↓
分析盈利趋势
↓
生成盈利报表
```
## 4. 简易页面设计
### 4.1 设备状态管理页面
```
+----------------------------------+
| 设备状态管理 |
+----------------------------------+
| 设备列表 |
| - 设备1:在线,电量 80% |
| - 设备2:离线,电量 20% |
| - 设备3:在线,电量 90% |
+----------------------------------+
| 设备状态历史记录 |
| - 设备1:2024-01-01 10:00 在线 |
| - 设备1:2024-01-01 11:00 离线 |
| - 设备2:2024-01-01 10:00 在线 |
+----------------------------------+
| 告警通知 |
| - 设备2离线告警 |
| - 设备1电量低告警 |
+----------------------------------+
```
### 4.2 设备作业情况页面
```
+----------------------------------+
| 设备作业情况 |
+----------------------------------+
| 当前作业状态 |
| - 设备1:执行航线任务,进度 50% |
| - 设备2:空闲 |
| - 设备3:执行航线任务,进度 30% |
+----------------------------------+
| 历史作业记录 |
| - 设备1:2024-01-01 任务完成 |
| - 设备2:2024-01-01 任务失败 |
| - 设备3:2024-01-01 任务完成 |
+----------------------------------+
| 作业统计分析 |
| - 成功率:80% |
| - 平均作业时间:30分钟 |
| - 故障率:20% |
+----------------------------------+
```
### 4.3 景区设备分布页面
```
+----------------------------------+
| 景区设备分布 |
+----------------------------------+
| 设备分布地图 |
| [地图展示设备分布位置] |
+----------------------------------+
| 设备分类统计 |
| - 在线设备:5台 |
| - 离线设备:2台 |
| - 故障设备:1台 |
+----------------------------------+
| 设备详情 |
| - 设备1:在线,电量 80% |
| - 设备2:离线,电量 20% |
| - 设备3:在线,电量 90% |
+----------------------------------+
```
### 4.4 设备订单完成情况页面
```
+----------------------------------+
| 设备订单完成情况 |
+----------------------------------+
| 订单完成统计 |
| - 完成订单:100单 |
| - 完成率:90% |
| - 平均完成时间:20分钟 |
+----------------------------------+
| 订单详情 |
| - 订单1:已完成,支付成功 |
| - 订单2:已完成,支付成功 |
| - 订单3:已完成,支付成功 |
+----------------------------------+
| 订单趋势分析 |
| [趋势图表展示订单完成情况] |
+----------------------------------+
```
### 4.5 设备盈利页面
```
+----------------------------------+
| 设备盈利情况 |
+----------------------------------+
| 盈利统计 |
| - 收入:10000元 |
| - 成本:5000元 |
| - 利润:5000元 |
+----------------------------------+
| 盈利趋势分析 |
| [趋势图表展示盈利情况] |
+----------------------------------+
| 盈利报表 |
| [导出为Excel或PDF] |
+----------------------------------+
```
## 5. 总结
设备运维管理系统通过设备状态管理、设备作业情况、景区设备分布、设备订单完成情况、设备盈利等模块,实现设备运维的全方位监控和管理。系统采用微服务架构,支持实时数据推送、数据可视化、告警通知等功能,确保设备运维的高效性和可靠性。
-996
View File
@@ -1,996 +0,0 @@
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 734003200 bytes for G1 virtual space
# Possible reasons:
# The system is out of physical RAM or swap space
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# JVM is running with Zero Based Compressed Oops mode in which the Java heap is
# placed in the first 32GB address space. The Java Heap base address is the
# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
# to set the Java Heap base and to place the Java Heap above 32GB virtual address.
# This output file may be truncated or incomplete.
#
# Out of Memory Error (os_windows.cpp:3548), pid=25368, tid=16648
#
# JRE version: Java(TM) SE Runtime Environment (17.0.13+10) (build 17.0.13+10-LTS-268)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0.13+10-LTS-268, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
--------------- S U M M A R Y ------------
Command Line: -Dmaven.multiModuleProjectDirectory=E:\Idea-project\ikingtec-new6.0\microservices-platform -Djansi.passthrough=true -Dmaven.home=D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\plugins\maven\lib\maven3 -Dclassworlds.conf=D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\plugins\maven\lib\maven3\bin\m2.conf -Dmaven.ext.class.path=D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\plugins\maven\lib\maven-event-listener.jar -javaagent:D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\lib\idea_rt.jar=58940:D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\bin -Dfile.encoding=UTF-8 org.codehaus.classworlds.Launcher -Didea.version=2024.3.1 -T 8 -s D:\maven\apache-maven-3.5.2\conf\settings.xml package
Host: Intel(R) Core(TM) i7-9700F CPU @ 3.00GHz, 8 cores, 31G, Windows 10 , 64 bit Build 19041 (10.0.19041.5198)
Time: Sun Jan 5 03:07:02 2025 Windows 10 , 64 bit Build 19041 (10.0.19041.5198) elapsed time: 21.807413 seconds (0d 0h 0m 21s)
--------------- T H R E A D ---------------
Current thread (0x000002577ec0ce20): VMThread "VM Thread" [stack: 0x000000a0c9200000,0x000000a0c9300000] [id=16648]
Stack: [0x000000a0c9200000,0x000000a0c9300000]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x67a23a]
V [jvm.dll+0x7da96d]
V [jvm.dll+0x7dc2b3]
V [jvm.dll+0x7dc923]
V [jvm.dll+0x2450ef]
V [jvm.dll+0x677279]
V [jvm.dll+0x66bf22]
V [jvm.dll+0x302006]
V [jvm.dll+0x3095a6]
V [jvm.dll+0x359e9e]
V [jvm.dll+0x35a0cf]
V [jvm.dll+0x2d90d8]
V [jvm.dll+0x2d750d]
V [jvm.dll+0x2d6b5c]
V [jvm.dll+0x31a6bb]
V [jvm.dll+0x7e121b]
V [jvm.dll+0x7e1f54]
V [jvm.dll+0x7e246d]
V [jvm.dll+0x7e2844]
V [jvm.dll+0x7e2910]
V [jvm.dll+0x78af1a]
V [jvm.dll+0x679125]
C [ucrtbase.dll+0x21bb2]
C [KERNEL32.DLL+0x17374]
C [ntdll.dll+0x4cc91]
VM_Operation (0x000000a0caffda70): G1CollectForAllocation, mode: safepoint, requested by thread 0x0000025747e837f0
--------------- P R O C E S S ---------------
Threads class SMR info:
_java_thread_list=0x0000025783920dc0, length=24, elements={
0x00000257543ff050, 0x000002577ec11c60, 0x000002577ec127f0, 0x000002577ec2c960,
0x000002577ec2f240, 0x000002577ec2fb10, 0x000002577ec31f60, 0x000002577ec32b60,
0x000002577ec34090, 0x000002577ec3aa20, 0x000002577f560090, 0x000002577f6d0220,
0x000002577f6d0700, 0x00000257472e95c0, 0x00000257477e9500, 0x0000025747e80550,
0x0000025747e828c0, 0x0000025747e82dd0, 0x0000025747e832e0, 0x0000025747e80a60,
0x0000025747e80f70, 0x0000025747e837f0, 0x0000025747e83d00, 0x0000025747e81990
}
Java Threads: ( => current thread )
0x00000257543ff050 JavaThread "main" [_thread_blocked, id=16164, stack(0x000000a0c8c00000,0x000000a0c8d00000)]
0x000002577ec11c60 JavaThread "Reference Handler" daemon [_thread_blocked, id=30264, stack(0x000000a0c9300000,0x000000a0c9400000)]
0x000002577ec127f0 JavaThread "Finalizer" daemon [_thread_blocked, id=25264, stack(0x000000a0c9400000,0x000000a0c9500000)]
0x000002577ec2c960 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=28952, stack(0x000000a0c9500000,0x000000a0c9600000)]
0x000002577ec2f240 JavaThread "Attach Listener" daemon [_thread_blocked, id=22620, stack(0x000000a0c9600000,0x000000a0c9700000)]
0x000002577ec2fb10 JavaThread "Service Thread" daemon [_thread_blocked, id=19780, stack(0x000000a0c9700000,0x000000a0c9800000)]
0x000002577ec31f60 JavaThread "Monitor Deflation Thread" daemon [_thread_blocked, id=16724, stack(0x000000a0c9800000,0x000000a0c9900000)]
0x000002577ec32b60 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=18424, stack(0x000000a0c9900000,0x000000a0c9a00000)]
0x000002577ec34090 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=26280, stack(0x000000a0c9a00000,0x000000a0c9b00000)]
0x000002577ec3aa20 JavaThread "Sweeper thread" daemon [_thread_blocked, id=18348, stack(0x000000a0c9b00000,0x000000a0c9c00000)]
0x000002577f560090 JavaThread "Common-Cleaner" daemon [_thread_blocked, id=31456, stack(0x000000a0c9c00000,0x000000a0c9d00000)]
0x000002577f6d0220 JavaThread "Monitor Ctrl-Break" daemon [_thread_in_native, id=12312, stack(0x000000a0c9d00000,0x000000a0c9e00000)]
0x000002577f6d0700 JavaThread "Notification Thread" daemon [_thread_blocked, id=27832, stack(0x000000a0c9e00000,0x000000a0c9f00000)]
0x00000257472e95c0 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=4900, stack(0x000000a0ca000000,0x000000a0ca100000)]
0x00000257477e9500 JavaThread "C2 CompilerThread2" daemon [_thread_blocked, id=29180, stack(0x000000a0ca100000,0x000000a0ca200000)]
0x0000025747e80550 JavaThread "Thread-1" daemon [_thread_blocked, id=25424, stack(0x000000a0ca900000,0x000000a0caa00000)]
0x0000025747e828c0 JavaThread "BuilderThread 0" [_thread_blocked, id=30432, stack(0x000000a0caa00000,0x000000a0cab00000)]
0x0000025747e82dd0 JavaThread "mvn-builder-user-center" [_thread_blocked, id=26920, stack(0x000000a0cab00000,0x000000a0cac00000)]
0x0000025747e832e0 JavaThread "mvn-builder-device-center" [_thread_blocked, id=11224, stack(0x000000a0cac00000,0x000000a0cad00000)]
0x0000025747e80a60 JavaThread "BuilderThread 3" [_thread_blocked, id=18428, stack(0x000000a0cad00000,0x000000a0cae00000)]
0x0000025747e80f70 JavaThread "mvn-builder-search-server" [_thread_blocked, id=912, stack(0x000000a0cae00000,0x000000a0caf00000)]
0x0000025747e837f0 JavaThread "mvn-builder-zlt-uaa" [_thread_blocked, id=19144, stack(0x000000a0caf00000,0x000000a0cb000000)]
0x0000025747e83d00 JavaThread "mvn-builder-sc-gateway" [_thread_blocked, id=15892, stack(0x000000a0cb000000,0x000000a0cb100000)]
0x0000025747e81990 JavaThread "mvn-builder-tourism-core" [_thread_blocked, id=11476, stack(0x000000a0cb100000,0x000000a0cb200000)]
Other Threads:
=>0x000002577ec0ce20 VMThread "VM Thread" [stack: 0x000000a0c9200000,0x000000a0c9300000] [id=16648]
0x000002577f73e060 WatcherThread [stack: 0x000000a0c9f00000,0x000000a0ca000000] [id=27448]
0x000002575446c3e0 GCTaskThread "GC Thread#0" [stack: 0x000000a0c8d00000,0x000000a0c8e00000] [id=15572]
0x00000257477e9a20 GCTaskThread "GC Thread#1" [stack: 0x000000a0ca200000,0x000000a0ca300000] [id=27424]
0x0000025747647e60 GCTaskThread "GC Thread#2" [stack: 0x000000a0ca300000,0x000000a0ca400000] [id=27164]
0x0000025747648120 GCTaskThread "GC Thread#3" [stack: 0x000000a0ca400000,0x000000a0ca500000] [id=27856]
0x0000025747648bf0 GCTaskThread "GC Thread#4" [stack: 0x000000a0ca500000,0x000000a0ca600000] [id=24492]
0x000002574775a1a0 GCTaskThread "GC Thread#5" [stack: 0x000000a0ca600000,0x000000a0ca700000] [id=22336]
0x000002574775a460 GCTaskThread "GC Thread#6" [stack: 0x000000a0ca700000,0x000000a0ca800000] [id=23664]
0x000002574775a720 GCTaskThread "GC Thread#7" [stack: 0x000000a0ca800000,0x000000a0ca900000] [id=3648]
0x000002575447d0c0 ConcurrentGCThread "G1 Main Marker" [stack: 0x000000a0c8e00000,0x000000a0c8f00000] [id=30772]
0x000002575447d8e0 ConcurrentGCThread "G1 Conc#0" [stack: 0x000000a0c8f00000,0x000000a0c9000000] [id=21488]
0x00000257498e01e0 ConcurrentGCThread "G1 Conc#1" [stack: 0x000000a0cb200000,0x000000a0cb300000] [id=27744]
0x00000257544ae530 ConcurrentGCThread "G1 Refine#0" [stack: 0x000000a0c9000000,0x000000a0c9100000] [id=27880]
0x0000025749319780 ConcurrentGCThread "G1 Refine#1" [stack: 0x000000a0cb300000,0x000000a0cb400000] [id=668]
0x000002574858b650 ConcurrentGCThread "G1 Refine#2" [stack: 0x000000a0cb400000,0x000000a0cb500000] [id=31388]
0x000002574858b940 ConcurrentGCThread "G1 Refine#3" [stack: 0x000000a0cb500000,0x000000a0cb600000] [id=3292]
0x000002574b98f880 ConcurrentGCThread "G1 Refine#4" [stack: 0x000000a0cb600000,0x000000a0cb700000] [id=30844]
0x0000025750ddf500 ConcurrentGCThread "G1 Refine#5" [stack: 0x000000a0cb700000,0x000000a0cb800000] [id=18084]
0x000002577eb45030 ConcurrentGCThread "G1 Service" [stack: 0x000000a0c9100000,0x000000a0c9200000] [id=26648]
Threads with active compile tasks:
C2 CompilerThread0 21840 20058 4 lombok.core.AST::buildWithField (21 bytes)
C2 CompilerThread1 21840 20070 ! 4 lombok.javac.JavacAST::drill (146 bytes)
C2 CompilerThread2 21840 20059 ! 4 lombok.core.AST::buildWithField0 (121 bytes)
VM state: at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
[0x00000257543fc490] Threads_lock - owner thread: 0x000002577ec0ce20
[0x00000257543fb4d0] Heap_lock - owner thread: 0x0000025747e837f0
Heap address: 0x0000000601000000, size: 8176 MB, Compressed Oops mode: Zero based, Oop shift amount: 3
CDS archive(s) mapped at: [0x0000025702000000-0x0000025702bd0000-0x0000025702bd0000), size 12386304, SharedBaseAddress: 0x0000025702000000, ArchiveRelocationMode: 1.
Compressed class space mapped at: 0x0000025703000000-0x0000025743000000, reserved size: 1073741824
Narrow klass base: 0x0000025702000000, Narrow klass shift: 0, Narrow klass range: 0x100000000
GC Precious Log:
CPUs: 8 total, 8 available
Memory: 32701M
Large Page Support: Disabled
NUMA Support: Disabled
Compressed Oops: Enabled (Zero based)
Heap Region Size: 4M
Heap Min Capacity: 8M
Heap Initial Capacity: 512M
Heap Max Capacity: 8176M
Pre-touch: Disabled
Parallel Workers: 8
Concurrent Workers: 2
Concurrent Refinement Workers: 8
Periodic GC: Disabled
Heap:
garbage-first heap total 1400832K, used 464510K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 2 young (8192K), 2 survivors (8192K)
Metaspace used 49364K, committed 56640K, reserved 1114112K
class space used 5435K, committed 7168K, reserved 1048576K
Heap Regions: E=young(eden), S=young(survivor), O=old, HS=humongous(starts), HC=humongous(continues), CS=collection set, F=free, OA=open archive, CA=closed archive, TAMS=top-at-mark-start (previous, next)
| 0|0x0000000601000000, 0x0000000601400000, 0x0000000601400000|100%| O| |TAMS 0x0000000601400000, 0x0000000601000000| Untracked
| 1|0x0000000601400000, 0x0000000601800000, 0x0000000601800000|100%| O| |TAMS 0x0000000601800000, 0x0000000601400000| Untracked
| 2|0x0000000601800000, 0x0000000601c00000, 0x0000000601c00000|100%| O| |TAMS 0x0000000601c00000, 0x0000000601800000| Untracked
| 3|0x0000000601c00000, 0x0000000602000000, 0x0000000602000000|100%| O| |TAMS 0x0000000602000000, 0x0000000601c00000| Untracked
| 4|0x0000000602000000, 0x0000000602400000, 0x0000000602400000|100%| O| |TAMS 0x0000000602400000, 0x0000000602000000| Untracked
| 5|0x0000000602400000, 0x0000000602800000, 0x0000000602800000|100%| O| |TAMS 0x0000000602800000, 0x0000000602400000| Untracked
| 6|0x0000000602800000, 0x0000000602c00000, 0x0000000602c00000|100%| O| |TAMS 0x0000000602800000, 0x0000000602800000| Untracked
| 7|0x0000000602c00000, 0x0000000603000000, 0x0000000603000000|100%| O| |TAMS 0x0000000603000000, 0x0000000602c00000| Untracked
| 8|0x0000000603000000, 0x0000000603400000, 0x0000000603400000|100%| O| |TAMS 0x0000000603400000, 0x0000000603000000| Untracked
| 9|0x0000000603400000, 0x0000000603800000, 0x0000000603800000|100%| O| |TAMS 0x0000000603800000, 0x0000000603400000| Untracked
| 10|0x0000000603800000, 0x0000000603c00000, 0x0000000603c00000|100%| O| |TAMS 0x0000000603c00000, 0x0000000603800000| Untracked
| 11|0x0000000603c00000, 0x0000000604000000, 0x0000000604000000|100%| O| |TAMS 0x0000000604000000, 0x0000000603c00000| Untracked
| 12|0x0000000604000000, 0x0000000604400000, 0x0000000604400000|100%| O| |TAMS 0x0000000604000000, 0x0000000604000000| Untracked
| 13|0x0000000604400000, 0x0000000604671c00, 0x0000000604800000| 61%| O| |TAMS 0x0000000604400000, 0x0000000604400000| Untracked
| 14|0x0000000604800000, 0x0000000604800000, 0x0000000604c00000| 0%| F| |TAMS 0x0000000604800000, 0x0000000604800000| Untracked
| 15|0x0000000604c00000, 0x0000000605000000, 0x0000000605000000|100%| O| |TAMS 0x0000000605000000, 0x0000000604c00000| Untracked
| 16|0x0000000605000000, 0x0000000605000000, 0x0000000605400000| 0%| F| |TAMS 0x0000000605000000, 0x0000000605000000| Untracked
| 17|0x0000000605400000, 0x0000000605400000, 0x0000000605800000| 0%| F| |TAMS 0x0000000605400000, 0x0000000605400000| Untracked
| 18|0x0000000605800000, 0x0000000605800000, 0x0000000605c00000| 0%| F| |TAMS 0x0000000605800000, 0x0000000605800000| Untracked
| 19|0x0000000605c00000, 0x0000000605c00000, 0x0000000606000000| 0%| F| |TAMS 0x0000000605c00000, 0x0000000605c00000| Untracked
| 20|0x0000000606000000, 0x0000000606000000, 0x0000000606400000| 0%| F| |TAMS 0x0000000606000000, 0x0000000606000000| Untracked
| 21|0x0000000606400000, 0x0000000606400000, 0x0000000606800000| 0%| F| |TAMS 0x0000000606400000, 0x0000000606400000| Untracked
| 22|0x0000000606800000, 0x0000000606c00000, 0x0000000606c00000|100%| O| |TAMS 0x0000000606c00000, 0x0000000606800000| Complete
| 23|0x0000000606c00000, 0x0000000606c00000, 0x0000000607000000| 0%| F| |TAMS 0x0000000606c00000, 0x0000000606c00000| Untracked
| 24|0x0000000607000000, 0x0000000607000000, 0x0000000607400000| 0%| F| |TAMS 0x0000000607000000, 0x0000000607000000| Untracked
| 25|0x0000000607400000, 0x0000000607400000, 0x0000000607800000| 0%| F| |TAMS 0x0000000607400000, 0x0000000607400000| Untracked
| 26|0x0000000607800000, 0x0000000607c00000, 0x0000000607c00000|100%| O| |TAMS 0x0000000607c00000, 0x0000000607800000| Complete
| 27|0x0000000607c00000, 0x0000000607c00000, 0x0000000608000000| 0%| F| |TAMS 0x0000000607c00000, 0x0000000607c00000| Untracked
| 28|0x0000000608000000, 0x0000000608400000, 0x0000000608400000|100%| O| |TAMS 0x0000000608400000, 0x0000000608000000| Complete
| 29|0x0000000608400000, 0x0000000608800000, 0x0000000608800000|100%| O| |TAMS 0x0000000608800000, 0x0000000608400000| Complete
| 30|0x0000000608800000, 0x0000000608c00000, 0x0000000608c00000|100%| O| |TAMS 0x0000000608c00000, 0x0000000608800000| Untracked
| 31|0x0000000608c00000, 0x0000000609000000, 0x0000000609000000|100%| O| |TAMS 0x0000000609000000, 0x0000000608c00000| Complete
| 32|0x0000000609000000, 0x0000000609000000, 0x0000000609400000| 0%| F| |TAMS 0x0000000609000000, 0x0000000609000000| Untracked
| 33|0x0000000609400000, 0x0000000609400000, 0x0000000609800000| 0%| F| |TAMS 0x0000000609400000, 0x0000000609400000| Untracked
| 34|0x0000000609800000, 0x0000000609800000, 0x0000000609c00000| 0%| F| |TAMS 0x0000000609800000, 0x0000000609800000| Untracked
| 35|0x0000000609c00000, 0x0000000609c00000, 0x000000060a000000| 0%| F| |TAMS 0x0000000609c00000, 0x0000000609c00000| Untracked
| 36|0x000000060a000000, 0x000000060a400000, 0x000000060a400000|100%|HS| |TAMS 0x000000060a400000, 0x000000060a000000| Complete
| 37|0x000000060a400000, 0x000000060a800000, 0x000000060a800000|100%| O| |TAMS 0x000000060a800000, 0x000000060a400000| Complete
| 38|0x000000060a800000, 0x000000060a800000, 0x000000060ac00000| 0%| F| |TAMS 0x000000060a800000, 0x000000060a800000| Untracked
| 39|0x000000060ac00000, 0x000000060b000000, 0x000000060b000000|100%| O| |TAMS 0x000000060b000000, 0x000000060ac00000| Complete
| 40|0x000000060b000000, 0x000000060b400000, 0x000000060b400000|100%| O| |TAMS 0x000000060b400000, 0x000000060b000000| Complete
| 41|0x000000060b400000, 0x000000060b800000, 0x000000060b800000|100%| O| |TAMS 0x000000060b800000, 0x000000060b400000| Untracked
| 42|0x000000060b800000, 0x000000060bc00000, 0x000000060bc00000|100%| O| |TAMS 0x000000060bc00000, 0x000000060b800000| Complete
| 43|0x000000060bc00000, 0x000000060bc00000, 0x000000060c000000| 0%| F| |TAMS 0x000000060bc00000, 0x000000060bc00000| Untracked
| 44|0x000000060c000000, 0x000000060c000000, 0x000000060c400000| 0%| F| |TAMS 0x000000060c000000, 0x000000060c000000| Untracked
| 45|0x000000060c400000, 0x000000060c800000, 0x000000060c800000|100%| O| |TAMS 0x000000060c800000, 0x000000060c400000| Untracked
| 46|0x000000060c800000, 0x000000060cc00000, 0x000000060cc00000|100%| O| |TAMS 0x000000060cc00000, 0x000000060c800000| Untracked
| 47|0x000000060cc00000, 0x000000060cc00000, 0x000000060d000000| 0%| F| |TAMS 0x000000060cc00000, 0x000000060cc00000| Untracked
| 48|0x000000060d000000, 0x000000060d000000, 0x000000060d400000| 0%| F| |TAMS 0x000000060d000000, 0x000000060d000000| Untracked
| 49|0x000000060d400000, 0x000000060d400000, 0x000000060d800000| 0%| F| |TAMS 0x000000060d400000, 0x000000060d400000| Untracked
| 50|0x000000060d800000, 0x000000060d800000, 0x000000060dc00000| 0%| F| |TAMS 0x000000060d800000, 0x000000060d800000| Untracked
| 51|0x000000060dc00000, 0x000000060dc00000, 0x000000060e000000| 0%| F| |TAMS 0x000000060dc00000, 0x000000060dc00000| Untracked
| 52|0x000000060e000000, 0x000000060e000000, 0x000000060e400000| 0%| F| |TAMS 0x000000060e000000, 0x000000060e000000| Untracked
| 53|0x000000060e400000, 0x000000060e800000, 0x000000060e800000|100%| O| |TAMS 0x000000060e800000, 0x000000060e400000| Complete
| 54|0x000000060e800000, 0x000000060e800000, 0x000000060ec00000| 0%| F| |TAMS 0x000000060e800000, 0x000000060e800000| Untracked
| 55|0x000000060ec00000, 0x000000060ec00000, 0x000000060f000000| 0%| F| |TAMS 0x000000060ec00000, 0x000000060ec00000| Untracked
| 56|0x000000060f000000, 0x000000060f400000, 0x000000060f400000|100%| O| |TAMS 0x000000060f400000, 0x000000060f000000| Untracked
| 57|0x000000060f400000, 0x000000060f400000, 0x000000060f800000| 0%| F| |TAMS 0x000000060f400000, 0x000000060f400000| Untracked
| 58|0x000000060f800000, 0x000000060f800000, 0x000000060fc00000| 0%| F| |TAMS 0x000000060f800000, 0x000000060f800000| Untracked
| 59|0x000000060fc00000, 0x000000060fc00000, 0x0000000610000000| 0%| F| |TAMS 0x000000060fc00000, 0x000000060fc00000| Untracked
| 60|0x0000000610000000, 0x0000000610000000, 0x0000000610400000| 0%| F| |TAMS 0x0000000610000000, 0x0000000610000000| Untracked
| 61|0x0000000610400000, 0x0000000610400000, 0x0000000610800000| 0%| F| |TAMS 0x0000000610400000, 0x0000000610400000| Untracked
| 62|0x0000000610800000, 0x0000000610800000, 0x0000000610c00000| 0%| F| |TAMS 0x0000000610800000, 0x0000000610800000| Untracked
| 63|0x0000000610c00000, 0x0000000610c00000, 0x0000000611000000| 0%| F| |TAMS 0x0000000610c00000, 0x0000000610c00000| Untracked
| 64|0x0000000611000000, 0x0000000611000000, 0x0000000611400000| 0%| F| |TAMS 0x0000000611000000, 0x0000000611000000| Untracked
| 65|0x0000000611400000, 0x0000000611400000, 0x0000000611800000| 0%| F| |TAMS 0x0000000611400000, 0x0000000611400000| Untracked
| 66|0x0000000611800000, 0x0000000611800000, 0x0000000611c00000| 0%| F| |TAMS 0x0000000611800000, 0x0000000611800000| Untracked
| 67|0x0000000611c00000, 0x0000000611c00000, 0x0000000612000000| 0%| F| |TAMS 0x0000000611c00000, 0x0000000611c00000| Untracked
| 68|0x0000000612000000, 0x0000000612000000, 0x0000000612400000| 0%| F| |TAMS 0x0000000612000000, 0x0000000612000000| Untracked
| 69|0x0000000612400000, 0x0000000612800000, 0x0000000612800000|100%| O| |TAMS 0x0000000612800000, 0x0000000612400000| Complete
| 70|0x0000000612800000, 0x0000000612800000, 0x0000000612c00000| 0%| F| |TAMS 0x0000000612800000, 0x0000000612800000| Untracked
| 71|0x0000000612c00000, 0x0000000612c00000, 0x0000000613000000| 0%| F| |TAMS 0x0000000612c00000, 0x0000000612c00000| Untracked
| 72|0x0000000613000000, 0x0000000613000000, 0x0000000613400000| 0%| F| |TAMS 0x0000000613000000, 0x0000000613000000| Untracked
| 73|0x0000000613400000, 0x0000000613400000, 0x0000000613800000| 0%| F| |TAMS 0x0000000613400000, 0x0000000613400000| Untracked
| 74|0x0000000613800000, 0x0000000613800000, 0x0000000613c00000| 0%| F| |TAMS 0x0000000613800000, 0x0000000613800000| Untracked
| 75|0x0000000613c00000, 0x0000000613c00000, 0x0000000614000000| 0%| F| |TAMS 0x0000000613c00000, 0x0000000613c00000| Untracked
| 76|0x0000000614000000, 0x0000000614000000, 0x0000000614400000| 0%| F| |TAMS 0x0000000614000000, 0x0000000614000000| Untracked
| 77|0x0000000614400000, 0x0000000614400000, 0x0000000614800000| 0%| F| |TAMS 0x0000000614400000, 0x0000000614400000| Untracked
| 78|0x0000000614800000, 0x0000000614800000, 0x0000000614c00000| 0%| F| |TAMS 0x0000000614800000, 0x0000000614800000| Untracked
| 79|0x0000000614c00000, 0x0000000615000000, 0x0000000615000000|100%| O| |TAMS 0x0000000615000000, 0x0000000614c00000| Untracked
| 80|0x0000000615000000, 0x0000000615400000, 0x0000000615400000|100%| O| |TAMS 0x0000000615400000, 0x0000000615000000| Untracked
| 81|0x0000000615400000, 0x0000000615800000, 0x0000000615800000|100%| O| |TAMS 0x0000000615800000, 0x0000000615400000| Untracked
| 82|0x0000000615800000, 0x0000000615c00000, 0x0000000615c00000|100%| O| |TAMS 0x0000000615c00000, 0x0000000615800000| Untracked
| 83|0x0000000615c00000, 0x0000000616000000, 0x0000000616000000|100%| O| |TAMS 0x0000000616000000, 0x0000000615c00000| Complete
| 84|0x0000000616000000, 0x0000000616400000, 0x0000000616400000|100%| O| |TAMS 0x0000000616400000, 0x0000000616000000| Complete
| 85|0x0000000616400000, 0x0000000616800000, 0x0000000616800000|100%| O| |TAMS 0x0000000616800000, 0x0000000616400000| Complete
| 86|0x0000000616800000, 0x0000000616c00000, 0x0000000616c00000|100%| O| |TAMS 0x0000000616c00000, 0x0000000616800000| Complete
| 87|0x0000000616c00000, 0x0000000616c00000, 0x0000000617000000| 0%| F| |TAMS 0x0000000616c00000, 0x0000000616c00000| Untracked
| 88|0x0000000617000000, 0x0000000617400000, 0x0000000617400000|100%| O| |TAMS 0x0000000617400000, 0x0000000617000000| Untracked
| 89|0x0000000617400000, 0x0000000617800000, 0x0000000617800000|100%| O| |TAMS 0x0000000617800000, 0x0000000617400000| Untracked
| 90|0x0000000617800000, 0x0000000617c00000, 0x0000000617c00000|100%| O| |TAMS 0x0000000617c00000, 0x0000000617800000| Untracked
| 91|0x0000000617c00000, 0x0000000618000000, 0x0000000618000000|100%| O| |TAMS 0x0000000618000000, 0x0000000617c00000| Untracked
| 92|0x0000000618000000, 0x0000000618000000, 0x0000000618400000| 0%| F| |TAMS 0x0000000618000000, 0x0000000618000000| Untracked
| 93|0x0000000618400000, 0x0000000618400000, 0x0000000618800000| 0%| F| |TAMS 0x0000000618400000, 0x0000000618400000| Untracked
| 94|0x0000000618800000, 0x0000000618800000, 0x0000000618c00000| 0%| F| |TAMS 0x0000000618800000, 0x0000000618800000| Untracked
| 95|0x0000000618c00000, 0x0000000618c00000, 0x0000000619000000| 0%| F| |TAMS 0x0000000618c00000, 0x0000000618c00000| Untracked
| 96|0x0000000619000000, 0x0000000619400000, 0x0000000619400000|100%|HS| |TAMS 0x0000000619400000, 0x0000000619000000| Complete
| 97|0x0000000619400000, 0x0000000619800000, 0x0000000619800000|100%| O| |TAMS 0x0000000619800000, 0x0000000619400000| Complete
| 98|0x0000000619800000, 0x0000000619800000, 0x0000000619c00000| 0%| F| |TAMS 0x0000000619800000, 0x0000000619800000| Untracked
| 99|0x0000000619c00000, 0x0000000619c00000, 0x000000061a000000| 0%| F| |TAMS 0x0000000619c00000, 0x0000000619c00000| Untracked
| 100|0x000000061a000000, 0x000000061a000000, 0x000000061a400000| 0%| F| |TAMS 0x000000061a000000, 0x000000061a000000| Untracked
| 101|0x000000061a400000, 0x000000061a800000, 0x000000061a800000|100%| O| |TAMS 0x000000061a800000, 0x000000061a400000| Complete
| 102|0x000000061a800000, 0x000000061a800000, 0x000000061ac00000| 0%| F| |TAMS 0x000000061a800000, 0x000000061a800000| Untracked
| 103|0x000000061ac00000, 0x000000061ac00000, 0x000000061b000000| 0%| F| |TAMS 0x000000061ac00000, 0x000000061ac00000| Untracked
| 104|0x000000061b000000, 0x000000061b000000, 0x000000061b400000| 0%| F| |TAMS 0x000000061b000000, 0x000000061b000000| Untracked
| 105|0x000000061b400000, 0x000000061b800000, 0x000000061b800000|100%| O| |TAMS 0x000000061b800000, 0x000000061b400000| Complete
| 106|0x000000061b800000, 0x000000061bc00000, 0x000000061bc00000|100%| O| |TAMS 0x000000061bc00000, 0x000000061b800000| Untracked
| 107|0x000000061bc00000, 0x000000061c000000, 0x000000061c000000|100%| O| |TAMS 0x000000061c000000, 0x000000061bc00000| Untracked
| 108|0x000000061c000000, 0x000000061c000000, 0x000000061c400000| 0%| F| |TAMS 0x000000061c000000, 0x000000061c000000| Untracked
| 109|0x000000061c400000, 0x000000061c800000, 0x000000061c800000|100%| O| |TAMS 0x000000061c800000, 0x000000061c400000| Untracked
| 110|0x000000061c800000, 0x000000061cc00000, 0x000000061cc00000|100%| O| |TAMS 0x000000061cc00000, 0x000000061c800000| Untracked
| 111|0x000000061cc00000, 0x000000061cc00000, 0x000000061d000000| 0%| F| |TAMS 0x000000061cc00000, 0x000000061cc00000| Untracked
| 112|0x000000061d000000, 0x000000061d400000, 0x000000061d400000|100%| O| |TAMS 0x000000061d400000, 0x000000061d000000| Untracked
| 113|0x000000061d400000, 0x000000061d800000, 0x000000061d800000|100%| O| |TAMS 0x000000061d800000, 0x000000061d400000| Untracked
| 114|0x000000061d800000, 0x000000061d800000, 0x000000061dc00000| 0%| F| |TAMS 0x000000061d800000, 0x000000061d800000| Untracked
| 115|0x000000061dc00000, 0x000000061e000000, 0x000000061e000000|100%| O| |TAMS 0x000000061e000000, 0x000000061dc00000| Untracked
| 116|0x000000061e000000, 0x000000061e400000, 0x000000061e400000|100%| O| |TAMS 0x000000061e400000, 0x000000061e000000| Untracked
| 117|0x000000061e400000, 0x000000061e800000, 0x000000061e800000|100%| O| |TAMS 0x000000061e800000, 0x000000061e400000| Untracked
| 118|0x000000061e800000, 0x000000061ec00000, 0x000000061ec00000|100%| O| |TAMS 0x000000061ec00000, 0x000000061e800000| Untracked
| 119|0x000000061ec00000, 0x000000061f000000, 0x000000061f000000|100%| O| |TAMS 0x000000061f000000, 0x000000061ec00000| Untracked
| 120|0x000000061f000000, 0x000000061f400000, 0x000000061f400000|100%| O| |TAMS 0x000000061f400000, 0x000000061f000000| Untracked
| 121|0x000000061f400000, 0x000000061f800000, 0x000000061f800000|100%| O| |TAMS 0x000000061f800000, 0x000000061f400000| Untracked
| 122|0x000000061f800000, 0x000000061f800000, 0x000000061fc00000| 0%| F| |TAMS 0x000000061f800000, 0x000000061f800000| Untracked
| 123|0x000000061fc00000, 0x0000000620000000, 0x0000000620000000|100%| O| |TAMS 0x0000000620000000, 0x000000061fc00000| Complete
| 124|0x0000000620000000, 0x0000000620400000, 0x0000000620400000|100%| O| |TAMS 0x0000000620400000, 0x0000000620000000| Complete
| 125|0x0000000620400000, 0x0000000620800000, 0x0000000620800000|100%| O| |TAMS 0x0000000620800000, 0x0000000620400000| Untracked
| 126|0x0000000620800000, 0x0000000620c00000, 0x0000000620c00000|100%| O| |TAMS 0x0000000620c00000, 0x0000000620800000| Untracked
| 127|0x0000000620c00000, 0x0000000621000000, 0x0000000621000000|100%| O| |TAMS 0x0000000621000000, 0x0000000620c00000| Untracked
| 128|0x0000000621000000, 0x0000000621400000, 0x0000000621400000|100%| O| |TAMS 0x0000000621400000, 0x0000000621000000| Untracked
| 129|0x0000000621400000, 0x0000000621800000, 0x0000000621800000|100%| O| |TAMS 0x0000000621800000, 0x0000000621400000| Complete
| 130|0x0000000621800000, 0x0000000621c00000, 0x0000000621c00000|100%| O| |TAMS 0x0000000621c00000, 0x0000000621800000| Untracked
| 131|0x0000000621c00000, 0x0000000622000000, 0x0000000622000000|100%| O| |TAMS 0x0000000622000000, 0x0000000621c00000| Untracked
| 132|0x0000000622000000, 0x0000000622400000, 0x0000000622400000|100%| O| |TAMS 0x0000000622400000, 0x0000000622000000| Untracked
| 133|0x0000000622400000, 0x0000000622800000, 0x0000000622800000|100%| O| |TAMS 0x0000000622800000, 0x0000000622400000| Untracked
| 134|0x0000000622800000, 0x0000000622c00000, 0x0000000622c00000|100%| O| |TAMS 0x0000000622c00000, 0x0000000622800000| Complete
| 135|0x0000000622c00000, 0x0000000623000000, 0x0000000623000000|100%| O| |TAMS 0x0000000623000000, 0x0000000622c00000| Untracked
| 136|0x0000000623000000, 0x0000000623400000, 0x0000000623400000|100%| O| |TAMS 0x0000000623400000, 0x0000000623000000| Untracked
| 137|0x0000000623400000, 0x0000000623800000, 0x0000000623800000|100%| O| |TAMS 0x0000000623800000, 0x0000000623400000| Untracked
| 138|0x0000000623800000, 0x0000000623c00000, 0x0000000623c00000|100%| O| |TAMS 0x0000000623c00000, 0x0000000623800000| Untracked
| 139|0x0000000623c00000, 0x0000000624000000, 0x0000000624000000|100%| O| |TAMS 0x0000000624000000, 0x0000000623c00000| Complete
| 140|0x0000000624000000, 0x0000000624000000, 0x0000000624400000| 0%| F| |TAMS 0x0000000624000000, 0x0000000624000000| Untracked
| 141|0x0000000624400000, 0x0000000624400000, 0x0000000624800000| 0%| F| |TAMS 0x0000000624400000, 0x0000000624400000| Untracked
| 142|0x0000000624800000, 0x0000000624c00000, 0x0000000624c00000|100%| O| |TAMS 0x0000000624c00000, 0x0000000624800000| Complete
| 143|0x0000000624c00000, 0x0000000624c00000, 0x0000000625000000| 0%| F| |TAMS 0x0000000624c00000, 0x0000000624c00000| Untracked
| 144|0x0000000625000000, 0x0000000625400000, 0x0000000625400000|100%| O| |TAMS 0x0000000625400000, 0x0000000625000000| Untracked
| 145|0x0000000625400000, 0x0000000625800000, 0x0000000625800000|100%| O| |TAMS 0x0000000625800000, 0x0000000625400000| Untracked
| 146|0x0000000625800000, 0x0000000625c00000, 0x0000000625c00000|100%| O| |TAMS 0x0000000625c00000, 0x0000000625800000| Untracked
| 147|0x0000000625c00000, 0x0000000626000000, 0x0000000626000000|100%| O| |TAMS 0x0000000626000000, 0x0000000625c00000| Untracked
| 148|0x0000000626000000, 0x0000000626400000, 0x0000000626400000|100%| O| |TAMS 0x0000000626400000, 0x0000000626000000| Untracked
| 149|0x0000000626400000, 0x0000000626800000, 0x0000000626800000|100%| O| |TAMS 0x0000000626800000, 0x0000000626400000| Untracked
| 150|0x0000000626800000, 0x0000000626800000, 0x0000000626c00000| 0%| F| |TAMS 0x0000000626800000, 0x0000000626800000| Untracked
| 151|0x0000000626c00000, 0x0000000626c00000, 0x0000000627000000| 0%| F| |TAMS 0x0000000626c00000, 0x0000000626c00000| Untracked
| 152|0x0000000627000000, 0x0000000627400000, 0x0000000627400000|100%| O| |TAMS 0x0000000627400000, 0x0000000627000000| Untracked
| 153|0x0000000627400000, 0x0000000627800000, 0x0000000627800000|100%|HS| |TAMS 0x0000000627800000, 0x0000000627400000| Complete
| 154|0x0000000627800000, 0x0000000627c00000, 0x0000000627c00000|100%| O| |TAMS 0x0000000627836400, 0x0000000627800000| Untracked
| 155|0x0000000627c00000, 0x0000000628000000, 0x0000000628000000|100%|HS| |TAMS 0x0000000628000000, 0x0000000627c00000| Complete
| 156|0x0000000628000000, 0x0000000628400000, 0x0000000628400000|100%| O| |TAMS 0x0000000628000000, 0x0000000628000000| Untracked
| 157|0x0000000628400000, 0x0000000628800000, 0x0000000628800000|100%| O| |TAMS 0x0000000628400000, 0x0000000628400000| Untracked
| 158|0x0000000628800000, 0x0000000628c00000, 0x0000000628c00000|100%| O| |TAMS 0x0000000628800000, 0x0000000628800000| Untracked
| 159|0x0000000628c00000, 0x0000000629000000, 0x0000000629000000|100%| O| |TAMS 0x0000000628c00000, 0x0000000628c00000| Untracked
| 160|0x0000000629000000, 0x0000000629400000, 0x0000000629400000|100%| O| |TAMS 0x0000000629000000, 0x0000000629000000| Untracked
| 161|0x0000000629400000, 0x0000000629800000, 0x0000000629800000|100%| O| |TAMS 0x0000000629400000, 0x0000000629400000| Untracked
| 162|0x0000000629800000, 0x0000000629c00000, 0x0000000629c00000|100%| O| |TAMS 0x0000000629800000, 0x0000000629800000| Untracked
| 163|0x0000000629c00000, 0x000000062a000000, 0x000000062a000000|100%| O| |TAMS 0x0000000629c00000, 0x0000000629c00000| Untracked
| 164|0x000000062a000000, 0x000000062a400000, 0x000000062a400000|100%| O| |TAMS 0x000000062a000000, 0x000000062a000000| Untracked
| 165|0x000000062a400000, 0x000000062a800000, 0x000000062a800000|100%| O| |TAMS 0x000000062a400000, 0x000000062a400000| Untracked
| 166|0x000000062a800000, 0x000000062ac00000, 0x000000062ac00000|100%| O| |TAMS 0x000000062a800000, 0x000000062a800000| Untracked
| 167|0x000000062ac00000, 0x000000062b000000, 0x000000062b000000|100%| O| |TAMS 0x000000062ac00000, 0x000000062ac00000| Untracked
| 168|0x000000062b000000, 0x000000062b400000, 0x000000062b400000|100%| O| |TAMS 0x000000062b000000, 0x000000062b000000| Untracked
| 169|0x000000062b400000, 0x000000062b800000, 0x000000062b800000|100%| O| |TAMS 0x000000062b400000, 0x000000062b400000| Untracked
| 170|0x000000062b800000, 0x000000062bc00000, 0x000000062bc00000|100%| O| |TAMS 0x000000062b800000, 0x000000062b800000| Untracked
| 171|0x000000062bc00000, 0x000000062c000000, 0x000000062c000000|100%| O| |TAMS 0x000000062bc00000, 0x000000062bc00000| Untracked
| 172|0x000000062c000000, 0x000000062c400000, 0x000000062c400000|100%| O| |TAMS 0x000000062c000000, 0x000000062c000000| Untracked
| 173|0x000000062c400000, 0x000000062c800000, 0x000000062c800000|100%| O| |TAMS 0x000000062c400000, 0x000000062c400000| Untracked
| 174|0x000000062c800000, 0x000000062cc00000, 0x000000062cc00000|100%| O| |TAMS 0x000000062c800000, 0x000000062c800000| Untracked
| 175|0x000000062cc00000, 0x000000062d000000, 0x000000062d000000|100%| O| |TAMS 0x000000062cc00000, 0x000000062cc00000| Untracked
| 176|0x000000062d000000, 0x000000062d400000, 0x000000062d400000|100%| O| |TAMS 0x000000062d000000, 0x000000062d000000| Untracked
| 177|0x000000062d400000, 0x000000062d800000, 0x000000062d800000|100%| O| |TAMS 0x000000062d400000, 0x000000062d400000| Untracked
| 178|0x000000062d800000, 0x000000062dc00000, 0x000000062dc00000|100%| O| |TAMS 0x000000062d800000, 0x000000062d800000| Untracked
| 179|0x000000062dc00000, 0x000000062dc00000, 0x000000062e000000| 0%| F| |TAMS 0x000000062dc00000, 0x000000062dc00000| Untracked
| 180|0x000000062e000000, 0x000000062e000000, 0x000000062e400000| 0%| F| |TAMS 0x000000062e000000, 0x000000062e000000| Untracked
| 181|0x000000062e400000, 0x000000062e400000, 0x000000062e800000| 0%| F| |TAMS 0x000000062e400000, 0x000000062e400000| Untracked
| 182|0x000000062e800000, 0x000000062e800000, 0x000000062ec00000| 0%| F| |TAMS 0x000000062e800000, 0x000000062e800000| Untracked
| 183|0x000000062ec00000, 0x000000062ec00000, 0x000000062f000000| 0%| F| |TAMS 0x000000062ec00000, 0x000000062ec00000| Untracked
| 184|0x000000062f000000, 0x000000062f000000, 0x000000062f400000| 0%| F| |TAMS 0x000000062f000000, 0x000000062f000000| Untracked
| 185|0x000000062f400000, 0x000000062f400000, 0x000000062f800000| 0%| F| |TAMS 0x000000062f400000, 0x000000062f400000| Untracked
| 186|0x000000062f800000, 0x000000062f800000, 0x000000062fc00000| 0%| F| |TAMS 0x000000062f800000, 0x000000062f800000| Untracked
| 187|0x000000062fc00000, 0x000000062fc00000, 0x0000000630000000| 0%| F| |TAMS 0x000000062fc00000, 0x000000062fc00000| Untracked
| 188|0x0000000630000000, 0x0000000630000000, 0x0000000630400000| 0%| F| |TAMS 0x0000000630000000, 0x0000000630000000| Untracked
| 189|0x0000000630400000, 0x0000000630400000, 0x0000000630800000| 0%| F| |TAMS 0x0000000630400000, 0x0000000630400000| Untracked
| 190|0x0000000630800000, 0x0000000630800000, 0x0000000630c00000| 0%| F| |TAMS 0x0000000630800000, 0x0000000630800000| Untracked
| 191|0x0000000630c00000, 0x0000000630c00000, 0x0000000631000000| 0%| F| |TAMS 0x0000000630c00000, 0x0000000630c00000| Untracked
| 192|0x0000000631000000, 0x0000000631000000, 0x0000000631400000| 0%| F| |TAMS 0x0000000631000000, 0x0000000631000000| Untracked
| 193|0x0000000631400000, 0x0000000631400000, 0x0000000631800000| 0%| F| |TAMS 0x0000000631400000, 0x0000000631400000| Untracked
| 194|0x0000000631800000, 0x0000000631800000, 0x0000000631c00000| 0%| F| |TAMS 0x0000000631800000, 0x0000000631800000| Untracked
| 195|0x0000000631c00000, 0x0000000631c00000, 0x0000000632000000| 0%| F| |TAMS 0x0000000631c00000, 0x0000000631c00000| Untracked
| 196|0x0000000632000000, 0x0000000632000000, 0x0000000632400000| 0%| F| |TAMS 0x0000000632000000, 0x0000000632000000| Untracked
| 197|0x0000000632400000, 0x0000000632400000, 0x0000000632800000| 0%| F| |TAMS 0x0000000632400000, 0x0000000632400000| Untracked
| 198|0x0000000632800000, 0x0000000632800000, 0x0000000632c00000| 0%| F| |TAMS 0x0000000632800000, 0x0000000632800000| Untracked
| 199|0x0000000632c00000, 0x0000000632c00000, 0x0000000633000000| 0%| F| |TAMS 0x0000000632c00000, 0x0000000632c00000| Untracked
| 200|0x0000000633000000, 0x0000000633000000, 0x0000000633400000| 0%| F| |TAMS 0x0000000633000000, 0x0000000633000000| Untracked
| 201|0x0000000633400000, 0x0000000633400000, 0x0000000633800000| 0%| F| |TAMS 0x0000000633400000, 0x0000000633400000| Untracked
| 202|0x0000000633800000, 0x0000000633800000, 0x0000000633c00000| 0%| F| |TAMS 0x0000000633800000, 0x0000000633800000| Untracked
| 203|0x0000000633c00000, 0x0000000633c00000, 0x0000000634000000| 0%| F| |TAMS 0x0000000633c00000, 0x0000000633c00000| Untracked
| 204|0x0000000634000000, 0x0000000634000000, 0x0000000634400000| 0%| F| |TAMS 0x0000000634000000, 0x0000000634000000| Untracked
| 205|0x0000000634400000, 0x0000000634400000, 0x0000000634800000| 0%| F| |TAMS 0x0000000634400000, 0x0000000634400000| Untracked
| 206|0x0000000634800000, 0x0000000634800000, 0x0000000634c00000| 0%| F| |TAMS 0x0000000634800000, 0x0000000634800000| Untracked
| 207|0x0000000634c00000, 0x0000000634c00000, 0x0000000635000000| 0%| F| |TAMS 0x0000000634c00000, 0x0000000634c00000| Untracked
| 208|0x0000000635000000, 0x0000000635000000, 0x0000000635400000| 0%| F| |TAMS 0x0000000635000000, 0x0000000635000000| Untracked
| 209|0x0000000635400000, 0x0000000635400000, 0x0000000635800000| 0%| F| |TAMS 0x0000000635400000, 0x0000000635400000| Untracked
| 210|0x0000000635800000, 0x0000000635800000, 0x0000000635c00000| 0%| F| |TAMS 0x0000000635800000, 0x0000000635800000| Untracked
| 211|0x0000000635c00000, 0x0000000635c00000, 0x0000000636000000| 0%| F| |TAMS 0x0000000635c00000, 0x0000000635c00000| Untracked
| 212|0x0000000636000000, 0x0000000636000000, 0x0000000636400000| 0%| F| |TAMS 0x0000000636000000, 0x0000000636000000| Untracked
| 213|0x0000000636400000, 0x0000000636400000, 0x0000000636800000| 0%| F| |TAMS 0x0000000636400000, 0x0000000636400000| Untracked
| 214|0x0000000636800000, 0x0000000636800000, 0x0000000636c00000| 0%| F| |TAMS 0x0000000636800000, 0x0000000636800000| Untracked
| 215|0x0000000636c00000, 0x0000000636c00000, 0x0000000637000000| 0%| F| |TAMS 0x0000000636c00000, 0x0000000636c00000| Untracked
| 216|0x0000000637000000, 0x0000000637000000, 0x0000000637400000| 0%| F| |TAMS 0x0000000637000000, 0x0000000637000000| Untracked
| 217|0x0000000637400000, 0x0000000637400000, 0x0000000637800000| 0%| F| |TAMS 0x0000000637400000, 0x0000000637400000| Untracked
| 218|0x0000000637800000, 0x0000000637800000, 0x0000000637c00000| 0%| F| |TAMS 0x0000000637800000, 0x0000000637800000| Untracked
| 219|0x0000000637c00000, 0x0000000637c00000, 0x0000000638000000| 0%| F| |TAMS 0x0000000637c00000, 0x0000000637c00000| Untracked
| 220|0x0000000638000000, 0x0000000638000000, 0x0000000638400000| 0%| F| |TAMS 0x0000000638000000, 0x0000000638000000| Untracked
| 221|0x0000000638400000, 0x0000000638400000, 0x0000000638800000| 0%| F| |TAMS 0x0000000638400000, 0x0000000638400000| Untracked
| 222|0x0000000638800000, 0x0000000638800000, 0x0000000638c00000| 0%| F| |TAMS 0x0000000638800000, 0x0000000638800000| Untracked
| 223|0x0000000638c00000, 0x0000000638c00000, 0x0000000639000000| 0%| F| |TAMS 0x0000000638c00000, 0x0000000638c00000| Untracked
| 224|0x0000000639000000, 0x0000000639000000, 0x0000000639400000| 0%| F| |TAMS 0x0000000639000000, 0x0000000639000000| Untracked
| 225|0x0000000639400000, 0x0000000639400000, 0x0000000639800000| 0%| F| |TAMS 0x0000000639400000, 0x0000000639400000| Untracked
| 226|0x0000000639800000, 0x0000000639800000, 0x0000000639c00000| 0%| F| |TAMS 0x0000000639800000, 0x0000000639800000| Untracked
| 227|0x0000000639c00000, 0x0000000639c00000, 0x000000063a000000| 0%| F| |TAMS 0x0000000639c00000, 0x0000000639c00000| Untracked
| 228|0x000000063a000000, 0x000000063a000000, 0x000000063a400000| 0%| F| |TAMS 0x000000063a000000, 0x000000063a000000| Untracked
| 229|0x000000063a400000, 0x000000063a400000, 0x000000063a800000| 0%| F| |TAMS 0x000000063a400000, 0x000000063a400000| Untracked
| 230|0x000000063a800000, 0x000000063a800000, 0x000000063ac00000| 0%| F| |TAMS 0x000000063a800000, 0x000000063a800000| Untracked
| 231|0x000000063ac00000, 0x000000063ac00000, 0x000000063b000000| 0%| F| |TAMS 0x000000063ac00000, 0x000000063ac00000| Untracked
| 232|0x000000063b000000, 0x000000063b000000, 0x000000063b400000| 0%| F| |TAMS 0x000000063b000000, 0x000000063b000000| Untracked
| 233|0x000000063b400000, 0x000000063b400000, 0x000000063b800000| 0%| F| |TAMS 0x000000063b400000, 0x000000063b400000| Untracked
| 234|0x000000063b800000, 0x000000063b800000, 0x000000063bc00000| 0%| F| |TAMS 0x000000063b800000, 0x000000063b800000| Untracked
| 235|0x000000063bc00000, 0x000000063bc00000, 0x000000063c000000| 0%| F| |TAMS 0x000000063bc00000, 0x000000063bc00000| Untracked
| 236|0x000000063c000000, 0x000000063c000000, 0x000000063c400000| 0%| F| |TAMS 0x000000063c000000, 0x000000063c000000| Untracked
| 237|0x000000063c400000, 0x000000063c400000, 0x000000063c800000| 0%| F| |TAMS 0x000000063c400000, 0x000000063c400000| Untracked
| 238|0x000000063c800000, 0x000000063c800000, 0x000000063cc00000| 0%| F| |TAMS 0x000000063c800000, 0x000000063c800000| Untracked
| 239|0x000000063cc00000, 0x000000063cc00000, 0x000000063d000000| 0%| F| |TAMS 0x000000063cc00000, 0x000000063cc00000| Untracked
| 240|0x000000063d000000, 0x000000063d000000, 0x000000063d400000| 0%| F| |TAMS 0x000000063d000000, 0x000000063d000000| Untracked
| 241|0x000000063d400000, 0x000000063d400000, 0x000000063d800000| 0%| F| |TAMS 0x000000063d400000, 0x000000063d400000| Untracked
| 242|0x000000063d800000, 0x000000063d800000, 0x000000063dc00000| 0%| F| |TAMS 0x000000063d800000, 0x000000063d800000| Untracked
| 243|0x000000063dc00000, 0x000000063dc00000, 0x000000063e000000| 0%| F| |TAMS 0x000000063dc00000, 0x000000063dc00000| Untracked
| 244|0x000000063e000000, 0x000000063e000000, 0x000000063e400000| 0%| F| |TAMS 0x000000063e000000, 0x000000063e000000| Untracked
| 245|0x000000063e400000, 0x000000063e400000, 0x000000063e800000| 0%| F| |TAMS 0x000000063e400000, 0x000000063e400000| Untracked
| 246|0x000000063e800000, 0x000000063e800000, 0x000000063ec00000| 0%| F| |TAMS 0x000000063e800000, 0x000000063e800000| Untracked
| 247|0x000000063ec00000, 0x000000063ec00000, 0x000000063f000000| 0%| F| |TAMS 0x000000063ec00000, 0x000000063ec00000| Untracked
| 248|0x000000063f000000, 0x000000063f000000, 0x000000063f400000| 0%| F| |TAMS 0x000000063f000000, 0x000000063f000000| Untracked
| 249|0x000000063f400000, 0x000000063f400000, 0x000000063f800000| 0%| F| |TAMS 0x000000063f400000, 0x000000063f400000| Untracked
| 250|0x000000063f800000, 0x000000063f800000, 0x000000063fc00000| 0%| F| |TAMS 0x000000063f800000, 0x000000063f800000| Untracked
| 251|0x000000063fc00000, 0x000000063fc00000, 0x0000000640000000| 0%| F| |TAMS 0x000000063fc00000, 0x000000063fc00000| Untracked
| 252|0x0000000640000000, 0x0000000640000000, 0x0000000640400000| 0%| F| |TAMS 0x0000000640000000, 0x0000000640000000| Untracked
| 253|0x0000000640400000, 0x0000000640400000, 0x0000000640800000| 0%| F| |TAMS 0x0000000640400000, 0x0000000640400000| Untracked
| 254|0x0000000640800000, 0x0000000640800000, 0x0000000640c00000| 0%| F| |TAMS 0x0000000640800000, 0x0000000640800000| Untracked
| 255|0x0000000640c00000, 0x0000000640c00000, 0x0000000641000000| 0%| F| |TAMS 0x0000000640c00000, 0x0000000640c00000| Untracked
| 256|0x0000000641000000, 0x0000000641000000, 0x0000000641400000| 0%| F| |TAMS 0x0000000641000000, 0x0000000641000000| Untracked
| 257|0x0000000641400000, 0x0000000641400000, 0x0000000641800000| 0%| F| |TAMS 0x0000000641400000, 0x0000000641400000| Untracked
| 258|0x0000000641800000, 0x0000000641800000, 0x0000000641c00000| 0%| F| |TAMS 0x0000000641800000, 0x0000000641800000| Untracked
| 259|0x0000000641c00000, 0x0000000641c00000, 0x0000000642000000| 0%| F| |TAMS 0x0000000641c00000, 0x0000000641c00000| Untracked
| 260|0x0000000642000000, 0x0000000642000000, 0x0000000642400000| 0%| F| |TAMS 0x0000000642000000, 0x0000000642000000| Untracked
| 261|0x0000000642400000, 0x0000000642400000, 0x0000000642800000| 0%| F| |TAMS 0x0000000642400000, 0x0000000642400000| Untracked
| 262|0x0000000642800000, 0x0000000642800000, 0x0000000642c00000| 0%| F| |TAMS 0x0000000642800000, 0x0000000642800000| Untracked
| 263|0x0000000642c00000, 0x0000000642c00000, 0x0000000643000000| 0%| F| |TAMS 0x0000000642c00000, 0x0000000642c00000| Untracked
| 264|0x0000000643000000, 0x0000000643000000, 0x0000000643400000| 0%| F| |TAMS 0x0000000643000000, 0x0000000643000000| Untracked
| 265|0x0000000643400000, 0x0000000643400000, 0x0000000643800000| 0%| F| |TAMS 0x0000000643400000, 0x0000000643400000| Untracked
| 266|0x0000000643800000, 0x0000000643800000, 0x0000000643c00000| 0%| F| |TAMS 0x0000000643800000, 0x0000000643800000| Untracked
| 267|0x0000000643c00000, 0x0000000643c00000, 0x0000000644000000| 0%| F| |TAMS 0x0000000643c00000, 0x0000000643c00000| Untracked
| 268|0x0000000644000000, 0x0000000644000000, 0x0000000644400000| 0%| F| |TAMS 0x0000000644000000, 0x0000000644000000| Untracked
| 269|0x0000000644400000, 0x0000000644400000, 0x0000000644800000| 0%| F| |TAMS 0x0000000644400000, 0x0000000644400000| Untracked
| 270|0x0000000644800000, 0x0000000644800000, 0x0000000644c00000| 0%| F| |TAMS 0x0000000644800000, 0x0000000644800000| Untracked
| 271|0x0000000644c00000, 0x0000000644c00000, 0x0000000645000000| 0%| F| |TAMS 0x0000000644c00000, 0x0000000644c00000| Untracked
| 272|0x0000000645000000, 0x0000000645000000, 0x0000000645400000| 0%| F| |TAMS 0x0000000645000000, 0x0000000645000000| Untracked
| 273|0x0000000645400000, 0x0000000645400000, 0x0000000645800000| 0%| F| |TAMS 0x0000000645400000, 0x0000000645400000| Untracked
| 274|0x0000000645800000, 0x0000000645800000, 0x0000000645c00000| 0%| F| |TAMS 0x0000000645800000, 0x0000000645800000| Untracked
| 275|0x0000000645c00000, 0x0000000645c00000, 0x0000000646000000| 0%| F| |TAMS 0x0000000645c00000, 0x0000000645c00000| Untracked
| 276|0x0000000646000000, 0x0000000646000000, 0x0000000646400000| 0%| F| |TAMS 0x0000000646000000, 0x0000000646000000| Untracked
| 277|0x0000000646400000, 0x0000000646400000, 0x0000000646800000| 0%| F| |TAMS 0x0000000646400000, 0x0000000646400000| Untracked
| 278|0x0000000646800000, 0x0000000646800000, 0x0000000646c00000| 0%| F| |TAMS 0x0000000646800000, 0x0000000646800000| Untracked
| 279|0x0000000646c00000, 0x0000000646c00000, 0x0000000647000000| 0%| F| |TAMS 0x0000000646c00000, 0x0000000646c00000| Untracked
| 280|0x0000000647000000, 0x0000000647000000, 0x0000000647400000| 0%| F| |TAMS 0x0000000647000000, 0x0000000647000000| Untracked
| 281|0x0000000647400000, 0x0000000647400000, 0x0000000647800000| 0%| F| |TAMS 0x0000000647400000, 0x0000000647400000| Untracked
| 282|0x0000000647800000, 0x0000000647800000, 0x0000000647c00000| 0%| F| |TAMS 0x0000000647800000, 0x0000000647800000| Untracked
| 283|0x0000000647c00000, 0x0000000647c00000, 0x0000000648000000| 0%| F| |TAMS 0x0000000647c00000, 0x0000000647c00000| Untracked
| 284|0x0000000648000000, 0x0000000648000000, 0x0000000648400000| 0%| F| |TAMS 0x0000000648000000, 0x0000000648000000| Untracked
| 285|0x0000000648400000, 0x0000000648400000, 0x0000000648800000| 0%| F| |TAMS 0x0000000648400000, 0x0000000648400000| Untracked
| 286|0x0000000648800000, 0x0000000648800000, 0x0000000648c00000| 0%| F| |TAMS 0x0000000648800000, 0x0000000648800000| Untracked
| 287|0x0000000648c00000, 0x0000000648c00000, 0x0000000649000000| 0%| F| |TAMS 0x0000000648c00000, 0x0000000648c00000| Untracked
| 288|0x0000000649000000, 0x0000000649000000, 0x0000000649400000| 0%| F| |TAMS 0x0000000649000000, 0x0000000649000000| Untracked
| 289|0x0000000649400000, 0x0000000649400000, 0x0000000649800000| 0%| F| |TAMS 0x0000000649400000, 0x0000000649400000| Untracked
| 290|0x0000000649800000, 0x0000000649800000, 0x0000000649c00000| 0%| F| |TAMS 0x0000000649800000, 0x0000000649800000| Untracked
| 291|0x0000000649c00000, 0x0000000649c00000, 0x000000064a000000| 0%| F| |TAMS 0x0000000649c00000, 0x0000000649c00000| Untracked
| 292|0x000000064a000000, 0x000000064a000000, 0x000000064a400000| 0%| F| |TAMS 0x000000064a000000, 0x000000064a000000| Untracked
| 293|0x000000064a400000, 0x000000064a400000, 0x000000064a800000| 0%| F| |TAMS 0x000000064a400000, 0x000000064a400000| Untracked
| 294|0x000000064a800000, 0x000000064a800000, 0x000000064ac00000| 0%| F| |TAMS 0x000000064a800000, 0x000000064a800000| Untracked
| 295|0x000000064ac00000, 0x000000064ac00000, 0x000000064b000000| 0%| F| |TAMS 0x000000064ac00000, 0x000000064ac00000| Untracked
| 296|0x000000064b000000, 0x000000064b000000, 0x000000064b400000| 0%| F| |TAMS 0x000000064b000000, 0x000000064b000000| Untracked
| 297|0x000000064b400000, 0x000000064b400000, 0x000000064b800000| 0%| F| |TAMS 0x000000064b400000, 0x000000064b400000| Untracked
| 298|0x000000064b800000, 0x000000064b800000, 0x000000064bc00000| 0%| F| |TAMS 0x000000064b800000, 0x000000064b800000| Untracked
| 299|0x000000064bc00000, 0x000000064bc00000, 0x000000064c000000| 0%| F| |TAMS 0x000000064bc00000, 0x000000064bc00000| Untracked
| 300|0x000000064c000000, 0x000000064c000000, 0x000000064c400000| 0%| F| |TAMS 0x000000064c000000, 0x000000064c000000| Untracked
| 301|0x000000064c400000, 0x000000064c400000, 0x000000064c800000| 0%| F| |TAMS 0x000000064c400000, 0x000000064c400000| Untracked
| 302|0x000000064c800000, 0x000000064c800000, 0x000000064cc00000| 0%| F| |TAMS 0x000000064c800000, 0x000000064c800000| Untracked
| 303|0x000000064cc00000, 0x000000064cc00000, 0x000000064d000000| 0%| F| |TAMS 0x000000064cc00000, 0x000000064cc00000| Untracked
| 304|0x000000064d000000, 0x000000064d000000, 0x000000064d400000| 0%| F| |TAMS 0x000000064d000000, 0x000000064d000000| Untracked
| 305|0x000000064d400000, 0x000000064d400000, 0x000000064d800000| 0%| F| |TAMS 0x000000064d400000, 0x000000064d400000| Untracked
| 306|0x000000064d800000, 0x000000064d800000, 0x000000064dc00000| 0%| F| |TAMS 0x000000064d800000, 0x000000064d800000| Untracked
| 307|0x000000064dc00000, 0x000000064dc00000, 0x000000064e000000| 0%| F| |TAMS 0x000000064dc00000, 0x000000064dc00000| Untracked
| 308|0x000000064e000000, 0x000000064e000000, 0x000000064e400000| 0%| F| |TAMS 0x000000064e000000, 0x000000064e000000| Untracked
| 309|0x000000064e400000, 0x000000064e400000, 0x000000064e800000| 0%| F| |TAMS 0x000000064e400000, 0x000000064e400000| Untracked
| 310|0x000000064e800000, 0x000000064e800000, 0x000000064ec00000| 0%| F| |TAMS 0x000000064e800000, 0x000000064e800000| Untracked
| 311|0x000000064ec00000, 0x000000064ec00000, 0x000000064f000000| 0%| F| |TAMS 0x000000064ec00000, 0x000000064ec00000| Untracked
| 312|0x000000064f000000, 0x000000064f000000, 0x000000064f400000| 0%| F| |TAMS 0x000000064f000000, 0x000000064f000000| Untracked
| 313|0x000000064f400000, 0x000000064f400000, 0x000000064f800000| 0%| F| |TAMS 0x000000064f400000, 0x000000064f400000| Untracked
| 314|0x000000064f800000, 0x000000064f800000, 0x000000064fc00000| 0%| F| |TAMS 0x000000064f800000, 0x000000064f800000| Untracked
| 315|0x000000064fc00000, 0x000000064fc00000, 0x0000000650000000| 0%| F| |TAMS 0x000000064fc00000, 0x000000064fc00000| Untracked
| 316|0x0000000650000000, 0x0000000650000000, 0x0000000650400000| 0%| F| |TAMS 0x0000000650000000, 0x0000000650000000| Untracked
| 317|0x0000000650400000, 0x0000000650400000, 0x0000000650800000| 0%| F| |TAMS 0x0000000650400000, 0x0000000650400000| Untracked
| 318|0x0000000650800000, 0x0000000650800000, 0x0000000650c00000| 0%| F| |TAMS 0x0000000650800000, 0x0000000650800000| Untracked
| 319|0x0000000650c00000, 0x0000000650c00000, 0x0000000651000000| 0%| F| |TAMS 0x0000000650c00000, 0x0000000650c00000| Untracked
| 320|0x0000000651000000, 0x0000000651000000, 0x0000000651400000| 0%| F| |TAMS 0x0000000651000000, 0x0000000651000000| Untracked
| 321|0x0000000651400000, 0x0000000651400000, 0x0000000651800000| 0%| F| |TAMS 0x0000000651400000, 0x0000000651400000| Untracked
| 322|0x0000000651800000, 0x0000000651800000, 0x0000000651c00000| 0%| F| |TAMS 0x0000000651800000, 0x0000000651800000| Untracked
| 323|0x0000000651c00000, 0x0000000651f2dc78, 0x0000000652000000| 79%| S|CS|TAMS 0x0000000651c00000, 0x0000000651c00000| Complete
| 324|0x0000000652000000, 0x0000000652400000, 0x0000000652400000|100%| S|CS|TAMS 0x0000000652000000, 0x0000000652000000| Complete
| 325|0x0000000652400000, 0x0000000652400000, 0x0000000652800000| 0%| F| |TAMS 0x0000000652400000, 0x0000000652400000| Untracked
| 326|0x0000000652800000, 0x0000000652800000, 0x0000000652c00000| 0%| F| |TAMS 0x0000000652800000, 0x0000000652800000| Untracked
| 327|0x0000000652c00000, 0x0000000652c00000, 0x0000000653000000| 0%| F| |TAMS 0x0000000652c00000, 0x0000000652c00000| Untracked
| 328|0x0000000653000000, 0x0000000653000000, 0x0000000653400000| 0%| F| |TAMS 0x0000000653000000, 0x0000000653000000| Untracked
| 329|0x0000000653400000, 0x0000000653400000, 0x0000000653800000| 0%| F| |TAMS 0x0000000653400000, 0x0000000653400000| Untracked
| 330|0x0000000653800000, 0x0000000653800000, 0x0000000653c00000| 0%| F| |TAMS 0x0000000653800000, 0x0000000653800000| Untracked
| 331|0x0000000653c00000, 0x0000000653c00000, 0x0000000654000000| 0%| F| |TAMS 0x0000000653c00000, 0x0000000653c00000| Untracked
| 332|0x0000000654000000, 0x0000000654000000, 0x0000000654400000| 0%| F| |TAMS 0x0000000654000000, 0x0000000654000000| Untracked
| 333|0x0000000654400000, 0x0000000654400000, 0x0000000654800000| 0%| F| |TAMS 0x0000000654400000, 0x0000000654400000| Untracked
| 334|0x0000000654800000, 0x0000000654800000, 0x0000000654c00000| 0%| F| |TAMS 0x0000000654800000, 0x0000000654800000| Untracked
| 335|0x0000000654c00000, 0x0000000654c00000, 0x0000000655000000| 0%| F| |TAMS 0x0000000654c00000, 0x0000000654c00000| Untracked
| 336|0x0000000655000000, 0x0000000655000000, 0x0000000655400000| 0%| F| |TAMS 0x0000000655000000, 0x0000000655000000| Untracked
| 337|0x0000000655400000, 0x0000000655400000, 0x0000000655800000| 0%| F| |TAMS 0x0000000655400000, 0x0000000655400000| Untracked
| 338|0x0000000655800000, 0x0000000655800000, 0x0000000655c00000| 0%| F| |TAMS 0x0000000655800000, 0x0000000655800000| Untracked
| 339|0x0000000655c00000, 0x0000000655c00000, 0x0000000656000000| 0%| F| |TAMS 0x0000000655c00000, 0x0000000655c00000| Untracked
| 340|0x0000000656000000, 0x0000000656000000, 0x0000000656400000| 0%| F| |TAMS 0x0000000656000000, 0x0000000656000000| Untracked
| 341|0x0000000656400000, 0x0000000656400000, 0x0000000656800000| 0%| F| |TAMS 0x0000000656400000, 0x0000000656400000| Untracked
Card table byte_map: [0x000002576ca50000,0x000002576da50000] _byte_map_base: 0x0000025769a48000
Marking Bits (Prev, Next): (CMBitMap*) 0x000002575446c810, (CMBitMap*) 0x000002575446c850
Prev Bits: [0x000002576ea50000, 0x0000025776a10000)
Next Bits: [0x0000025776a10000, 0x000002577e9d0000)
Polling page: 0x0000025752b40000
Metaspace:
Usage:
Non-class: 42.90 MB used.
Class: 5.31 MB used.
Both: 48.21 MB used.
Virtual space:
Non-class space: 64.00 MB reserved, 48.31 MB ( 75%) committed, 1 nodes.
Class space: 1.00 GB reserved, 7.00 MB ( <1%) committed, 1 nodes.
Both: 1.06 GB reserved, 55.31 MB ( 5%) committed.
Chunk freelists:
Non-Class: 20.77 MB
Class: 10.33 MB
Both: 31.11 MB
MaxMetaspaceSize: unlimited
CompressedClassSpaceSize: 1.00 GB
Initial GC threshold: 21.00 MB
Current GC threshold: 92.19 MB
CDS: on
MetaspaceReclaimPolicy: balanced
- commit_granule_bytes: 65536.
- commit_granule_words: 8192.
- virtual_space_node_default_size: 8388608.
- enlarge_chunks_in_place: 1.
- new_chunks_are_fully_committed: 0.
- uncommit_free_chunks: 1.
- use_allocation_guard: 0.
- handle_deallocations: 1.
Internal statistics:
num_allocs_failed_limit: 17.
num_arena_births: 758.
num_arena_deaths: 140.
num_vsnodes_births: 2.
num_vsnodes_deaths: 0.
num_space_committed: 1232.
num_space_uncommitted: 347.
num_chunks_returned_to_freelist: 2252.
num_chunks_taken_from_freelist: 5191.
num_chunk_merges: 689.
num_chunk_splits: 2844.
num_chunks_enlarged: 1361.
num_inconsistent_stats: 0.
CodeHeap 'non-profiled nmethods': size=120000Kb used=13845Kb max_used=14768Kb free=106154Kb
bounds [0x0000025763ac0000, 0x0000025764930000, 0x000002576aff0000]
CodeHeap 'profiled nmethods': size=120000Kb used=25344Kb max_used=29850Kb free=94655Kb
bounds [0x000002575bff0000, 0x000002575dd20000, 0x0000025763520000]
CodeHeap 'non-nmethods': size=5760Kb used=1250Kb max_used=1534Kb free=4509Kb
bounds [0x0000025763520000, 0x0000025763790000, 0x0000025763ac0000]
total_blobs=13033 nmethods=12471 adapters=473
compilation: enabled
stopped_count=0, restarted_count=0
full_count=0
Compilation events (20 events):
Event: 21.747 Thread 0x000002577ec34090 20241 3 com.sun.tools.javac.comp.TypeEnter$HierarchyPhase::clearTypeParams (38 bytes)
Event: 21.747 Thread 0x000002577ec34090 nmethod 20241 0x000002575ccc7b90 code [0x000002575ccc7d60, 0x000002575ccc8108]
Event: 21.747 Thread 0x000002577ec34090 20242 3 com.sun.tools.javac.comp.Check$CycleChecker::visitIdent (13 bytes)
Event: 21.747 Thread 0x000002577ec34090 nmethod 20242 0x000002575ce5fb10 code [0x000002575ce5fcc0, 0x000002575ce5fee8]
Event: 21.747 Thread 0x000002577ec34090 20243 2 lombok.javac.JavacASTAdapter::endVisitCompilationUnit (1 bytes)
Event: 21.747 Thread 0x000002577ec34090 nmethod 20243 0x000002575d125290 code [0x000002575d125420, 0x000002575d125518]
Event: 21.749 Thread 0x000002577ec34090 20244 2 lombok.javac.handlers.HandleVal::eq (58 bytes)
Event: 21.749 Thread 0x000002577ec34090 nmethod 20244 0x000002575c759710 code [0x000002575c759940, 0x000002575c759d48]
Event: 21.750 Thread 0x000002577ec34090 20245 2 lombok.javac.JavacASTAdapter::visitAnnotationOnMethod (1 bytes)
Event: 21.750 Thread 0x000002577ec34090 nmethod 20245 0x000002575d379f90 code [0x000002575d37a120, 0x000002575d37a218]
Event: 21.751 Thread 0x000002577ec34090 20246 ! 2 lombok.javac.handlers.HandleVal::endVisitLocal (993 bytes)
Event: 21.755 Thread 0x000002577ec34090 nmethod 20246 0x000002575d413b90 code [0x000002575d4143e0, 0x000002575d417218]
Event: 21.755 Thread 0x000002577ec34090 20247 2 lombok.permit.Permit::setAccessible (27 bytes)
Event: 21.755 Thread 0x000002577ec34090 nmethod 20247 0x000002575d486d10 code [0x000002575d486ea0, 0x000002575d486f98]
Event: 21.759 Thread 0x000002577ec34090 20248 ! 2 lombok.javac.JavacAST::getBodyMethod (64 bytes)
Event: 21.759 Thread 0x000002577ec34090 nmethod 20248 0x000002575c3f6d90 code [0x000002575c3f6f80, 0x000002575c3f7368]
Event: 21.760 Thread 0x000002577ec34090 20249 2 com.sun.tools.javac.comp.TypeEnter::ensureImportsChecked (62 bytes)
Event: 21.761 Thread 0x000002577ec34090 nmethod 20249 0x000002575c7ad110 code [0x000002575c7ad320, 0x000002575c7ad8c8]
Event: 21.772 Thread 0x000002577ec34090 20255 2 com.sun.tools.javac.comp.Check::checkRefType (26 bytes)
Event: 21.772 Thread 0x000002577ec34090 nmethod 20255 0x000002575c9d3c10 code [0x000002575c9d3de0, 0x000002575c9d3fc8]
GC Heap History (20 events):
Event: 14.570 GC heap after
{Heap after GC invocations=35 (full 0):
garbage-first heap total 1167360K, used 424005K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 8 young (32768K), 8 survivors (32768K)
Metaspace used 61566K, committed 62592K, reserved 1114112K
class space used 6957K, committed 7424K, reserved 1048576K
}
Event: 16.908 GC heap before
{Heap before GC invocations=35 (full 0):
garbage-first heap total 1167360K, used 862277K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 115 young (471040K), 8 survivors (32768K)
Metaspace used 62236K, committed 63232K, reserved 1114112K
class space used 7020K, committed 7488K, reserved 1048576K
}
Event: 16.929 GC heap after
{Heap after GC invocations=36 (full 0):
garbage-first heap total 1167360K, used 495229K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 15 young (61440K), 15 survivors (61440K)
Metaspace used 62236K, committed 63232K, reserved 1114112K
class space used 7020K, committed 7488K, reserved 1048576K
}
Event: 17.969 GC heap before
{Heap before GC invocations=36 (full 0):
garbage-first heap total 1167360K, used 863869K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 106 young (434176K), 15 survivors (61440K)
Metaspace used 63393K, committed 64512K, reserved 1114112K
class space used 7148K, committed 7616K, reserved 1048576K
}
Event: 18.001 GC heap after
{Heap after GC invocations=37 (full 0):
garbage-first heap total 1167360K, used 588618K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 14 young (57344K), 14 survivors (57344K)
Metaspace used 63393K, committed 64512K, reserved 1114112K
class space used 7148K, committed 7616K, reserved 1048576K
}
Event: 18.755 GC heap before
{Heap before GC invocations=37 (full 0):
garbage-first heap total 1167360K, used 879434K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 86 young (352256K), 14 survivors (57344K)
Metaspace used 68268K, committed 69376K, reserved 1114112K
class space used 7712K, committed 8192K, reserved 1048576K
}
Event: 18.777 GC heap after
{Heap after GC invocations=38 (full 0):
garbage-first heap total 1167360K, used 621836K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 8 young (32768K), 8 survivors (32768K)
Metaspace used 68268K, committed 69376K, reserved 1114112K
class space used 7712K, committed 8192K, reserved 1048576K
}
Event: 19.223 GC heap before
{Heap before GC invocations=38 (full 0):
garbage-first heap total 1167360K, used 904460K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 78 young (319488K), 8 survivors (32768K)
Metaspace used 69902K, committed 71104K, reserved 1114112K
class space used 7909K, committed 8448K, reserved 1048576K
}
Event: 19.236 GC heap after
{Heap after GC invocations=39 (full 0):
garbage-first heap total 1167360K, used 636231K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 3 young (12288K), 3 survivors (12288K)
Metaspace used 69902K, committed 71104K, reserved 1114112K
class space used 7909K, committed 8448K, reserved 1048576K
}
Event: 19.750 GC heap before
{Heap before GC invocations=39 (full 0):
garbage-first heap total 1167360K, used 922951K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 74 young (303104K), 3 survivors (12288K)
Metaspace used 70950K, committed 72064K, reserved 1114112K
class space used 8006K, committed 8512K, reserved 1048576K
}
Event: 19.765 GC heap after
{Heap after GC invocations=40 (full 0):
garbage-first heap total 1400832K, used 652012K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 7 young (28672K), 7 survivors (28672K)
Metaspace used 70950K, committed 72064K, reserved 1114112K
class space used 8006K, committed 8512K, reserved 1048576K
}
Event: 20.441 GC heap before
{Heap before GC invocations=40 (full 0):
garbage-first heap total 1400832K, used 1086188K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 113 young (462848K), 7 survivors (28672K)
Metaspace used 71423K, committed 72576K, reserved 1114112K
class space used 8062K, committed 8576K, reserved 1048576K
}
Event: 20.465 GC heap after
{Heap after GC invocations=41 (full 0):
garbage-first heap total 1400832K, used 692441K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 15 young (61440K), 15 survivors (61440K)
Metaspace used 71423K, committed 72576K, reserved 1114112K
class space used 8062K, committed 8576K, reserved 1048576K
}
Event: 20.964 GC heap before
{Heap before GC invocations=41 (full 0):
garbage-first heap total 1400832K, used 1069273K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 108 young (442368K), 15 survivors (61440K)
Metaspace used 72709K, committed 73856K, reserved 1114112K
class space used 8207K, committed 8768K, reserved 1048576K
}
Event: 20.987 GC heap after
{Heap after GC invocations=42 (full 0):
garbage-first heap total 1400832K, used 720801K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 7 young (28672K), 7 survivors (28672K)
Metaspace used 72709K, committed 73856K, reserved 1114112K
class space used 8207K, committed 8768K, reserved 1048576K
}
Event: 21.637 GC heap before
{Heap before GC invocations=43 (full 0):
garbage-first heap total 1400832K, used 1122209K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 106 young (434176K), 7 survivors (28672K)
Metaspace used 49336K, committed 56640K, reserved 1114112K
class space used 5434K, committed 7168K, reserved 1048576K
}
Event: 21.648 GC heap after
{Heap after GC invocations=44 (full 0):
garbage-first heap total 1400832K, used 723685K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 7 young (28672K), 7 survivors (28672K)
Metaspace used 49336K, committed 56640K, reserved 1114112K
class space used 5434K, committed 7168K, reserved 1048576K
}
Event: 21.701 GC heap before
{Heap before GC invocations=44 (full 0):
garbage-first heap total 1400832K, used 760549K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 17 young (69632K), 7 survivors (28672K)
Metaspace used 49343K, committed 56640K, reserved 1114112K
class space used 5435K, committed 7168K, reserved 1048576K
}
Event: 21.712 GC heap after
{Heap after GC invocations=45 (full 0):
garbage-first heap total 1400832K, used 591919K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 2 young (8192K), 2 survivors (8192K)
Metaspace used 49343K, committed 56640K, reserved 1114112K
class space used 5435K, committed 7168K, reserved 1048576K
}
Event: 21.792 GC heap before
{Heap before GC invocations=45 (full 0):
garbage-first heap total 1400832K, used 653359K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 17 young (69632K), 2 survivors (8192K)
Metaspace used 49364K, committed 56640K, reserved 1114112K
class space used 5435K, committed 7168K, reserved 1048576K
}
Deoptimization events (20 events):
Event: 21.736 Thread 0x0000025747e837f0 Uncommon trap: trap_request=0xffffffc6 fr.pc=0x0000025763fe00f0 relative=0x0000000000000ff0
Event: 21.736 Thread 0x0000025747e837f0 Uncommon trap: reason=bimorphic_or_optimized_type_check action=maybe_recompile pc=0x0000025763fe00f0 method=lombok.javac.JavacNode.traverse(Llombok/javac/JavacASTVisitor;)V @ 490 c2
Event: 21.736 Thread 0x0000025747e837f0 DEOPT PACKING pc=0x0000025763fe00f0 sp=0x000000a0caffd680
Event: 21.736 Thread 0x0000025747e837f0 DEOPT UNPACKING pc=0x00000257635723a3 sp=0x000000a0caffd600 mode 2
Event: 21.781 Thread 0x0000025747e83d00 Uncommon trap: trap_request=0xffffffde fr.pc=0x00000257648c60f4 relative=0x00000000000000d4
Event: 21.781 Thread 0x0000025747e83d00 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00000257648c60f4 method=java.lang.Character.toLowerCase(I)I @ 5 c2
Event: 21.781 Thread 0x0000025747e83d00 DEOPT PACKING pc=0x00000257648c60f4 sp=0x000000a0cb0fe0e0
Event: 21.781 Thread 0x0000025747e83d00 DEOPT UNPACKING pc=0x00000257635723a3 sp=0x000000a0cb0fe078 mode 2
Event: 21.781 Thread 0x0000025747e83d00 Uncommon trap: trap_request=0xffffffde fr.pc=0x00000257648c60f4 relative=0x00000000000000d4
Event: 21.781 Thread 0x0000025747e83d00 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00000257648c60f4 method=java.lang.Character.toLowerCase(I)I @ 5 c2
Event: 21.781 Thread 0x0000025747e83d00 DEOPT PACKING pc=0x00000257648c60f4 sp=0x000000a0cb0fe0e0
Event: 21.781 Thread 0x0000025747e83d00 DEOPT UNPACKING pc=0x00000257635723a3 sp=0x000000a0cb0fe078 mode 2
Event: 21.781 Thread 0x0000025747e83d00 Uncommon trap: trap_request=0xffffffde fr.pc=0x00000257648c60f4 relative=0x00000000000000d4
Event: 21.781 Thread 0x0000025747e83d00 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00000257648c60f4 method=java.lang.Character.toLowerCase(I)I @ 5 c2
Event: 21.781 Thread 0x0000025747e83d00 DEOPT PACKING pc=0x00000257648c60f4 sp=0x000000a0cb0fe0e0
Event: 21.781 Thread 0x0000025747e83d00 DEOPT UNPACKING pc=0x00000257635723a3 sp=0x000000a0cb0fe078 mode 2
Event: 21.781 Thread 0x0000025747e83d00 Uncommon trap: trap_request=0xffffffde fr.pc=0x00000257648c60f4 relative=0x00000000000000d4
Event: 21.781 Thread 0x0000025747e83d00 Uncommon trap: reason=class_check action=maybe_recompile pc=0x00000257648c60f4 method=java.lang.Character.toLowerCase(I)I @ 5 c2
Event: 21.781 Thread 0x0000025747e83d00 DEOPT PACKING pc=0x00000257648c60f4 sp=0x000000a0cb0fe0e0
Event: 21.781 Thread 0x0000025747e83d00 DEOPT UNPACKING pc=0x00000257635723a3 sp=0x000000a0cb0fe078 mode 2
Classes unloaded (20 events):
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x00000257034d1808 'org/springframework/boot/configurationprocessor/MetadataGenerationEnvironment'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x00000257034d15e8 'org/springframework/boot/configurationprocessor/TypeUtils$$Lambda$694+0x00000257034d15e8'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x00000257034d12c8 'org/springframework/boot/configurationprocessor/TypeUtils$TypeExtractor'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x00000257034d1098 'org/springframework/boot/configurationprocessor/TypeUtils$$Lambda$688+0x00000257034d1098'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x00000257034d0e40 'org/springframework/boot/configurationprocessor/TypeUtils'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x00000257034d0c08 'org/springframework/boot/configurationprocessor/metadata/ConfigurationMetadata$$Lambda$687+0x00000257034d0c08'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x00000257034d09e8 'org/springframework/boot/configurationprocessor/metadata/ItemMetadata'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x00000257034d07e8 'org/springframework/boot/configurationprocessor/json/JSON'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x00000257034d05a8 'org/springframework/boot/configurationprocessor/metadata/ItemMetadata$ItemType'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x00000257034d0270 'org/springframework/boot/configurationprocessor/json/JSONArray'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x00000257034d0000 'org/springframework/boot/configurationprocessor/json/JSONTokener'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x00000257034ccc08 'org/springframework/boot/configurationprocessor/json/JSONObject$1'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x00000257034cc9b0 'org/springframework/boot/configurationprocessor/json/JSONException'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x00000257034cc678 'org/springframework/boot/configurationprocessor/json/JSONObject'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x00000257034cc438 'org/springframework/boot/configurationprocessor/metadata/ConfigurationMetadata'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x00000257034cc228 'org/springframework/boot/configurationprocessor/metadata/JsonMarshaller'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x00000257034cc000 'org/springframework/boot/configurationprocessor/MetadataCollector'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x0000025703364530 'org/springframework/boot/configurationprocessor/MetadataStore'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x00000257033642d0 'org/springframework/boot/configurationprocessor/metadata/InvalidConfigurationMetadataException'
Event: 21.132 Thread 0x000002577ec0ce20 Unloading class 0x0000025703364000 'org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessor'
Classes redefined (0 events):
No events
Internal exceptions (20 events):
Event: 21.715 Thread 0x0000025747e83d00 Exception <a 'sun/nio/fs/WindowsException'{0x00000006566273d0}> (0x00000006566273d0)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.716 Thread 0x0000025747e837f0 Exception <a 'sun/nio/fs/WindowsException'{0x000000065666ab88}> (0x000000065666ab88)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.716 Thread 0x0000025747e837f0 Exception <a 'sun/nio/fs/WindowsException'{0x000000065666ad40}> (0x000000065666ad40)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.716 Thread 0x0000025747e837f0 Exception <a 'sun/nio/fs/WindowsException'{0x000000065666bcb8}> (0x000000065666bcb8)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.716 Thread 0x0000025747e837f0 Exception <a 'sun/nio/fs/WindowsException'{0x000000065666beb8}> (0x000000065666beb8)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.716 Thread 0x0000025747e837f0 Exception <a 'sun/nio/fs/WindowsException'{0x000000065666cf18}> (0x000000065666cf18)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.716 Thread 0x0000025747e837f0 Exception <a 'sun/nio/fs/WindowsException'{0x000000065666d0e0}> (0x000000065666d0e0)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.720 Thread 0x0000025747e83d00 Exception <a 'sun/nio/fs/WindowsException'{0x00000006567f6850}> (0x00000006567f6850)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.720 Thread 0x0000025747e83d00 Exception <a 'sun/nio/fs/WindowsException'{0x00000006567f6f40}> (0x00000006567f6f40)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.720 Thread 0x0000025747e83d00 Exception <a 'sun/nio/fs/WindowsException'{0x00000006567f78d0}> (0x00000006567f78d0)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.725 Thread 0x0000025747e83d00 Exception <a 'sun/nio/fs/WindowsException'{0x0000000655e1fb00}> (0x0000000655e1fb00)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.725 Thread 0x0000025747e83d00 Exception <a 'sun/nio/fs/WindowsException'{0x0000000655e20220}> (0x0000000655e20220)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.725 Thread 0x0000025747e83d00 Exception <a 'sun/nio/fs/WindowsException'{0x0000000655e20cb8}> (0x0000000655e20cb8)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.725 Thread 0x0000025747e83d00 Exception <a 'sun/nio/fs/WindowsException'{0x0000000655e21458}> (0x0000000655e21458)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.766 Thread 0x0000025747e837f0 Exception <a 'sun/nio/fs/WindowsException'{0x00000006541cbb00}> (0x00000006541cbb00)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.766 Thread 0x0000025747e837f0 Exception <a 'sun/nio/fs/WindowsException'{0x00000006541cbcb8}> (0x00000006541cbcb8)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.766 Thread 0x0000025747e837f0 Exception <a 'sun/nio/fs/WindowsException'{0x00000006541ccc30}> (0x00000006541ccc30)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.766 Thread 0x0000025747e837f0 Exception <a 'sun/nio/fs/WindowsException'{0x00000006541cce30}> (0x00000006541cce30)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.766 Thread 0x0000025747e837f0 Exception <a 'sun/nio/fs/WindowsException'{0x00000006541cde90}> (0x00000006541cde90)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
Event: 21.767 Thread 0x0000025747e837f0 Exception <a 'sun/nio/fs/WindowsException'{0x00000006541ce058}> (0x00000006541ce058)
thrown [s\open\src\hotspot\share\prims\jni.cpp, line 516]
VM Operations (20 events):
Event: 20.989 Executing VM operation: CollectForMetadataAllocation done
Event: 21.085 Executing VM operation: CollectForMetadataAllocation
Event: 21.085 Executing VM operation: CollectForMetadataAllocation done
Event: 21.113 Executing VM operation: G1Concurrent
Event: 21.154 Executing VM operation: G1Concurrent done
Event: 21.154 Executing VM operation: HandshakeAllThreads
Event: 21.209 Executing VM operation: HandshakeAllThreads done
Event: 21.232 Executing VM operation: HandshakeAllThreads
Event: 21.233 Executing VM operation: HandshakeAllThreads done
Event: 21.239 Executing VM operation: G1Concurrent
Event: 21.242 Executing VM operation: G1Concurrent done
Event: 21.624 Executing VM operation: ICBufferFull
Event: 21.624 Executing VM operation: ICBufferFull done
Event: 21.637 Executing VM operation: G1CollectForAllocation
Event: 21.648 Executing VM operation: G1CollectForAllocation done
Event: 21.701 Executing VM operation: G1CollectForAllocation
Event: 21.713 Executing VM operation: G1CollectForAllocation done
Event: 21.745 Executing VM operation: HandshakeAllThreads
Event: 21.745 Executing VM operation: HandshakeAllThreads done
Event: 21.792 Executing VM operation: G1CollectForAllocation
Events (20 events):
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575db72390
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575db78210
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575db86710
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575db86c10
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575db9c110
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575db9cd10
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575db9d110
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575db9d710
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575db9f490
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575dbb2110
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575dbb7010
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575dbb7390
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575dbe5990
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575dc2a290
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575dc58490
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575dc5b890
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575dc5c090
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575dc5d090
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575dc5e190
Event: 21.764 Thread 0x000002577ec3aa20 flushing nmethod 0x000002575dc5e910
Dynamic libraries:
0x00007ff7ebc30000 - 0x00007ff7ebc40000 D:\Program Files\Java\jdk-17\bin\java.exe
0x00007ffc3de30000 - 0x00007ffc3e028000 C:\WINDOWS\SYSTEM32\ntdll.dll
0x00007ffc3caf0000 - 0x00007ffc3cbb2000 C:\WINDOWS\System32\KERNEL32.DLL
0x00007ffc3b630000 - 0x00007ffc3b92e000 C:\WINDOWS\System32\KERNELBASE.dll
0x00007ffc3b930000 - 0x00007ffc3ba30000 C:\WINDOWS\System32\ucrtbase.dll
0x00007ffc36620000 - 0x00007ffc3663b000 D:\Program Files\Java\jdk-17\bin\VCRUNTIME140.dll
0x00007ffc2e970000 - 0x00007ffc2e989000 D:\Program Files\Java\jdk-17\bin\jli.dll
0x00007ffc3c010000 - 0x00007ffc3c0c1000 C:\WINDOWS\System32\ADVAPI32.dll
0x00007ffc3c1f0000 - 0x00007ffc3c28e000 C:\WINDOWS\System32\msvcrt.dll
0x00007ffc3cbd0000 - 0x00007ffc3cc6f000 C:\WINDOWS\System32\sechost.dll
0x00007ffc3be50000 - 0x00007ffc3bf73000 C:\WINDOWS\System32\RPCRT4.dll
0x00007ffc3bd60000 - 0x00007ffc3bd87000 C:\WINDOWS\System32\bcrypt.dll
0x00007ffc3c800000 - 0x00007ffc3c99d000 C:\WINDOWS\System32\USER32.dll
0x00007ffc3be20000 - 0x00007ffc3be42000 C:\WINDOWS\System32\win32u.dll
0x00007ffc3bf80000 - 0x00007ffc3bfab000 C:\WINDOWS\System32\GDI32.dll
0x00007ffc3bb80000 - 0x00007ffc3bc97000 C:\WINDOWS\System32\gdi32full.dll
0x00007ffc26790000 - 0x00007ffc26a2a000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.4355_none_60b8b9eb71f62e16\COMCTL32.dll
0x00007ffc3ba30000 - 0x00007ffc3bacd000 C:\WINDOWS\System32\msvcp_win.dll
0x00007ffc3afe0000 - 0x00007ffc3afea000 C:\WINDOWS\SYSTEM32\VERSION.dll
0x00007ffc3c0e0000 - 0x00007ffc3c10f000 C:\WINDOWS\System32\IMM32.DLL
0x000000005ca60000 - 0x000000005ca6d000 D:\Program Files (x86)\360\360SAFE\safemon\SafeWrapper.dll
0x00007ffc2e060000 - 0x00007ffc2e165000 D:\Program Files (x86)\360\360SAFE\safemon\libzdtp64.dll
0x00007ffc3cc70000 - 0x00007ffc3d3dd000 C:\WINDOWS\System32\SHELL32.dll
0x00007ffc3c190000 - 0x00007ffc3c1e5000 C:\WINDOWS\System32\SHLWAPI.dll
0x00007ffc36610000 - 0x00007ffc3661c000 D:\Program Files\Java\jdk-17\bin\vcruntime140_1.dll
0x00007ffc03e10000 - 0x00007ffc03e9e000 D:\Program Files\Java\jdk-17\bin\msvcp140.dll
0x00007ffbe4ab0000 - 0x00007ffbe5691000 D:\Program Files\Java\jdk-17\bin\server\jvm.dll
0x00007ffc3c0d0000 - 0x00007ffc3c0d8000 C:\WINDOWS\System32\PSAPI.DLL
0x00007ffc27990000 - 0x00007ffc27999000 C:\WINDOWS\SYSTEM32\WSOCK32.dll
0x00007ffc32310000 - 0x00007ffc32337000 C:\WINDOWS\SYSTEM32\WINMM.dll
0x00007ffc3ca80000 - 0x00007ffc3caeb000 C:\WINDOWS\System32\WS2_32.dll
0x00007ffc39cc0000 - 0x00007ffc39cd2000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll
0x00007ffc2e880000 - 0x00007ffc2e88a000 D:\Program Files\Java\jdk-17\bin\jimage.dll
0x00007ffc397f0000 - 0x00007ffc399d4000 C:\WINDOWS\SYSTEM32\DBGHELP.DLL
0x00007ffc2d790000 - 0x00007ffc2d7c4000 C:\WINDOWS\SYSTEM32\dbgcore.DLL
0x00007ffc3bd90000 - 0x00007ffc3be12000 C:\WINDOWS\System32\bcryptPrimitives.dll
0x00007ffc27490000 - 0x00007ffc2749e000 D:\Program Files\Java\jdk-17\bin\instrument.dll
0x00007ffc27460000 - 0x00007ffc27485000 D:\Program Files\Java\jdk-17\bin\java.dll
0x00007ffbfa7d0000 - 0x00007ffbfa8a7000 D:\Program Files\Java\jdk-17\bin\jsvml.dll
0x00007ffc38f70000 - 0x00007ffc39714000 C:\WINDOWS\SYSTEM32\windows.storage.dll
0x00007ffc3da90000 - 0x00007ffc3dde3000 C:\WINDOWS\System32\combase.dll
0x00007ffc3ae40000 - 0x00007ffc3ae6e000 C:\WINDOWS\SYSTEM32\Wldp.dll
0x00007ffc3d640000 - 0x00007ffc3d70d000 C:\WINDOWS\System32\OLEAUT32.dll
0x00007ffc3d9e0000 - 0x00007ffc3da8d000 C:\WINDOWS\System32\SHCORE.dll
0x00007ffc3b400000 - 0x00007ffc3b424000 C:\WINDOWS\SYSTEM32\profapi.dll
0x00007ffc25b50000 - 0x00007ffc25b68000 D:\Program Files\Java\jdk-17\bin\zip.dll
0x00007ffc25e90000 - 0x00007ffc25ea9000 D:\Program Files\Java\jdk-17\bin\net.dll
0x00007ffc34d20000 - 0x00007ffc34e2d000 C:\WINDOWS\SYSTEM32\WINHTTP.dll
0x00007ffc3aba0000 - 0x00007ffc3ac0a000 C:\WINDOWS\system32\mswsock.dll
0x00007ffc25bd0000 - 0x00007ffc25be6000 D:\Program Files\Java\jdk-17\bin\nio.dll
0x00007ffc25ef0000 - 0x00007ffc25f0a000 D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\bin\breakgen64.dll
0x00007ffc2ccf0000 - 0x00007ffc2cd14000 C:\Users\ADAM5\AppData\Local\Temp\jansi-2.4.1-b87462ac789684e0-jansi.dll
0x00007ffc27a20000 - 0x00007ffc27a30000 D:\Program Files\Java\jdk-17\bin\verify.dll
0x00007ffc3a6e0000 - 0x00007ffc3a713000 C:\WINDOWS\SYSTEM32\ntmarta.dll
dbghelp: loaded successfully - version: 4.0.5 - missing functions: none
symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;D:\Program Files\Java\jdk-17\bin;C:\WINDOWS\SYSTEM32;C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.4355_none_60b8b9eb71f62e16;D:\Program Files (x86)\360\360SAFE\safemon;D:\Program Files\Java\jdk-17\bin\server;D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\bin;C:\Users\ADAM5\AppData\Local\Temp
VM Arguments:
jvm_args: -Dmaven.multiModuleProjectDirectory=E:\Idea-project\ikingtec-new6.0\microservices-platform -Djansi.passthrough=true -Dmaven.home=D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\plugins\maven\lib\maven3 -Dclassworlds.conf=D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\plugins\maven\lib\maven3\bin\m2.conf -Dmaven.ext.class.path=D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\plugins\maven\lib\maven-event-listener.jar -javaagent:D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\lib\idea_rt.jar=58940:D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\bin -Dfile.encoding=UTF-8
java_command: org.codehaus.classworlds.Launcher -Didea.version=2024.3.1 -T 8 -s D:\maven\apache-maven-3.5.2\conf\settings.xml package
java_class_path (initial): D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.8.0.jar;D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\plugins\maven\lib\maven3\boot\plexus-classworlds.license
Launcher Type: SUN_STANDARD
[Global flags]
intx CICompilerCount = 4 {product} {ergonomic}
uint ConcGCThreads = 2 {product} {ergonomic}
uint G1ConcRefinementThreads = 8 {product} {ergonomic}
size_t G1HeapRegionSize = 4194304 {product} {ergonomic}
uintx GCDrainStackTargetSize = 64 {product} {ergonomic}
size_t InitialHeapSize = 536870912 {product} {ergonomic}
size_t MarkStackSize = 4194304 {product} {ergonomic}
size_t MaxHeapSize = 8573157376 {product} {ergonomic}
size_t MaxNewSize = 5142216704 {product} {ergonomic}
size_t MinHeapDeltaBytes = 4194304 {product} {ergonomic}
size_t MinHeapSize = 8388608 {product} {ergonomic}
uintx NonNMethodCodeHeapSize = 5839372 {pd product} {ergonomic}
uintx NonProfiledCodeHeapSize = 122909434 {pd product} {ergonomic}
uintx ProfiledCodeHeapSize = 122909434 {pd product} {ergonomic}
uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic}
bool SegmentedCodeCache = true {product} {ergonomic}
size_t SoftMaxHeapSize = 8573157376 {manageable} {ergonomic}
bool UseCompressedClassPointers = true {product lp64_product} {ergonomic}
bool UseCompressedOops = true {product lp64_product} {ergonomic}
bool UseG1GC = true {product} {ergonomic}
bool UseLargePagesIndividualAllocation = false {pd product} {ergonomic}
Logging:
Log output configuration:
#0: stdout all=warning uptime,level,tags
#1: stderr all=off uptime,level,tags
Environment Variables:
JAVA_HOME=D:\Program Files\Java\jdk-17
PATH=C:\Program Files\Common Files\Oracle\Java\javapath;D:\Python39\Scripts\;D:\Python39\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;D:\Program Files\Java\jdk-17\bin;node_global;D:\maven\apache-maven-3.5.2\bin;D:\Program Files\nodejs\node_global\node_modules;E:\gradle\gradle-5.2.1-all\gradle-5.2.1\bin;C:\Users\ADAM5\.windows-build-tools\python27;D:\Program Files (x86)\Yarn\bin\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;node_global;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\Program Files\Microsoft VS Code\bin;D:\P;ogram Files\Git\cmd;C:\Program Files\dotnet\;C:\Program Files\GitHub CLI\;D:\nvm;D:\Program Files\nodejs;D:\Program Files\apache-ant-1.10.15-bin\apache-ant-1.10.15\bin;D:\Program Files (x86)\Tencent\΢ÐÅweb¿ª·¢Õß¹¤¾ß\dll;;;D:\Program Files\Git\cmd;C:\Users\ADAM5\AppData\Local\Microsoft\WindowsApps;D:\Program Files (x86)\SSH Communications Security\SSH Secure Shell;C:\Users\ADAM5\AppData\Roaming\npm;C:\Users\ADAM5\AppData\Local\Yarn\bin;D:\Program Files\JetBrains\PyCharm Community Edition 2020.3.2\bin;C:\Users\ADAM5\AppData\Local\Programs\Fiddler;D:\Program Files (x86)\GitHub CLI\;C:\Users\ADAM5\AppData\Local\Microsoft\WindowsApps;D:\Program Files (x86)\nvm;D:\Program Files\nodejs;D:\Program Files (x86)\Fiddler2\Fiddler;D:\nvm;D:\Program Files\nodejs;D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\bin;
USERNAME=ADAM5
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 158 Stepping 13, GenuineIntel
--------------- S Y S T E M ---------------
OS:
Windows 10 , 64 bit Build 19041 (10.0.19041.5198)
OS uptime: 6 days 7:35 hours
CPU: total 8 (initial active 8) (8 cores per cpu, 1 threads per core) family 6 model 158 stepping 13 microcode 0xb8, cx8, cmov, fxsr, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, lzcnt, tsc, tscinvbit, avx, avx2, aes, erms, clmul, bmi1, bmi2, rtm, adx, fma, vzeroupper, clflush, clflushopt
Memory: 4k page, system-wide physical 32701M (5698M free)
TotalPageFile size 54576M (AvailPageFile size 117M)
current process WorkingSet (physical memory assigned to process): 1750M, peak: 1755M
current process commit charge ("private bytes"): 1812M, peak: 2516M
vm_info: Java HotSpot(TM) 64-Bit Server VM (17.0.13+10-LTS-268) for windows-amd64 JRE (17.0.13+10-LTS-268), built on Sep 30 2024 06:33:13 by "mach5one" with MS VC++ 17.6 (VS2022)
END.
-221
View File
@@ -1,221 +0,0 @@
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 536870912 bytes for G1 virtual space
# Possible reasons:
# The system is out of physical RAM or swap space
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# JVM is running with Zero Based Compressed Oops mode in which the Java heap is
# placed in the first 32GB address space. The Java Heap base address is the
# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
# to set the Java Heap base and to place the Java Heap above 32GB virtual address.
# This output file may be truncated or incomplete.
#
# Out of Memory Error (os_windows.cpp:3548), pid=8960, tid=12132
#
# JRE version: (17.0.13+10) (build )
# Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0.13+10-LTS-268, mixed mode, emulated-client, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
--------------- S U M M A R Y ------------
Command Line: -XX:TieredStopAtLevel=1 -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dmanagement.endpoints.jmx.exposure.include=* -javaagent:D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\lib\idea_rt.jar=55248:D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\bin -Dfile.encoding=UTF-8 com.zlt.tourism.CulturalTourismApplication
Host: Intel(R) Core(TM) i7-9700F CPU @ 3.00GHz, 8 cores, 31G, Windows 10 , 64 bit Build 19041 (10.0.19041.5198)
Time: Sun Jan 5 15:41:20 2025 Windows 10 , 64 bit Build 19041 (10.0.19041.5198) elapsed time: 0.016570 seconds (0d 0h 0m 0s)
--------------- T H R E A D ---------------
Current thread (0x000001d97c4e6800): JavaThread "Unknown thread" [_thread_in_vm, id=12132, stack(0x0000004a1ad00000,0x0000004a1ae00000)]
Stack: [0x0000004a1ad00000,0x0000004a1ae00000]
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x67a23a]
V [jvm.dll+0x7da96d]
V [jvm.dll+0x7dc2b3]
V [jvm.dll+0x7dc923]
V [jvm.dll+0x2450ef]
V [jvm.dll+0x677279]
V [jvm.dll+0x66bf22]
V [jvm.dll+0x302006]
V [jvm.dll+0x3095a6]
V [jvm.dll+0x359e9e]
V [jvm.dll+0x35a0cf]
V [jvm.dll+0x2d90d8]
V [jvm.dll+0x2da044]
V [jvm.dll+0x7ace81]
V [jvm.dll+0x367701]
V [jvm.dll+0x78bcc9]
V [jvm.dll+0x3ec9bf]
V [jvm.dll+0x3ee5f1]
C [jli.dll+0x5297]
C [ucrtbase.dll+0x21bb2]
C [KERNEL32.DLL+0x17374]
C [ntdll.dll+0x4cc91]
--------------- P R O C E S S ---------------
Threads class SMR info:
_java_thread_list=0x00007ffbe5568a18, length=0, elements={
}
Java Threads: ( => current thread )
Other Threads:
0x000001d97c554a50 GCTaskThread "GC Thread#0" [stack: 0x0000004a1ae00000,0x0000004a1af00000] [id=3964]
0x000001d97c565820 ConcurrentGCThread "G1 Main Marker" [stack: 0x0000004a1af00000,0x0000004a1b000000] [id=28228]
0x000001d97c5668d0 ConcurrentGCThread "G1 Conc#0" [stack: 0x0000004a1b000000,0x0000004a1b100000] [id=4148]
[error occurred during error reporting (printing all threads), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffbe4d99bc7]
VM state: not at safepoint (not fully initialized)
VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
[0x000001d97c4e37c0] Heap_lock - owner thread: 0x000001d97c4e6800
Heap address: 0x0000000601000000, size: 8176 MB, Compressed Oops mode: Zero based, Oop shift amount: 3
CDS archive(s) mapped at: [0x0000000000000000-0x0000000000000000-0x0000000000000000), size 0, SharedBaseAddress: 0x0000000800000000, ArchiveRelocationMode: 1.
Narrow klass base: 0x0000000000000000, Narrow klass shift: 0, Narrow klass range: 0x0
GC Precious Log:
<Empty>
Heap:
garbage-first heap total 0K, used 0K [0x0000000601000000, 0x0000000800000000)
region size 4096K, 0 young (0K), 0 survivors (0K)
[error occurred during error reporting (printing heap information), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffbe5183a29]
GC Heap History (0 events):
No events
Deoptimization events (0 events):
No events
Classes unloaded (0 events):
No events
Classes redefined (0 events):
No events
Internal exceptions (0 events):
No events
VM Operations (0 events):
No events
Events (1 events):
Event: 0.011 Loaded shared library D:\Program Files\Java\jdk-17\bin\java.dll
Dynamic libraries:
0x00007ff7ebc30000 - 0x00007ff7ebc40000 D:\Program Files\Java\jdk-17\bin\java.exe
0x00007ffc3de30000 - 0x00007ffc3e028000 C:\WINDOWS\SYSTEM32\ntdll.dll
0x00007ffc3caf0000 - 0x00007ffc3cbb2000 C:\WINDOWS\System32\KERNEL32.DLL
0x00007ffc3b630000 - 0x00007ffc3b92e000 C:\WINDOWS\System32\KERNELBASE.dll
0x00007ffc3b930000 - 0x00007ffc3ba30000 C:\WINDOWS\System32\ucrtbase.dll
0x00007ffc36620000 - 0x00007ffc3663b000 D:\Program Files\Java\jdk-17\bin\VCRUNTIME140.dll
0x00007ffc2e970000 - 0x00007ffc2e989000 D:\Program Files\Java\jdk-17\bin\jli.dll
0x00007ffc3c010000 - 0x00007ffc3c0c1000 C:\WINDOWS\System32\ADVAPI32.dll
0x00007ffc3c1f0000 - 0x00007ffc3c28e000 C:\WINDOWS\System32\msvcrt.dll
0x00007ffc3cbd0000 - 0x00007ffc3cc6f000 C:\WINDOWS\System32\sechost.dll
0x00007ffc3be50000 - 0x00007ffc3bf73000 C:\WINDOWS\System32\RPCRT4.dll
0x00007ffc3bd60000 - 0x00007ffc3bd87000 C:\WINDOWS\System32\bcrypt.dll
0x00007ffc3c800000 - 0x00007ffc3c99d000 C:\WINDOWS\System32\USER32.dll
0x00007ffc3be20000 - 0x00007ffc3be42000 C:\WINDOWS\System32\win32u.dll
0x00007ffc3bf80000 - 0x00007ffc3bfab000 C:\WINDOWS\System32\GDI32.dll
0x00007ffc3bb80000 - 0x00007ffc3bc97000 C:\WINDOWS\System32\gdi32full.dll
0x00007ffc26790000 - 0x00007ffc26a2a000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.4355_none_60b8b9eb71f62e16\COMCTL32.dll
0x00007ffc3ba30000 - 0x00007ffc3bacd000 C:\WINDOWS\System32\msvcp_win.dll
0x00007ffc3afe0000 - 0x00007ffc3afea000 C:\WINDOWS\SYSTEM32\VERSION.dll
0x00007ffc3c0e0000 - 0x00007ffc3c10f000 C:\WINDOWS\System32\IMM32.DLL
0x000000005ca60000 - 0x000000005ca6d000 D:\Program Files (x86)\360\360SAFE\safemon\SafeWrapper.dll
0x00007ffc2e060000 - 0x00007ffc2e165000 D:\Program Files (x86)\360\360SAFE\safemon\libzdtp64.dll
0x00007ffc3cc70000 - 0x00007ffc3d3dd000 C:\WINDOWS\System32\SHELL32.dll
0x00007ffc3c190000 - 0x00007ffc3c1e5000 C:\WINDOWS\System32\SHLWAPI.dll
0x00007ffc36610000 - 0x00007ffc3661c000 D:\Program Files\Java\jdk-17\bin\vcruntime140_1.dll
0x00007ffc03e10000 - 0x00007ffc03e9e000 D:\Program Files\Java\jdk-17\bin\msvcp140.dll
0x00007ffbe4ab0000 - 0x00007ffbe5691000 D:\Program Files\Java\jdk-17\bin\server\jvm.dll
0x00007ffc3c0d0000 - 0x00007ffc3c0d8000 C:\WINDOWS\System32\PSAPI.DLL
0x00007ffc32310000 - 0x00007ffc32337000 C:\WINDOWS\SYSTEM32\WINMM.dll
0x00007ffc27990000 - 0x00007ffc27999000 C:\WINDOWS\SYSTEM32\WSOCK32.dll
0x00007ffc3ca80000 - 0x00007ffc3caeb000 C:\WINDOWS\System32\WS2_32.dll
0x00007ffc39cc0000 - 0x00007ffc39cd2000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll
0x00007ffc2e880000 - 0x00007ffc2e88a000 D:\Program Files\Java\jdk-17\bin\jimage.dll
0x00007ffc397f0000 - 0x00007ffc399d4000 C:\WINDOWS\SYSTEM32\DBGHELP.DLL
0x00007ffc2d790000 - 0x00007ffc2d7c4000 C:\WINDOWS\SYSTEM32\dbgcore.DLL
0x00007ffc3bd90000 - 0x00007ffc3be12000 C:\WINDOWS\System32\bcryptPrimitives.dll
0x00007ffc27490000 - 0x00007ffc2749e000 D:\Program Files\Java\jdk-17\bin\instrument.dll
0x00007ffc27460000 - 0x00007ffc27485000 D:\Program Files\Java\jdk-17\bin\java.dll
dbghelp: loaded successfully - version: 4.0.5 - missing functions: none
symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;D:\Program Files\Java\jdk-17\bin;C:\WINDOWS\SYSTEM32;C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.4355_none_60b8b9eb71f62e16;D:\Program Files (x86)\360\360SAFE\safemon;D:\Program Files\Java\jdk-17\bin\server
VM Arguments:
jvm_args: -XX:TieredStopAtLevel=1 -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dmanagement.endpoints.jmx.exposure.include=* -javaagent:D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\lib\idea_rt.jar=55248:D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\bin -Dfile.encoding=UTF-8
java_command: com.zlt.tourism.CulturalTourismApplication
java_class_path (initial): E:\Idea-project\ikingtec-new6.0\microservices-platform\zlt-business\tourism-center\tourism-service\target\classes;E:\Idea-project\ikingtec-new6.0\microservices-platform\zlt-business\tourism-center\tourism-core\target\classes;D:\maven\ikingtec-repo\com\github\pagehelper\pagehelper-spring-boot-starter\1.4.6\pagehelper-spring-boot-starter-1.4.6.jar;D:\maven\ikingtec-repo\org\mybatis\spring\boot\mybatis-spring-boot-starter\2.2.2\mybatis-spring-boot-starter-2.2.2.jar;D:\maven\ikingtec-repo\org\mybatis\spring\boot\mybatis-spring-boot-autoconfigure\2.2.2\mybatis-spring-boot-autoconfigure-2.2.2.jar;D:\maven\ikingtec-repo\com\github\pagehelper\pagehelper-spring-boot-autoconfigure\1.4.6\pagehelper-spring-boot-autoconfigure-1.4.6.jar;D:\maven\ikingtec-repo\com\github\pagehelper\pagehelper\5.3.2\pagehelper-5.3.2.jar;D:\maven\ikingtec-repo\org\springframework\statemachine\spring-statemachine-core\2.5.1\spring-statemachine-core-2.5.1.jar;D:\maven\ikingtec-repo\org\springframework\spring-tx\6.0.14\spring-tx-6.0.14.jar;D:\maven\ikingtec-repo\org\springframework\spring-messaging\6.0.14\spring-messaging-6.0.14.jar;D:\maven\ikingtec-repo\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar;D:\maven\ikingtec-repo\com\alibaba\fastjson\1.2.83\fastjson-1.2.83.jar;E:\Idea-project\ikingtec-new6.0\microservices-platform\zlt-config\target\classes;D:\maven\ikingtec-repo\com\alibaba\cloud\spring-cloud-starter-alibaba-nacos-config\2022.0.0.0\spring-cloud-starter-alibaba-nacos-config-2022.0.0.0.jar;D:\maven\ikingtec-repo\org\slf4j\slf4j-api\2.0.9\slf4j-api-2.0.9.jar;D:\maven\ikingtec-repo\jakarta\annotation\jakarta.annotation-api\2.1.1\jakarta.annotation-api-2.1.1.jar;E:\Idea-project\ikingtec-new6.0\microservices-platform\zlt-commons\zlt-common-spring-boot-starter\target\classes;E:\Idea-project\ikingtec-new6.0\microservices-platform\zlt-commons\zlt-common-core\target\classes;D:\maven\ikingtec-repo\com\baomidou\mybatis-plus-extension\3.5.4.1\mybatis-plus-e
Launcher Type: SUN_STANDARD
[Global flags]
intx CICompilerCount = 4 {product} {ergonomic}
uint ConcGCThreads = 2 {product} {ergonomic}
uint G1ConcRefinementThreads = 8 {product} {ergonomic}
size_t G1HeapRegionSize = 4194304 {product} {ergonomic}
uintx GCDrainStackTargetSize = 64 {product} {ergonomic}
size_t InitialHeapSize = 536870912 {product} {ergonomic}
bool ManagementServer = true {product} {command line}
size_t MarkStackSize = 4194304 {product} {ergonomic}
size_t MaxHeapSize = 8573157376 {product} {ergonomic}
size_t MinHeapDeltaBytes = 4194304 {product} {ergonomic}
size_t MinHeapSize = 8388608 {product} {ergonomic}
uintx NonProfiledCodeHeapSize = 0 {pd product} {ergonomic}
bool ProfileInterpreter = false {pd product} {command line}
uintx ProfiledCodeHeapSize = 0 {pd product} {ergonomic}
size_t SoftMaxHeapSize = 8573157376 {manageable} {ergonomic}
intx TieredStopAtLevel = 1 {product} {command line}
bool UseCompressedClassPointers = true {product lp64_product} {ergonomic}
bool UseCompressedOops = true {product lp64_product} {ergonomic}
bool UseG1GC = true {product} {ergonomic}
bool UseLargePagesIndividualAllocation = false {pd product} {ergonomic}
Logging:
Log output configuration:
#0: stdout all=warning uptime,level,tags
#1: stderr all=off uptime,level,tags
Environment Variables:
JAVA_HOME=D:\Program Files\Java\jdk-17
PATH=C:\Program Files\Common Files\Oracle\Java\javapath;D:\Python39\Scripts\;D:\Python39\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;D:\Program Files\Java\jdk-17\bin;node_global;D:\maven\apache-maven-3.5.2\bin;D:\Program Files\nodejs\node_global\node_modules;E:\gradle\gradle-5.2.1-all\gradle-5.2.1\bin;C:\Users\ADAM5\.windows-build-tools\python27;D:\Program Files (x86)\Yarn\bin\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;node_global;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\Program Files\Microsoft VS Code\bin;D:\P;ogram Files\Git\cmd;C:\Program Files\dotnet\;C:\Program Files\GitHub CLI\;D:\nvm;D:\Program Files\nodejs;D:\Program Files\apache-ant-1.10.15-bin\apache-ant-1.10.15\bin;D:\Program Files (x86)\Tencent\΢ÐÅweb¿ª·¢Õß¹¤¾ß\dll;;;D:\Program Files\Git\cmd;C:\Users\ADAM5\AppData\Local\Microsoft\WindowsApps;D:\Program Files (x86)\SSH Communications Security\SSH Secure Shell;C:\Users\ADAM5\AppData\Roaming\npm;C:\Users\ADAM5\AppData\Local\Yarn\bin;D:\Program Files\JetBrains\PyCharm Community Edition 2020.3.2\bin;C:\Users\ADAM5\AppData\Local\Programs\Fiddler;D:\Program Files (x86)\GitHub CLI\;C:\Users\ADAM5\AppData\Local\Microsoft\WindowsApps;D:\Program Files (x86)\nvm;D:\Program Files\nodejs;D:\Program Files (x86)\Fiddler2\Fiddler;D:\nvm;D:\Program Files\nodejs;D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.1\bin;
USERNAME=ADAM5
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 158 Stepping 13, GenuineIntel
--------------- S Y S T E M ---------------
OS:
Windows 10 , 64 bit Build 19041 (10.0.19041.5198)
OS uptime: 6 days 20:09 hours
CPU: total 8 (initial active 8) (8 cores per cpu, 1 threads per core) family 6 model 158 stepping 13 microcode 0xb8, cx8, cmov, fxsr, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, lzcnt, tsc, tscinvbit, avx, avx2, aes, erms, clmul, bmi1, bmi2, rtm, adx, fma, vzeroupper, clflush, clflushopt
Memory: 4k page, system-wide physical 32701M (6439M free)
TotalPageFile size 54576M (AvailPageFile size 25M)
current process WorkingSet (physical memory assigned to process): 12M, peak: 12M
current process commit charge ("private bytes"): 56M, peak: 568M
vm_info: Java HotSpot(TM) 64-Bit Server VM (17.0.13+10-LTS-268) for windows-amd64 JRE (17.0.13+10-LTS-268), built on Sep 30 2024 06:33:13 by "mach5one" with MS VC++ 17.6 (VS2022)
END.
+13 -4
View File
@@ -60,10 +60,6 @@
<tomcat-embed-core.version>10.1.11</tomcat-embed-core.version>
<httpclient.version>5.2.1</httpclient.version>
<oauth2-oidc-sdk.version>11.7</oauth2-oidc-sdk.version>
<dji-cloud-sdk.version>1.3.1</dji-cloud-sdk.version>
<okhttp3.version>4.9.1</okhttp3.version>
<glassfish-jaxb.version>2.3.3</glassfish-jaxb.version>
<javax-jaxb.version>2.3.0</javax-jaxb.version>
<easyexcel.version>3.3.3</easyexcel.version>
</properties>
@@ -454,6 +450,19 @@
</build>
<repositories>
<!-- &lt;!&ndash; 添加本地仓库,优先级最高 &ndash;&gt;
<repository>
<id>local</id>
<name>Local Repository</name>
<url>file:${user.home}/.m2/repository</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>-->
<repository>
<id>aliyun-repos</id>
<url>https://maven.aliyun.com/repository/public</url>
BIN
View File
Binary file not shown.
-267
View File
@@ -1,267 +0,0 @@
# 携程优惠券业务对接系统
## 项目概述
本项目是携程优惠券业务对接系统,实现了与携程平台的优惠券业务集成,包括优惠券创建、核销、取消等完整业务流程。
## 功能特性
### 核心功能
- ✅ **携程优惠券创建** - 支持携程下单后回调创建用户优惠券
- ✅ **智能优惠券选择** - 根据订单金额智能选择最优优惠券
- ✅ **优惠券核销** - 完整的核销流程,包括携程API调用和本地状态更新
- ✅ **优惠券取消** - 支持指定优惠券或默认取消第一个可用券
- ✅ **优惠券状态查询** - 实时查询优惠券状态
- ✅ **过期优惠券处理** - 定时任务自动处理过期优惠券
### 技术特性
- 🔐 **安全加密** - AES-128-CBC加密和MD5签名验证
- 🔄 **重试机制** - API调用失败自动重试
- 📊 **幂等性保证** - 防止重复处理
- 🎯 **智能选择** - 优惠券优先级算法
- 📝 **完整日志** - 详细的操作日志记录
- 🧪 **单元测试** - 完整的测试覆盖
## 系统架构
```
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ 携程平台API │ │ 优惠券服务 │ │ 数据库 │
│ │ │ │ │ │
│ - 创建优惠券 │◄──►│ - 业务逻辑处理 │◄──►│ - t_coupon │
│ - 核销优惠券 │ │ - 数据验证 │ │ - t_ctrip_* │
│ - 取消优惠券 │ │ - 状态管理 │ │ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
```
## 数据库设计
### 核心表结构
#### t_coupon (优惠券主表)
```sql
- id: 主键ID
- coupon_no: 优惠券编号
- coupon_name: 优惠券名称
- coupon_type: 优惠券类型(1-满减券,2-折扣券,3-免费券)
- amount: 优惠券面额
- min_amount: 使用门槛金额
- discount_rate: 折扣率
- status: 状态(0-未使用,1-已使用,2-已过期,3-已作废)
- user_phone: 用户手机号
- source: 来源(1-携程,2-高飞自建)
- ctrip_coupon_id: 携程优惠券ID
- valid_start_time/valid_end_time: 有效期
- used_time/used_order_no: 使用时间和订单号
- cancel_time: 退券时间
```
#### t_ctrip_* (携程相关表)
- `t_ctrip_order` - 携程订单表
- `t_ctrip_coupon` - 携程优惠券信息表
- `t_ctrip_refund` - 携程退款表
- `t_ctrip_consumed` - 携程核销表
## API接口
### 1. 携程创建优惠券接口
```http
POST /coupon/ctrip/create
Content-Type: application/json
{
"ctripCouponId": "CTRIP_001",
"userPhone": "13800138000",
"couponName": "满100减50券",
"couponType": 1,
"amount": 50.00,
"minAmount": 100.00,
"validStartTime": "2024-01-01 00:00:00",
"validEndTime": "2024-12-31 23:59:59"
}
```
### 2. 核销携程优惠券接口
```http
POST /coupon/ctrip/verify?userPhone=13800138000&orderNo=ORDER_001&orderAmount=300.00
```
### 3. 取消携程优惠券接口
```http
POST /coupon/ctrip/cancel?userPhone=13800138000&ctripCouponId=CTRIP_001&reason=用户取消
```
### 4. 查询携程优惠券状态
```http
GET /coupon/ctrip/status/CTRIP_001
```
## 配置说明
### 应用配置 (application.yml)
```yaml
# 携程API配置
ctrip:
aes:
key: your-aes-key-here-16chars
iv: your-aes-iv-here-16chars
md5:
secret: your-md5-secret-here
api:
timeout: 30000
retry-times: 3
base-url: https://api.ctrip.com
account:
id: your-account-id
secret: your-account-secret
```
### 环境变量配置
```bash
# 生产环境
export CTRIP_ACCOUNT_ID=your-prod-account-id
export CTRIP_ACCOUNT_SECRET=your-prod-account-secret
export CTRIP_AES_KEY=your-prod-aes-key
export CTRIP_AES_IV=your-prod-aes-iv
export CTRIP_MD5_SECRET=your-prod-md5-secret
```
## 部署指南
### 1. 环境要求
- JDK 1.8+
- MySQL 5.7+
- Maven 3.6+
### 2. 数据库初始化
```sql
-- 执行数据库迁移脚本
source database_migration.sql
```
### 3. 应用启动
```bash
# 开发环境
mvn spring-boot:run -Dspring.profiles.active=dev
# 生产环境
mvn clean package
java -jar target/coupon-center.jar --spring.profiles.active=prod
```
### 4. 健康检查
```bash
curl http://localhost:8082/coupon-center/actuator/health
```
## 监控和日志
### 日志配置
- 应用日志:`logs/coupon-center.log`
- 日志级别:开发环境 DEBUG,生产环境 INFO
### 监控指标
- 优惠券创建成功率
- 优惠券核销成功率
- API调用响应时间
- 数据库连接状态
### 定时任务
- 过期优惠券处理:每天凌晨2点
- 即将过期优惠券检查:每小时
## 测试
### 单元测试
```bash
mvn test
```
### 集成测试
```bash
mvn test -Dspring.profiles.active=test
```
### API测试
```bash
# 创建优惠券测试
curl -X POST http://localhost:8082/coupon-center/coupon/ctrip/create \
-H "Content-Type: application/json" \
-d '{
"ctripCouponId": "TEST_001",
"userPhone": "13800138000",
"couponName": "测试优惠券",
"couponType": 1,
"amount": 100.00,
"minAmount": 200.00,
"validStartTime": "2024-01-01 00:00:00",
"validEndTime": "2024-12-31 23:59:59"
}'
```
## 错误码说明
| 错误码 | 说明 |
|--------|------|
| COUPON_NOT_FOUND | 优惠券不存在 |
| COUPON_INVALID | 优惠券状态不正确 |
| COUPON_EXPIRED | 优惠券已过期 |
| COUPON_USAGE_ERROR | 优惠券使用条件不满足 |
| COUPON_VERIFY_FAILED | 携程核销失败 |
| COUPON_UPDATE_FAILED | 更新优惠券状态失败 |
| COUPON_PARAM_ERROR | 参数错误 |
| SYSTEM_ERROR | 系统异常 |
## 开发指南
### 代码结构
```
src/main/java/com/central/coupon/
├── controller/ # 控制器层
├── service/ # 服务层
├── entity/ # 实体类
├── mapper/ # 数据访问层
├── config/ # 配置类
├── exception/ # 异常处理
├── task/ # 定时任务
└── util/ # 工具类
```
### 开发规范
1. **命名规范** - 使用驼峰命名法
2. **注释规范** - 类和方法必须有注释
3. **异常处理** - 使用自定义异常类
4. **日志记录** - 关键操作必须记录日志
5. **单元测试** - 核心业务逻辑必须有测试
### 提交规范
```
feat: 新功能
fix: 修复bug
docs: 文档更新
style: 代码格式调整
refactor: 重构
test: 测试相关
chore: 构建过程或辅助工具的变动
```
## 常见问题
### Q: 携程API调用失败怎么办?
A: 检查网络连接、API配置、签名验证等,系统会自动重试3次。
### Q: 优惠券核销失败怎么办?
A: 检查优惠券状态、有效期、使用条件等,查看详细错误日志。
### Q: 如何监控系统状态?
A: 通过健康检查接口和日志文件监控系统状态。
## 联系方式
如有问题,请联系开发团队或查看项目文档。
## 版本历史
- v1.0.0 - 初始版本,实现基础优惠券功能
- v1.1.0 - 添加智能优惠券选择
- v1.2.0 - 完善错误处理和监控
-161
View File
@@ -1,161 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.zlt</groupId>
<artifactId>central-platform</artifactId>
<version>6.0.0</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>coupon-center</artifactId>
<description>优惠券中心服务</description>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- 公共实体类模块 -->
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-config</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-log-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-common-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-db-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-redis-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-loadbalancer-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-sentinel-spring-boot-starter</artifactId>
</dependency>
<!-- swagger -->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>search-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webflux</artifactId>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>alibabacloud-ice20201109</artifactId>
<version>5.0.3</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
<imageTags>
<imageTag>${project.version}</imageTag>
<imageTag>latest</imageTag>
</imageTags>
<forceTags>true</forceTags>
<baseImage>${docker.baseImage}</baseImage>
<volumes>${docker.volumes}</volumes>
<env>
<JAVA_OPTS>${docker.java.opts}</JAVA_OPTS>
</env>
<entryPoint>["sh","-c","java $JAVA_OPTS ${docker.java.security.egd} -jar /${project.build.finalName}.jar"]</entryPoint>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
<finalName>${project.artifactId}</finalName>
</build>
</project>
@@ -1,27 +0,0 @@
package com.central.coupon;
import com.central.common.lb.annotation.EnableFeignInterceptor;
import com.central.search.annotation.EnableSearchClient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
* 优惠券中心启动类
*
* @author system
* @date 2024-12-19
*/
@EnableDiscoveryClient
@EnableSearchClient
@EnableTransactionManagement
@EnableFeignInterceptor
@SpringBootApplication
public class CouponCenterApplication {
public static void main(String[] args) {
SpringApplication.run(CouponCenterApplication.class, args);
}
}
@@ -1,32 +0,0 @@
package com.central.coupon.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;
/**
* RestTemplate配置类
*/
@Configuration
public class RestTemplateConfig {
@Value("${ctrip.api.timeout:30000}")
private int timeout;
@Bean
public RestTemplate restTemplate() {
RestTemplate restTemplate = new RestTemplate();
restTemplate.setRequestFactory(clientHttpRequestFactory());
return restTemplate;
}
private ClientHttpRequestFactory clientHttpRequestFactory() {
SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory();
factory.setConnectTimeout(timeout);
factory.setReadTimeout(timeout);
return factory;
}
}
@@ -1,117 +0,0 @@
package com.central.coupon.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.central.common.model.Result;
import com.central.common.model.PageResult;
import com.central.coupon.entity.Coupon;
import com.central.coupon.service.ICouponService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* 优惠券管理控制器
*/
@Slf4j
@RestController
@RequestMapping("/coupon")
@Tag(name = "优惠券管理")
public class CouponController {
@Autowired
private ICouponService couponService;
/**
* 列表
*/
@Operation(summary = "查询列表")
@Parameters({
@Parameter(name = "page",description = "分页起始位置",required = true,in=ParameterIn.QUERY),
@Parameter(name = "limit",description = "分页结束位置",required = true,in=ParameterIn.QUERY)
})
@GetMapping
public PageResult<Coupon> list(@RequestParam Map<String, Object> params) {
return couponService.findList(params);
}
/**
* 根据ID查询优惠券
*/
@Operation(summary = "根据ID查询优惠券")
@GetMapping("/{id}")
public Result<Coupon> getCouponById(@PathVariable Long id) {
Coupon coupon = couponService.getById(id);
return Result.succeed(coupon);
}
/**
* 创建优惠券
*/
@Operation(summary = "创建优惠券")
@PostMapping
public Result<Boolean> createCoupon(@RequestBody Coupon coupon) {
boolean result = couponService.createCoupon(coupon);
return Result.succeed(result);
}
/**
* 更新优惠券
*/
@Operation(summary = "更新优惠券")
@PutMapping("/{id}")
public Result<Boolean> updateCoupon(@PathVariable Long id, @RequestBody Coupon coupon) {
coupon.setId(id);
boolean result = couponService.updateCoupon(coupon);
return Result.succeed(result);
}
/**
* 删除优惠券
*/
@Operation(summary = "删除优惠券")
@DeleteMapping("/{id}")
public Result<Boolean> deleteCoupon(@PathVariable Long id) {
boolean result = couponService.deleteCoupon(id);
return Result.succeed(result);
}
/**
* 根据手机号查询用户优惠券
*/
@Operation(summary = "根据手机号查询用户优惠券")
@GetMapping("/user/{userPhone}")
public Result<List<Coupon>> getCouponsByUserPhone(@PathVariable String userPhone) {
List<Coupon> coupons = couponService.getCouponsByUserPhone(userPhone);
return Result.succeed(coupons);
}
/**
* 根据手机号查询可用优惠券
*/
@Operation(summary = "根据手机号查询可用优惠券")
@GetMapping("/user/{userPhone}/available")
public Result<List<Coupon>> getAvailableCouponsByUserPhone(@PathVariable String userPhone) {
List<Coupon> coupons = couponService.getAvailableCouponsByUserPhone(userPhone);
return Result.succeed(coupons);
}
/**
* 使用优惠券
*/
@Operation(summary = "使用优惠券")
@PostMapping("/{id}/use")
public Result<Boolean> useCoupon(@PathVariable Long id, @RequestParam String orderNo) {
boolean result = couponService.useCoupon(id, orderNo);
return Result.succeed(result);
}
}
@@ -1,804 +0,0 @@
package com.central.coupon.controller;
import com.central.common.model.Result;
import com.central.coupon.entity.Coupon;
import com.central.coupon.service.ICouponService;
import com.central.coupon.service.ICtripApiService;
import com.central.coupon.service.impl.CouponServiceImpl;
import com.central.coupon.util.CtripDecryptUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import jakarta.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 携程优惠券控制器
* 专门处理携程相关的优惠券接口
*/
@Slf4j
@RestController
@RequestMapping("/coupon/ctrip")
@Tag(name = "携程优惠券管理")
public class CtripCouponController {
@Autowired
private ICouponService couponService;
@Autowired
private ICtripApiService ctripApiService;
@Autowired
private CtripDecryptUtil ctripDecryptUtil;
@Autowired
private ObjectMapper objectMapper;
/**
* 携程创建优惠券接口
* 携程下单后回调,创建用户优惠券(手机号+携程券ID唯一,幂等)
*
* 实际请求格式:
* {
* "header": {
* "accountId": "供应商账号",
* "serviceName": "CreatePreOrder",
* "requestTime": "2025-08-07 03:36:11",
* "version": "1.0",
* "sign": "签名"
* },
* "body": {
* "otaOrderId": "订单ID",
* "sequenceId": "序列ID",
* "items": [...],
* "contacts": [...]
* }
* }
*/
@Operation(summary = "携程创建优惠券接口")
@PostMapping("/create")
public Result<Boolean> createCouponFromCtrip(@RequestBody Map<String, Object> request,
jakarta.servlet.http.HttpServletRequest httpRequest) {
log.info("收到携程创建优惠券请求,IP: {}", httpRequest.getRemoteAddr());
try {
// 解析携程标准请求格式
@SuppressWarnings("unchecked")
Map<String, Object> header = (Map<String, Object>) request.get("header");
Object bodyObj = request.get("body");
if (header == null || bodyObj == null) {
log.error("请求格式错误,缺少header或body");
return Result.succeed(false);
}
// 处理body,可能是字符串或对象
Map<String, Object> body;
String bodyJson;
if (bodyObj instanceof String) {
// body是字符串,可能是加密的或JSON字符串
String bodyStr = (String) bodyObj;
log.info("body是字符串类型,长度: {}", bodyStr.length());
// 尝试解密
String decryptedBody = ctripDecryptUtil.decryptAES(bodyStr);
if (decryptedBody != null) {
// 解密成功,解析JSON
body = objectMapper.readValue(decryptedBody, Map.class);
bodyJson = decryptedBody;
log.info("body解密成功");
} else {
// 解密失败,尝试直接解析JSON
try {
body = objectMapper.readValue(bodyStr, Map.class);
bodyJson = bodyStr;
log.info("body直接解析JSON成功");
} catch (Exception e) {
log.error("body既不是有效的加密数据也不是有效的JSON: {}", e.getMessage());
return Result.succeed(false);
}
}
} else if (bodyObj instanceof Map) {
// body是对象
body = (Map<String, Object>) bodyObj;
bodyJson = objectMapper.writeValueAsString(body);
log.info("body是对象类型");
} else {
log.error("body类型不支持: {}", bodyObj.getClass().getName());
return Result.succeed(false);
}
// 验证签名
String accountId = (String) header.get("accountId");
String serviceName = (String) header.get("serviceName");
String requestTime = (String) header.get("requestTime");
String version = (String) header.get("version");
String sign = (String) header.get("sign");
if (!ctripDecryptUtil.verifySign(accountId, serviceName, requestTime, bodyJson, version, sign)) {
log.error("签名验证失败,但继续处理业务逻辑");
log.error("期望签名: {}, 计算签名: {}", sign, ctripDecryptUtil.generateSign(accountId, serviceName, requestTime, bodyJson, version));
// 临时跳过签名验证,继续处理业务逻辑
// return Result.succeed(false);
}
// 从body中提取订单信息
String otaOrderId = (String) body.get("otaOrderId");
String sequenceId = (String) body.get("sequenceId");
log.info("提取到订单信息 - otaOrderId: {}, sequenceId: {}", otaOrderId, sequenceId);
// 提取联系人信息
@SuppressWarnings("unchecked")
List<Map<String, Object>> contacts = (List<Map<String, Object>>) body.get("contacts");
String userPhone = null;
if (contacts != null && !contacts.isEmpty()) {
Map<String, Object> contact = contacts.get(0);
userPhone = (String) contact.get("mobile");
log.info("从联系人中提取到手机号: {}", userPhone);
}
// 提取乘客信息
@SuppressWarnings("unchecked")
List<Map<String, Object>> items = (List<Map<String, Object>>) body.get("items");
if (items != null && !items.isEmpty()) {
Map<String, Object> item = items.get(0);
@SuppressWarnings("unchecked")
List<Map<String, Object>> passengers = (List<Map<String, Object>>) item.get("passengers");
if (passengers != null && !passengers.isEmpty() && userPhone == null) {
Map<String, Object> passenger = passengers.get(0);
userPhone = (String) passenger.get("mobile");
log.info("从乘客中提取到手机号: {}", userPhone);
}
}
// 参数验证
if (otaOrderId == null || userPhone == null) {
log.error("参数不完整 - otaOrderId: {}, userPhone: {}", otaOrderId, userPhone);
return Result.succeed(false);
}
// 生成携程优惠券ID(使用订单ID作为唯一标识)
String ctripCouponId = "CTRIP_" + otaOrderId;
// 幂等校验
if (couponService.existsByUserPhoneAndCtripCouponId(userPhone, ctripCouponId)) {
log.info("携程优惠券已存在,userPhone: {}, ctripCouponId: {}", userPhone, ctripCouponId);
return Result.succeed(true);
}
// 创建优惠券(使用默认值)
String couponName = "携程订单优惠券";
Integer couponType = 1; // 满减券
BigDecimal amount = new BigDecimal("50.00"); // 默认50元优惠券
BigDecimal minAmount = new BigDecimal("100.00"); // 满100可用
Integer discountRate = null;
// 设置有效期(从当前时间开始,30天有效期)
Calendar cal = Calendar.getInstance();
Date validStartTime = cal.getTime();
cal.add(Calendar.DAY_OF_MONTH, 30);
Date validEndTime = cal.getTime();
// 创建优惠券
boolean success = couponService.createCouponFromCtrip(
ctripCouponId, userPhone, couponName, couponType, amount,
minAmount, discountRate, validStartTime, validEndTime
);
if (success) {
log.info("携程优惠券创建成功,userPhone: {}, ctripCouponId: {}, otaOrderId: {}",
userPhone, ctripCouponId, otaOrderId);
return Result.succeed(true);
} else {
log.error("携程优惠券创建失败,userPhone: {}, ctripCouponId: {}", userPhone, ctripCouponId);
return Result.succeed(false);
}
} catch (Exception e) {
log.error("处理携程创建优惠券请求异常", e);
return Result.succeed(false);
}
}
/**
* 核销携程优惠券接口
* 用户使用优惠券时调用,验证优惠券有效性并核销
*
* 实际请求格式:
* {
* "header": {
* "accountId": "供应商账号",
* "serviceName": "VerifyCoupon",
* "requestTime": "2025-08-07 03:36:11",
* "version": "1.0",
* "sign": "签名"
* },
* "body": {
* "userPhone": "用户手机号",
* "orderNo": "订单号",
* "orderAmount": 订单金额
* }
* }
*/
@Operation(summary = "核销携程优惠券")
@PostMapping("/verify")
public Result<Boolean> verifyCtripCoupon(@RequestBody Map<String, Object> request,
jakarta.servlet.http.HttpServletRequest httpRequest) {
log.info("收到携程核销优惠券请求,IP: {}", httpRequest.getRemoteAddr());
try {
// 解析携程标准请求格式
@SuppressWarnings("unchecked")
Map<String, Object> header = (Map<String, Object>) request.get("header");
Object bodyObj = request.get("body");
if (header == null || bodyObj == null) {
log.error("请求格式错误,缺少header或body");
return Result.succeed(false);
}
// 处理body,可能是字符串或对象
Map<String, Object> body;
String bodyJson;
if (bodyObj instanceof String) {
// body是字符串,可能是加密的或JSON字符串
String bodyStr = (String) bodyObj;
log.info("body是字符串类型,长度: {}", bodyStr.length());
// 尝试解密
String decryptedBody = ctripDecryptUtil.decryptAES(bodyStr);
if (decryptedBody != null) {
// 解密成功,解析JSON
body = objectMapper.readValue(decryptedBody, Map.class);
bodyJson = decryptedBody;
log.info("body解密成功");
} else {
// 解密失败,尝试直接解析JSON
try {
body = objectMapper.readValue(bodyStr, Map.class);
bodyJson = bodyStr;
log.info("body直接解析JSON成功");
} catch (Exception e) {
log.error("body既不是有效的加密数据也不是有效的JSON: {}", e.getMessage());
return Result.succeed(false);
}
}
} else if (bodyObj instanceof Map) {
// body是对象
body = (Map<String, Object>) bodyObj;
bodyJson = objectMapper.writeValueAsString(body);
log.info("body是对象类型");
} else {
log.error("body类型不支持: {}", bodyObj.getClass().getName());
return Result.succeed(false);
}
// 验证签名
String accountId = (String) header.get("accountId");
String serviceName = (String) header.get("serviceName");
String requestTime = (String) header.get("requestTime");
String version = (String) header.get("version");
String sign = (String) header.get("sign");
if (!ctripDecryptUtil.verifySign(accountId, serviceName, requestTime, bodyJson, version, sign)) {
log.error("签名验证失败,但继续处理业务逻辑");
log.error("期望签名: {}, 计算签名: {}", sign, ctripDecryptUtil.generateSign(accountId, serviceName, requestTime, bodyJson, version));
// 临时跳过签名验证,继续处理业务逻辑
// return Result.succeed(false);
}
// 提取业务参数
String userPhone = (String) body.get("userPhone");
String orderNo = (String) body.get("orderNo");
BigDecimal orderAmount = null;
if (body.get("orderAmount") != null) {
orderAmount = new BigDecimal(body.get("orderAmount").toString());
}
// 参数验证
if (userPhone == null || orderNo == null) {
log.error("参数不完整 - userPhone: {}, orderNo: {}", userPhone, orderNo);
return Result.succeed(false);
}
// 先根据用户手机号选择最优优惠券
Coupon selectedCoupon = couponService.selectBestCoupon(userPhone, orderAmount);
if (selectedCoupon == null) {
log.warn("用户无可用优惠券,userPhone: {}, orderAmount: {}", userPhone, orderAmount);
return Result.succeed(false);
}
// 使用携程优惠券ID进行核销
boolean success = couponService.verifyCtripCoupon(selectedCoupon.getCtripCouponId(), orderNo);
if (success) {
log.info("携程优惠券核销成功,userPhone: {}, orderNo: {}", userPhone, orderNo);
return Result.succeed(true);
} else {
log.error("携程优惠券核销失败,userPhone: {}, orderNo: {}", userPhone, orderNo);
return Result.succeed(false);
}
} catch (Exception e) {
log.error("处理携程核销优惠券请求异常", e);
return Result.succeed(false);
}
}
/**
* 携程取消优惠券接口
* 携程订单取消时回调,取消相关优惠券
*
* 实际请求格式:
* {
* "header": {
* "accountId": "供应商账号",
* "serviceName": "CancelCoupon",
* "requestTime": "2025-08-07 03:36:11",
* "version": "1.0",
* "sign": "签名"
* },
* "body": {
* "userPhone": "用户手机号",
* "ctripCouponId": "携程优惠券ID",
* "reason": "取消原因"
* }
* }
*/
@Operation(summary = "携程取消优惠券接口")
@PostMapping("/cancel")
public Result<Boolean> cancelCouponFromCtrip(@RequestBody Map<String, Object> request,
jakarta.servlet.http.HttpServletRequest httpRequest) {
log.info("收到携程取消优惠券请求,IP: {}", httpRequest.getRemoteAddr());
try {
// 解析携程标准请求格式
@SuppressWarnings("unchecked")
Map<String, Object> header = (Map<String, Object>) request.get("header");
Object bodyObj = request.get("body");
if (header == null || bodyObj == null) {
log.error("请求格式错误,缺少header或body");
return Result.succeed(false);
}
// 处理body,可能是字符串或对象
Map<String, Object> body;
String bodyJson;
if (bodyObj instanceof String) {
// body是字符串,可能是加密的或JSON字符串
String bodyStr = (String) bodyObj;
log.info("body是字符串类型,长度: {}", bodyStr.length());
// 尝试解密
String decryptedBody = ctripDecryptUtil.decryptAES(bodyStr);
if (decryptedBody != null) {
// 解密成功,解析JSON
body = objectMapper.readValue(decryptedBody, Map.class);
bodyJson = decryptedBody;
log.info("body解密成功");
} else {
// 解密失败,尝试直接解析JSON
try {
body = objectMapper.readValue(bodyStr, Map.class);
bodyJson = bodyStr;
log.info("body直接解析JSON成功");
} catch (Exception e) {
log.error("body既不是有效的加密数据也不是有效的JSON: {}", e.getMessage());
return Result.succeed(false);
}
}
} else if (bodyObj instanceof Map) {
// body是对象
body = (Map<String, Object>) bodyObj;
bodyJson = objectMapper.writeValueAsString(body);
log.info("body是对象类型");
} else {
log.error("body类型不支持: {}", bodyObj.getClass().getName());
return Result.succeed(false);
}
// 验证签名
String accountId = (String) header.get("accountId");
String serviceName = (String) header.get("serviceName");
String requestTime = (String) header.get("requestTime");
String version = (String) header.get("version");
String sign = (String) header.get("sign");
if (!ctripDecryptUtil.verifySign(accountId, serviceName, requestTime, bodyJson, version, sign)) {
log.error("签名验证失败,但继续处理业务逻辑");
log.error("期望签名: {}, 计算签名: {}", sign, ctripDecryptUtil.generateSign(accountId, serviceName, requestTime, bodyJson, version));
// 临时跳过签名验证,继续处理业务逻辑
// return Result.succeed(false);
}
// 提取业务参数
String userPhone = (String) body.get("userPhone");
String ctripCouponId = (String) body.get("ctripCouponId");
String reason = (String) body.get("reason");
// 参数验证
if (userPhone == null) {
log.error("参数不完整 - userPhone: {}", userPhone);
return Result.succeed(false);
}
// 调用携程API取消优惠券
boolean success = ctripApiService.cancelCoupon(ctripCouponId, userPhone, reason);
if (success) {
log.info("携程优惠券取消成功,userPhone: {}, ctripCouponId: {}", userPhone, ctripCouponId);
return Result.succeed(true);
} else {
log.error("携程优惠券取消失败,userPhone: {}, ctripCouponId: {}", userPhone, ctripCouponId);
return Result.succeed(false);
}
} catch (Exception e) {
log.error("处理携程取消优惠券请求异常", e);
return Result.succeed(false);
}
}
/**
* 查询携程优惠券状态
*
* 路径参数:
* - ctripCouponId: 携程优惠券ID
*/
@Operation(summary = "查询携程优惠券状态")
@GetMapping("/status/{ctripCouponId}")
public Result<Map<String, Object>> getCtripCouponStatus(@PathVariable String ctripCouponId) {
log.info("查询携程优惠券状态,ctripCouponId: {}", ctripCouponId);
try {
if (ctripCouponId == null || ctripCouponId.trim().isEmpty()) {
log.error("携程优惠券ID不能为空");
return Result.succeed(null);
}
Coupon coupon = couponService.getByCtripCouponId(ctripCouponId);
if (coupon == null) {
log.warn("优惠券不存在,ctripCouponId: {}", ctripCouponId);
return Result.succeed(null);
}
Map<String, Object> status = Map.of(
"ctripCouponId", coupon.getCtripCouponId(),
"status", coupon.getStatus(),
"statusText", getStatusText(coupon.getStatus()),
"userPhone", coupon.getUserPhone(),
"amount", coupon.getAmount(),
"validStartTime", coupon.getValidStartTime(),
"validEndTime", coupon.getValidEndTime(),
"usedTime", coupon.getUsedTime(),
"usedOrderNo", coupon.getUsedOrderNo()
);
return Result.succeed(status);
} catch (Exception e) {
log.error("查询携程优惠券状态失败", e);
return Result.succeed(null);
}
}
/**
* 解析日期字符串
* 支持 yyyy-MM-dd 或 yyyy-MM-dd HH:mm:ss 格式
*/
private Date parseDate(String dateStr) {
try {
if (dateStr == null || dateStr.trim().isEmpty()) {
return null;
}
if (dateStr.length() == 10) {
// yyyy-MM-dd 格式
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
return sdf.parse(dateStr);
} else if (dateStr.length() == 19) {
// yyyy-MM-dd HH:mm:ss 格式
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.parse(dateStr);
} else {
log.error("不支持的日期格式: {}", dateStr);
return null;
}
} catch (Exception e) {
log.error("日期解析失败: {}", dateStr, e);
return null;
}
}
/**
* 获取状态文本
*/
private String getStatusText(Integer status) {
switch (status) {
case 0: return "未使用";
case 1: return "已使用";
case 2: return "已过期";
case 3: return "已作废";
default: return "未知状态";
}
}
/**
* 测试接口 - 明文创建优惠券(仅用于开发测试)
*/
@Operation(summary = "测试接口 - 明文创建优惠券")
@PostMapping("/test/create")
public Result<Boolean> testCreateCoupon(@RequestBody Map<String, Object> request) {
log.info("收到测试创建优惠券请求");
try {
// 提取请求参数
String ctripCouponId = (String) request.get("ctripCouponId");
String userPhone = (String) request.get("userPhone");
String couponName = (String) request.get("couponName");
Integer couponType = (Integer) request.get("couponType");
BigDecimal amount = null;
if (request.get("amount") != null) {
amount = new BigDecimal(request.get("amount").toString());
}
BigDecimal minAmount = null;
if (request.get("minAmount") != null) {
minAmount = new BigDecimal(request.get("minAmount").toString());
}
Integer discountRate = (Integer) request.get("discountRate");
String validStartTimeStr = (String) request.get("validStartTime");
String validEndTimeStr = (String) request.get("validEndTime");
// 参数验证
if (ctripCouponId == null || userPhone == null || couponName == null ||
couponType == null || amount == null || validStartTimeStr == null || validEndTimeStr == null) {
log.error("参数不完整 - ctripCouponId: {}, userPhone: {}, couponName: {}, couponType: {}, amount: {}, validStartTime: {}, validEndTime: {}",
ctripCouponId, userPhone, couponName, couponType, amount, validStartTimeStr, validEndTimeStr);
return Result.succeed(false);
}
// 幂等校验
if (couponService.existsByUserPhoneAndCtripCouponId(userPhone, ctripCouponId)) {
log.info("携程优惠券已存在,userPhone: {}, ctripCouponId: {}", userPhone, ctripCouponId);
return Result.succeed(true);
}
// 时间解析
Date validStartTime = parseDate(validStartTimeStr);
Date validEndTime = parseDate(validEndTimeStr);
if (validStartTime == null || validEndTime == null) {
log.error("时间格式错误 - validStartTime: {}, validEndTime: {}", validStartTimeStr, validEndTimeStr);
return Result.succeed(false);
}
// 创建优惠券
boolean success = couponService.createCouponFromCtrip(
ctripCouponId, userPhone, couponName, couponType, amount,
minAmount, discountRate, validStartTime, validEndTime
);
if (success) {
log.info("测试优惠券创建成功,userPhone: {}, ctripCouponId: {}", userPhone, ctripCouponId);
return Result.succeed(true);
} else {
log.error("测试优惠券创建失败,userPhone: {}, ctripCouponId: {}", userPhone, ctripCouponId);
return Result.succeed(false);
}
} catch (Exception e) {
log.error("处理测试创建优惠券请求异常", e);
return Result.succeed(false);
}
}
/**
* 测试接口 - 明文核销优惠券(仅用于开发测试)
*/
@Operation(summary = "测试接口 - 明文核销优惠券")
@PostMapping("/test/verify")
public Result<Boolean> testVerifyCoupon(@RequestBody Map<String, Object> request) {
log.info("收到测试核销优惠券请求");
try {
// 提取业务参数
String userPhone = (String) request.get("userPhone");
String orderNo = (String) request.get("orderNo");
BigDecimal orderAmount = null;
if (request.get("orderAmount") != null) {
orderAmount = new BigDecimal(request.get("orderAmount").toString());
}
// 参数验证
if (userPhone == null || orderNo == null) {
log.error("参数不完整 - userPhone: {}, orderNo: {}", userPhone, orderNo);
return Result.succeed(false);
}
// 先根据用户手机号选择最优优惠券
Coupon selectedCoupon = couponService.selectBestCoupon(userPhone, orderAmount);
if (selectedCoupon == null) {
log.warn("用户无可用优惠券,userPhone: {}, orderAmount: {}", userPhone, orderAmount);
return Result.succeed(false);
}
// 使用携程优惠券ID进行核销
boolean success = couponService.verifyCtripCoupon(selectedCoupon.getCtripCouponId(), orderNo);
if (success) {
log.info("测试优惠券核销成功,userPhone: {}, orderNo: {}", userPhone, orderNo);
return Result.succeed(true);
} else {
log.error("测试优惠券核销失败,userPhone: {}, orderNo: {}", userPhone, orderNo);
return Result.succeed(false);
}
} catch (Exception e) {
log.error("处理测试核销优惠券请求异常", e);
return Result.succeed(false);
}
}
/**
* 测试接口 - 验证签名计算(仅用于开发测试)
*/
@Operation(summary = "测试接口 - 验证签名计算")
@PostMapping("/test/sign")
public Result<Map<String, Object>> testSignCalculation(@RequestBody Map<String, Object> request) {
log.info("收到签名测试请求");
try {
// 提取参数
String accountId = (String) request.get("accountId");
String serviceName = (String) request.get("serviceName");
String requestTime = (String) request.get("requestTime");
String body = (String) request.get("body");
String version = (String) request.get("version");
String expectedSign = (String) request.get("expectedSign");
// 计算签名
String calculatedSign = ctripDecryptUtil.testSignCalculation(accountId, serviceName, requestTime, body, version);
// 验证签名
boolean isValid = calculatedSign != null && calculatedSign.equalsIgnoreCase(expectedSign);
Map<String, Object> result = new java.util.HashMap<>();
result.put("isValid", isValid);
result.put("calculatedSign", calculatedSign);
result.put("expectedSign", expectedSign);
result.put("accountId", accountId);
result.put("serviceName", serviceName);
result.put("requestTime", requestTime);
result.put("body", body);
result.put("version", version);
log.info("签名测试结果: {}", result);
return Result.succeed(result);
} catch (Exception e) {
log.error("签名测试失败", e);
return Result.succeed(null);
}
}
/**
* 测试接口 - AES加密解密测试(仅用于开发测试)
*/
@Operation(summary = "测试接口 - AES加密解密测试")
@PostMapping("/test/aes")
public Result<Map<String, Object>> testAESEncryption(@RequestBody Map<String, Object> request) {
log.info("收到AES测试请求");
try {
String plainData = (String) request.get("plainData");
if (plainData == null) {
return Result.succeed(null);
}
Map<String, Object> result = ctripDecryptUtil.testAESEncryption(plainData);
return Result.succeed(result);
} catch (Exception e) {
log.error("AES测试失败", e);
return Result.succeed(null);
}
}
/**
* 测试接口 - AES配置验证(仅用于开发测试)
*/
@Operation(summary = "测试接口 - AES配置验证")
@PostMapping("/test/aes-config")
public Result<Map<String, Object>> testAESConfig() {
log.info("收到AES配置验证请求");
try {
Map<String, Object> result = ctripDecryptUtil.validateAESConfig();
return Result.succeed(result);
} catch (Exception e) {
log.error("AES配置验证失败", e);
return Result.succeed(null);
}
}
/**
* 测试接口 - 验证实际请求数据(仅用于开发测试)
*/
@Operation(summary = "测试接口 - 验证实际请求数据")
@PostMapping("/test/real-request")
public Result<Map<String, Object>> testRealRequest(@RequestBody Map<String, Object> request) {
log.info("收到实际请求数据测试");
try {
// 解析请求格式
@SuppressWarnings("unchecked")
Map<String, Object> header = (Map<String, Object>) request.get("header");
Object bodyObj = request.get("body");
Map<String, Object> result = new java.util.HashMap<>();
result.put("header", header);
result.put("bodyType", bodyObj.getClass().getName());
if (bodyObj instanceof String) {
String bodyStr = (String) bodyObj;
result.put("bodyLength", bodyStr.length());
// 尝试解密
String decryptedBody = ctripDecryptUtil.decryptAES(bodyStr);
if (decryptedBody != null) {
result.put("decryptedBody", decryptedBody);
result.put("decryptSuccess", true);
// 解析JSON
try {
@SuppressWarnings("unchecked")
Map<String, Object> body = objectMapper.readValue(decryptedBody, Map.class);
result.put("parsedBody", body);
result.put("parseSuccess", true);
// 提取关键信息
String otaOrderId = (String) body.get("otaOrderId");
result.put("otaOrderId", otaOrderId);
// 提取手机号
String userPhone = null;
@SuppressWarnings("unchecked")
List<Map<String, Object>> contacts = (List<Map<String, Object>>) body.get("contacts");
if (contacts != null && !contacts.isEmpty()) {
userPhone = (String) contacts.get(0).get("mobile");
}
result.put("userPhone", userPhone);
} catch (Exception e) {
result.put("parseSuccess", false);
result.put("parseError", e.getMessage());
}
} else {
result.put("decryptSuccess", false);
}
} else {
result.put("body", bodyObj);
}
return Result.succeed(result);
} catch (Exception e) {
log.error("测试实际请求数据失败", e);
return Result.succeed(null);
}
}
}
@@ -1,143 +0,0 @@
package com.central.coupon.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
/**
* 优惠券实体类
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_coupon")
public class Coupon implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 优惠券编号
*/
private String couponNo;
/**
* 优惠券名称
*/
private String couponName;
/**
* 优惠券类型:1-满减券,2-折扣券,3-免费券
*/
private Integer couponType;
/**
* 优惠券面额
*/
private BigDecimal amount;
/**
* 使用门槛金额
*/
private BigDecimal minAmount;
/**
* 折扣率(0-100,折扣券时使用)
*/
private Integer discountRate;
/**
* 优惠券状态:0-未使用,1-已使用,2-已过期,3-已作废
*/
private Integer status;
/**
* 用户手机号
*/
private String userPhone;
/**
* 用户ID
*/
private Long userId;
/**
* 来源:1-携程,2-高飞自建
*/
private Integer source;
/**
* 携程优惠券ID(来源为携程时使用)
*/
private String ctripCouponId;
/**
* 有效期开始时间
*/
private Date validStartTime;
/**
* 有效期结束时间
*/
private Date validEndTime;
/**
* 使用时间
*/
private Date usedTime;
/**
* 使用订单号
*/
private String usedOrderNo;
/**
* 退券时间
*/
private Date cancelTime;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private Date createTime;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateTime;
/**
* 创建人
*/
private String createBy;
/**
* 更新人
*/
private String updateBy;
/**
* 备注
*/
private String remark;
/**
* 租户ID
*/
private String tenantId;
}
@@ -1,113 +0,0 @@
package com.central.coupon.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* 携程核销表
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_ctrip_consumed")
public class CtripConsumed implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 携程订单号
*/
private String otaOrderId;
/**
* 供应商订单号
*/
private String supplierOrderId;
/**
* 携程批次流水号
*/
private String sequenceId;
/**
* 订单项编号
*/
private String itemId;
/**
* 实际使用开始日期
*/
private LocalDate useStartDate;
/**
* 实际使用结束日期
*/
private LocalDate useEndDate;
/**
* 订单总份数
*/
private Integer totalQuantity;
/**
* 订单已核销总份数
*/
private Integer useQuantity;
/**
* 备注信息
*/
private String remark;
/**
* 实际损失金额
*/
private BigDecimal lostAmount;
/**
* 实际损失金额单位
*/
private String lostAmountCurrency;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime;
/**
* 创建人
*/
private String createBy;
/**
* 更新人
*/
private String updateBy;
/**
* 租户ID
*/
private String tenantId;
}
@@ -1,61 +0,0 @@
package com.central.coupon.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 携程核销乘客表
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_ctrip_consumed_passenger")
public class CtripConsumedPassenger implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 核销ID
*/
private Long consumedId;
/**
* 乘客ID
*/
private String passengerId;
/**
* 乘客姓名
*/
private String passengerName;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime;
/**
* 是否删除:0-未删除,1-已删除
*/
private Integer deleted;
}
@@ -1,61 +0,0 @@
package com.central.coupon.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 携程核销凭证表
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_ctrip_consumed_voucher")
public class CtripConsumedVoucher implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 核销ID
*/
private Long consumedId;
/**
* 凭证编号
*/
private String voucherId;
/**
* 凭证码
*/
private String voucherCode;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime;
/**
* 是否删除:0-未删除,1-已删除
*/
private Integer deleted;
}
@@ -1,71 +0,0 @@
package com.central.coupon.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 携程联系人信息表
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_ctrip_contact")
public class CtripContact implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 订单ID
*/
private Long orderId;
/**
* 联系人姓名
*/
private String name;
/**
* 联系人电话
*/
private String mobile;
/**
* 联系人邮箱
*/
private String email;
/**
* 联系人类型:BOOKER-预订人,CONTACT-联系人
*/
private String contactType;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime;
/**
* 是否删除:0-未删除,1-已删除
*/
private Integer deleted;
}
@@ -1,87 +0,0 @@
package com.central.coupon.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 携程优惠券信息表
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_ctrip_coupon")
public class CtripCoupon implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 订单ID
*/
private Long orderId;
/**
* 优惠券类型
*/
private String couponType;
/**
* 优惠券代码
*/
private String couponCode;
/**
* 优惠券名称
*/
private String couponName;
/**
* 优惠券金额
*/
private BigDecimal couponAmount;
/**
* 货币类型
*/
private String currency;
/**
* 优惠券状态:1-有效,2-已使用,3-已过期
*/
private Integer couponStatus;
/**
* 使用时间
*/
private LocalDateTime useTime;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime;
/**
* 是否删除:0-未删除,1-已删除
*/
private Integer deleted;
}
@@ -1,102 +0,0 @@
package com.central.coupon.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 携程订单表
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_ctrip_order")
public class CtripOrder implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 携程订单号
*/
private String otaOrderId;
/**
* 供应商订单号
*/
private String supplierOrderId;
/**
* 携程批次流水号
*/
private String sequenceId;
/**
* 确认类型:1-仅通知,2-需确认
*/
private Integer confirmType;
/**
* 最晚确认时间
*/
private LocalDateTime orderLastConfirmTime;
/**
* 订单状态:0-待确认,1-已确认,2-已取消,3-已过期
*/
private Integer status;
/**
* 订单总金额
*/
private BigDecimal totalAmount;
/**
* 货币类型
*/
private String currency;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime;
/**
* 创建人
*/
private String createBy;
/**
* 更新人
*/
private String updateBy;
/**
* 备注
*/
private String remark;
/**
* 租户ID
*/
private String tenantId;
}
@@ -1,98 +0,0 @@
package com.central.coupon.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* 携程订单项表
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_ctrip_order_item")
public class CtripOrderItem implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 订单ID
*/
private Long orderId;
/**
* 订单项编号
*/
private String itemId;
/**
* 订单项名称
*/
private String itemName;
/**
* 订单项类型
*/
private String itemType;
/**
* 数量
*/
private Integer quantity;
/**
* 单价
*/
private BigDecimal unitPrice;
/**
* 总价
*/
private BigDecimal totalPrice;
/**
* 货币类型
*/
private String currency;
/**
* 使用开始日期
*/
private LocalDate useStartDate;
/**
* 使用结束日期
*/
private LocalDate useEndDate;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime;
/**
* 是否删除:0-未删除,1-已删除
*/
private Integer deleted;
}
@@ -1,87 +0,0 @@
package com.central.coupon.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* 携程乘客信息表
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_ctrip_passenger")
public class CtripPassenger implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 订单ID
*/
private Long orderId;
/**
* 订单项编号
*/
private String itemId;
/**
* 乘客ID
*/
private String passengerId;
/**
* 乘客姓名
*/
private String passengerName;
/**
* 乘客类型:ADULT-成人,CHILD-儿童,INFANT-婴儿
*/
private String passengerType;
/**
* 证件类型:ID_CARD-身份证,PASSPORT-护照
*/
private String idType;
/**
* 证件号码
*/
private String idNumber;
/**
* 手机号码
*/
private String phone;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime;
/**
* 是否删除:0-未删除,1-已删除
*/
private Integer deleted;
}
@@ -1,107 +0,0 @@
package com.central.coupon.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 携程退款表
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_ctrip_refund")
public class CtripRefund implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 携程订单号
*/
private String otaOrderId;
/**
* 供应商订单号
*/
private String supplierOrderId;
/**
* 携程批次流水号
*/
private String sequenceId;
/**
* 退款金额
*/
private BigDecimal refundAmount;
/**
* 货币类型
*/
private String currency;
/**
* 退款状态:0-待确认,1-已确认,2-已拒绝
*/
private Integer refundStatus;
/**
* 确认结果码
*/
private String confirmResultCode;
/**
* 确认结果信息
*/
private String confirmResultMessage;
/**
* 最晚确认时间
*/
private LocalDateTime lastConfirmTime;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime;
/**
* 创建人
*/
private String createBy;
/**
* 更新人
*/
private String updateBy;
/**
* 备注
*/
private String remark;
/**
* 租户ID
*/
private String tenantId;
}
@@ -1,72 +0,0 @@
package com.central.coupon.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 携程退款项表
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_ctrip_refund_item")
public class CtripRefundItem implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 退款ID
*/
private Long refundId;
/**
* 订单项编号
*/
private String itemId;
/**
* 供应商产品最小单位
*/
private String plu;
/**
* 退款金额
*/
private BigDecimal refundAmount;
/**
* 货币类型
*/
private String currency;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime;
/**
* 是否删除:0-未删除,1-已删除
*/
private Integer deleted;
}
@@ -1,81 +0,0 @@
package com.central.coupon.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 携程凭证信息表
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_ctrip_voucher")
public class CtripVoucher implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 订单ID
*/
private Long orderId;
/**
* 订单项编号
*/
private String itemId;
/**
* 凭证编号
*/
private String voucherId;
/**
* 凭证码
*/
private String voucherCode;
/**
* 凭证类型
*/
private String voucherType;
/**
* 凭证状态:1-未使用,2-已使用,3-已过期
*/
private Integer voucherStatus;
/**
* 使用时间
*/
private LocalDateTime useTime;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private LocalDateTime updateTime;
/**
* 是否删除:0-未删除,1-已删除
*/
private Integer deleted;
}
@@ -1,123 +0,0 @@
package com.central.coupon.exception;
import com.central.common.model.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
/**
* 全局异常处理器
*/
@Slf4j
@RestControllerAdvice
public class GlobalExceptionHandler {
/**
* 优惠券不存在异常
*/
@ExceptionHandler(CouponNotFoundException.class)
public Result<String> handleCouponNotFoundException(CouponNotFoundException e) {
log.error("优惠券不存在异常", e);
return Result.failed("COUPON_NOT_FOUND", e.getMessage());
}
/**
* 优惠券状态不正确异常
*/
@ExceptionHandler(CouponInvalidException.class)
public Result<String> handleCouponInvalidException(CouponInvalidException e) {
log.error("优惠券状态不正确异常", e);
return Result.failed("COUPON_INVALID", e.getMessage());
}
/**
* 优惠券已过期异常
*/
@ExceptionHandler(CouponExpiredException.class)
public Result<String> handleCouponExpiredException(CouponExpiredException e) {
log.error("优惠券已过期异常", e);
return Result.failed("COUPON_EXPIRED", e.getMessage());
}
/**
* 优惠券使用条件不满足异常
*/
@ExceptionHandler(CouponUsageException.class)
public Result<String> handleCouponUsageException(CouponUsageException e) {
log.error("优惠券使用条件不满足异常", e);
return Result.failed("COUPON_USAGE_ERROR", e.getMessage());
}
/**
* 携程核销失败异常
*/
@ExceptionHandler(CouponVerifyException.class)
public Result<String> handleCouponVerifyException(CouponVerifyException e) {
log.error("携程核销失败异常", e);
return Result.failed("COUPON_VERIFY_FAILED", e.getMessage());
}
/**
* 优惠券更新失败异常
*/
@ExceptionHandler(CouponUpdateException.class)
public Result<String> handleCouponUpdateException(CouponUpdateException e) {
log.error("优惠券更新失败异常", e);
return Result.failed("COUPON_UPDATE_FAILED", e.getMessage());
}
/**
* 参数验证异常
*/
@ExceptionHandler(IllegalArgumentException.class)
public Result<String> handleIllegalArgumentException(IllegalArgumentException e) {
log.error("参数验证异常", e);
return Result.failed("PARAM_ERROR", e.getMessage());
}
/**
* 系统异常
*/
@ExceptionHandler(Exception.class)
public Result<String> handleException(Exception e) {
log.error("系统异常", e);
return Result.failed("SYSTEM_ERROR", "系统异常:" + e.getMessage());
}
// 自定义异常类
public static class CouponNotFoundException extends RuntimeException {
public CouponNotFoundException(String message) {
super(message);
}
}
public static class CouponInvalidException extends RuntimeException {
public CouponInvalidException(String message) {
super(message);
}
}
public static class CouponExpiredException extends RuntimeException {
public CouponExpiredException(String message) {
super(message);
}
}
public static class CouponUsageException extends RuntimeException {
public CouponUsageException(String message) {
super(message);
}
}
public static class CouponVerifyException extends RuntimeException {
public CouponVerifyException(String message) {
super(message);
}
}
public static class CouponUpdateException extends RuntimeException {
public CouponUpdateException(String message) {
super(message);
}
}
}
@@ -1,59 +0,0 @@
package com.central.coupon.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.central.coupon.entity.Coupon;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;
/**
* 优惠券Mapper接口
*/
@Mapper
public interface CouponMapper extends BaseMapper<Coupon> {
/**
* 分页查询优惠券列表
*/
IPage<Coupon> selectCouponPage(Page<Coupon> page, @Param("coupon") Coupon coupon);
/**
* 根据手机号查询用户优惠券
*/
List<Coupon> selectByUserPhone(@Param("userPhone") String userPhone);
/**
* 根据手机号查询可用优惠券
*/
List<Coupon> selectAvailableByUserPhone(@Param("userPhone") String userPhone);
/**
* 根据携程优惠券ID查询
*/
Coupon selectByCtripCouponId(@Param("ctripCouponId") String ctripCouponId);
/**
* 根据订单号查询使用的优惠券
*/
Coupon selectByUsedOrderNo(@Param("usedOrderNo") String usedOrderNo);
/**
* 更新优惠券状态为已使用
*/
int updateCouponUsed(@Param("id") Long id, @Param("usedOrderNo") String usedOrderNo);
/**
* 批量更新过期优惠券状态
*/
int updateExpiredCoupons();
/**
* 检查用户手机号和携程优惠券ID是否已存在
*/
int countByUserPhoneAndCtripCouponId(@Param("userPhone") String userPhone, @Param("ctripCouponId") String ctripCouponId);
}
@@ -1,39 +0,0 @@
package com.central.coupon.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.central.coupon.entity.CtripConsumed;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 携程核销Mapper接口
*/
@Mapper
public interface CtripConsumedMapper extends BaseMapper<CtripConsumed> {
/**
* 根据携程订单号查询核销记录
*
* @param otaOrderId 携程订单号
* @return 核销记录列表
*/
List<CtripConsumed> selectByOtaOrderId(@Param("otaOrderId") String otaOrderId);
/**
* 根据供应商订单号查询核销记录
*
* @param supplierOrderId 供应商订单号
* @return 核销记录列表
*/
List<CtripConsumed> selectBySupplierOrderId(@Param("supplierOrderId") String supplierOrderId);
/**
* 根据批次流水号查询核销记录
*
* @param sequenceId 批次流水号
* @return 核销记录
*/
CtripConsumed selectBySequenceId(@Param("sequenceId") String sequenceId);
}
@@ -1,31 +0,0 @@
package com.central.coupon.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.central.coupon.entity.CtripConsumedPassenger;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 携程核销乘客Mapper接口
*/
@Mapper
public interface CtripConsumedPassengerMapper extends BaseMapper<CtripConsumedPassenger> {
/**
* 根据核销ID查询乘客列表
*
* @param consumedId 核销ID
* @return 乘客列表
*/
List<CtripConsumedPassenger> selectByConsumedId(@Param("consumedId") Long consumedId);
/**
* 根据乘客ID查询核销乘客记录
*
* @param passengerId 乘客ID
* @return 核销乘客记录列表
*/
List<CtripConsumedPassenger> selectByPassengerId(@Param("passengerId") String passengerId);
}
@@ -1,31 +0,0 @@
package com.central.coupon.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.central.coupon.entity.CtripConsumedVoucher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 携程核销凭证Mapper接口
*/
@Mapper
public interface CtripConsumedVoucherMapper extends BaseMapper<CtripConsumedVoucher> {
/**
* 根据核销ID查询凭证列表
*
* @param consumedId 核销ID
* @return 凭证列表
*/
List<CtripConsumedVoucher> selectByConsumedId(@Param("consumedId") Long consumedId);
/**
* 根据凭证编号查询核销凭证记录
*
* @param voucherId 凭证编号
* @return 核销凭证记录列表
*/
List<CtripConsumedVoucher> selectByVoucherId(@Param("voucherId") String voucherId);
}
@@ -1,32 +0,0 @@
package com.central.coupon.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.central.coupon.entity.CtripContact;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 携程联系人Mapper接口
*/
@Mapper
public interface CtripContactMapper extends BaseMapper<CtripContact> {
/**
* 根据订单ID查询联系人列表
*
* @param orderId 订单ID
* @return 联系人列表
*/
List<CtripContact> selectByOrderId(@Param("orderId") Long orderId);
/**
* 根据订单ID和联系人类型查询联系人
*
* @param orderId 订单ID
* @param contactType 联系人类型
* @return 联系人列表
*/
List<CtripContact> selectByOrderIdAndType(@Param("orderId") Long orderId, @Param("contactType") String contactType);
}
@@ -1,40 +0,0 @@
package com.central.coupon.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.central.coupon.entity.CtripCoupon;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 携程优惠券Mapper接口
*/
@Mapper
public interface CtripCouponMapper extends BaseMapper<CtripCoupon> {
/**
* 根据订单ID查询优惠券列表
*
* @param orderId 订单ID
* @return 优惠券列表
*/
List<CtripCoupon> selectByOrderId(@Param("orderId") Long orderId);
/**
* 根据优惠券代码查询优惠券
*
* @param couponCode 优惠券代码
* @return 优惠券信息
*/
CtripCoupon selectByCouponCode(@Param("couponCode") String couponCode);
/**
* 根据订单ID和优惠券状态查询优惠券
*
* @param orderId 订单ID
* @param couponStatus 优惠券状态
* @return 优惠券列表
*/
List<CtripCoupon> selectByOrderIdAndStatus(@Param("orderId") Long orderId, @Param("couponStatus") Integer couponStatus);
}
@@ -1,40 +0,0 @@
package com.central.coupon.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.central.coupon.entity.CtripOrderItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 携程订单项Mapper接口
*/
@Mapper
public interface CtripOrderItemMapper extends BaseMapper<CtripOrderItem> {
/**
* 根据订单ID查询订单项列表
*
* @param orderId 订单ID
* @return 订单项列表
*/
List<CtripOrderItem> selectByOrderId(@Param("orderId") Long orderId);
/**
* 根据订单项编号查询订单项
*
* @param itemId 订单项编号
* @return 订单项信息
*/
CtripOrderItem selectByItemId(@Param("itemId") String itemId);
/**
* 根据订单ID和订单项编号查询订单项
*
* @param orderId 订单ID
* @param itemId 订单项编号
* @return 订单项信息
*/
CtripOrderItem selectByOrderIdAndItemId(@Param("orderId") Long orderId, @Param("itemId") String itemId);
}
@@ -1,37 +0,0 @@
package com.central.coupon.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.central.coupon.entity.CtripOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 携程订单Mapper接口
*/
@Mapper
public interface CtripOrderMapper extends BaseMapper<CtripOrder> {
/**
* 根据携程订单号查询订单
*
* @param otaOrderId 携程订单号
* @return 订单信息
*/
CtripOrder selectByOtaOrderId(@Param("otaOrderId") String otaOrderId);
/**
* 根据供应商订单号查询订单
*
* @param supplierOrderId 供应商订单号
* @return 订单信息
*/
CtripOrder selectBySupplierOrderId(@Param("supplierOrderId") String supplierOrderId);
/**
* 根据流水号查询订单
*
* @param sequenceId 流水号
* @return 订单信息
*/
CtripOrder selectBySequenceId(@Param("sequenceId") String sequenceId);
}
@@ -1,39 +0,0 @@
package com.central.coupon.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.central.coupon.entity.CtripPassenger;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 携程乘客Mapper接口
*/
@Mapper
public interface CtripPassengerMapper extends BaseMapper<CtripPassenger> {
/**
* 根据订单ID查询乘客列表
*
* @param orderId 订单ID
* @return 乘客列表
*/
List<CtripPassenger> selectByOrderId(@Param("orderId") Long orderId);
/**
* 根据订单项编号查询乘客列表
*
* @param itemId 订单项编号
* @return 乘客列表
*/
List<CtripPassenger> selectByItemId(@Param("itemId") String itemId);
/**
* 根据乘客ID查询乘客信息
*
* @param passengerId 乘客ID
* @return 乘客信息
*/
CtripPassenger selectByPassengerId(@Param("passengerId") String passengerId);
}
@@ -1,31 +0,0 @@
package com.central.coupon.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.central.coupon.entity.CtripRefundItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 携程退款项Mapper接口
*/
@Mapper
public interface CtripRefundItemMapper extends BaseMapper<CtripRefundItem> {
/**
* 根据退款ID查询退款项列表
*
* @param refundId 退款ID
* @return 退款项列表
*/
List<CtripRefundItem> selectByRefundId(@Param("refundId") Long refundId);
/**
* 根据订单项编号查询退款项
*
* @param itemId 订单项编号
* @return 退款项列表
*/
List<CtripRefundItem> selectByItemId(@Param("itemId") String itemId);
}
@@ -1,39 +0,0 @@
package com.central.coupon.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.central.coupon.entity.CtripRefund;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 携程退款Mapper接口
*/
@Mapper
public interface CtripRefundMapper extends BaseMapper<CtripRefund> {
/**
* 根据携程订单号查询退款记录
*
* @param otaOrderId 携程订单号
* @return 退款记录列表
*/
List<CtripRefund> selectByOtaOrderId(@Param("otaOrderId") String otaOrderId);
/**
* 根据供应商订单号查询退款记录
*
* @param supplierOrderId 供应商订单号
* @return 退款记录列表
*/
List<CtripRefund> selectBySupplierOrderId(@Param("supplierOrderId") String supplierOrderId);
/**
* 根据批次流水号查询退款记录
*
* @param sequenceId 批次流水号
* @return 退款记录
*/
CtripRefund selectBySequenceId(@Param("sequenceId") String sequenceId);
}
@@ -1,47 +0,0 @@
package com.central.coupon.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.central.coupon.entity.CtripVoucher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 携程凭证Mapper接口
*/
@Mapper
public interface CtripVoucherMapper extends BaseMapper<CtripVoucher> {
/**
* 根据订单ID查询凭证列表
*
* @param orderId 订单ID
* @return 凭证列表
*/
List<CtripVoucher> selectByOrderId(@Param("orderId") Long orderId);
/**
* 根据订单项ID查询凭证列表
*
* @param itemId 订单项ID
* @return 凭证列表
*/
List<CtripVoucher> selectByItemId(@Param("itemId") String itemId);
/**
* 根据凭证编号查询凭证
*
* @param voucherId 凭证编号
* @return 凭证信息
*/
CtripVoucher selectByVoucherId(@Param("voucherId") String voucherId);
/**
* 根据凭证码查询凭证
*
* @param voucherCode 凭证码
* @return 凭证信息
*/
CtripVoucher selectByVoucherCode(@Param("voucherCode") String voucherCode);
}
@@ -1,87 +0,0 @@
package com.central.coupon.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.util.List;
/**
* 携程订单取消确认请求
* 当订单在取消提交后供应商需异步确认进行操作(接受、拒绝)
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class CtripCancelOrderConfirmRequest {
/**
* 请求头
*/
@JsonProperty("header")
private CtripHeader header;
/**
* 请求体 - 可能是加密字符串或JSON对象
*/
@JsonProperty("body")
private Object body;
/**
* 携程请求头
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripHeader {
@JsonProperty("accountId")
private String accountId; // 供应商帐号,由携程分配
@JsonProperty("serviceName")
private String serviceName; // 接口名称: CancelOrderConfirm
@JsonProperty("requestTime")
private String requestTime; // 请求时间(格式: yyyy-MM-dd HH:mm:ss)
@JsonProperty("version")
private String version; // 版本号, 1.0
@JsonProperty("sign")
private String sign; // 签名
}
/**
* 携程订单取消确认体
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripCancelOrderConfirmBody {
@JsonProperty("sequenceId")
private String sequenceId; // 供应商处理批次流水号
@JsonProperty("otaOrderId")
private String otaOrderId; // 携程订单号
@JsonProperty("supplierOrderId")
private String supplierOrderId; // 供应商订单号
@JsonProperty("confirmResultCode")
private String confirmResultCode; // 确认结果返回码
@JsonProperty("confirmResultMessage")
private String confirmResultMessage; // 确认结果信息
@JsonProperty("items")
private List<CtripCancelOrderConfirmItem> items; // 订单项节点
}
/**
* 携程订单取消确认项
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripCancelOrderConfirmItem {
@JsonProperty("itemId")
private String itemId; // 订单项编号
@JsonProperty("vouchers")
private List<CtripVoucher> vouchers; // 已取消的凭证
}
/**
* 携程凭证
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripVoucher {
@JsonProperty("voucherId")
private String voucherId; // 凭证编号
}
}
@@ -1,44 +0,0 @@
package com.central.coupon.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
/**
* 携程订单取消确认响应
* 不接受同批次的取消推送多次不同操作(接受、拒绝)结果给到携程
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class CtripCancelOrderConfirmResponse {
/**
* 返回头
*/
@JsonProperty("header")
private CtripResponseHeader header;
/**
* 处理结果返回码
*/
@JsonProperty("resultCode")
private String resultCode;
/**
* 处理结果返回信息
*/
@JsonProperty("resultMessage")
private String resultMessage;
/**
* 携程返回头
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripResponseHeader {
@JsonProperty("resultCode")
private String resultCode; // 处理结果返回码
@JsonProperty("resultMessage")
private String resultMessage; // 处理结果返回信息
}
}
@@ -1,98 +0,0 @@
package com.central.coupon.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* 携程订单取消请求
* 提供携程与供应商系统进行订单取消操作的接口
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class CtripCancelOrderRequest {
/**
* 请求头
*/
@JsonProperty("header")
private CtripHeader header;
/**
* 请求体 - 可能是加密字符串或JSON对象
*/
@JsonProperty("body")
private Object body;
/**
* 携程请求头
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripHeader {
@JsonProperty("accountId")
private String accountId; // 供应商帐号,由携程分配
@JsonProperty("serviceName")
private String serviceName; // 接口名称: CancelOrder
@JsonProperty("requestTime")
private String requestTime; // 请求时间(格式: yyyy-MM-dd HH:mm:ss)
@JsonProperty("version")
private String version; // 版本号, 1.0
@JsonProperty("sign")
private String sign; // 签名
}
/**
* 携程订单取消体
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripCancelOrderBody {
@JsonProperty("sequenceId")
private String sequenceId; // 携程处理批次流水号
@JsonProperty("otaOrderId")
private String otaOrderId; // 携程订单号
@JsonProperty("supplierOrderId")
private String supplierOrderId; // 供应商订单号
@JsonProperty("confirmType")
private Integer confirmType; // 确认类型:1-仅通知,2-供应商确认
@JsonProperty("items")
private List<CtripCancelOrderItem> items; // 订单项节点
}
/**
* 携程订单取消项
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripCancelOrderItem {
@JsonProperty("itemId")
private String itemId; // 订单项编号
@JsonProperty("PLU")
private String PLU; // 供应商产品最小单位
@JsonProperty("lastConfirmTime")
private String lastConfirmTime; // 供应商最晚确认时间
@JsonProperty("cancelType")
private Integer cancelType; // 退订类型:0-全退,1-按份数部分退,2-按出行人部分退
@JsonProperty("quantity")
private Integer quantity; // 本次请求取消份数
@JsonProperty("passengers")
private List<CtripCancelPassenger> passengers; // 退订出行人节点
@JsonProperty("amount")
private BigDecimal amount; // 被取消的退款金额
@JsonProperty("amountCurrency")
private String amountCurrency; // 被取消的退款金额单位
}
/**
* 携程取消出行人信息
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripCancelPassenger {
@JsonProperty("passengerId")
private String passengerId; // 出行人编号
}
}
@@ -1,85 +0,0 @@
package com.central.coupon.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.util.List;
/**
* 携程订单取消响应
* 当confirmType=2在取消发起时必须验证取消数量等于可退数量
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class CtripCancelOrderResponse {
/**
* 返回头
*/
@JsonProperty("header")
private CtripResponseHeader header;
/**
* 处理结果返回码
*/
@JsonProperty("resultCode")
private String resultCode;
/**
* 处理结果返回信息
*/
@JsonProperty("resultMessage")
private String resultMessage;
/**
* 返回体(传输时该字段需要AES加密)
*/
@JsonProperty("body")
private CtripResponseBody body;
/**
* 携程返回头
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripResponseHeader {
@JsonProperty("resultCode")
private String resultCode; // 处理结果返回码
@JsonProperty("resultMessage")
private String resultMessage; // 处理结果返回信息
}
/**
* 携程返回体
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripResponseBody {
@JsonProperty("supplierConfirmType")
private Integer supplierConfirmType; // 供应商确认类型:1-取消已确认,2-取消待确认
@JsonProperty("items")
private List<CtripResponseOrderItem> items; // 订单项节点
}
/**
* 携程返回订单项
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripResponseOrderItem {
@JsonProperty("itemId")
private String itemId; // 订单项编号
@JsonProperty("vouchers")
private List<CtripVoucher> vouchers; // 已取消的凭证
}
/**
* 携程凭证
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripVoucher {
@JsonProperty("voucherId")
private String voucherId; // 凭证编号
}
}
@@ -1,126 +0,0 @@
package com.central.coupon.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* 携程订单核销通知请求
* 当订单在新订确认后,供应商可将客人出行后的使用情况或归还物品等信息调用该接口将对应的最终结果同步给携程系统
*/
@Data
public class CtripConsumedNoticeRequest {
/**
* 携程请求头
*/
@JsonProperty("header")
private CtripHeader header;
/**
* 携程请求体
*/
@JsonProperty("body")
private Object body;
/**
* 携程请求头
*/
@Data
public static class CtripHeader {
@JsonProperty("accountId")
private String accountId;
@JsonProperty("serviceName")
private String serviceName;
@JsonProperty("requestTime")
private String requestTime;
@JsonProperty("version")
private String version;
@JsonProperty("sign")
private String sign;
}
/**
* 携程核销通知体
*/
@Data
public static class CtripConsumedNoticeBody {
@JsonProperty("sequenceId")
private String sequenceId;
@JsonProperty("otaOrderId")
private String otaOrderId;
@JsonProperty("supplierOrderId")
private String supplierOrderId;
@JsonProperty("items")
private List<CtripConsumedNoticeItem> items;
}
/**
* 携程核销通知项
*/
@Data
public static class CtripConsumedNoticeItem {
@JsonProperty("itemId")
private String itemId;
@JsonProperty("useStartDate")
private String useStartDate;
@JsonProperty("useEndDate")
private String useEndDate;
@JsonProperty("quantity")
private Integer quantity;
@JsonProperty("useQuantity")
private Integer useQuantity;
@JsonProperty("passengers")
private List<CtripConsumedPassenger> passengers;
@JsonProperty("vouchers")
private List<CtripConsumedVoucher> vouchers;
@JsonProperty("remark")
private String remark;
@JsonProperty("discount")
private CtripDiscount discount;
@JsonProperty("lostAmount")
private BigDecimal lostAmount;
@JsonProperty("lostAmountCurrency")
private String lostAmountCurrency;
}
/**
* 携程核销乘客
*/
@Data
public static class CtripConsumedPassenger {
@JsonProperty("passengerId")
private String passengerId;
}
/**
* 携程核销凭证
*/
@Data
public static class CtripConsumedVoucher {
@JsonProperty("voucherId")
private String voucherId;
}
/**
* 携程折扣信息
*/
@Data
public static class CtripDiscount {
@JsonProperty("policyList")
private List<CtripDiscountPolicy> policyList;
}
/**
* 携程折扣政策
*/
@Data
public static class CtripDiscountPolicy {
@JsonProperty("date")
private String date;
@JsonProperty("quantity")
private Integer quantity;
}
}
@@ -1,55 +0,0 @@
package com.central.coupon.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
/**
* 携程订单核销通知响应
* 当订单在新订确认后,供应商可将客人出行后的使用情况或归还物品等信息调用该接口将对应的最终结果同步给携程系统
*/
@Data
public class CtripConsumedNoticeResponse {
/**
* 携程返回头
*/
@JsonProperty("header")
private CtripResponseHeader header;
/**
* 携程返回体
*/
@JsonProperty("body")
private CtripResponseBody body;
/**
* 响应码
*/
@JsonProperty("resultCode")
private String resultCode;
/**
* 响应信息
*/
@JsonProperty("resultMessage")
private String resultMessage;
/**
* 携程返回头
*/
@Data
public static class CtripResponseHeader {
@JsonProperty("resultCode")
private String resultCode;
@JsonProperty("resultMessage")
private String resultMessage;
}
/**
* 携程返回体
*/
@Data
public static class CtripResponseBody {
// 核销通知响应体通常为空,因为这是一个通知接口
}
}
@@ -1,270 +0,0 @@
package com.central.coupon.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* 携程订单新订请求
* 当客人在携程平台进行订单预定后,携程会通过该接口向供应商系统提交客人的预定信息来完成订单预定
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class CtripCreateOrderRequest {
/**
* 请求头
*/
@JsonProperty("header")
private CtripHeader header;
/**
* 请求体 - 可能是加密字符串或JSON对象
*/
@JsonProperty("body")
private Object body; // 改为Object类型,支持字符串和对象两种格式
/**
* 携程请求头
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripHeader {
@JsonProperty("accountId")
private String accountId; // 供应商帐号,由携程分配
@JsonProperty("serviceName")
private String serviceName; // 接口名称: CreateOrder
@JsonProperty("requestTime")
private String requestTime; // 请求时间(格式: yyyy-MM-dd HH:mm:ss)
@JsonProperty("version")
private String version; // 版本号, 1.0
@JsonProperty("sign")
private String sign; // 签名
}
/**
* 携程订单体
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripOrderBody {
@JsonProperty("sequenceId")
private String sequenceId; // 携程处理批次流水号。格式为处理日期(yyyyMMdd)+32位去分隔符的Guid
@JsonProperty("otaOrderId")
private String otaOrderId; // 携程订单号
@JsonProperty("confirmType")
private Integer confirmType; // 确认类型:1-仅通知供应商订单操作,2-供应商系统确认
@JsonProperty("orderLastConfirmTime")
private String orderLastConfirmTime; // 供应商最晚确认时间,格式:yyyy-MM-dd hh:mm:ss
@JsonProperty("contacts")
private List<CtripContact> contacts; // 联系人节点,为此笔订单联系人,并非实际出行人
@JsonProperty("coupons")
private List<CtripCoupon> coupons; // 优惠信息节点
@JsonProperty("items")
private List<CtripOrderItem> items; // 订单项节点
}
/**
* 携程订单项
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripOrderItem {
@JsonProperty("itemId")
private String itemId; // 订单项编号
@JsonProperty("openId")
private String openId; // 用户对外标识
@JsonProperty("PLU")
private String PLU; // 供应商产品最小单位
@JsonProperty("locale")
private String locale; // 语言-地区
@JsonProperty("distributionChannel")
private String distributionChannel; // 销售渠道
@JsonProperty("useStartDate")
private String useStartDate; // 使用日期
@JsonProperty("useEndDate")
private String useEndDate; // 最晚可使用日期
@JsonProperty("lastConfirmTime")
private String lastConfirmTime; // 供应商最晚确认时间(已废弃)
@JsonProperty("remark")
private String remark; // 备注信息
@JsonProperty("price")
private BigDecimal price; // 单位客人实付金额
@JsonProperty("priceCurrency")
private String priceCurrency; // 客人实付金额币种
@JsonProperty("salePrice")
private BigDecimal salePrice; // 单价卖价
@JsonProperty("salePriceCurrency")
private String salePriceCurrency; // 单位卖价币种
@JsonProperty("cost")
private BigDecimal cost; // 单价结算价
@JsonProperty("costCurrency")
private String costCurrency; // 单价结算价单位
@JsonProperty("suggestedPrice")
private BigDecimal suggestedPrice; // 供应商建议携程卖价
@JsonProperty("suggestedPriceCurrency")
private String suggestedPriceCurrency; // 供应商建议携程卖价单位
@JsonProperty("quantity")
private Integer quantity; // 订单数量
@JsonProperty("passengers")
private List<CtripPassenger> passengers; // 乘客信息
@JsonProperty("adjunctions")
private List<CtripAdjunction> adjunctions; // 附加信息
@JsonProperty("deposit")
private CtripDeposit deposit; // 押金信息
@JsonProperty("expressDelivery")
private CtripExpressDelivery expressDelivery; // 快递信息
}
/**
* 携程乘客信息
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripPassenger {
@JsonProperty("passengerId")
private String passengerId; // 出行人编号
@JsonProperty("name")
private String name; // 姓名
@JsonProperty("firstName")
private String firstName; // 拼音或英文名
@JsonProperty("lastName")
private String lastName; // 拼音或英文姓
@JsonProperty("mobile")
private String mobile; // 手机号码/国际电话号码
@JsonProperty("intlCode")
private String intlCode; // 国际标准电话区号
@JsonProperty("cardType")
private String cardType; // 证件类型
@JsonProperty("cardNo")
private String cardNo; // 证件号
@JsonProperty("birthDate")
private String birthDate; // 生日
@JsonProperty("ageType")
private String ageType; // 年龄类型:ADU-成人,CHI-儿童,BAB-婴儿
@JsonProperty("gender")
private String gender; // 性别:M-男,F-女
@JsonProperty("nationalityCode")
private String nationalityCode; // 国籍代码
@JsonProperty("nationalityName")
private String nationalityName; // 国籍名称
@JsonProperty("cardIssueCountry")
private String cardIssueCountry; // 证件签发国
@JsonProperty("cardIssuePlace")
private String cardIssuePlace; // 证件签发地
@JsonProperty("cardIssueDate")
private String cardIssueDate; // 证件签发日期
@JsonProperty("cardValidDate")
private String cardValidDate; // 证件有效期
@JsonProperty("cardIssueNumber")
private Integer cardIssueNumber; // 证件签发次数
@JsonProperty("birthPlace")
private String birthPlace; // 出生地
@JsonProperty("height")
private Integer height; // 身高
@JsonProperty("weight")
private Integer weight; // 体重
@JsonProperty("myopiaDegreeL")
private Integer myopiaDegreeL; // 左眼近视度数
@JsonProperty("myopiaDegreeR")
private Integer myopiaDegreeR; // 右眼近视度数
@JsonProperty("shoeSize")
private Integer shoeSize; // 鞋码
}
/**
* 携程联系人信息
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripContact {
@JsonProperty("name")
private String name; // 姓名
@JsonProperty("mobile")
private String mobile; // 手机号码/国际电话号码
@JsonProperty("intlCode")
private String intlCode; // 国际标准电话区号
@JsonProperty("optionalMobile")
private String optionalMobile; // 备选的手机号码/国际电话号码
@JsonProperty("optionalIntlCode")
private String optionalIntlCode; // 备选的国际标准电话区号
@JsonProperty("email")
private String email; // 邮箱地址
}
/**
* 携程优惠券信息
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripCoupon {
@JsonProperty("type")
private Integer type; // 优惠券源类型:1-携程,2-供应商
@JsonProperty("code")
private String code; // 优惠券编码
@JsonProperty("name")
private String name; // 优惠券名称
@JsonProperty("amount")
private BigDecimal amount; // 优惠券金额
@JsonProperty("amountCurrency")
private String amountCurrency; // 优惠券金额单位
}
/**
* 携程附加信息
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripAdjunction {
@JsonProperty("name")
private String name; // 名称
@JsonProperty("nameCode")
private String nameCode; // 名称编码(系统标识)
@JsonProperty("content")
private String content; // 内容
@JsonProperty("contentCode")
private String contentCode; // 内容编码(系统标识)
}
/**
* 携程押金信息
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripDeposit {
@JsonProperty("type")
private Integer type; // 押金/保证金类型:1-网站预付,2-景区现付
@JsonProperty("amount")
private BigDecimal amount; // 押金/保证金金额
@JsonProperty("amountCurrency")
private String amountCurrency; // 押金/保证金单位
}
/**
* 携程快递信息
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripExpressDelivery {
@JsonProperty("type")
private String type; // 配送类型:1-客人自提,2-供应商配送
@JsonProperty("name")
private String name; // 中文或英文姓名
@JsonProperty("mobile")
private String mobile; // 手机号码/国际电话号码
@JsonProperty("intlCode")
private String intlCode; // 国际标准电话区号
@JsonProperty("country")
private String country; // 国家
@JsonProperty("province")
private String province; // 省/直辖市
@JsonProperty("city")
private String city; // 市
@JsonProperty("district")
private String district; // 县/区
@JsonProperty("address")
private String address; // 详细地址
}
}
@@ -1,134 +0,0 @@
package com.central.coupon.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.util.List;
/**
* 携程订单新订响应
* 供应商在收到携程的下单请求时,需先判断同批次的携程订单号在供应商系统中是否存在且已下单成功
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class CtripCreateOrderResponse {
/**
* 返回头
*/
@JsonProperty("header")
private CtripResponseHeader header;
/**
* 处理结果返回码
*/
@JsonProperty("resultCode")
private String resultCode;
/**
* 处理结果返回信息。若返回结果为失败,需在此字段内明确描述失败原因
*/
@JsonProperty("resultMessage")
private String resultMessage;
/**
* 返回体(传输时该字段需要AES加密)
* 该节点在返回码为0000时必填,其他均为非必填
*/
@JsonProperty("body")
private CtripResponseBody body;
/**
* 携程返回头
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripResponseHeader {
@JsonProperty("resultCode")
private String resultCode; // 处理结果返回码
@JsonProperty("resultMessage")
private String resultMessage; // 处理结果返回信息
}
/**
* 携程返回体
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripResponseBody {
@JsonProperty("otaOrderId")
private String otaOrderId; // 携程订单号
@JsonProperty("supplierOrderId")
private String supplierOrderId; // 供应商订单号
@JsonProperty("supplierConfirmType")
private Integer supplierConfirmType; // 供应商确认类型:1-新订已确认,2-新订待确认
@JsonProperty("voucherSender")
private Integer voucherSender; // 凭证发送方:1-携程对客发送凭证,2-供应商对客发送凭证
@JsonProperty("vouchers")
private List<CtripVoucher> vouchers; // 凭证集合节点
@JsonProperty("orderExtendMessage")
private String orderExtendMessage; // 订单附加信息
@JsonProperty("items")
private List<CtripResponseOrderItem> items; // 订单项节点
}
/**
* 携程凭证
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripVoucher {
@JsonProperty("itemId")
private String itemId; // 订单项编号,如果按资源单位来匹配凭证则必返回值
@JsonProperty("voucherId")
private String voucherId; // 凭证编号,isCredentialVouchers=1必填,需保证订单内唯一
@JsonProperty("voucherType")
private Integer voucherType; // 凭证形式:1-普通凭证,2-数字码,3-二维码图片,4-凭证图片,5-PDF确认单,6-凭证链接,7-条形码128格式,8-条形码417格式
@JsonProperty("voucherCode")
private String voucherCode; // 凭证数字码,当voucherType=2时必返回值
@JsonProperty("voucherData")
private String voucherData; // 凭证数据源
@JsonProperty("voucherSeatInfo")
private String voucherSeatInfo; // 凭证座位信息
}
/**
* 携程返回订单项
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripResponseOrderItem {
@JsonProperty("itemId")
private String itemId; // 订单项编号
@JsonProperty("isCredentialVouchers")
private Integer isCredentialVouchers; // 是否出行人与凭证有关联关系:0-不相关,1-相关
@JsonProperty("passengerVouchers")
private List<CtripPassengerVoucher> passengerVouchers; // 出行人凭证关系节点
@JsonProperty("inventorys")
private List<CtripInventory> inventorys; // 剩余库存数量节点
}
/**
* 携程出行人凭证关系
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripPassengerVoucher {
@JsonProperty("passengerId")
private String passengerId; // 出行人编号
@JsonProperty("voucherId")
private String voucherId; // 凭证编号
}
/**
* 携程库存信息
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripInventory {
@JsonProperty("useDate")
private String useDate; // 使用日期
@JsonProperty("quantity")
private Integer quantity; // 库存数量
}
}
@@ -1,62 +0,0 @@
package com.central.coupon.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
/**
* 携程订单退款确认请求
* 当订单在退款提交后供应商需异步确认进行操作(接受、拒绝)
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class CtripRefundOrderConfirmRequest {
/**
* 请求头
*/
@JsonProperty("header")
private CtripHeader header;
/**
* 请求体 - 可能是加密字符串或JSON对象
*/
@JsonProperty("body")
private Object body;
/**
* 携程请求头
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripHeader {
@JsonProperty("accountId")
private String accountId; // 供应商帐号,由携程分配
@JsonProperty("serviceName")
private String serviceName; // 接口名称: RefundOrderConfirm
@JsonProperty("requestTime")
private String requestTime; // 请求时间(格式: yyyy-MM-dd HH:mm:ss)
@JsonProperty("version")
private String version; // 版本号, 1.0
@JsonProperty("sign")
private String sign; // 签名
}
/**
* 携程订单退款确认体
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripRefundOrderConfirmBody {
@JsonProperty("sequenceId")
private String sequenceId; // 供应商处理批次流水号
@JsonProperty("otaOrderId")
private String otaOrderId; // 携程订单号
@JsonProperty("supplierOrderId")
private String supplierOrderId; // 供应商订单号
@JsonProperty("confirmResultCode")
private String confirmResultCode; // 确认结果返回码
@JsonProperty("confirmResultMessage")
private String confirmResultMessage; // 确认结果信息
}
}
@@ -1,44 +0,0 @@
package com.central.coupon.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
/**
* 携程订单退款确认响应
* 不接受同批次的退款推送多次不同操作(接受、拒绝)结果给到携程
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class CtripRefundOrderConfirmResponse {
/**
* 返回头
*/
@JsonProperty("header")
private CtripResponseHeader header;
/**
* 处理结果返回码
*/
@JsonProperty("resultCode")
private String resultCode;
/**
* 处理结果返回信息
*/
@JsonProperty("resultMessage")
private String resultMessage;
/**
* 携程返回头
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripResponseHeader {
@JsonProperty("resultCode")
private String resultCode; // 处理结果返回码
@JsonProperty("resultMessage")
private String resultMessage; // 处理结果返回信息
}
}
@@ -1,84 +0,0 @@
package com.central.coupon.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.List;
/**
* 携程订单退款请求
* 退款接口与订单取消逻辑并无关联,是纯粹的退钱操作
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class CtripRefundOrderRequest {
/**
* 请求头
*/
@JsonProperty("header")
private CtripHeader header;
/**
* 请求体 - 可能是加密字符串或JSON对象
*/
@JsonProperty("body")
private Object body;
/**
* 携程请求头
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripHeader {
@JsonProperty("accountId")
private String accountId; // 供应商帐号,由携程分配
@JsonProperty("serviceName")
private String serviceName; // 接口名称: RefundOrder
@JsonProperty("requestTime")
private String requestTime; // 请求时间(格式: yyyy-MM-dd HH:mm:ss)
@JsonProperty("version")
private String version; // 版本号, 1.0
@JsonProperty("sign")
private String sign; // 签名
}
/**
* 携程订单退款体
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripRefundOrderBody {
@JsonProperty("sequenceId")
private String sequenceId; // 携程处理批次流水号
@JsonProperty("otaOrderId")
private String otaOrderId; // 携程订单号
@JsonProperty("supplierOrderId")
private String supplierOrderId; // 供应商订单号
@JsonProperty("lastConfirmTime")
private String lastConfirmTime; // 供应商最晚确认时间
@JsonProperty("totalAmount")
private BigDecimal totalAmount; // 退款总金额
@JsonProperty("totalAmountCurrency")
private String totalAmountCurrency; // 退款总金额单位
@JsonProperty("items")
private List<CtripRefundOrderItem> items; // 订单项节点
}
/**
* 携程订单退款项
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripRefundOrderItem {
@JsonProperty("itemId")
private String itemId; // 订单项编号
@JsonProperty("PLU")
private String PLU; // 供应商产品最小单位
@JsonProperty("amount")
private BigDecimal amount; // 退款金额
@JsonProperty("amountCurrency")
private String amountCurrency; // 退款金额单位
}
}
@@ -1,60 +0,0 @@
package com.central.coupon.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
/**
* 携程订单退款响应
* 在退款发起时必须验证退款金额小于等于可退金额
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class CtripRefundOrderResponse {
/**
* 返回头
*/
@JsonProperty("header")
private CtripResponseHeader header;
/**
* 处理结果返回码
*/
@JsonProperty("resultCode")
private String resultCode;
/**
* 处理结果返回信息
*/
@JsonProperty("resultMessage")
private String resultMessage;
/**
* 返回体(传输时该字段需要AES加密)
*/
@JsonProperty("body")
private CtripResponseBody body;
/**
* 携程返回头
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripResponseHeader {
@JsonProperty("resultCode")
private String resultCode; // 处理结果返回码
@JsonProperty("resultMessage")
private String resultMessage; // 处理结果返回信息
}
/**
* 携程返回体
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public static class CtripResponseBody {
@JsonProperty("supplierConfirmType")
private Integer supplierConfirmType; // 供应商确认类型:1-退款已确认,2-退款待确认
}
}
@@ -1,94 +0,0 @@
package com.central.coupon.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.central.coupon.entity.Coupon;
import com.central.common.model.PageResult;
import java.util.List;
import java.util.Map;
/**
* 优惠券服务接口
*/
public interface ICouponService extends IService<Coupon> {
/**
* 分页查询优惠券列表
*/
IPage<Coupon> getCouponPage(Page<Coupon> page, Coupon coupon);
/**
* 查询优惠券列表(统一风格)
*/
PageResult<Coupon> findList(Map<String, Object> params);
/**
* 创建优惠券
*/
boolean createCoupon(Coupon coupon);
/**
* 更新优惠券
*/
boolean updateCoupon(Coupon coupon);
/**
* 删除优惠券
*/
boolean deleteCoupon(Long id);
/**
* 根据手机号查询用户优惠券
*/
List<Coupon> getCouponsByUserPhone(String userPhone);
/**
* 根据手机号查询可用优惠券
*/
List<Coupon> getAvailableCouponsByUserPhone(String userPhone);
/**
* 使用优惠券
*/
boolean useCoupon(Long couponId, String orderNo);
/**
* 根据携程优惠券ID创建优惠券(携程接口调用)
*/
boolean createCouponFromCtrip(String ctripCouponId, String userPhone, String couponName,
Integer couponType, java.math.BigDecimal amount,
java.math.BigDecimal minAmount, Integer discountRate,
java.util.Date validStartTime,
java.util.Date validEndTime);
/**
* 批量更新过期优惠券状态
*/
void updateExpiredCoupons();
/**
* 核销携程优惠券
*/
boolean verifyCtripCoupon(String ctripCouponId, String orderNo);
/**
* 根据携程优惠券ID查询优惠券
*/
Coupon getByCtripCouponId(String ctripCouponId);
/**
* 检查用户手机号和携程优惠券ID是否已存在
*/
boolean existsByUserPhoneAndCtripCouponId(String userPhone, String ctripCouponId);
/**
* 智能选择最优优惠券
*
* @param userPhone 用户手机号
* @param orderAmount 订单金额
* @return 最优优惠券,如果没有则返回null
*/
Coupon selectBestCoupon(String userPhone, java.math.BigDecimal orderAmount);
}
@@ -1,54 +0,0 @@
package com.central.coupon.service;
/**
* 携程API服务接口
* 用于调用携程的优惠券相关API
*/
public interface ICtripApiService {
/**
* 验证携程优惠券
*
* @param ctripCouponId 携程优惠券ID
* @param orderNo 订单号
* @return 验证结果
*/
boolean verifyCoupon(String ctripCouponId, String orderNo);
/**
* 获取携程优惠券状态
*
* @param ctripCouponId 携程优惠券ID
* @return 优惠券状态
*/
String getCouponStatus(String ctripCouponId);
/**
* 创建携程优惠券
*
* @param ctripCouponId 携程优惠券ID
* @param userPhone 用户手机号
* @param couponName 优惠券名称
* @param couponType 优惠券类型
* @param amount 优惠券面额
* @param minAmount 使用门槛金额
* @param discountRate 折扣率
* @param validStartTime 有效期开始时间
* @param validEndTime 有效期结束时间
* @return 创建结果
*/
boolean createCoupon(String ctripCouponId, String userPhone, String couponName,
Integer couponType, java.math.BigDecimal amount,
java.math.BigDecimal minAmount, Integer discountRate,
java.util.Date validStartTime, java.util.Date validEndTime);
/**
* 取消携程优惠券
*
* @param ctripCouponId 携程优惠券ID
* @param userPhone 用户手机号
* @param reason 取消原因
* @return 取消结果
*/
boolean cancelCoupon(String ctripCouponId, String userPhone, String reason);
}
@@ -1,211 +0,0 @@
package com.central.coupon.service;
import com.central.coupon.model.CtripCreateOrderRequest;
import com.central.coupon.model.CtripCreateOrderResponse;
import com.central.coupon.model.CtripCancelOrderRequest;
import com.central.coupon.model.CtripCancelOrderResponse;
import com.central.coupon.model.CtripCancelOrderConfirmRequest;
import com.central.coupon.model.CtripCancelOrderConfirmResponse;
import com.central.coupon.model.CtripRefundOrderRequest;
import com.central.coupon.model.CtripRefundOrderResponse;
import com.central.coupon.model.CtripRefundOrderConfirmRequest;
import com.central.coupon.model.CtripRefundOrderConfirmResponse;
import com.central.coupon.model.CtripConsumedNoticeRequest;
import com.central.coupon.model.CtripConsumedNoticeResponse;
/**
* 携程订单服务接口
* 处理携程订单相关的业务逻辑
*/
public interface ICtripOrderService {
/**
* 处理订单新订
* 当客人在携程平台进行订单预定后,携程会通过该接口向供应商系统提交客人的预定信息来完成订单预定
*
* @param header 请求头
* @param body 请求体
* @return 订单创建响应
*/
CtripCreateOrderResponse processCreateOrder(CtripCreateOrderRequest.CtripHeader header,
CtripCreateOrderRequest.CtripOrderBody body);
/**
* 处理订单取消
* 提供携程与供应商系统进行订单取消操作的接口
*
* @param header 请求头
* @param body 请求体
* @return 订单取消响应
*/
CtripCancelOrderResponse processCancelOrder(CtripCancelOrderRequest.CtripHeader header,
CtripCancelOrderRequest.CtripCancelOrderBody body);
/**
* 处理订单取消确认
* 当订单在取消提交后供应商需异步确认进行操作(接受、拒绝)
*
* @param header 请求头
* @param body 请求体
* @return 订单取消确认响应
*/
CtripCancelOrderConfirmResponse processCancelOrderConfirm(CtripCancelOrderConfirmRequest.CtripHeader header,
CtripCancelOrderConfirmRequest.CtripCancelOrderConfirmBody body);
/**
* 检查订单是否已存在
* 供应商在收到携程的下单请求时,需先判断同批次的携程订单号在供应商系统中是否存在且已下单成功
*
* @param otaOrderId 携程订单号
* @param sequenceId 携程处理批次流水号
* @return 如果订单已存在且已下单成功返回true,否则返回false
*/
boolean isOrderExists(String otaOrderId, String sequenceId);
/**
* 创建新订单
*
* @param header 请求头
* @param body 请求体
* @return 供应商订单号
*/
String createNewOrder(CtripCreateOrderRequest.CtripHeader header,
CtripCreateOrderRequest.CtripOrderBody body);
/**
* 检查订单取消数量是否合法
* 当confirmType=2在取消发起时必须验证取消数量等于可退数量
*
* @param otaOrderId 携程订单号
* @param supplierOrderId 供应商订单号
* @param itemId 订单项编号
* @param cancelQuantity 取消数量
* @return 如果取消数量合法返回true,否则返回false
*/
boolean validateCancelQuantity(String otaOrderId, String supplierOrderId, String itemId, Integer cancelQuantity);
/**
* 执行订单取消
*
* @param header 请求头
* @param body 请求体
* @return 取消结果
*/
boolean executeOrderCancel(CtripCancelOrderRequest.CtripHeader header,
CtripCancelOrderRequest.CtripCancelOrderBody body);
/**
* 处理优惠券信息
* 当订单中包含优惠券信息时,需要处理优惠券的创建和使用
*
* @param coupons 优惠券列表
* @param orderId 订单ID
* @return 处理结果
*/
boolean processCoupons(java.util.List<CtripCreateOrderRequest.CtripCoupon> coupons, Long orderId);
/**
* 生成凭证信息
* 根据订单信息生成相应的凭证
*
* @param body 订单体
* @param supplierOrderId 供应商订单号
* @return 凭证列表
*/
java.util.List<CtripCreateOrderResponse.CtripVoucher> generateVouchers(
CtripCreateOrderRequest.CtripOrderBody body, String supplierOrderId);
/**
* 生成订单项响应
*
* @param body 订单体
* @param supplierOrderId 供应商订单号
* @return 订单项响应列表
*/
java.util.List<CtripCreateOrderResponse.CtripResponseOrderItem> generateOrderItems(
CtripCreateOrderRequest.CtripOrderBody body, String supplierOrderId);
/**
* 生成取消订单项响应
*
* @param body 取消订单体
* @return 取消订单项响应列表
*/
java.util.List<CtripCancelOrderResponse.CtripResponseOrderItem> generateCancelOrderItems(
CtripCancelOrderRequest.CtripCancelOrderBody body);
/**
* 处理订单退款
* 退款接口与订单取消逻辑并无关联,是纯粹的退钱操作
*
* @param header 请求头
* @param body 请求体
* @return 订单退款响应
*/
CtripRefundOrderResponse processRefundOrder(CtripRefundOrderRequest.CtripHeader header,
CtripRefundOrderRequest.CtripRefundOrderBody body);
/**
* 处理订单退款确认
* 当订单在退款提交后供应商需异步确认进行操作(接受、拒绝)
*
* @param header 请求头
* @param body 请求体
* @return 订单退款确认响应
*/
CtripRefundOrderConfirmResponse processRefundOrderConfirm(CtripRefundOrderConfirmRequest.CtripHeader header,
CtripRefundOrderConfirmRequest.CtripRefundOrderConfirmBody body);
/**
* 检查订单退款金额是否合法
* 在退款发起时必须验证退款金额小于等于可退金额
*
* @param otaOrderId 携程订单号
* @param supplierOrderId 供应商订单号
* @param refundAmount 退款金额
* @return 如果退款金额合法返回true,否则返回false
*/
boolean validateRefundAmount(String otaOrderId, String supplierOrderId, java.math.BigDecimal refundAmount);
/**
* 执行订单退款
*
* @param header 请求头
* @param body 请求体
* @return 退款结果
*/
boolean executeOrderRefund(CtripRefundOrderRequest.CtripHeader header,
CtripRefundOrderRequest.CtripRefundOrderBody body);
/**
* 处理订单核销通知
* 当订单在新订确认后,供应商可将客人出行后的使用情况或归还物品等信息调用该接口将对应的最终结果同步给携程系统
*
* @param header 请求头
* @param body 请求体
* @return 订单核销通知响应
*/
CtripConsumedNoticeResponse processConsumedNotice(CtripConsumedNoticeRequest.CtripHeader header,
CtripConsumedNoticeRequest.CtripConsumedNoticeBody body);
/**
* 验证核销数量是否合法
* 验证已核销数量不超过总数量
*
* @param itemId 订单项编号
* @param totalQuantity 总数量
* @param useQuantity 已核销数量
* @return 如果核销数量合法返回true,否则返回false
*/
boolean validateConsumedQuantity(String itemId, Integer totalQuantity, Integer useQuantity);
/**
* 执行订单核销
*
* @param header 请求头
* @param body 请求体
* @return 核销结果
*/
boolean executeOrderConsumed(CtripConsumedNoticeRequest.CtripHeader header,
CtripConsumedNoticeRequest.CtripConsumedNoticeBody body);
}
@@ -1,426 +0,0 @@
package com.central.coupon.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.central.coupon.entity.Coupon;
import com.central.coupon.mapper.CouponMapper;
import com.central.coupon.service.ICouponService;
import com.central.coupon.service.ICtripApiService;
import com.central.common.model.PageResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.UUID;
/**
* 优惠券服务实现类
*/
@Slf4j
@Service
public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon> implements ICouponService {
@Autowired
private ICtripApiService ctripApiService;
@Override
public IPage<Coupon> getCouponPage(Page<Coupon> page, Coupon coupon) {
return baseMapper.selectCouponPage(page, coupon);
}
@Override
public PageResult<Coupon> findList(Map<String, Object> params) {
// 构建查询条件
Coupon coupon = new Coupon();
if (params.get("couponName") != null) {
coupon.setCouponName((String) params.get("couponName"));
}
if (params.get("userPhone") != null) {
coupon.setUserPhone((String) params.get("userPhone"));
}
if (params.get("status") != null) {
coupon.setStatus(Integer.valueOf(params.get("status").toString()));
}
if (params.get("source") != null) {
coupon.setSource(Integer.valueOf(params.get("source").toString()));
}
if (params.get("couponType") != null) {
coupon.setCouponType(Integer.valueOf(params.get("couponType").toString()));
}
// 分页查询
Page<Coupon> page = new Page<>();
if (params.get("page") != null) {
page.setCurrent(Long.valueOf(params.get("page").toString()));
}
if (params.get("limit") != null) {
page.setSize(Long.valueOf(params.get("limit").toString()));
}
IPage<Coupon> result = getCouponPage(page, coupon);
return PageResult.<Coupon>builder()
.data(result.getRecords())
.count(result.getTotal())
.resp_code(0)
.build();
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean createCoupon(Coupon coupon) {
if (coupon.getCouponNo() == null) {
coupon.setCouponNo(generateCouponNo());
}
coupon.setCreateTime(new Date());
coupon.setUpdateTime(new Date());
return save(coupon);
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean updateCoupon(Coupon coupon) {
coupon.setUpdateTime(new Date());
return updateById(coupon);
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean deleteCoupon(Long id) {
return removeById(id);
}
@Override
public List<Coupon> getCouponsByUserPhone(String userPhone) {
return baseMapper.selectByUserPhone(userPhone);
}
@Override
public List<Coupon> getAvailableCouponsByUserPhone(String userPhone) {
return baseMapper.selectAvailableByUserPhone(userPhone);
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean useCoupon(Long couponId, String orderNo) {
Coupon coupon = getById(couponId);
if (coupon == null) {
log.error("优惠券不存在,couponId: {}", couponId);
return false;
}
if (coupon.getStatus() != 0) {
log.error("优惠券状态不正确,couponId: {}, status: {}", couponId, coupon.getStatus());
return false;
}
if (coupon.getValidEndTime().before(new Date())) {
log.error("优惠券已过期,couponId: {}", couponId);
return false;
}
return baseMapper.updateCouponUsed(couponId, orderNo) > 0;
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean createCouponFromCtrip(String ctripCouponId, String userPhone, String couponName,
Integer couponType, java.math.BigDecimal amount,
java.math.BigDecimal minAmount, Integer discountRate,
java.util.Date validStartTime,
java.util.Date validEndTime) {
log.info("开始创建携程优惠券 - ctripCouponId: {}, userPhone: {}, couponName: {}, amount: {}, minAmount: {}",
ctripCouponId, userPhone, couponName, amount, minAmount);
// 检查是否已存在该携程优惠券
Coupon existingCoupon = baseMapper.selectByCtripCouponId(ctripCouponId);
if (existingCoupon != null) {
log.warn("携程优惠券已存在,ctripCouponId: {}, 优惠券ID: {}", ctripCouponId, existingCoupon.getId());
return true; // 已存在也算成功
}
log.info("携程优惠券不存在,开始创建新优惠券");
Coupon coupon = new Coupon();
coupon.setCouponNo(generateCouponNo());
coupon.setCouponName(couponName);
coupon.setCouponType(couponType);
coupon.setAmount(amount);
coupon.setMinAmount(minAmount);
coupon.setDiscountRate(discountRate);
coupon.setStatus(0); // 未使用
coupon.setUserPhone(userPhone);
coupon.setSource(1); // 来源:携程
coupon.setCtripCouponId(ctripCouponId);
coupon.setValidStartTime(validStartTime);
coupon.setValidEndTime(validEndTime);
coupon.setCreateTime(new Date());
coupon.setUpdateTime(new Date());
coupon.setCreateBy("ctrip");
coupon.setUpdateBy("ctrip");
log.info("优惠券对象创建完成,准备保存到数据库 - couponNo: {}", coupon.getCouponNo());
boolean saveResult = save(coupon);
if (saveResult) {
log.info("携程优惠券保存成功 - 优惠券ID: {}, couponNo: {}, ctripCouponId: {}",
coupon.getId(), coupon.getCouponNo(), ctripCouponId);
} else {
log.error("携程优惠券保存失败 - ctripCouponId: {}, userPhone: {}", ctripCouponId, userPhone);
}
return saveResult;
}
@Override
@Transactional(rollbackFor = Exception.class)
public void updateExpiredCoupons() {
int count = baseMapper.updateExpiredCoupons();
log.info("批量更新过期优惠券完成,更新数量: {}", count);
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean verifyCtripCoupon(String ctripCouponId, String orderNo) {
log.info("开始核销携程优惠券,ctripCouponId: {}, orderNo: {}", ctripCouponId, orderNo);
// 1. 查询优惠券
Coupon coupon = baseMapper.selectByCtripCouponId(ctripCouponId);
if (coupon == null) {
log.error("携程优惠券不存在,ctripCouponId: {}", ctripCouponId);
throw new CouponNotFoundException("优惠券不存在");
}
// 2. 验证优惠券状态
if (coupon.getStatus() != 0) {
log.error("携程优惠券状态不正确,ctripCouponId: {}, status: {}", ctripCouponId, coupon.getStatus());
throw new CouponInvalidException("优惠券状态不正确");
}
// 3. 验证有效期
if (coupon.getValidEndTime().before(new Date())) {
log.error("携程优惠券已过期,ctripCouponId: {}", ctripCouponId);
throw new CouponExpiredException("优惠券已过期");
}
// 4. 验证使用条件
if (!validateCouponUsageConditions(coupon, orderNo)) {
log.error("携程优惠券使用条件不满足,ctripCouponId: {}", ctripCouponId);
throw new CouponUsageException("优惠券使用条件不满足");
}
// 5. 调用携程核销接口
boolean ctripVerifyResult = ctripApiService.verifyCoupon(ctripCouponId, orderNo);
if (!ctripVerifyResult) {
log.error("携程核销失败,ctripCouponId: {}, orderNo: {}", ctripCouponId, orderNo);
throw new CouponVerifyException("携程核销失败");
}
// 6. 更新本地优惠券状态
int updateResult = baseMapper.updateCouponUsed(coupon.getId(), orderNo);
if (updateResult <= 0) {
log.error("更新优惠券状态失败,couponId: {}, orderNo: {}", coupon.getId(), orderNo);
throw new CouponUpdateException("更新优惠券状态失败");
}
log.info("携程优惠券核销成功,ctripCouponId: {}, orderNo: {}", ctripCouponId, orderNo);
return true;
}
@Override
public Coupon getByCtripCouponId(String ctripCouponId) {
return baseMapper.selectByCtripCouponId(ctripCouponId);
}
@Override
public boolean existsByUserPhoneAndCtripCouponId(String userPhone, String ctripCouponId) {
return lambdaQuery()
.eq(Coupon::getUserPhone, userPhone)
.eq(Coupon::getCtripCouponId, ctripCouponId)
.count() > 0;
}
/**
* 智能选择最优优惠券
*/
@Override
public Coupon selectBestCoupon(String userPhone, java.math.BigDecimal orderAmount) {
log.info("开始智能选择优惠券,userPhone: {}, orderAmount: {}", userPhone, orderAmount);
// 1. 查询用户可用优惠券
List<Coupon> availableCoupons = getAvailableCouponsByUserPhone(userPhone);
if (availableCoupons.isEmpty()) {
log.warn("用户无可用优惠券,userPhone: {}", userPhone);
return null;
}
// 2. 按优先级排序
List<Coupon> sortedCoupons = availableCoupons.stream()
.filter(coupon -> validateCouponForOrder(coupon, orderAmount))
.sorted((c1, c2) -> compareCouponPriority(c1, c2, orderAmount))
.collect(java.util.stream.Collectors.toList());
if (sortedCoupons.isEmpty()) {
log.warn("无符合条件的优惠券,userPhone: {}, orderAmount: {}", userPhone, orderAmount);
return null;
}
Coupon bestCoupon = sortedCoupons.get(0);
log.info("选择最优优惠券,couponId: {}, amount: {}, discount: {}",
bestCoupon.getId(), bestCoupon.getAmount(), bestCoupon.getDiscountRate());
return bestCoupon;
}
/**
* 验证优惠券使用条件
*/
private boolean validateCouponUsageConditions(Coupon coupon, String orderNo) {
try {
// 1. 验证订单金额是否满足使用门槛
java.math.BigDecimal orderAmount = getOrderAmount(orderNo);
if (coupon.getMinAmount() != null && orderAmount.compareTo(coupon.getMinAmount()) < 0) {
log.warn("订单金额不满足优惠券使用门槛,orderAmount: {}, minAmount: {}",
orderAmount, coupon.getMinAmount());
return false;
}
// 2. 验证优惠券是否已被使用
if (coupon.getStatus() != 0) {
log.warn("优惠券已被使用,status: {}", coupon.getStatus());
return false;
}
// 3. 验证优惠券是否过期
if (coupon.getValidEndTime().before(new Date())) {
log.warn("优惠券已过期,validEndTime: {}", coupon.getValidEndTime());
return false;
}
// 4. 验证优惠券是否在有效期内
if (coupon.getValidStartTime().after(new Date())) {
log.warn("优惠券未到生效时间,validStartTime: {}", coupon.getValidStartTime());
return false;
}
return true;
} catch (Exception e) {
log.error("验证优惠券使用条件异常", e);
return false;
}
}
/**
* 验证优惠券是否适用于当前订单
*/
private boolean validateCouponForOrder(Coupon coupon, java.math.BigDecimal orderAmount) {
// 1. 验证订单金额是否满足使用门槛
if (coupon.getMinAmount() != null && orderAmount.compareTo(coupon.getMinAmount()) < 0) {
return false;
}
// 2. 验证优惠券状态
if (coupon.getStatus() != 0) {
return false;
}
// 3. 验证有效期
Date now = new Date();
if (coupon.getValidStartTime().after(now) || coupon.getValidEndTime().before(now)) {
return false;
}
return true;
}
/**
* 比较优惠券优先级
*/
private int compareCouponPriority(Coupon c1, Coupon c2, java.math.BigDecimal orderAmount) {
// 1. 优先选择满减券
if (c1.getCouponType() == 1 && c2.getCouponType() != 1) {
return -1;
}
if (c1.getCouponType() != 1 && c2.getCouponType() == 1) {
return 1;
}
// 2. 满减券按金额排序(金额大的优先)
if (c1.getCouponType() == 1 && c2.getCouponType() == 1) {
return c2.getAmount().compareTo(c1.getAmount());
}
// 3. 折扣券按折扣率排序(折扣率高的优先)
if (c1.getCouponType() == 2 && c2.getCouponType() == 2) {
return c2.getDiscountRate().compareTo(c1.getDiscountRate());
}
// 4. 按创建时间排序(先创建的优先)
return c1.getCreateTime().compareTo(c2.getCreateTime());
}
/**
* 获取订单金额
*/
private java.math.BigDecimal getOrderAmount(String orderNo) {
try {
// TODO: 调用订单服务获取订单金额
// 这里先返回一个默认值,实际应该调用订单服务
return new java.math.BigDecimal("100.00");
} catch (Exception e) {
log.error("获取订单金额失败,orderNo: {}", orderNo, e);
return java.math.BigDecimal.ZERO;
}
}
/**
* 生成优惠券编号
*/
private String generateCouponNo() {
return "CP" + System.currentTimeMillis() + UUID.randomUUID().toString().substring(0, 8).toUpperCase();
}
// 自定义异常类
public static class CouponNotFoundException extends RuntimeException {
public CouponNotFoundException(String message) {
super(message);
}
}
public static class CouponInvalidException extends RuntimeException {
public CouponInvalidException(String message) {
super(message);
}
}
public static class CouponExpiredException extends RuntimeException {
public CouponExpiredException(String message) {
super(message);
}
}
public static class CouponUsageException extends RuntimeException {
public CouponUsageException(String message) {
super(message);
}
}
public static class CouponVerifyException extends RuntimeException {
public CouponVerifyException(String message) {
super(message);
}
}
public static class CouponUpdateException extends RuntimeException {
public CouponUpdateException(String message) {
super(message);
}
}
}
@@ -1,330 +0,0 @@
package com.central.coupon.service.impl;
import com.central.coupon.service.ICtripApiService;
import com.central.coupon.util.CtripDecryptUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.*;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import java.util.HashMap;
import java.util.Map;
/**
* 携程API服务实现类
* 实现携程优惠券相关的API调用
*/
@Slf4j
@Service
public class CtripApiServiceImpl implements ICtripApiService {
@Autowired
private RestTemplate restTemplate;
@Autowired
private CtripDecryptUtil ctripDecryptUtil;
@Value("${ctrip.api.base-url:https://api.ctrip.com}")
private String baseUrl;
@Value("${ctrip.api.timeout:30000}")
private int timeout;
@Value("${ctrip.api.retry-times:3}")
private int retryTimes;
@Value("${ctrip.account.id:your-account-id}")
private String accountId;
@Value("${ctrip.account.secret:your-account-secret}")
private String accountSecret;
@Override
public boolean verifyCoupon(String ctripCouponId, String orderNo) {
log.info("调用携程核销接口,ctripCouponId: {}, orderNo: {}", ctripCouponId, orderNo);
try {
// 构建请求参数
Map<String, Object> requestParams = new HashMap<>();
requestParams.put("ctripCouponId", ctripCouponId);
requestParams.put("orderNo", orderNo);
requestParams.put("verifyTime", java.time.LocalDateTime.now().format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
log.info("携程核销请求参数: {}", requestParams);
// 发送HTTP请求到携程API
String url = baseUrl + "/coupon/verify";
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.set("X-CTRIP-ACCOUNT-ID", accountId);
headers.set("X-CTRIP-TIMESTAMP", String.valueOf(System.currentTimeMillis()));
// 生成签名
String sign = ctripDecryptUtil.generateSign(accountId, "VerifyCoupon",
java.time.LocalDateTime.now().format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
requestParams.toString(), "1.0");
headers.set("X-CTRIP-SIGN", sign);
HttpEntity<Map<String, Object>> request = new HttpEntity<>(requestParams, headers);
// 重试机制
for (int i = 0; i < retryTimes; i++) {
try {
ResponseEntity<Map> response = restTemplate.postForEntity(url, request, Map.class);
if (response.getStatusCode() == HttpStatus.OK) {
Map<String, Object> responseBody = response.getBody();
if (responseBody != null && "0000".equals(responseBody.get("resultCode"))) {
log.info("携程核销接口调用成功,ctripCouponId: {}, orderNo: {}", ctripCouponId, orderNo);
return true;
} else {
log.warn("携程核销接口返回失败,response: {}", responseBody);
}
} else {
log.warn("携程核销接口HTTP状态码异常,status: {}", response.getStatusCode());
}
} catch (Exception e) {
log.error("携程核销接口调用异常,第{}次重试,ctripCouponId: {}, orderNo: {}", i + 1, ctripCouponId, orderNo, e);
if (i == retryTimes - 1) {
throw e;
}
// 等待后重试
try {
Thread.sleep(1000 * (i + 1));
} catch (InterruptedException ie) {
Thread.currentThread().interrupt();
break;
}
}
}
log.error("携程核销接口调用失败,已重试{}次,ctripCouponId: {}, orderNo: {}", retryTimes, ctripCouponId, orderNo);
return false;
} catch (Exception e) {
log.error("携程核销接口调用失败,ctripCouponId: {}, orderNo: {}", ctripCouponId, orderNo, e);
return false;
}
}
@Override
public String getCouponStatus(String ctripCouponId) {
log.info("调用携程查询优惠券状态接口,ctripCouponId: {}", ctripCouponId);
try {
// 构建请求参数
Map<String, Object> requestParams = new HashMap<>();
requestParams.put("ctripCouponId", ctripCouponId);
log.info("携程查询请求参数: {}", requestParams);
// 发送HTTP请求到携程API
String url = baseUrl + "/coupon/status";
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.set("X-CTRIP-ACCOUNT-ID", accountId);
headers.set("X-CTRIP-TIMESTAMP", String.valueOf(System.currentTimeMillis()));
// 生成签名
String sign = ctripDecryptUtil.generateSign(accountId, "GetCouponStatus",
java.time.LocalDateTime.now().format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
requestParams.toString(), "1.0");
headers.set("X-CTRIP-SIGN", sign);
HttpEntity<Map<String, Object>> request = new HttpEntity<>(requestParams, headers);
// 重试机制
for (int i = 0; i < retryTimes; i++) {
try {
ResponseEntity<Map> response = restTemplate.getForEntity(url, Map.class);
if (response.getStatusCode() == HttpStatus.OK) {
Map<String, Object> responseBody = response.getBody();
if (responseBody != null && "0000".equals(responseBody.get("resultCode"))) {
String status = (String) responseBody.get("status");
log.info("携程查询接口调用成功,ctripCouponId: {}, status: {}", ctripCouponId, status);
return status;
} else {
log.warn("携程查询接口返回失败,response: {}", responseBody);
}
} else {
log.warn("携程查询接口HTTP状态码异常,status: {}", response.getStatusCode());
}
} catch (Exception e) {
log.error("携程查询接口调用异常,第{}次重试,ctripCouponId: {}", i + 1, ctripCouponId, e);
if (i == retryTimes - 1) {
throw e;
}
// 等待后重试
try {
Thread.sleep(1000 * (i + 1));
} catch (InterruptedException ie) {
Thread.currentThread().interrupt();
break;
}
}
}
log.error("携程查询接口调用失败,已重试{}次,ctripCouponId: {}", retryTimes, ctripCouponId);
return "UNKNOWN";
} catch (Exception e) {
log.error("携程查询接口调用失败,ctripCouponId: {}", ctripCouponId, e);
return "UNKNOWN";
}
}
/**
* 创建优惠券
*/
@Override
public boolean createCoupon(String ctripCouponId, String userPhone, String couponName,
Integer couponType, java.math.BigDecimal amount,
java.math.BigDecimal minAmount, Integer discountRate,
java.util.Date validStartTime, java.util.Date validEndTime) {
log.info("调用携程创建优惠券接口,ctripCouponId: {}, userPhone: {}", ctripCouponId, userPhone);
try {
// 构建请求参数
Map<String, Object> requestParams = new HashMap<>();
requestParams.put("ctripCouponId", ctripCouponId);
requestParams.put("userPhone", userPhone);
requestParams.put("couponName", couponName);
requestParams.put("couponType", couponType);
requestParams.put("amount", amount);
requestParams.put("minAmount", minAmount);
requestParams.put("discountRate", discountRate);
requestParams.put("validStartTime", new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(validStartTime));
requestParams.put("validEndTime", new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(validEndTime));
log.info("携程创建优惠券请求参数: {}", requestParams);
// 发送HTTP请求到携程API
String url = baseUrl + "/coupon/create";
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.set("X-CTRIP-ACCOUNT-ID", accountId);
headers.set("X-CTRIP-TIMESTAMP", String.valueOf(System.currentTimeMillis()));
// 生成签名
String sign = ctripDecryptUtil.generateSign(accountId, "CreateCoupon",
java.time.LocalDateTime.now().format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
requestParams.toString(), "1.0");
headers.set("X-CTRIP-SIGN", sign);
HttpEntity<Map<String, Object>> request = new HttpEntity<>(requestParams, headers);
// 重试机制
for (int i = 0; i < retryTimes; i++) {
try {
ResponseEntity<Map> response = restTemplate.postForEntity(url, request, Map.class);
if (response.getStatusCode() == HttpStatus.OK) {
Map<String, Object> responseBody = response.getBody();
if (responseBody != null && "0000".equals(responseBody.get("resultCode"))) {
log.info("携程创建优惠券接口调用成功,ctripCouponId: {}, userPhone: {}", ctripCouponId, userPhone);
return true;
} else {
log.warn("携程创建优惠券接口返回失败,response: {}", responseBody);
}
} else {
log.warn("携程创建优惠券接口HTTP状态码异常,status: {}", response.getStatusCode());
}
} catch (Exception e) {
log.error("携程创建优惠券接口调用异常,第{}次重试,ctripCouponId: {}, userPhone: {}", i + 1, ctripCouponId, userPhone, e);
if (i == retryTimes - 1) {
throw e;
}
// 等待后重试
try {
Thread.sleep(1000 * (i + 1));
} catch (InterruptedException ie) {
Thread.currentThread().interrupt();
break;
}
}
}
log.error("携程创建优惠券接口调用失败,已重试{}次,ctripCouponId: {}, userPhone: {}", retryTimes, ctripCouponId, userPhone);
return false;
} catch (Exception e) {
log.error("携程创建优惠券接口调用失败,ctripCouponId: {}, userPhone: {}", ctripCouponId, userPhone, e);
return false;
}
}
/**
* 取消优惠券
*/
@Override
public boolean cancelCoupon(String ctripCouponId, String userPhone, String reason) {
log.info("调用携程取消优惠券接口,ctripCouponId: {}, userPhone: {}, reason: {}", ctripCouponId, userPhone, reason);
try {
// 构建请求参数
Map<String, Object> requestParams = new HashMap<>();
requestParams.put("ctripCouponId", ctripCouponId);
requestParams.put("userPhone", userPhone);
requestParams.put("reason", reason);
requestParams.put("cancelTime", java.time.LocalDateTime.now().format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
log.info("携程取消优惠券请求参数: {}", requestParams);
// 发送HTTP请求到携程API
String url = baseUrl + "/coupon/cancel";
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.set("X-CTRIP-ACCOUNT-ID", accountId);
headers.set("X-CTRIP-TIMESTAMP", String.valueOf(System.currentTimeMillis()));
// 生成签名
String sign = ctripDecryptUtil.generateSign(accountId, "CancelCoupon",
java.time.LocalDateTime.now().format(java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
requestParams.toString(), "1.0");
headers.set("X-CTRIP-SIGN", sign);
HttpEntity<Map<String, Object>> request = new HttpEntity<>(requestParams, headers);
// 重试机制
for (int i = 0; i < retryTimes; i++) {
try {
ResponseEntity<Map> response = restTemplate.postForEntity(url, request, Map.class);
if (response.getStatusCode() == HttpStatus.OK) {
Map<String, Object> responseBody = response.getBody();
if (responseBody != null && "0000".equals(responseBody.get("resultCode"))) {
log.info("携程取消优惠券接口调用成功,ctripCouponId: {}, userPhone: {}", ctripCouponId, userPhone);
return true;
} else {
log.warn("携程取消优惠券接口返回失败,response: {}", responseBody);
}
} else {
log.warn("携程取消优惠券接口HTTP状态码异常,status: {}", response.getStatusCode());
}
} catch (Exception e) {
log.error("携程取消优惠券接口调用异常,第{}次重试,ctripCouponId: {}, userPhone: {}", i + 1, ctripCouponId, userPhone, e);
if (i == retryTimes - 1) {
throw e;
}
// 等待后重试
try {
Thread.sleep(1000 * (i + 1));
} catch (InterruptedException ie) {
Thread.currentThread().interrupt();
break;
}
}
}
log.error("携程取消优惠券接口调用失败,已重试{}次,ctripCouponId: {}, userPhone: {}", retryTimes, ctripCouponId, userPhone);
return false;
} catch (Exception e) {
log.error("携程取消优惠券接口调用失败,ctripCouponId: {}, userPhone: {}", ctripCouponId, userPhone, e);
return false;
}
}
}
@@ -1,47 +0,0 @@
package com.central.coupon.task;
import com.central.coupon.service.ICouponService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
/**
* 优惠券过期处理定时任务
*/
@Slf4j
@Component
public class CouponExpireTask {
@Autowired
private ICouponService couponService;
/**
* 每天凌晨2点执行过期优惠券处理
*/
@Scheduled(cron = "0 0 2 * * ?")
public void processExpiredCoupons() {
log.info("开始处理过期优惠券");
try {
couponService.updateExpiredCoupons();
log.info("过期优惠券处理完成");
} catch (Exception e) {
log.error("处理过期优惠券异常", e);
}
}
/**
* 每小时检查一次即将过期的优惠券
*/
@Scheduled(cron = "0 0 * * * ?")
public void checkExpiringCoupons() {
log.info("开始检查即将过期的优惠券");
try {
// TODO: 实现即将过期优惠券的检查和通知
// 可以发送短信或邮件通知用户
log.info("即将过期优惠券检查完成");
} catch (Exception e) {
log.error("检查即将过期优惠券异常", e);
}
}
}
@@ -1,471 +0,0 @@
package com.central.coupon.util;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.Base64;
import java.util.Map;
/**
* 携程解密工具类
* 处理AES-128-CBC加密/解密和MD5签名验证
*/
@Slf4j
@Component
public class CtripDecryptUtil {
@Value("${ctrip.aes.key:your-aes-key-here}")
private String aesKey;
@Value("${ctrip.aes.iv:your-aes-iv-here}")
private String aesIv;
@Value("${ctrip.sign.key:your-sign-key-here}")
private String md5Secret;
/**
* AES-128-CBC解密
*
* @param encryptedData 加密的数据
* @return 解密后的数据,如果解密失败返回null
*/
public String decryptAES(String encryptedData) {
try {
log.info("开始AES解密,加密数据长度: {}", encryptedData.length());
log.info("AES密钥长度: {}, IV长度: {}", aesKey != null ? aesKey.length() : 0, aesIv != null ? aesIv.length() : 0);
log.debug("AES密钥: {}", aesKey);
log.debug("AES IV: {}", aesIv);
log.debug("加密数据: {}", encryptedData);
// 检查输入数据
if (encryptedData == null || encryptedData.trim().isEmpty()) {
log.error("加密数据为空");
return null;
}
// 清理数据,移除可能的空格和换行符
String cleanData = encryptedData.trim().replaceAll("\\s+", "");
log.debug("清理后的数据: {}", cleanData);
// 尝试携程自定义解码
byte[] encryptedBytes;
try {
// 首先尝试携程自定义解码
encryptedBytes = decodeBytes(cleanData);
log.info("携程自定义解码成功,字节长度: {}", encryptedBytes.length);
} catch (Exception e) {
log.debug("携程自定义解码失败,尝试Base64解码: {}", e.getMessage());
try {
// 如果自定义解码失败,尝试标准Base64解码
encryptedBytes = Base64.getDecoder().decode(cleanData);
log.info("Base64解码成功,字节长度: {}", encryptedBytes.length);
} catch (IllegalArgumentException e2) {
log.error("Base64解码失败: {}", e2.getMessage());
log.error("尝试解码的数据: {}", cleanData);
return null;
}
}
// 检查密钥和IV长度
if (aesKey.length() != 16) {
log.error("AES密钥长度不正确,期望16字节,实际{}字节", aesKey.length());
return null;
}
if (aesIv.length() != 16) {
log.error("AES IV长度不正确,期望16字节,实际{}字节", aesIv.length());
return null;
}
// 创建密钥规范
SecretKeySpec secretKeySpec = new SecretKeySpec(aesKey.getBytes(StandardCharsets.UTF_8), "AES");
IvParameterSpec ivParameterSpec = new IvParameterSpec(aesIv.getBytes(StandardCharsets.UTF_8));
// 创建解密器
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
cipher.init(Cipher.DECRYPT_MODE, secretKeySpec, ivParameterSpec);
// 解密
byte[] decryptedBytes = cipher.doFinal(encryptedBytes);
String decryptedData = new String(decryptedBytes, StandardCharsets.UTF_8);
log.info("AES解密成功,解密后数据长度: {}", decryptedData.length());
log.debug("解密后数据: {}", decryptedData);
return decryptedData;
} catch (Exception e) {
log.error("AES解密失败: {}", e.getMessage(), e);
return null;
}
}
/**
* AES-128-CBC加密
*
* @param plainData 明文数据
* @return 加密后的数据,如果加密失败返回null
*/
public String encryptAES(String plainData) {
try {
log.info("开始AES加密,明文数据长度: {}", plainData.length());
// 创建密钥规范
SecretKeySpec secretKeySpec = new SecretKeySpec(aesKey.getBytes(StandardCharsets.UTF_8), "AES");
IvParameterSpec ivParameterSpec = new IvParameterSpec(aesIv.getBytes(StandardCharsets.UTF_8));
// 创建加密器
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec, ivParameterSpec);
// 加密
byte[] encryptedBytes = cipher.doFinal(plainData.getBytes(StandardCharsets.UTF_8));
// 使用携程自定义编码
String encryptedData = encodeBytes(encryptedBytes);
log.info("AES加密成功,加密后数据长度: {}", encryptedData.length());
return encryptedData;
} catch (Exception e) {
log.error("AES加密失败: {}", e.getMessage(), e);
return null;
}
}
/**
* 转16进制(携程自定义编码)
*
* @param bytes
* @return
*/
public String encodeBytes(byte[] bytes) {
StringBuffer strBuf = new StringBuffer();
for (int i = 0; i < bytes.length; i++) {
strBuf.append((char) (((bytes[i] >> 4) & 0xF) + ((int) 'a')));
strBuf.append((char) (((bytes[i]) & 0xF) + ((int) 'a')));
}
return strBuf.toString();
}
/**
* 转字节数组(携程自定义解码)
*
* @param str
* @return
*/
public byte[] decodeBytes(String str) {
byte[] bytes = new byte[str.length() / 2];
for (int i = 0; i < str.length(); i += 2) {
char c = str.charAt(i);
bytes[i / 2] = (byte) ((c - 'a') << 4);
c = str.charAt(i + 1);
bytes[i / 2] += (c - 'a');
}
return bytes;
}
/**
* 验证MD5签名
*
* @param accountId 供应商帐号
* @param serviceName 接口名称
* @param requestTime 请求时间
* @param body 请求体
* @param version 版本号
* @param sign 签名
* @return 验证结果
*/
public boolean verifySign(String accountId, String serviceName, String requestTime,
String body, String version, String sign) {
try {
log.info("开始验证MD5签名,accountId: {}, serviceName: {}, requestTime: {}",
accountId, serviceName, requestTime);
log.info("签名密钥长度: {}", md5Secret != null ? md5Secret.length() : 0);
// 构建签名字符串
String signString = buildSignString(accountId, serviceName, requestTime, body, version);
// 计算MD5并转小写
String calculatedSign = calculateMD5(signString).toLowerCase();
// 比较签名(不区分大小写)
boolean isValid = calculatedSign.equalsIgnoreCase(sign);
log.info("MD5签名验证结果: {}, 期望签名: {}, 计算签名: {}", isValid, sign, calculatedSign);
log.debug("签名字符串: {}", signString);
log.debug("签名密钥: {}", md5Secret);
return isValid;
} catch (Exception e) {
log.error("MD5签名验证失败: {}", e.getMessage(), e);
return false;
}
}
/**
* 生成MD5签名
*
* @param accountId 供应商帐号
* @param serviceName 接口名称
* @param requestTime 请求时间
* @param body 请求体
* @param version 版本号
* @return MD5签名
*/
public String generateSign(String accountId, String serviceName, String requestTime,
String body, String version) {
try {
String signString = buildSignString(accountId, serviceName, requestTime, body, version);
return calculateMD5(signString).toLowerCase();
} catch (Exception e) {
log.error("生成MD5签名失败: {}", e.getMessage(), e);
return null;
}
}
/**
* 测试签名计算(用于调试)
*
* @param accountId 供应商帐号
* @param serviceName 接口名称
* @param requestTime 请求时间
* @param body 请求体
* @param version 版本号
* @return 计算出的签名
*/
public String testSignCalculation(String accountId, String serviceName, String requestTime,
String body, String version) {
try {
log.info("=== 测试签名计算 ===");
log.info("accountId: {}", accountId);
log.info("serviceName: {}", serviceName);
log.info("requestTime: {}", requestTime);
log.info("body: {}", body);
log.info("version: {}", version);
log.info("signKey: {}", md5Secret);
String signString = buildSignString(accountId, serviceName, requestTime, body, version);
log.info("签名字符串: {}", signString);
String calculatedSign = calculateMD5(signString).toLowerCase();
log.info("计算签名: {}", calculatedSign);
return calculatedSign;
} catch (Exception e) {
log.error("测试签名计算失败: {}", e.getMessage(), e);
return null;
}
}
/**
* 验证AES配置
*
* @return 配置验证结果
*/
public Map<String, Object> validateAESConfig() {
Map<String, Object> result = new java.util.HashMap<>();
try {
log.info("=== 验证AES配置 ===");
// 检查密钥和IV是否存在
boolean hasKey = aesKey != null && !aesKey.trim().isEmpty();
boolean hasIv = aesIv != null && !aesIv.trim().isEmpty();
result.put("hasKey", hasKey);
result.put("hasIv", hasIv);
if (hasKey) {
result.put("keyLength", aesKey.length());
result.put("keyValid", aesKey.length() == 16);
log.info("AES密钥长度: {}, 是否有效: {}", aesKey.length(), aesKey.length() == 16);
}
if (hasIv) {
result.put("ivLength", aesIv.length());
result.put("ivValid", aesIv.length() == 16);
log.info("AES IV长度: {}, 是否有效: {}", aesIv.length(), aesIv.length() == 16);
}
boolean isValid = hasKey && hasIv && aesKey.length() == 16 && aesIv.length() == 16;
result.put("isValid", isValid);
log.info("AES配置验证结果: {}", result);
return result;
} catch (Exception e) {
log.error("AES配置验证失败: {}", e.getMessage(), e);
result.put("isValid", false);
result.put("error", e.getMessage());
return result;
}
}
/**
* 测试AES加密解密(用于调试)
*
* @param plainData 明文数据
* @return 测试结果
*/
public Map<String, Object> testAESEncryption(String plainData) {
Map<String, Object> result = new java.util.HashMap<>();
try {
log.info("=== 测试AES加密解密 ===");
log.info("明文数据: {}", plainData);
log.info("AES密钥: {}", aesKey);
log.info("AES IV: {}", aesIv);
// 先验证配置
Map<String, Object> configResult = validateAESConfig();
if (!(Boolean) configResult.get("isValid")) {
result.put("success", false);
result.put("error", "AES配置无效");
result.put("configResult", configResult);
return result;
}
// 加密
String encryptedData = encryptAES(plainData);
if (encryptedData == null) {
result.put("success", false);
result.put("error", "加密失败");
return result;
}
// 解密
String decryptedData = decryptAES(encryptedData);
if (decryptedData == null) {
result.put("success", false);
result.put("error", "解密失败");
return result;
}
// 验证
boolean isValid = plainData.equals(decryptedData);
result.put("success", isValid);
result.put("originalData", plainData);
result.put("encryptedData", encryptedData);
result.put("decryptedData", decryptedData);
result.put("isValid", isValid);
result.put("configResult", configResult);
log.info("AES测试结果: {}", result);
return result;
} catch (Exception e) {
log.error("AES测试失败: {}", e.getMessage(), e);
result.put("success", false);
result.put("error", e.getMessage());
return result;
}
}
/**
* 构建签名字符串
* 格式:accountId + serviceName + requestTime + body + version + signkey
* 注意:这里使用的是signkey而不是md5Secret
*/
private String buildSignString(String accountId, String serviceName, String requestTime,
String body, String version) {
StringBuilder sb = new StringBuilder();
sb.append(accountId != null ? accountId : "");
sb.append(serviceName != null ? serviceName : "");
sb.append(requestTime != null ? requestTime : "");
sb.append(body != null ? body : "");
sb.append(version != null ? version : "");
sb.append(md5Secret != null ? md5Secret : "");
String signString = sb.toString();
log.debug("构建签名字符串: {}", signString);
return signString;
}
/**
* 计算MD5值
*/
private String calculateMD5(String input) {
try {
MessageDigest md = MessageDigest.getInstance("MD5");
byte[] digest = md.digest(input.getBytes(StandardCharsets.UTF_8));
StringBuilder sb = new StringBuilder();
for (byte b : digest) {
sb.append(String.format("%02x", b));
}
return sb.toString();
} catch (Exception e) {
log.error("计算MD5失败: {}", e.getMessage(), e);
return null;
}
}
/**
* 验证时间戳是否在有效期内
*
* @param requestTime 请求时间字符串,格式:yyyy-MM-dd HH:mm:ss
* @param validMinutes 有效期(分钟)
* @return 是否有效
*/
public boolean isTimestampValid(String requestTime, int validMinutes) {
try {
// 解析请求时间
java.time.LocalDateTime requestDateTime = java.time.LocalDateTime.parse(
requestTime,
java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
);
// 获取当前时间
java.time.LocalDateTime now = java.time.LocalDateTime.now();
// 计算时间差
long diffMinutes = java.time.Duration.between(requestDateTime, now).toMinutes();
boolean isValid = Math.abs(diffMinutes) <= validMinutes;
log.info("时间戳验证结果: {}, 请求时间: {}, 当前时间: {}, 时间差(分钟): {}",
isValid, requestTime, now, diffMinutes);
return isValid;
} catch (Exception e) {
log.error("时间戳验证失败: {}", e.getMessage(), e);
return false;
}
}
/**
* 验证版本号
*
* @param version 版本号
* @return 是否有效
*/
public boolean isVersionValid(String version) {
if (version == null || version.trim().isEmpty()) {
return false;
}
// 检查版本号格式,这里假设支持1.0和2.0
return "1.0".equals(version) || "2.0".equals(version);
}
/**
* 获取AES密钥(仅用于调试)
*/
public String getAesKey() {
return aesKey;
}
/**
* 获取AES IV(仅用于调试)
*/
public String getAesIv() {
return aesIv;
}
}
@@ -1,144 +0,0 @@
package com.central.coupon.util;
/**
* 携程响应码工具类
* 定义携程API的标准响应码和错误码
*/
public class CtripResponseCodeUtil {
/**
* 携程响应码
*/
public static class CtripResponseCodes {
// 成功响应码
public static final String SUCCESS = "0000";
public static final String SUCCESS_MESSAGE = "操作成功";
// 参数错误
public static final String PARAM_ERROR = "1001";
public static final String DATA_INVALID = "1002";
public static final String SIGN_ERROR = "1003";
// 订单相关错误
public static final String ORDER_NOT_FOUND = "2001";
public static final String ORDER_ALREADY_EXISTS = "2002";
public static final String ORDER_STATUS_ERROR = "2003";
public static final String ORDER_CANCEL_FAILED = "2004";
public static final String ORDER_REFUND_FAILED = "2005";
public static final String CANCEL_ERROR = "2006";
public static final String REFUND_ERROR = "2007";
public static final String CONSUMED_ERROR = "2008";
// 优惠券相关错误
public static final String COUPON_NOT_FOUND = "3001";
public static final String COUPON_EXPIRED = "3002";
public static final String COUPON_USED = "3003";
public static final String COUPON_INVALID = "3004";
public static final String COUPON_VERIFY_FAILED = "3005";
// 库存相关错误
public static final String INVENTORY_NOT_ENOUGH = "4001";
public static final String INVENTORY_LOCKED = "4002";
// 系统错误
public static final String SYSTEM_ERROR = "9999";
public static final String NETWORK_ERROR = "9998";
public static final String TIMEOUT_ERROR = "9997";
}
/**
* 获取错误码对应的错误信息
*/
public static String getErrorMessage(String errorCode) {
switch (errorCode) {
case CtripResponseCodes.SUCCESS:
return "操作成功";
case CtripResponseCodes.PARAM_ERROR:
return "参数错误";
case CtripResponseCodes.DATA_INVALID:
return "数据无效";
case CtripResponseCodes.SIGN_ERROR:
return "签名验证失败";
case CtripResponseCodes.ORDER_NOT_FOUND:
return "订单不存在";
case CtripResponseCodes.ORDER_ALREADY_EXISTS:
return "订单已存在";
case CtripResponseCodes.ORDER_STATUS_ERROR:
return "订单状态错误";
case CtripResponseCodes.ORDER_CANCEL_FAILED:
return "订单取消失败";
case CtripResponseCodes.ORDER_REFUND_FAILED:
return "订单退款失败";
case CtripResponseCodes.CANCEL_ERROR:
return "订单取消错误";
case CtripResponseCodes.REFUND_ERROR:
return "订单退款错误";
case CtripResponseCodes.CONSUMED_ERROR:
return "订单核销错误";
case CtripResponseCodes.COUPON_NOT_FOUND:
return "优惠券不存在";
case CtripResponseCodes.COUPON_EXPIRED:
return "优惠券已过期";
case CtripResponseCodes.COUPON_USED:
return "优惠券已使用";
case CtripResponseCodes.COUPON_INVALID:
return "优惠券无效";
case CtripResponseCodes.COUPON_VERIFY_FAILED:
return "优惠券核销失败";
case CtripResponseCodes.INVENTORY_NOT_ENOUGH:
return "库存不足";
case CtripResponseCodes.INVENTORY_LOCKED:
return "库存已锁定";
case CtripResponseCodes.SYSTEM_ERROR:
return "系统错误";
case CtripResponseCodes.NETWORK_ERROR:
return "网络错误";
case CtripResponseCodes.TIMEOUT_ERROR:
return "请求超时";
default:
return "未知错误";
}
}
/**
* 判断是否为成功响应码
*/
public static boolean isSuccess(String responseCode) {
return CtripResponseCodes.SUCCESS.equals(responseCode);
}
/**
* 判断是否为参数错误
*/
public static boolean isParamError(String responseCode) {
return responseCode != null && responseCode.startsWith("1");
}
/**
* 判断是否为订单错误
*/
public static boolean isOrderError(String responseCode) {
return responseCode != null && responseCode.startsWith("2");
}
/**
* 判断是否为优惠券错误
*/
public static boolean isCouponError(String responseCode) {
return responseCode != null && responseCode.startsWith("3");
}
/**
* 判断是否为库存错误
*/
public static boolean isInventoryError(String responseCode) {
return responseCode != null && responseCode.startsWith("4");
}
/**
* 判断是否为系统错误
*/
public static boolean isSystemError(String responseCode) {
return responseCode != null && responseCode.startsWith("9");
}
}
@@ -1,51 +0,0 @@
spring:
datasource:
# url: jdbc:mysql://${zlt.datasource.ip}:3306/device-center?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai
url: jdbc:mysql://${zlt.datasource.ip}/coupon-center?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&allowMultiQueries=true
username: ${zlt.datasource.username}
password: ${zlt.datasource.password}
driver-class-name: com.mysql.cj.jdbc.Driver
mybatis-plus:
mapper-locations: classpath:/mapper/*Mapper.xml
#实体扫描,多个package用逗号或者分号分隔
typeAliasesPackage: com.central.coupon.model
# configuration:
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
global-config:
db-config:
id-type: auto
springdoc:
group-configs:
- group: 'default'
paths-to-match: '/**'
packages-to-scan: com.central.coupon.controller
knife4j:
enable: true
setting:
swagger-model-name: 优惠券中心接口文档
zlt:
#多租户配置
tenant:
enable: false
ignoreTables:
ignoreSqls:
# 禁用分布式锁
lock:
lockerType: NONE
# 日志配置
logging:
level:
com.central.order.controller.OrderFileController: DEBUG
com.central.coupon.util.CtripDecryptUtil: DEBUG
# 携程API配置
ctrip:
aes:
key: 087b36ad0dff7942 # 请替换为实际的AES密钥
iv: 750e15a31356a99d # 请替换为实际的AES IV
sign:
key: ce6033ae31124ec5cdab3d2bc79f2622 # 请替换为实际的签名密钥
@@ -1,15 +0,0 @@
server:
port: 8002
spring:
application:
name: coupon-center
# cloud:
# nacos:
# discovery:
# ip: 81.70.164.178
# cloud:
# nacos:
# discovery:
# metadata:
# version: zlt
@@ -1,130 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.central.coupon.mapper.CouponMapper">
<!-- 结果映射 -->
<resultMap id="BaseResultMap" type="com.central.coupon.entity.Coupon">
<id column="id" property="id" jdbcType="BIGINT"/>
<result column="coupon_no" property="couponNo" jdbcType="VARCHAR"/>
<result column="coupon_name" property="couponName" jdbcType="VARCHAR"/>
<result column="coupon_type" property="couponType" jdbcType="INTEGER"/>
<result column="amount" property="amount" jdbcType="DECIMAL"/>
<result column="min_amount" property="minAmount" jdbcType="DECIMAL"/>
<result column="discount_rate" property="discountRate" jdbcType="INTEGER"/>
<result column="status" property="status" jdbcType="INTEGER"/>
<result column="user_phone" property="userPhone" jdbcType="VARCHAR"/>
<result column="user_id" property="userId" jdbcType="BIGINT"/>
<result column="source" property="source" jdbcType="INTEGER"/>
<result column="ctrip_coupon_id" property="ctripCouponId" jdbcType="VARCHAR"/>
<result column="valid_start_time" property="validStartTime" jdbcType="TIMESTAMP"/>
<result column="valid_end_time" property="validEndTime" jdbcType="TIMESTAMP"/>
<result column="used_time" property="usedTime" jdbcType="TIMESTAMP"/>
<result column="used_order_no" property="usedOrderNo" jdbcType="VARCHAR"/>
<result column="cancel_time" property="cancelTime" jdbcType="TIMESTAMP"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
<result column="create_by" property="createBy" jdbcType="VARCHAR"/>
<result column="update_by" property="updateBy" jdbcType="VARCHAR"/>
<result column="remark" property="remark" jdbcType="VARCHAR"/>
<result column="tenant_id" property="tenantId" jdbcType="VARCHAR"/>
</resultMap>
<!-- 基础字段 -->
<sql id="Base_Column_List">
id, coupon_no, coupon_name, coupon_type, amount, min_amount, discount_rate,
status, user_phone, user_id, source, ctrip_coupon_id, valid_start_time, valid_end_time,
used_time, used_order_no, cancel_time, create_time, update_time, create_by, update_by, remark, tenant_id
</sql>
<!-- 分页查询优惠券列表 -->
<select id="selectCouponPage" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_coupon
<where>
<if test="coupon.couponName != null and coupon.couponName != ''">
AND coupon_name LIKE CONCAT('%', #{coupon.couponName}, '%')
</if>
<if test="coupon.userPhone != null and coupon.userPhone != ''">
AND user_phone = #{coupon.userPhone}
</if>
<if test="coupon.status != null">
AND status = #{coupon.status}
</if>
<if test="coupon.source != null">
AND source = #{coupon.source}
</if>
<if test="coupon.couponType != null">
AND coupon_type = #{coupon.couponType}
</if>
</where>
ORDER BY create_time DESC
</select>
<!-- 根据手机号查询用户优惠券 -->
<select id="selectByUserPhone" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_coupon
WHERE user_phone = #{userPhone}
ORDER BY create_time DESC
</select>
<!-- 根据手机号查询可用优惠券 -->
<select id="selectAvailableByUserPhone" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_coupon
WHERE user_phone = #{userPhone}
AND status = 0
AND valid_start_time &lt;= NOW()
AND valid_end_time &gt;= NOW()
ORDER BY create_time DESC
</select>
<!-- 根据携程优惠券ID查询 -->
<select id="selectByCtripCouponId" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_coupon
WHERE ctrip_coupon_id = #{ctripCouponId}
LIMIT 1
</select>
<!-- 根据订单号查询使用的优惠券 -->
<select id="selectByUsedOrderNo" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_coupon
WHERE used_order_no = #{usedOrderNo}
LIMIT 1
</select>
<!-- 更新优惠券状态为已使用 -->
<update id="updateCouponUsed">
UPDATE t_coupon
SET status = 1,
used_time = NOW(),
used_order_no = #{usedOrderNo},
update_time = NOW()
WHERE id = #{id}
</update>
<!-- 批量更新过期优惠券状态 -->
<update id="updateExpiredCoupons">
UPDATE t_coupon
SET status = 2,
update_time = NOW()
WHERE status = 0
AND valid_end_time &lt; NOW()
</update>
<!-- 检查用户手机号和携程优惠券ID是否已存在 -->
<select id="countByUserPhoneAndCtripCouponId" resultType="int">
SELECT COUNT(*)
FROM t_coupon
WHERE user_phone = #{userPhone}
AND ctrip_coupon_id = #{ctripCouponId}
</select>
</mapper>
@@ -1,62 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.central.coupon.mapper.CtripConsumedMapper">
<!-- 结果映射 -->
<resultMap id="BaseResultMap" type="com.central.coupon.entity.CtripConsumed">
<id column="id" property="id" jdbcType="BIGINT"/>
<result column="ota_order_id" property="otaOrderId" jdbcType="VARCHAR"/>
<result column="supplier_order_id" property="supplierOrderId" jdbcType="VARCHAR"/>
<result column="sequence_id" property="sequenceId" jdbcType="VARCHAR"/>
<result column="item_id" property="itemId" jdbcType="VARCHAR"/>
<result column="use_start_date" property="useStartDate" jdbcType="VARCHAR"/>
<result column="use_end_date" property="useEndDate" jdbcType="VARCHAR"/>
<result column="quantity" property="quantity" jdbcType="INTEGER"/>
<result column="use_quantity" property="useQuantity" jdbcType="INTEGER"/>
<result column="lost_amount" property="lostAmount" jdbcType="DECIMAL"/>
<result column="lost_amount_currency" property="lostAmountCurrency" jdbcType="VARCHAR"/>
<result column="remark" property="remark" jdbcType="VARCHAR"/>
<result column="status" property="status" jdbcType="INTEGER"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
<result column="create_by" property="createBy" jdbcType="VARCHAR"/>
<result column="update_by" property="updateBy" jdbcType="VARCHAR"/>
<result column="remark_detail" property="remarkDetail" jdbcType="VARCHAR"/>
<result column="tenant_id" property="tenantId" jdbcType="VARCHAR"/>
</resultMap>
<!-- 基础字段 -->
<sql id="Base_Column_List">
id, ota_order_id, supplier_order_id, sequence_id, item_id, use_start_date, use_end_date,
quantity, use_quantity, lost_amount, lost_amount_currency, remark, status,
create_time, update_time, create_by, update_by, remark_detail, tenant_id
</sql>
<!-- 根据携程订单号查询核销信息 -->
<select id="selectByOtaOrderId" parameterType="string" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_ctrip_consumed
WHERE ota_order_id = #{otaOrderId,jdbcType=VARCHAR}
ORDER BY create_time DESC
</select>
<!-- 根据供应商订单号查询核销信息 -->
<select id="selectBySupplierOrderId" parameterType="string" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_ctrip_consumed
WHERE supplier_order_id = #{supplierOrderId,jdbcType=VARCHAR}
ORDER BY create_time DESC
</select>
<!-- 根据供应商批次流水号查询核销信息 -->
<select id="selectBySequenceId" parameterType="string" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_ctrip_consumed
WHERE sequence_id = #{sequenceId,jdbcType=VARCHAR}
LIMIT 1
</select>
</mapper>
@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.central.coupon.mapper.CtripConsumedPassengerMapper">
<!-- 结果映射 -->
<resultMap id="BaseResultMap" type="com.central.coupon.entity.CtripConsumedPassenger">
<id column="id" property="id" jdbcType="BIGINT"/>
<result column="consumed_id" property="consumedId" jdbcType="BIGINT"/>
<result column="passenger_id" property="passengerId" jdbcType="VARCHAR"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
<result column="create_by" property="createBy" jdbcType="VARCHAR"/>
<result column="update_by" property="updateBy" jdbcType="VARCHAR"/>
<result column="remark" property="remark" jdbcType="VARCHAR"/>
<result column="tenant_id" property="tenantId" jdbcType="VARCHAR"/>
</resultMap>
<!-- 基础字段 -->
<sql id="Base_Column_List">
id, consumed_id, passenger_id, create_time, update_time, create_by, update_by, remark, tenant_id
</sql>
<!-- 根据核销ID查询乘客列表 -->
<select id="selectByConsumedId" parameterType="long" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_ctrip_consumed_passenger
WHERE consumed_id = #{consumedId,jdbcType=BIGINT}
ORDER BY create_time ASC
</select>
</mapper>
@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.central.coupon.mapper.CtripConsumedVoucherMapper">
<!-- 结果映射 -->
<resultMap id="BaseResultMap" type="com.central.coupon.entity.CtripConsumedVoucher">
<id column="id" property="id" jdbcType="BIGINT"/>
<result column="consumed_id" property="consumedId" jdbcType="BIGINT"/>
<result column="voucher_id" property="voucherId" jdbcType="VARCHAR"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
<result column="create_by" property="createBy" jdbcType="VARCHAR"/>
<result column="update_by" property="updateBy" jdbcType="VARCHAR"/>
<result column="remark" property="remark" jdbcType="VARCHAR"/>
<result column="tenant_id" property="tenantId" jdbcType="VARCHAR"/>
</resultMap>
<!-- 基础字段 -->
<sql id="Base_Column_List">
id, consumed_id, voucher_id, create_time, update_time, create_by, update_by, remark, tenant_id
</sql>
<!-- 根据核销ID查询凭证列表 -->
<select id="selectByConsumedId" parameterType="long" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_ctrip_consumed_voucher
WHERE consumed_id = #{consumedId,jdbcType=BIGINT}
ORDER BY create_time ASC
</select>
</mapper>
@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.central.coupon.mapper.CtripContactMapper">
<!-- 根据订单ID查询联系人列表 -->
<select id="selectByOrderId" resultType="com.central.coupon.entity.CtripContact">
SELECT
id,
order_id,
contact_name,
contact_phone,
contact_email,
contact_type,
create_time,
update_time,
create_by,
update_by,
remark,
tenant_id
FROM t_ctrip_contact
WHERE order_id = #{orderId}
AND deleted = 0
ORDER BY id ASC
</select>
<!-- 根据订单ID和联系人类型查询联系人 -->
<select id="selectByOrderIdAndType" resultType="com.central.coupon.entity.CtripContact">
SELECT
id,
order_id,
contact_name,
contact_phone,
contact_email,
contact_type,
create_time,
update_time,
create_by,
update_by,
remark,
tenant_id
FROM t_ctrip_contact
WHERE order_id = #{orderId}
AND contact_type = #{contactType}
AND deleted = 0
ORDER BY id ASC
</select>
</mapper>
@@ -1,76 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.central.coupon.mapper.CtripCouponMapper">
<!-- 根据订单ID查询优惠券列表 -->
<select id="selectByOrderId" resultType="com.central.coupon.entity.CtripCoupon">
SELECT
id,
order_id,
coupon_type,
coupon_code,
coupon_name,
coupon_amount,
currency,
coupon_status,
use_time,
create_time,
update_time,
create_by,
update_by,
remark,
tenant_id
FROM t_ctrip_coupon
WHERE order_id = #{orderId}
AND deleted = 0
ORDER BY id ASC
</select>
<!-- 根据优惠券编码查询优惠券 -->
<select id="selectByCouponCode" resultType="com.central.coupon.entity.CtripCoupon">
SELECT
id,
order_id,
coupon_type,
coupon_code,
coupon_name,
coupon_amount,
currency,
coupon_status,
use_time,
create_time,
update_time,
create_by,
update_by,
remark,
tenant_id
FROM t_ctrip_coupon
WHERE coupon_code = #{couponCode}
AND deleted = 0
</select>
<!-- 根据优惠券状态查询优惠券列表 -->
<select id="selectByStatus" resultType="com.central.coupon.entity.CtripCoupon">
SELECT
id,
order_id,
coupon_type,
coupon_code,
coupon_name,
coupon_amount,
currency,
coupon_status,
use_time,
create_time,
update_time,
create_by,
update_by,
remark,
tenant_id
FROM t_ctrip_coupon
WHERE coupon_status = #{status}
AND deleted = 0
ORDER BY id ASC
</select>
</mapper>
@@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.central.coupon.mapper.CtripOrderItemMapper">
<!-- 根据订单ID查询订单项列表 -->
<select id="selectByOrderId" resultType="com.central.coupon.entity.CtripOrderItem">
SELECT
id,
order_id,
item_id,
item_name,
item_type,
plu,
use_start_date,
use_end_date,
price,
sale_price,
total_price,
currency,
quantity,
create_time,
update_time,
create_by,
update_by,
remark,
tenant_id
FROM t_ctrip_order_item
WHERE order_id = #{orderId}
AND deleted = 0
ORDER BY id ASC
</select>
<!-- 根据订单项编号查询订单项 -->
<select id="selectByItemId" resultType="com.central.coupon.entity.CtripOrderItem">
SELECT
id,
order_id,
item_id,
item_name,
item_type,
plu,
use_start_date,
use_end_date,
price,
sale_price,
total_price,
currency,
quantity,
create_time,
update_time,
create_by,
update_by,
remark,
tenant_id
FROM t_ctrip_order_item
WHERE item_id = #{itemId}
AND deleted = 0
</select>
<!-- 根据订单ID和订单项编号查询订单项 -->
<select id="selectByOrderIdAndItemId" resultType="com.central.coupon.entity.CtripOrderItem">
SELECT
id,
order_id,
item_id,
item_name,
item_type,
plu,
use_start_date,
use_end_date,
price,
sale_price,
total_price,
currency,
quantity,
create_time,
update_time,
create_by,
update_by,
remark,
tenant_id
FROM t_ctrip_order_item
WHERE order_id = #{orderId}
AND item_id = #{itemId}
AND deleted = 0
</select>
</mapper>
@@ -1,74 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.central.coupon.mapper.CtripOrderMapper">
<!-- 根据携程订单号查询订单 -->
<select id="selectByOtaOrderId" resultType="com.central.coupon.entity.CtripOrder">
SELECT
id,
ota_order_id,
supplier_order_id,
sequence_id,
confirm_type,
order_last_confirm_time,
status,
total_amount,
currency,
create_time,
update_time,
create_by,
update_by,
remark,
tenant_id
FROM t_ctrip_order
WHERE ota_order_id = #{otaOrderId}
AND deleted = 0
</select>
<!-- 根据供应商订单号查询订单 -->
<select id="selectBySupplierOrderId" resultType="com.central.coupon.entity.CtripOrder">
SELECT
id,
ota_order_id,
supplier_order_id,
sequence_id,
confirm_type,
order_last_confirm_time,
status,
total_amount,
currency,
create_time,
update_time,
create_by,
update_by,
remark,
tenant_id
FROM t_ctrip_order
WHERE supplier_order_id = #{supplierOrderId}
AND deleted = 0
</select>
<!-- 根据流水号查询订单 -->
<select id="selectBySequenceId" resultType="com.central.coupon.entity.CtripOrder">
SELECT
id,
ota_order_id,
supplier_order_id,
sequence_id,
confirm_type,
order_last_confirm_time,
status,
total_amount,
currency,
create_time,
update_time,
create_by,
update_by,
remark,
tenant_id
FROM t_ctrip_order
WHERE sequence_id = #{sequenceId}
AND deleted = 0
</select>
</mapper>
@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.central.coupon.mapper.CtripPassengerMapper">
<!-- 根据订单项ID查询乘客列表 -->
<select id="selectByOrderItemId" resultType="com.central.coupon.entity.CtripPassenger">
SELECT
id,
order_item_id,
passenger_id,
name,
mobile,
card_type,
card_no,
age_type,
gender,
create_time,
update_time,
create_by,
update_by,
remark,
tenant_id
FROM t_ctrip_passenger
WHERE order_item_id = #{orderItemId}
ORDER BY id ASC
</select>
</mapper>
@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.central.coupon.mapper.CtripRefundItemMapper">
<!-- 结果映射 -->
<resultMap id="BaseResultMap" type="com.central.coupon.entity.CtripRefundItem">
<id column="id" property="id" jdbcType="BIGINT"/>
<result column="refund_id" property="refundId" jdbcType="BIGINT"/>
<result column="item_id" property="itemId" jdbcType="VARCHAR"/>
<result column="plu" property="plu" jdbcType="VARCHAR"/>
<result column="amount" property="amount" jdbcType="DECIMAL"/>
<result column="amount_currency" property="amountCurrency" jdbcType="VARCHAR"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
<result column="create_by" property="createBy" jdbcType="VARCHAR"/>
<result column="update_by" property="updateBy" jdbcType="VARCHAR"/>
<result column="remark" property="remark" jdbcType="VARCHAR"/>
<result column="tenant_id" property="tenantId" jdbcType="VARCHAR"/>
</resultMap>
<!-- 基础字段 -->
<sql id="Base_Column_List">
id, refund_id, item_id, plu, amount, amount_currency,
create_time, update_time, create_by, update_by, remark, tenant_id
</sql>
<!-- 根据退款ID查询退款项列表 -->
<select id="selectByRefundId" parameterType="long" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_ctrip_refund_item
WHERE refund_id = #{refundId,jdbcType=BIGINT}
ORDER BY create_time ASC
</select>
</mapper>
@@ -1,59 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.central.coupon.mapper.CtripRefundMapper">
<!-- 结果映射 -->
<resultMap id="BaseResultMap" type="com.central.coupon.entity.CtripRefund">
<id column="id" property="id" jdbcType="BIGINT"/>
<result column="ota_order_id" property="otaOrderId" jdbcType="VARCHAR"/>
<result column="supplier_order_id" property="supplierOrderId" jdbcType="VARCHAR"/>
<result column="sequence_id" property="sequenceId" jdbcType="VARCHAR"/>
<result column="total_amount" property="totalAmount" jdbcType="DECIMAL"/>
<result column="total_amount_currency" property="totalAmountCurrency" jdbcType="VARCHAR"/>
<result column="last_confirm_time" property="lastConfirmTime" jdbcType="TIMESTAMP"/>
<result column="status" property="status" jdbcType="INTEGER"/>
<result column="confirm_result_code" property="confirmResultCode" jdbcType="VARCHAR"/>
<result column="confirm_result_message" property="confirmResultMessage" jdbcType="VARCHAR"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
<result column="create_by" property="createBy" jdbcType="VARCHAR"/>
<result column="update_by" property="updateBy" jdbcType="VARCHAR"/>
<result column="remark" property="remark" jdbcType="VARCHAR"/>
<result column="tenant_id" property="tenantId" jdbcType="VARCHAR"/>
</resultMap>
<!-- 基础字段 -->
<sql id="Base_Column_List">
id, ota_order_id, supplier_order_id, sequence_id, total_amount, total_amount_currency,
last_confirm_time, status, confirm_result_code, confirm_result_message,
create_time, update_time, create_by, update_by, remark, tenant_id
</sql>
<!-- 根据携程订单号查询退款信息 -->
<select id="selectByOtaOrderId" parameterType="string" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_ctrip_refund
WHERE ota_order_id = #{otaOrderId,jdbcType=VARCHAR}
ORDER BY create_time DESC
</select>
<!-- 根据供应商订单号查询退款信息 -->
<select id="selectBySupplierOrderId" parameterType="string" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_ctrip_refund
WHERE supplier_order_id = #{supplierOrderId,jdbcType=VARCHAR}
ORDER BY create_time DESC
</select>
<!-- 根据携程批次流水号查询退款信息 -->
<select id="selectBySequenceId" parameterType="string" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_ctrip_refund
WHERE sequence_id = #{sequenceId,jdbcType=VARCHAR}
LIMIT 1
</select>
</mapper>
@@ -1,72 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.central.coupon.mapper.CtripVoucherMapper">
<!-- 根据订单ID查询凭证列表 -->
<select id="selectByOrderId" resultType="com.central.coupon.entity.CtripVoucher">
SELECT
id,
order_id,
item_id,
voucher_id,
voucher_code,
voucher_type,
voucher_data,
voucher_seat_info,
create_time,
update_time,
create_by,
update_by,
remark,
tenant_id
FROM t_ctrip_voucher
WHERE order_id = #{orderId}
AND deleted = 0
ORDER BY id ASC
</select>
<!-- 根据凭证编号查询凭证 -->
<select id="selectByVoucherId" resultType="com.central.coupon.entity.CtripVoucher">
SELECT
id,
order_id,
item_id,
voucher_id,
voucher_code,
voucher_type,
voucher_data,
voucher_seat_info,
create_time,
update_time,
create_by,
update_by,
remark,
tenant_id
FROM t_ctrip_voucher
WHERE voucher_id = #{voucherId}
AND deleted = 0
</select>
<!-- 根据凭证码查询凭证 -->
<select id="selectByVoucherCode" resultType="com.central.coupon.entity.CtripVoucher">
SELECT
id,
order_id,
item_id,
voucher_id,
voucher_code,
voucher_type,
voucher_data,
voucher_seat_info,
create_time,
update_time,
create_by,
update_by,
remark,
tenant_id
FROM t_ctrip_voucher
WHERE voucher_code = #{voucherCode}
AND deleted = 0
</select>
</mapper>
@@ -1,194 +0,0 @@
package com.central.coupon.service;
import com.central.coupon.entity.Coupon;
import com.central.coupon.service.impl.CouponServiceImpl;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import static org.junit.jupiter.api.Assertions.*;
/**
* 优惠券服务测试类
*/
@SpringBootTest
@ActiveProfiles("test")
@Transactional
public class CouponServiceTest {
@Autowired
private ICouponService couponService;
@Test
public void testCreateCouponFromCtrip() {
// 准备测试数据
String ctripCouponId = "TEST_COUPON_001";
String userPhone = "13800138000";
String couponName = "测试优惠券";
Integer couponType = 1;
BigDecimal amount = new BigDecimal("100.00");
BigDecimal minAmount = new BigDecimal("200.00");
Integer discountRate = null;
Date validStartTime = new Date();
Date validEndTime = new Date(System.currentTimeMillis() + 30 * 24 * 60 * 60 * 1000L); // 30天后过期
// 执行测试
boolean result = couponService.createCouponFromCtrip(ctripCouponId, userPhone, couponName,
couponType, amount, minAmount, discountRate, validStartTime, validEndTime);
// 验证结果
assertTrue(result);
// 验证数据是否正确保存
Coupon savedCoupon = couponService.getByCtripCouponId(ctripCouponId);
assertNotNull(savedCoupon);
assertEquals(userPhone, savedCoupon.getUserPhone());
assertEquals(couponName, savedCoupon.getCouponName());
assertEquals(couponType, savedCoupon.getCouponType());
assertEquals(amount, savedCoupon.getAmount());
assertEquals(minAmount, savedCoupon.getMinAmount());
assertEquals(0, savedCoupon.getStatus()); // 未使用状态
assertEquals(1, savedCoupon.getSource()); // 来源:携程
}
@Test
public void testGetAvailableCouponsByUserPhone() {
// 准备测试数据
String userPhone = "13800138000";
// 创建测试优惠券
createTestCoupon(userPhone, "TEST_COUPON_001", 0); // 未使用
createTestCoupon(userPhone, "TEST_COUPON_002", 1); // 已使用
createTestCoupon(userPhone, "TEST_COUPON_003", 0); // 未使用
// 执行测试
List<Coupon> availableCoupons = couponService.getAvailableCouponsByUserPhone(userPhone);
// 验证结果
assertEquals(2, availableCoupons.size()); // 只有未使用的优惠券
assertTrue(availableCoupons.stream().allMatch(coupon -> coupon.getStatus() == 0));
}
@Test
public void testSelectBestCoupon() {
// 准备测试数据
String userPhone = "13800138000";
BigDecimal orderAmount = new BigDecimal("300.00");
// 创建测试优惠券
createTestCoupon(userPhone, "TEST_COUPON_001", 0, new BigDecimal("50.00"), new BigDecimal("200.00")); // 满减券
createTestCoupon(userPhone, "TEST_COUPON_002", 0, new BigDecimal("100.00"), new BigDecimal("200.00")); // 满减券
createTestCoupon(userPhone, "TEST_COUPON_003", 0, new BigDecimal("30.00"), new BigDecimal("100.00")); // 满减券,金额不够
// 执行测试
Coupon bestCoupon = couponService.selectBestCoupon(userPhone, orderAmount);
// 验证结果
assertNotNull(bestCoupon);
assertEquals("TEST_COUPON_002", bestCoupon.getCtripCouponId()); // 应该选择金额最大的优惠券
assertEquals(new BigDecimal("100.00"), bestCoupon.getAmount());
}
@Test
public void testVerifyCtripCoupon() {
// 准备测试数据
String userPhone = "13800138000";
String ctripCouponId = "TEST_COUPON_001";
String orderNo = "ORDER_001";
// 创建测试优惠券
createTestCoupon(userPhone, ctripCouponId, 0);
// 执行测试
boolean result = couponService.verifyCtripCoupon(ctripCouponId, orderNo);
// 验证结果
assertTrue(result);
// 验证优惠券状态已更新
Coupon updatedCoupon = couponService.getByCtripCouponId(ctripCouponId);
assertEquals(1, updatedCoupon.getStatus()); // 已使用状态
assertEquals(orderNo, updatedCoupon.getUsedOrderNo());
}
@Test
public void testVerifyCtripCouponNotFound() {
// 执行测试
assertThrows(CouponServiceImpl.CouponNotFoundException.class, () -> {
couponService.verifyCtripCoupon("NON_EXISTENT_COUPON", "ORDER_001");
});
}
@Test
public void testVerifyCtripCouponExpired() {
// 准备测试数据
String userPhone = "13800138000";
String ctripCouponId = "TEST_COUPON_EXPIRED";
// 创建已过期的测试优惠券
createExpiredTestCoupon(userPhone, ctripCouponId);
// 执行测试
assertThrows(CouponServiceImpl.CouponExpiredException.class, () -> {
couponService.verifyCtripCoupon(ctripCouponId, "ORDER_001");
});
}
/**
* 创建测试优惠券
*/
private void createTestCoupon(String userPhone, String ctripCouponId, Integer status) {
createTestCoupon(userPhone, ctripCouponId, status, new BigDecimal("100.00"), new BigDecimal("200.00"));
}
/**
* 创建测试优惠券
*/
private void createTestCoupon(String userPhone, String ctripCouponId, Integer status,
BigDecimal amount, BigDecimal minAmount) {
Coupon coupon = new Coupon();
coupon.setCouponNo("CP" + System.currentTimeMillis());
coupon.setCouponName("测试优惠券");
coupon.setCouponType(1);
coupon.setAmount(amount);
coupon.setMinAmount(minAmount);
coupon.setStatus(status);
coupon.setUserPhone(userPhone);
coupon.setSource(1);
coupon.setCtripCouponId(ctripCouponId);
coupon.setValidStartTime(new Date());
coupon.setValidEndTime(new Date(System.currentTimeMillis() + 30 * 24 * 60 * 60 * 1000L));
coupon.setCreateTime(new Date());
coupon.setUpdateTime(new Date());
couponService.save(coupon);
}
/**
* 创建已过期的测试优惠券
*/
private void createExpiredTestCoupon(String userPhone, String ctripCouponId) {
Coupon coupon = new Coupon();
coupon.setCouponNo("CP" + System.currentTimeMillis());
coupon.setCouponName("已过期测试优惠券");
coupon.setCouponType(1);
coupon.setAmount(new BigDecimal("100.00"));
coupon.setMinAmount(new BigDecimal("200.00"));
coupon.setStatus(0);
coupon.setUserPhone(userPhone);
coupon.setSource(1);
coupon.setCtripCouponId(ctripCouponId);
coupon.setValidStartTime(new Date(System.currentTimeMillis() - 60 * 24 * 60 * 60 * 1000L)); // 60天前开始
coupon.setValidEndTime(new Date(System.currentTimeMillis() - 30 * 24 * 60 * 60 * 1000L)); // 30天前过期
coupon.setCreateTime(new Date());
coupon.setUpdateTime(new Date());
couponService.save(coupon);
}
}
@@ -1 +0,0 @@
@@ -1 +0,0 @@
@@ -1 +0,0 @@
+57
View File
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.zlt</groupId>
<artifactId>zlt-business</artifactId>
<version>6.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>demo-center</artifactId>
<description>示例业务模块</description>
<dependencies>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-common-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-db-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-log-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-redis-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-loadbalancer-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-sentinel-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
@@ -0,0 +1,13 @@
package com.central.demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@EnableDiscoveryClient
@SpringBootApplication
public class DemoCenterApplication {
public static void main(String[] args) {
SpringApplication.run(DemoCenterApplication.class, args);
}
}
@@ -0,0 +1,16 @@
package com.central.demo.controller;
import com.central.common.model.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/demo")
public class DemoController {
@GetMapping("/hello")
public Result<String> hello() {
return Result.succeed("Hello from Demo Center!");
}
}
@@ -0,0 +1,13 @@
spring:
application:
name: demo-center
cloud:
nacos:
discovery:
server-addr: ${NACOS_HOST:localhost}:${NACOS_PORT:8848}
config:
server-addr: ${NACOS_HOST:localhost}:${NACOS_PORT:8848}
file-extension: yml
server:
port: 8100
-146
View File
@@ -1,146 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.zlt</groupId>
<artifactId>zlt-business</artifactId>
<version>6.0.0</version>
</parent>
<artifactId>device-center</artifactId>
<description>设备中心</description>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- 公共实体类模块 -->
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-config</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-log-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-common-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-db-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-redis-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-loadbalancer-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>zlt-sentinel-spring-boot-starter</artifactId>
</dependency>
<!-- swagger -->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.zlt</groupId>
<artifactId>search-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
<!-- 验证依赖 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.25</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
<imageTags>
<imageTag>${project.version}</imageTag>
<imageTag>latest</imageTag>
</imageTags>
<forceTags>true</forceTags>
<baseImage>${docker.baseImage}</baseImage>
<volumes>${docker.volumes}</volumes>
<env>
<JAVA_OPTS>${docker.java.opts}</JAVA_OPTS>
</env>
<entryPoint>["sh","-c","java $JAVA_OPTS ${docker.java.security.egd} -jar /${project.build.finalName}.jar"]</entryPoint>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
<finalName>${project.artifactId}</finalName>
</build>
</project>
@@ -1,22 +0,0 @@
package com.central.device;
import com.central.common.lb.annotation.EnableFeignInterceptor;
import com.central.search.annotation.EnableSearchClient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
* @author 作者 lsl E-mail: 1272745473@qq.com
*/
@EnableDiscoveryClient
@EnableSearchClient
@EnableTransactionManagement
@EnableFeignInterceptor
@SpringBootApplication
public class DeviceCenterApp {
public static void main(String[] args) {
SpringApplication.run(DeviceCenterApp.class, args);
}
}
@@ -1,273 +0,0 @@
package com.central.device.controller;
import cn.hutool.core.collection.CollUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.support.ExcelTypeEnum;
import com.central.common.model.PageResult;
import com.central.common.model.Result;
import com.central.device.model.AgeDevice;
import com.central.device.model.excel.AgeDeviceExcel;
import com.central.device.service.IAgeDeviceService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* Device information
*
* @author lsl
* @date 2024-12-19 17:51:47
*/
@Slf4j
@RestController
@RequestMapping("/device")
@Tag(name = "设备管理")
@RequiredArgsConstructor
public class AgeDeviceController {
@Autowired
private IAgeDeviceService ageDeviceService;
/**
* 列表
*/
@Operation(summary = "查询列表")
@Parameters({
@Parameter(name = "page",description = "分页起始位置",required = true,in=ParameterIn.QUERY),
@Parameter(name = "limit",description = "分页结束位置",required = true,in=ParameterIn.QUERY)
})
@GetMapping
public PageResult list(@RequestParam Map<String, Object> params) {
return ageDeviceService.findList(params);
}
/**
* 查询
*/
@Operation(summary = "查询")
@GetMapping("/{id}")
public Result findUserById(@PathVariable Long id) {
AgeDevice model = ageDeviceService.getById(id);
return Result.succeed(model, "查询成功");
}
/**
* 新增or更新
*/
@Operation(summary = "保存")
@PostMapping
public Result save(@RequestBody AgeDevice ageDevice) {
ageDeviceService.saveOrUpdate(ageDevice);
return Result.succeed("保存成功");
}
/**
* 删除
*/
@Operation(summary = "删除")
@Parameter(name = "id", description = "id", in = ParameterIn.PATH, required = true)
@DeleteMapping("/{id}")
public Result delete(@PathVariable Long id) {
ageDeviceService.removeById(id);
return Result.succeed("删除成功");
}
/**
* 导出设备信息
*/
@Operation(summary = "导出设备信息")
@PostMapping("/export")
public void exportDevices(@RequestBody Map<String, Object> params, HttpServletResponse response) {
try {
// 设置响应头
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding(StandardCharsets.UTF_8.name());
String fileName = URLEncoder.encode("设备信息", StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
// 查询导出数据
List<AgeDevice> deviceList = ageDeviceService.findListByParams(params);
if (CollUtil.isEmpty(deviceList)) {
deviceList = new ArrayList<>();
}
// 转换并写入Excel
List<AgeDeviceExcel> excelList = deviceList.stream()
.map(AgeDeviceExcel::fromDevice)
.collect(java.util.stream.Collectors.toList());
EasyExcel.write(response.getOutputStream(), AgeDeviceExcel.class)
.excelType(ExcelTypeEnum.XLSX)
.sheet("设备信息")
.doWrite(excelList);
} catch (Exception e) {
log.error("导出设备信息失败", e);
// 重置response
response.reset();
response.setContentType("application/json");
response.setCharacterEncoding(StandardCharsets.UTF_8.name());
try {
response.getWriter().println("{\"code\":500,\"msg\":\"导出失败\"}");
} catch (IOException ex) {
log.error("写入响应失败", ex);
}
}
}
/**
* 导入设备信息
*/
@Operation(summary = "导入设备信息")
@PostMapping("/import")
public Result<String> importDevices(@RequestParam("file") MultipartFile file) {
try {
if (file.isEmpty()) {
return Result.failed("请选择要导入的文件");
}
// 文件大小校验(10MB)
if (file.getSize() > 10 * 1024 * 1024) {
return Result.failed("文件大小不能超过10MB");
}
// 文件类型校验
String fileName = file.getOriginalFilename();
if (fileName == null || (!fileName.endsWith(".xlsx") && !fileName.endsWith(".xls"))) {
return Result.failed("请上传Excel文件");
}
// 读取Excel数据
List<AgeDeviceExcel> excelList = EasyExcel.read(file.getInputStream())
.head(AgeDeviceExcel.class)
.sheet()
.doReadSync();
if (CollUtil.isEmpty(excelList)) {
return Result.failed("导入数据为空");
}
// 数据校验和转换
List<String> errorMsgs = new ArrayList<>();
List<AgeDevice> deviceList = new ArrayList<>();
for (int i = 0; i < excelList.size(); i++) {
AgeDeviceExcel excelData = excelList.get(i);
try {
// 数据校验
validateExcelData(excelData, i + 1, errorMsgs);
if (errorMsgs.isEmpty()) {
deviceList.add(excelData.toDevice());
}
} catch (Exception e) {
log.error("第{}行数据处理失败", i + 1, e);
errorMsgs.add(String.format("第%d行数据处理失败:%s", i + 1, e.getMessage()));
}
}
if (!errorMsgs.isEmpty()) {
return Result.failed("导入失败:" + String.join("; ", errorMsgs));
}
// 批量保存数据
boolean success = ageDeviceService.importDevices(deviceList);
return success ? Result.succeed("导入成功") : Result.failed("导入失败");
} catch (Exception e) {
log.error("导入设备信息失败", e);
return Result.failed("导入失败:" + e.getMessage());
}
}
@Operation(summary = "下载导入模板")
@GetMapping("/template")
public void downloadTemplate(HttpServletResponse response) {
try {
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setCharacterEncoding(StandardCharsets.UTF_8.name());
String fileName = URLEncoder.encode("设备导入模板", StandardCharsets.UTF_8.name()).replaceAll("\\+", "%20");
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
// 创建模板数据
List<AgeDeviceExcel> templateList = new ArrayList<>();
// 可以添加一行示例数据
AgeDeviceExcel template = new AgeDeviceExcel();
template.setDeviceSn("示例:DEVICE001");
template.setDeviceName("示例:测试设备1");
templateList.add(template);
EasyExcel.write(response.getOutputStream(), AgeDeviceExcel.class)
.excelType(ExcelTypeEnum.XLSX)
.sheet("设备信息")
.doWrite(templateList);
} catch (Exception e) {
log.error("下载模板失败", e);
response.reset();
response.setContentType("application/json");
response.setCharacterEncoding(StandardCharsets.UTF_8.name());
try {
response.getWriter().println("{\"code\":500,\"msg\":\"下载模板失败\"}");
} catch (IOException ex) {
log.error("写入响应失败", ex);
}
}
}
/**
* 验证Excel数据
*/
private void validateExcelData(AgeDeviceExcel excelData, int rowIndex, List<String> errorMsgs) {
if (excelData == null) {
errorMsgs.add(String.format("第%d行数据为空", rowIndex));
return;
}
// 必填字段校验
if (org.springframework.util.StringUtils.isEmpty(excelData.getDeviceSn())) {
errorMsgs.add(String.format("第%d行:设备序列号不能为空", rowIndex));
}
if (org.springframework.util.StringUtils.isEmpty(excelData.getDeviceName())) {
errorMsgs.add(String.format("第%d行:设备名称不能为空", rowIndex));
}
// 字段格式校验
if (excelData.getDeviceType() != null && (excelData.getDeviceType() < 0 || excelData.getDeviceType() > 100)) {
errorMsgs.add(String.format("第%d行:设备类型取值范围为0-100", rowIndex));
}
// 重复性校验
if (!org.springframework.util.StringUtils.isEmpty(excelData.getDeviceSn())) {
boolean exists = ageDeviceService.checkDeviceSnExists(excelData.getDeviceSn());
if (exists) {
errorMsgs.add(String.format("第%d行:设备序列号已存在", rowIndex));
}
}
}
private List<AgeDeviceExcel> convertToExcelList(List<AgeDevice> deviceList) {
return deviceList.stream().map(device -> {
AgeDeviceExcel excel = new AgeDeviceExcel();
BeanUtils.copyProperties(device, excel);
return excel;
}).collect(Collectors.toList());
}
}
@@ -1,76 +0,0 @@
package com.central.device.controller;
import java.util.Map;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import lombok.extern.slf4j.Slf4j;
import com.central.device.model.AgeDeviceFirmware;
import com.central.device.service.IAgeDeviceFirmwareService;
import com.central.common.model.PageResult;
import com.central.common.model.Result;
/**
* Firmware file information
*
* @author lsl
* @date 2024-12-19 17:52:54
*/
@Slf4j
@RestController
@RequestMapping("/firmware")
@Tag(name = "Firmware file information")
@RequiredArgsConstructor
public class AgeDeviceFirmwareController {
private final IAgeDeviceFirmwareService ageDeviceFirmwareService;
/**
* 列表
*/
@Operation(summary = "查询列表")
@Parameters({
@Parameter(name = "page",description = "分页起始位置",required = true,in=ParameterIn.QUERY),
@Parameter(name = "limit",description = "分页结束位置",required = true,in=ParameterIn.QUERY)
})
@GetMapping
public PageResult list(@RequestParam Map<String, Object> params) {
return ageDeviceFirmwareService.findList(params);
}
/**
* 查询
*/
@Operation(summary = "查询")
@GetMapping("/{id}")
public Result findUserById(@PathVariable Long id) {
AgeDeviceFirmware model = ageDeviceFirmwareService.getById(id);
return Result.succeed(model, "查询成功");
}
/**
* 新增or更新
*/
@Operation(summary = "保存")
@PostMapping
public Result save(@RequestBody AgeDeviceFirmware ageDeviceFirmware) {
ageDeviceFirmwareService.saveOrUpdate(ageDeviceFirmware);
return Result.succeed("保存成功");
}
/**
* 删除
*/
@Operation(summary = "删除")
@Parameter(name = "id", description = "id", in = ParameterIn.PATH, required = true)
@DeleteMapping("/{id}")
public Result delete(@PathVariable Long id) {
ageDeviceFirmwareService.removeById(id);
return Result.succeed("删除成功");
}
}
@@ -1,76 +0,0 @@
package com.central.device.controller;
import java.util.Map;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import lombok.extern.slf4j.Slf4j;
import com.central.device.model.AgeDeviceHms;
import com.central.device.service.IAgeDeviceHmsService;
import com.central.common.model.PageResult;
import com.central.common.model.Result;
/**
* Device's hms information
*
* @author lsl
* @date 2024-12-19 17:53:01
*/
@Slf4j
@RestController
@RequestMapping("/hms")
@Tag(name = "Device's hms information")
@RequiredArgsConstructor
public class AgeDeviceHmsController {
private final IAgeDeviceHmsService ageDeviceHmsService;
/**
* 列表
*/
@Operation(summary = "查询列表")
@Parameters({
@Parameter(name = "page",description = "分页起始位置",required = true,in=ParameterIn.QUERY),
@Parameter(name = "limit",description = "分页结束位置",required = true,in=ParameterIn.QUERY)
})
@GetMapping
public PageResult list(@RequestParam Map<String, Object> params) {
return ageDeviceHmsService.findList(params);
}
/**
* 查询
*/
@Operation(summary = "查询")
@GetMapping("/{id}")
public Result findUserById(@PathVariable Long id) {
AgeDeviceHms model = ageDeviceHmsService.getById(id);
return Result.succeed(model, "查询成功");
}
/**
* 新增or更新
*/
@Operation(summary = "保存")
@PostMapping
public Result save(@RequestBody AgeDeviceHms ageDeviceHms) {
ageDeviceHmsService.saveOrUpdate(ageDeviceHms);
return Result.succeed("保存成功");
}
/**
* 删除
*/
@Operation(summary = "删除")
@Parameter(name = "id", description = "id", in = ParameterIn.PATH, required = true)
@DeleteMapping("/{id}")
public Result delete(@PathVariable Long id) {
ageDeviceHmsService.removeById(id);
return Result.succeed("删除成功");
}
}
@@ -1,76 +0,0 @@
package com.central.device.controller;
import java.util.Map;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import lombok.extern.slf4j.Slf4j;
import com.central.device.model.AgeDeviceLogs;
import com.central.device.service.IAgeDeviceLogsService;
import com.central.common.model.PageResult;
import com.central.common.model.Result;
/**
* Log for uploading logs
*
* @author lsl
* @date 2024-12-19 17:53:03
*/
@Slf4j
@RestController
@RequestMapping("/logs")
@Tag(name = "Log for uploading logs")
@RequiredArgsConstructor
public class AgeDeviceLogsController {
private final IAgeDeviceLogsService ageDeviceLogsService;
/**
* 列表
*/
@Operation(summary = "查询列表")
@Parameters({
@Parameter(name = "page",description = "分页起始位置",required = true,in=ParameterIn.QUERY),
@Parameter(name = "limit",description = "分页结束位置",required = true,in=ParameterIn.QUERY)
})
@GetMapping
public PageResult list(@RequestParam Map<String, Object> params) {
return ageDeviceLogsService.findList(params);
}
/**
* 查询
*/
@Operation(summary = "查询")
@GetMapping("/{id}")
public Result findUserById(@PathVariable Long id) {
AgeDeviceLogs model = ageDeviceLogsService.getById(id);
return Result.succeed(model, "查询成功");
}
/**
* 新增or更新
*/
@Operation(summary = "保存")
@PostMapping
public Result save(@RequestBody AgeDeviceLogs ageDeviceLogs) {
ageDeviceLogsService.saveOrUpdate(ageDeviceLogs);
return Result.succeed("保存成功");
}
/**
* 删除
*/
@Operation(summary = "删除")
@Parameter(name = "id", description = "id", in = ParameterIn.PATH, required = true)
@DeleteMapping("/{id}")
public Result delete(@PathVariable Long id) {
ageDeviceLogsService.removeById(id);
return Result.succeed("删除成功");
}
}
@@ -1,76 +0,0 @@
package com.central.device.controller;
import java.util.Map;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import lombok.extern.slf4j.Slf4j;
import com.central.device.model.AgeDevicePayload;
import com.central.device.service.IAgeDevicePayloadService;
import com.central.common.model.PageResult;
import com.central.common.model.Result;
/**
* The payload information of the device.
*
* @author lsl
* @date 2024-12-19 17:53:19
*/
@Slf4j
@RestController
@RequestMapping("/payload")
@Tag(name = "The payload information of the device.")
@RequiredArgsConstructor
public class AgeDevicePayloadController {
private final IAgeDevicePayloadService ageDevicePayloadService;
/**
* 列表
*/
@Operation(summary = "查询列表")
@Parameters({
@Parameter(name = "page",description = "分页起始位置",required = true,in=ParameterIn.QUERY),
@Parameter(name = "limit",description = "分页结束位置",required = true,in=ParameterIn.QUERY)
})
@GetMapping
public PageResult list(@RequestParam Map<String, Object> params) {
return ageDevicePayloadService.findList(params);
}
/**
* 查询
*/
@Operation(summary = "查询")
@GetMapping("/{id}")
public Result findUserById(@PathVariable Long id) {
AgeDevicePayload model = ageDevicePayloadService.getById(id);
return Result.succeed(model, "查询成功");
}
/**
* 新增or更新
*/
@Operation(summary = "保存")
@PostMapping
public Result save(@RequestBody AgeDevicePayload ageDevicePayload) {
ageDevicePayloadService.saveOrUpdate(ageDevicePayload);
return Result.succeed("保存成功");
}
/**
* 删除
*/
@Operation(summary = "删除")
@Parameter(name = "id", description = "id", in = ParameterIn.PATH, required = true)
@DeleteMapping("/{id}")
public Result delete(@PathVariable Long id) {
ageDevicePayloadService.removeById(id);
return Result.succeed("删除成功");
}
}

Some files were not shown because too many files have changed in this diff Show More