From b757e1fccb31add36ca4718c8f9f332e6cd0a822 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 31 Jan 2022 21:51:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E6=A8=A1=E5=9D=97=E9=87=8D=E6=9E=84?= =?UTF-8?q?=207=EF=BC=9Apay=20=E6=A8=A1=E5=9D=97=E7=9A=84=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 1 + yudao-admin-server/pom.xml | 57 +--- .../modules/pay/convert/package-info.java | 6 - .../mysql/order/PayOrderExtensionMapper.java | 16 -- .../pay/enums/PayErrorCodeConstants.java | 1 - .../modules/pay/job/package-info.java | 1 - .../adminserver/modules/pay/package-info.java | 7 - .../channel/impl/PayChannelServiceImpl.java | 161 ----------- .../pay/service/order/PayRefundService.java | 41 --- .../order/impl/PayOrderServiceImpl.java | 54 ---- .../order/impl/PayRefundServiceImpl.java | 42 --- .../pay/service/channel/PayChannelConfig.java | 20 -- .../convert/order/PayOrderCoreConvert.java | 22 -- .../convert/order/PayRefundCoreConvert.java | 23 -- .../modules/pay/convert/package-info.java | 6 - ...‹é“ Spring Boot å¯¹è±¡è½¬æ¢ MapStruct 入门》.md | 1 - .../dal/mysql/merchant/PayAppCoreMapper.java | 9 - .../mysql/merchant/PayChannelCoreMapper.java | 20 -- .../dal/mysql/order/PayOrderCoreMapper.java | 22 -- .../dal/mysql/order/PayRefundCoreMapper.java | 23 -- .../coreservice/modules/pay/package-info.java | 7 - .../service/merchant/PayAppCoreService.java | 23 -- .../merchant/PayChannelCoreService.java | 39 --- .../merchant/impl/PayAppCoreServiceImpl.java | 43 --- .../impl/PayChannelCoreServiceImpl.java | 121 --------- .../pay/service/notify/vo/package-info.java | 6 - .../service/order/PayOrderCoreService.java | 50 ---- .../service/order/PayRefundCoreService.java | 31 --- .../modules/pay/service/package-info.java | 1 - .../pay/core/enums/PayChannelEnum.java | 13 +- yudao-module-pay/pom.xml | 25 ++ yudao-module-pay/yudao-module-pay-api/pom.xml | 26 ++ .../module/pay/enums/DictTypeConstants.java | 35 +++ .../module/pay/enums/ErrorCodeConstants.java | 4 +- .../yudao/module/pay/package-info.java | 1 + .../yudao-module-pay-impl/pom.xml | 103 ++++++++ .../admin/merchant}/PayAppController.java | 24 +- .../admin/merchant}/PayChannelController.java | 19 +- .../merchant/PayMerchantController.java | 10 +- .../admin/merchant/vo/app}/PayAppBaseVO.java | 2 +- .../merchant/vo/app}/PayAppCreateReqVO.java | 6 +- .../admin/merchant/vo/app}/PayAppExcelVO.java | 9 +- .../merchant/vo/app}/PayAppExportReqVO.java | 4 +- .../vo/app}/PayAppPageItemRespVO.java | 9 +- .../merchant/vo/app}/PayAppPageReqVO.java | 4 +- .../admin/merchant/vo/app}/PayAppRespVO.java | 4 +- .../merchant/vo/app}/PayAppUpdateReqVO.java | 5 +- .../vo/app}/PayAppUpdateStatusReqVO.java | 4 +- .../vo/channel}/PayChannelBaseVO.java | 6 +- .../vo/channel}/PayChannelCreateReqVO.java | 8 +- .../vo/channel}/PayChannelExcelVO.java | 5 +- .../vo/channel}/PayChannelExportReqVO.java | 4 +- .../vo/channel}/PayChannelPageReqVO.java | 4 +- .../vo/channel}/PayChannelRespVO.java | 4 +- .../vo/channel}/PayChannelUpdateReqVO.java | 9 +- .../vo/merchant}/PayMerchantBaseVO.java | 2 +- .../vo/merchant}/PayMerchantCreateReqVO.java | 6 +- .../vo/merchant}/PayMerchantExcelVO.java | 2 +- .../vo/merchant}/PayMerchantExportReqVO.java | 4 +- .../vo/merchant}/PayMerchantPageReqVO.java | 4 +- .../vo/merchant}/PayMerchantRespVO.java | 10 +- .../vo/merchant}/PayMerchantUpdateReqVO.java | 5 +- .../PayMerchantUpdateStatusReqVO.java | 4 +- .../admin}/order/PayOrderController.java | 45 +--- .../admin/order/vo}/PayOrderBaseVO.java | 5 +- .../order/vo}/PayOrderDetailsRespVO.java | 9 +- .../admin/order/vo}/PayOrderExcelVO.java | 4 +- .../admin/order/vo}/PayOrderExportReqVO.java | 8 +- .../order/vo}/PayOrderPageItemRespVO.java | 9 +- .../admin/order/vo}/PayOrderPageReqVO.java | 9 +- .../admin/order/vo}/PayOrderRespVO.java | 9 +- .../admin/refund}/PayRefundController.java | 42 +-- .../admin}/refund/vo/PayRefundBaseVO.java | 2 +- .../refund/vo/PayRefundCreateReqVO.java | 4 +- .../refund/vo/PayRefundDetailsRespVO.java | 9 +- .../admin}/refund/vo/PayRefundExcelVO.java | 4 +- .../refund/vo/PayRefundExportReqVO.java | 4 +- .../refund/vo/PayRefundPageItemRespVO.java | 8 +- .../admin}/refund/vo/PayRefundPageReqVO.java | 4 +- .../admin}/refund/vo/PayRefundRespVO.java | 4 +- .../refund/vo/PayRefundUpdateReqVO.java | 4 +- .../app/order/AppPayOrderController.java | 42 +-- .../app/order/vo/AppPayOrderSubmitReqVO.java | 6 +- .../app/order/vo/AppPayOrderSubmitRespVO.java | 6 +- .../pay/controller/app/package-info.java | 1 + .../app/refund/AppPayRefundController.java | 29 +- .../app/refund/vo/AppPayRefundReqVO.java | 6 +- .../app/refund/vo/AppPayRefundRespVO.java | 12 +- .../module/pay/controller/package-info.java | 6 + .../pay/convert/app/PayAppConvert.java | 8 +- .../convert/channel/PayChannelConvert.java | 16 +- .../convert/merchant/PayMerchantConvert.java | 14 +- .../pay/convert/order/PayOrderConvert.java | 45 ++-- .../module}/pay/convert/package-info.java | 2 +- .../pay/convert/refund/PayRefundConvert.java | 25 +- ...‹é“ Spring Boot å¯¹è±¡è½¬æ¢ MapStruct 入门》.md | 0 .../pay/dal/dataobject/merchant/PayAppDO.java | 2 +- .../dal/dataobject/merchant/PayChannelDO.java | 2 +- .../dataobject/merchant/PayMerchantDO.java | 2 +- .../dal/dataobject/notify/PayNotifyLogDO.java | 4 +- .../dataobject/notify/PayNotifyTaskDO.java | 14 +- .../pay/dal/dataobject/order/PayOrderDO.java | 14 +- .../dataobject/order/PayOrderExtensionDO.java | 6 +- .../dal/dataobject/refund}/PayRefundDO.java | 13 +- .../pay/dal/mysql/merchant}/PayAppMapper.java | 40 +-- .../dal/mysql/merchant}/PayChannelMapper.java | 37 +-- .../dal/mysql/merchant/PayMerchantMapper.java | 13 +- .../mysql/notify/PayNotifyLogCoreMapper.java | 4 +- .../mysql/notify/PayNotifyTaskCoreMapper.java | 6 +- .../mysql/order/PayOrderExtensionMapper.java | 6 +- .../pay/dal/mysql/order/PayOrderMapper.java | 31 ++- .../dal/mysql/refund}/PayRefundMapper.java | 28 +- .../dal/redis/PayRedisKeyCoreConstants.java | 6 +- .../redis/notify/PayNotifyLockRedisDAO.java | 6 +- .../pay/enums/notify/PayNotifyStatusEnum.java | 2 +- .../pay/enums/notify/PayNotifyTypeEnum.java | 2 +- .../enums/order/PayOrderNotifyStatusEnum.java | 2 +- .../pay/enums/order/PayOrderStatusEnum.java | 2 +- .../enums/refund}/PayRefundStatusEnum.java | 2 +- .../pay/enums/refund}/PayRefundTypeEnum.java | 2 +- .../module}/pay/job/notify/PayNotifyJob.java | 6 +- .../yudao/module/pay/job/package-info.java | 1 + .../yudao/module/pay/package-info.java | 10 + .../pay/service/merchant}/PayAppService.java | 25 +- .../service/merchant}/PayAppServiceImpl.java | 64 ++--- .../service/merchant}/PayChannelService.java | 50 +++- .../merchant/PayChannelServiceImpl.java | 250 ++++++++++++++++++ .../service/merchant/PayMerchantService.java | 12 +- .../merchant}/PayMerchantServiceImpl.java | 22 +- .../pay/service/notify/PayNotifyService.java | 8 +- .../service/notify/PayNotifyServiceImpl.java | 65 +++-- .../notify/dto/PayNotifyTaskCreateReqDTO.java | 2 +- .../notify/vo/PayNotifyOrderReqVO.java | 2 +- .../notify/vo/PayRefundOrderReqVO.java | 2 +- .../pay/service/notify/vo/package-info.java | 6 + .../order/PayOrderExtensionService.java | 8 +- .../order}/PayOrderExtensionServiceImpl.java | 7 +- .../pay/service/order/PayOrderService.java | 38 ++- .../service/order/PayOrderServiceImpl.java | 144 +++++----- .../order/dto/PayOrderCreateReqDTO.java | 2 +- .../order/dto/PayOrderSubmitReqDTO.java | 2 +- .../order/dto/PayOrderSubmitRespDTO.java | 2 +- .../service/order/dto/PayRefundReqDTO.java | 2 +- .../service/order/dto/PayRefundRespDTO.java | 2 +- .../module/pay/service/package-info.java | 1 + .../pay/service/refund/PayRefundService.java | 61 +++++ .../service/refund/PayRefundServiceImpl.java | 152 ++++++----- .../yudao/module}/pay/util/PaySeqUtils.java | 4 +- .../service/merchant}/PayAppServiceTest.java | 23 +- .../merchant}/PayChannelServiceTest.java | 32 +-- .../merchant/PayMerchantServiceTest.java | 19 +- .../service/order/PayOrderServiceTest.java | 19 +- .../module/pay/service/package-info.java | 1 + .../service/refund/PayRefundServiceTest.java | 19 +- .../pay/test}/BaseDbAndRedisUnitTest.java | 5 +- .../module/pay/test}/BaseDbUnitTest.java | 2 +- .../module/pay/test}/BaseRedisUnitTest.java | 4 +- .../pay/test}/RedisTestConfiguration.java | 2 +- .../system/enums/DictTypeConstants.java | 25 -- .../pay/convert/order/PayRefundConvert.java | 23 -- ...‹é“ Spring Boot å¯¹è±¡è½¬æ¢ MapStruct 入门》.md | 1 - .../userserver/modules/pay/package-info.java | 7 - 162 files changed, 1303 insertions(+), 1714 deletions(-) delete mode 100644 yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/package-info.java delete mode 100755 yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/order/PayOrderExtensionMapper.java delete mode 100644 yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/enums/PayErrorCodeConstants.java delete mode 100644 yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/job/package-info.java delete mode 100644 yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/package-info.java delete mode 100644 yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/channel/impl/PayChannelServiceImpl.java delete mode 100755 yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/PayRefundService.java delete mode 100755 yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/impl/PayOrderServiceImpl.java delete mode 100755 yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/impl/PayRefundServiceImpl.java delete mode 100644 yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/channel/PayChannelConfig.java delete mode 100644 yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/convert/order/PayOrderCoreConvert.java delete mode 100644 yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/convert/order/PayRefundCoreConvert.java delete mode 100644 yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/convert/package-info.java delete mode 100644 yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/convert/ã€ŠèŠ‹é“ Spring Boot å¯¹è±¡è½¬æ¢ MapStruct 入门》.md delete mode 100644 yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/merchant/PayAppCoreMapper.java delete mode 100644 yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/merchant/PayChannelCoreMapper.java delete mode 100644 yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/order/PayOrderCoreMapper.java delete mode 100644 yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/order/PayRefundCoreMapper.java delete mode 100644 yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/package-info.java delete mode 100644 yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/merchant/PayAppCoreService.java delete mode 100644 yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/merchant/PayChannelCoreService.java delete mode 100644 yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/merchant/impl/PayAppCoreServiceImpl.java delete mode 100644 yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/merchant/impl/PayChannelCoreServiceImpl.java delete mode 100644 yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/vo/package-info.java delete mode 100644 yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/PayOrderCoreService.java delete mode 100644 yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/PayRefundCoreService.java delete mode 100644 yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/package-info.java create mode 100644 yudao-module-pay/pom.xml create mode 100644 yudao-module-pay/yudao-module-pay-api/pom.xml create mode 100644 yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/DictTypeConstants.java rename yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/PayErrorCodeCoreConstants.java => yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/ErrorCodeConstants.java (97%) create mode 100644 yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/package-info.java create mode 100644 yudao-module-pay/yudao-module-pay-impl/pom.xml rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant}/PayAppController.java (88%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant}/PayChannelController.java (91%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin}/merchant/PayMerchantController.java (92%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app}/PayAppBaseVO.java (94%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app}/PayAppCreateReqVO.java (50%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app}/PayAppExcelVO.java (83%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app}/PayAppExportReqVO.java (84%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app}/PayAppPageItemRespVO.java (78%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app}/PayAppPageReqVO.java (90%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app}/PayAppRespVO.java (74%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app}/PayAppUpdateReqVO.java (72%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app}/PayAppUpdateStatusReqVO.java (81%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel}/PayChannelBaseVO.java (86%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel}/PayChannelCreateReqVO.java (60%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel}/PayChannelExcelVO.java (91%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel}/PayChannelExportReqVO.java (85%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel}/PayChannelPageReqVO.java (90%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel}/PayChannelRespVO.java (78%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel}/PayChannelUpdateReqVO.java (60%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant}/PayMerchantBaseVO.java (91%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant}/PayMerchantCreateReqVO.java (51%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant}/PayMerchantExcelVO.java (91%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant}/PayMerchantExportReqVO.java (82%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant}/PayMerchantPageReqVO.java (88%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant}/PayMerchantRespVO.java (69%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant}/PayMerchantUpdateReqVO.java (71%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant}/PayMerchantUpdateStatusReqVO.java (80%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin}/order/PayOrderController.java (85%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo}/PayOrderBaseVO.java (95%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo}/PayOrderDetailsRespVO.java (82%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo}/PayOrderExcelVO.java (94%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo}/PayOrderExportReqVO.java (92%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo}/PayOrderPageItemRespVO.java (82%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo}/PayOrderPageReqVO.java (95%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo}/PayOrderRespVO.java (74%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund}/PayRefundController.java (86%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin}/refund/vo/PayRefundBaseVO.java (98%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin}/refund/vo/PayRefundCreateReqVO.java (60%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin}/refund/vo/PayRefundDetailsRespVO.java (83%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin}/refund/vo/PayRefundExcelVO.java (93%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin}/refund/vo/PayRefundExportReqVO.java (94%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin}/refund/vo/PayRefundPageItemRespVO.java (79%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin}/refund/vo/PayRefundPageReqVO.java (96%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin}/refund/vo/PayRefundRespVO.java (81%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin}/refund/vo/PayRefundUpdateReqVO.java (75%) rename yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/PayOrderController.java => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/AppPayOrderController.java (69%) rename yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/vo/PayOrderSubmitReqVO.java => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitReqVO.java (83%) rename yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/vo/PayOrderSubmitRespVO.java => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitRespVO.java (69%) create mode 100644 yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/package-info.java rename yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/PayRefundController.java => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/AppPayRefundController.java (51%) rename yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/vo/PayRefundReqVO.java => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/vo/AppPayRefundReqVO.java (87%) rename yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/vo/PayRefundRespVO.java => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/vo/AppPayRefundRespVO.java (51%) create mode 100644 yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/package-info.java rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/convert/app/PayAppConvert.java (71%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/convert/channel/PayChannelConvert.java (64%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/convert/merchant/PayMerchantConvert.java (56%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/convert/order/PayOrderConvert.java (72%) rename {yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/convert/package-info.java (57%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/convert/refund/PayRefundConvert.java (73%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/convert/ã€ŠèŠ‹é“ Spring Boot å¯¹è±¡è½¬æ¢ MapStruct 入门》.md (100%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/dal/dataobject/merchant/PayAppDO.java (94%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/dal/dataobject/merchant/PayChannelDO.java (95%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/dal/dataobject/merchant/PayMerchantDO.java (94%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/dal/dataobject/notify/PayNotifyLogDO.java (86%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/dal/dataobject/notify/PayNotifyTaskDO.java (78%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/dal/dataobject/order/PayOrderDO.java (84%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/dal/dataobject/order/PayOrderExtensionDO.java (89%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/order => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/refund}/PayRefundDO.java (90%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/app => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant}/PayAppMapper.java (68%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/channel => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant}/PayChannelMapper.java (76%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/dal/mysql/merchant/PayMerchantMapper.java (82%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/dal/mysql/notify/PayNotifyLogCoreMapper.java (56%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/dal/mysql/notify/PayNotifyTaskCoreMapper.java (79%) rename yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/order/PayOrderExtensionCoreMapper.java => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/order/PayOrderExtensionMapper.java (70%) mode change 100644 => 100755 rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/dal/mysql/order/PayOrderMapper.java (78%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/order => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/refund}/PayRefundMapper.java (78%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/dal/redis/PayRedisKeyCoreConstants.java (65%) rename yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/redis/notify/PayNotifyLockCoreRedisDAO.java => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/redis/notify/PayNotifyLockRedisDAO.java (79%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/enums/notify/PayNotifyStatusEnum.java (89%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/enums/notify/PayNotifyTypeEnum.java (85%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/enums/order/PayOrderNotifyStatusEnum.java (89%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/enums/order/PayOrderStatusEnum.java (90%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/order => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/refund}/PayRefundStatusEnum.java (83%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/order => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/refund}/PayRefundTypeEnum.java (89%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/job/notify/PayNotifyJob.java (75%) create mode 100644 yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/job/package-info.java create mode 100644 yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/package-info.java rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/app => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant}/PayAppService.java (75%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/app/impl => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant}/PayAppServiceImpl.java (72%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/channel => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant}/PayChannelService.java (59%) create mode 100644 yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelServiceImpl.java rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/service/merchant/PayMerchantService.java (81%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/merchant/impl => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant}/PayMerchantServiceImpl.java (77%) rename yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/PayNotifyCoreService.java => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyService.java (66%) rename yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/impl/PayNotifyCoreServiceImpl.java => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyServiceImpl.java (77%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/service/notify/dto/PayNotifyTaskCreateReqDTO.java (88%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/service/notify/vo/PayNotifyOrderReqVO.java (92%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/service/notify/vo/PayRefundOrderReqVO.java (93%) create mode 100644 yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/vo/package-info.java rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/service/order/PayOrderExtensionService.java (80%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/impl => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order}/PayOrderExtensionServiceImpl.java (68%) rename {yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/service/order/PayOrderService.java (55%) rename yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/impl/PayOrderCoreServiceImpl.java => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceImpl.java (63%) mode change 100644 => 100755 rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/service/order/dto/PayOrderCreateReqDTO.java (95%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/service/order/dto/PayOrderSubmitReqDTO.java (92%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/service/order/dto/PayOrderSubmitRespDTO.java (83%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/service/order/dto/PayRefundReqDTO.java (93%) rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/service/order/dto/PayRefundRespDTO.java (85%) create mode 100644 yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/package-info.java create mode 100755 yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundService.java rename yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/impl/PayRefundCoreServiceImpl.java => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceImpl.java (62%) mode change 100644 => 100755 rename {yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules => yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module}/pay/util/PaySeqUtils.java (94%) rename {yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/app => yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/merchant}/PayAppServiceTest.java (90%) rename {yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/channel => yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/merchant}/PayChannelServiceTest.java (93%) rename {yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules => yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module}/pay/service/merchant/PayMerchantServiceTest.java (89%) rename {yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules => yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module}/pay/service/order/PayOrderServiceTest.java (91%) create mode 100644 yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/package-info.java rename {yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules => yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module}/pay/service/refund/PayRefundServiceTest.java (90%) rename {yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver => yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/test}/BaseDbAndRedisUnitTest.java (95%) rename {yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver => yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/test}/BaseDbUnitTest.java (97%) rename {yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver => yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/test}/BaseRedisUnitTest.java (86%) rename {yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/config => yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/test}/RedisTestConfiguration.java (96%) delete mode 100644 yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/convert/order/PayRefundConvert.java delete mode 100644 yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/convert/ã€ŠèŠ‹é“ Spring Boot å¯¹è±¡è½¬æ¢ MapStruct 入门》.md delete mode 100644 yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/package-info.java diff --git a/pom.xml b/pom.xml index f56f07ddb..e5294f7d8 100644 --- a/pom.xml +++ b/pom.xml @@ -18,6 +18,7 @@ yudao-module-system yudao-module-infra yudao-module-tool + yudao-module-pay ${artifactId} diff --git a/yudao-admin-server/pom.xml b/yudao-admin-server/pom.xml index dd73b5178..4eaef38c2 100644 --- a/yudao-admin-server/pom.xml +++ b/yudao-admin-server/pom.xml @@ -37,6 +37,11 @@ yudao-module-infra-impl ${revision} + + cn.iocoder.boot + yudao-module-pay-impl + ${revision} + @@ -71,11 +76,7 @@ - - - cn.iocoder.boot - yudao-spring-boot-starter-web - + org.springframework.boot @@ -83,34 +84,6 @@ true - - cn.iocoder.boot - yudao-spring-boot-starter-security - - - - - cn.iocoder.boot - yudao-spring-boot-starter-mybatis - - - - cn.iocoder.boot - yudao-spring-boot-starter-redis - - - - - cn.iocoder.boot - yudao-spring-boot-starter-job - - - - - cn.iocoder.boot - yudao-spring-boot-starter-mq - - cn.iocoder.boot @@ -128,24 +101,6 @@ spring-boot-admin-starter-server - - - cn.iocoder.boot - yudao-spring-boot-starter-test - test - - - - - cn.iocoder.boot - yudao-spring-boot-starter-excel - - - - org.apache.velocity - velocity-engine-core - - diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/package-info.java deleted file mode 100644 index da3973390..000000000 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/** - * æä¾› POJO ç±»çš„å®žä½“è½¬æ¢ - * - * ç›®å‰ä½¿ç”¨ MapStruct 框架 - */ -package cn.iocoder.yudao.adminserver.modules.pay.convert; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/order/PayOrderExtensionMapper.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/order/PayOrderExtensionMapper.java deleted file mode 100755 index 47baabb31..000000000 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/order/PayOrderExtensionMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.order; - -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderExtensionDO; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import org.apache.ibatis.annotations.Mapper; - -/** - * æ”¯ä»˜è®¢å• Mapper - * - * @author aquan - */ -@Mapper -public interface PayOrderExtensionMapper extends BaseMapperX { - - -} diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/enums/PayErrorCodeConstants.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/enums/PayErrorCodeConstants.java deleted file mode 100644 index df39d9efc..000000000 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/enums/PayErrorCodeConstants.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.yudao.adminserver.modules.pay.enums; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/job/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/job/package-info.java deleted file mode 100644 index 3db569789..000000000 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/job/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.yudao.adminserver.modules.pay.job; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/package-info.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/package-info.java deleted file mode 100644 index a113b9beb..000000000 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/** - * pay 包下,我们放支付业务,æ供业务的支付能力。 - * 例如说:商户ã€åº”用ã€æ”¯ä»˜ã€é€€æ¬¾ç­‰ç­‰ - * - * 缩写:pay - */ -package cn.iocoder.yudao.adminserver.modules.pay; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/channel/impl/PayChannelServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/channel/impl/PayChannelServiceImpl.java deleted file mode 100644 index 6ba21f8c3..000000000 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/channel/impl/PayChannelServiceImpl.java +++ /dev/null @@ -1,161 +0,0 @@ -package cn.iocoder.yudao.adminserver.modules.pay.service.channel.impl; - -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.json.JSONUtil; -import cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo.PayChannelCreateReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo.PayChannelExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo.PayChannelPageReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo.PayChannelUpdateReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.convert.channel.PayChannelConvert; -import cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.channel.PayChannelMapper; -import cn.iocoder.yudao.adminserver.modules.pay.service.channel.PayChannelService; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayChannelDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.pay.core.client.PayClientConfig; -import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; -import org.springframework.validation.annotation.Validated; - -import javax.annotation.Resource; -import javax.validation.Validator; -import java.util.Collection; -import java.util.List; - -import static cn.iocoder.yudao.coreservice.modules.pay.enums.PayErrorCodeCoreConstants.CHANNEL_EXIST_SAME_CHANNEL_ERROR; -import static cn.iocoder.yudao.coreservice.modules.pay.enums.PayErrorCodeCoreConstants.CHANNEL_NOT_EXISTS; -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; - -/** - * æ”¯ä»˜æ¸ é“ Service 实现类 - * - * @author aquan - */ -@Service -@Slf4j -@Validated -public class PayChannelServiceImpl implements PayChannelService { - - @Resource - private PayChannelMapper channelMapper; - - @Resource - private Validator validator; - - @Override - public Long createChannel(PayChannelCreateReqVO reqVO) { - // 断言是å¦æœ‰é‡å¤çš„ - PayChannelDO channelDO = this.getChannelByConditions(reqVO.getMerchantId(), reqVO.getAppId(), reqVO.getCode()); - if (ObjectUtil.isNotNull(channelDO)) { - throw exception(CHANNEL_EXIST_SAME_CHANNEL_ERROR); - } - - // æ–°å¢žæ¸ é“ - PayChannelDO channel = PayChannelConvert.INSTANCE.convert(reqVO); - settingConfigAndCheckParam(channel, reqVO.getConfig()); - channelMapper.insert(channel); - return channel.getId(); - } - - @Override - public void updateChannel(PayChannelUpdateReqVO updateReqVO) { - // 校验存在 - this.validateChannelExists(updateReqVO.getId()); - // æ›´æ–° - PayChannelDO channel = PayChannelConvert.INSTANCE.convert(updateReqVO); - settingConfigAndCheckParam(channel, updateReqVO.getConfig()); - channelMapper.updateById(channel); - } - - @Override - public void deleteChannel(Long id) { - // 校验存在 - this.validateChannelExists(id); - // 删除 - channelMapper.deleteById(id); - } - - private void validateChannelExists(Long id) { - if (channelMapper.selectById(id) == null) { - throw exception(CHANNEL_NOT_EXISTS); - } - } - - @Override - public PayChannelDO getChannel(Long id) { - return channelMapper.selectById(id); - } - - @Override - public List getChannelList(Collection ids) { - return channelMapper.selectBatchIds(ids); - } - - @Override - public PageResult getChannelPage(PayChannelPageReqVO pageReqVO) { - return channelMapper.selectPage(pageReqVO); - } - - @Override - public List getChannelList(PayChannelExportReqVO exportReqVO) { - return channelMapper.selectList(exportReqVO); - } - - /** - * æ ¹æ®æ”¯ä»˜åº”用ID集åˆèŽ·å¾—支付渠é“列表 - * - * @param appIds 应用编å·é›†åˆ - * @return 支付渠é“列表 - */ - @Override - public List getChannelListByAppIds(Collection appIds) { - return channelMapper.getChannelListByAppIds(appIds); - } - - - /** - * æ ¹æ®æ¡ä»¶èŽ·å–通é“æ•°é‡ - * - * @param merchantId å•†æˆ·ç¼–å· - * @param appid åº”ç”¨ç¼–å· - * @param code 通é“ç¼–ç  - * @return æ•°é‡ - */ - @Override - public Integer getChannelCountByConditions(Long merchantId, Long appid, String code) { - return this.channelMapper.selectCount(merchantId, appid, code); - } - - /** - * æ ¹æ®æ¡ä»¶èŽ·å–é€šé“ - * - * @param merchantId å•†æˆ·ç¼–å· - * @param appid åº”ç”¨ç¼–å· - * @param code 通é“ç¼–ç  - * @return æ•°é‡ - */ - @Override - public PayChannelDO getChannelByConditions(Long merchantId, Long appid, String code) { - return this.channelMapper.selectOne(merchantId, appid, code); - } - - /** - * 设置渠é“é…置以åŠå‚数校验 - * - * @param channel æ¸ é“ - * @param configStr é…ç½® - */ - private void settingConfigAndCheckParam(PayChannelDO channel, String configStr) { - // 得到这个渠é“是微信的还是支付å®çš„ - Class payClass = PayChannelEnum.getByCode(channel.getCode()).getConfigClass(); - if (ObjectUtil.isNull(payClass)) { - throw exception(CHANNEL_NOT_EXISTS); - } - PayClientConfig config = JSONUtil.toBean(configStr, payClass); - - // 验è¯å‚æ•° - config.validate(validator); - channel.setConfig(config); - } - -} diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/PayRefundService.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/PayRefundService.java deleted file mode 100755 index 1412bdefe..000000000 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/PayRefundService.java +++ /dev/null @@ -1,41 +0,0 @@ -package cn.iocoder.yudao.adminserver.modules.pay.service.order; - -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo.PayRefundExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo.PayRefundPageReqVO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayRefundDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; - -import java.util.List; - -/** - * é€€æ¬¾è®¢å• Service æŽ¥å£ - * - * @author aquan - */ -public interface PayRefundService { - - /** - * èŽ·å¾—é€€æ¬¾è®¢å• - * - * @param id ç¼–å· - * @return é€€æ¬¾è®¢å• - */ - PayRefundDO getRefund(Long id); - - /** - * 获得退款订å•åˆ†é¡µ - * - * @param pageReqVO 分页查询 - * @return 退款订å•åˆ†é¡µ - */ - PageResult getRefundPage(PayRefundPageReqVO pageReqVO); - - /** - * 获得退款订å•åˆ—表, 用于 Excel 导出 - * - * @param exportReqVO 查询æ¡ä»¶ - * @return 退款订å•åˆ—表 - */ - List getRefundList(PayRefundExportReqVO exportReqVO); - -} diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/impl/PayOrderServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/impl/PayOrderServiceImpl.java deleted file mode 100755 index dd6d0a8bd..000000000 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/impl/PayOrderServiceImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -package cn.iocoder.yudao.adminserver.modules.pay.service.order.impl; - -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order.PayOrderExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order.PayOrderPageReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.order.PayOrderMapper; -import cn.iocoder.yudao.adminserver.modules.pay.service.order.PayOrderService; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import org.springframework.stereotype.Service; -import org.springframework.validation.annotation.Validated; - -import javax.annotation.Resource; -import java.util.Collection; -import java.util.List; - -/** - * æ”¯ä»˜è®¢å• Service 实现类 - * - * @author aquan - */ -@Service -@Validated -public class PayOrderServiceImpl implements PayOrderService { - - @Resource - private PayOrderMapper orderMapper; - - @Override - public PayOrderDO getOrder(Long id) { - return orderMapper.selectById(id); - } - - @Override - public PageResult getOrderPage(PayOrderPageReqVO pageReqVO) { - return orderMapper.selectPage(pageReqVO); - } - - @Override - public List getOrderList(PayOrderExportReqVO exportReqVO) { - return orderMapper.selectList(exportReqVO); - } - - /** - * æ ¹æ® ID 集åˆèŽ·å–åªåŒ…å«å•†å“å称的订å•é›†åˆ - * - * @param idList è®¢å• ID é›†åˆ - * @return åªåŒ…å«å•†å“å称的订å•é›†åˆ - */ - @Override - public List getOrderSubjectList(Collection idList) { - return orderMapper.findByIdListQueryOrderSubject(idList); - } - -} diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/impl/PayRefundServiceImpl.java b/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/impl/PayRefundServiceImpl.java deleted file mode 100755 index 00f42ebcd..000000000 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/impl/PayRefundServiceImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -package cn.iocoder.yudao.adminserver.modules.pay.service.order.impl; - -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo.PayRefundExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo.PayRefundPageReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.order.PayRefundMapper; -import cn.iocoder.yudao.adminserver.modules.pay.service.order.PayRefundService; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayRefundDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import org.springframework.stereotype.Service; -import org.springframework.validation.annotation.Validated; - -import javax.annotation.Resource; -import java.util.List; - -/** - * é€€æ¬¾è®¢å• Service 实现类 - * - * @author aquan - */ -@Service -@Validated -public class PayRefundServiceImpl implements PayRefundService { - - @Resource - private PayRefundMapper refundMapper; - - @Override - public PayRefundDO getRefund(Long id) { - return refundMapper.selectById(id); - } - - @Override - public PageResult getRefundPage(PayRefundPageReqVO pageReqVO) { - return refundMapper.selectPage(pageReqVO); - } - - @Override - public List getRefundList(PayRefundExportReqVO exportReqVO) { - return refundMapper.selectList(exportReqVO); - } - -} diff --git a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/channel/PayChannelConfig.java b/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/channel/PayChannelConfig.java deleted file mode 100644 index bff90e6e0..000000000 --- a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/channel/PayChannelConfig.java +++ /dev/null @@ -1,20 +0,0 @@ -package cn.iocoder.yudao.adminserver.modules.pay.service.channel; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import javax.validation.Validation; -import javax.validation.Validator; - -/** - * 用于åˆå§‹åŒ– validator Bean 对象 - * @author aquan - */ -@Configuration -public class PayChannelConfig { - - @Bean - public Validator validator(){ - return Validation.buildDefaultValidatorFactory().getValidator(); - } -} diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/convert/order/PayOrderCoreConvert.java b/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/convert/order/PayOrderCoreConvert.java deleted file mode 100644 index 3e5215cd8..000000000 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/convert/order/PayOrderCoreConvert.java +++ /dev/null @@ -1,22 +0,0 @@ -package cn.iocoder.yudao.coreservice.modules.pay.convert.order; - -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderExtensionDO; -import cn.iocoder.yudao.coreservice.modules.pay.service.order.dto.PayOrderCreateReqDTO; -import cn.iocoder.yudao.coreservice.modules.pay.service.order.dto.PayOrderSubmitReqDTO; -import cn.iocoder.yudao.framework.pay.core.client.dto.PayOrderUnifiedReqDTO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -@Mapper -public interface PayOrderCoreConvert { - - PayOrderCoreConvert INSTANCE = Mappers.getMapper(PayOrderCoreConvert.class); - - PayOrderDO convert(PayOrderCreateReqDTO bean); - - PayOrderExtensionDO convert(PayOrderSubmitReqDTO bean); - - PayOrderUnifiedReqDTO convert2(PayOrderSubmitReqDTO bean); - -} diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/convert/order/PayRefundCoreConvert.java b/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/convert/order/PayRefundCoreConvert.java deleted file mode 100644 index 4a4ada555..000000000 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/convert/order/PayRefundCoreConvert.java +++ /dev/null @@ -1,23 +0,0 @@ -package cn.iocoder.yudao.coreservice.modules.pay.convert.order; - -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayRefundDO; -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import org.mapstruct.Mappings; -import org.mapstruct.factory.Mappers; - -@Mapper -public interface PayRefundCoreConvert { - - PayRefundCoreConvert INSTANCE = Mappers.getMapper(PayRefundCoreConvert.class); - - //TODO 太多需è¦å¤„ç†äº†ï¼Œ æš‚æ—¶ä¸ç”¨ - @Mappings(value = { - @Mapping(source = "amount", target = "payAmount"), - @Mapping(source = "id", target = "orderId"), - @Mapping(target = "status",ignore = true) - }) - PayRefundDO convert(PayOrderDO orderDO); - -} diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/convert/package-info.java b/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/convert/package-info.java deleted file mode 100644 index b10c09029..000000000 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/convert/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/** - * æä¾› POJO ç±»çš„å®žä½“è½¬æ¢ - * - * ç›®å‰ä½¿ç”¨ MapStruct 框架 - */ -package cn.iocoder.yudao.coreservice.modules.pay.convert; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/convert/ã€ŠèŠ‹é“ Spring Boot å¯¹è±¡è½¬æ¢ MapStruct 入门》.md b/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/convert/ã€ŠèŠ‹é“ Spring Boot å¯¹è±¡è½¬æ¢ MapStruct 入门》.md deleted file mode 100644 index 8153487b7..000000000 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/convert/ã€ŠèŠ‹é“ Spring Boot å¯¹è±¡è½¬æ¢ MapStruct 入门》.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/merchant/PayAppCoreMapper.java b/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/merchant/PayAppCoreMapper.java deleted file mode 100644 index 603ff4609..000000000 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/merchant/PayAppCoreMapper.java +++ /dev/null @@ -1,9 +0,0 @@ -package cn.iocoder.yudao.coreservice.modules.pay.dal.mysql.merchant; - -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface PayAppCoreMapper extends BaseMapperX { -} diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/merchant/PayChannelCoreMapper.java b/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/merchant/PayChannelCoreMapper.java deleted file mode 100644 index 767a16b24..000000000 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/merchant/PayChannelCoreMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package cn.iocoder.yudao.coreservice.modules.pay.dal.mysql.merchant; - -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayChannelDO; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Select; - -import java.util.Date; - -@Mapper -public interface PayChannelCoreMapper extends BaseMapperX { - - default PayChannelDO selectByAppIdAndCode(Long appId, String code) { - return selectOne(PayChannelDO::getAppId, appId, PayChannelDO::getCode, code); - } - - @Select("SELECT id FROM pay_channel WHERE update_time > #{maxUpdateTime} LIMIT 1") - Long selectExistsByUpdateTimeAfter(Date maxUpdateTime); - -} diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/order/PayOrderCoreMapper.java b/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/order/PayOrderCoreMapper.java deleted file mode 100644 index 1ed34d549..000000000 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/order/PayOrderCoreMapper.java +++ /dev/null @@ -1,22 +0,0 @@ -package cn.iocoder.yudao.coreservice.modules.pay.dal.mysql.order; - -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderExtensionDO; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface PayOrderCoreMapper extends BaseMapperX { - - default PayOrderDO selectByAppIdAndMerchantOrderId(Long appId, String merchantOrderId) { - return selectOne(new QueryWrapper().eq("app_id", appId) - .eq("merchant_order_id", merchantOrderId)); - } - - default int updateByIdAndStatus(Long id, Integer status, PayOrderDO update) { - return update(update, new QueryWrapper() - .eq("id", id).eq("status", status)); - } - -} diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/order/PayRefundCoreMapper.java b/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/order/PayRefundCoreMapper.java deleted file mode 100644 index 8de1396dd..000000000 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/order/PayRefundCoreMapper.java +++ /dev/null @@ -1,23 +0,0 @@ -package cn.iocoder.yudao.coreservice.modules.pay.dal.mysql.order; - -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayRefundDO; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import org.apache.ibatis.annotations.Mapper; - - -/** - * é€€æ¬¾è®¢å• Mapper - * - */ -@Mapper -public interface PayRefundCoreMapper extends BaseMapperX { - - default PayRefundDO selectByReqNo(String reqNo) { - return selectOne("req_no", reqNo); - } - - default PayRefundDO selectByTradeNoAndMerchantRefundNo(String tradeNo, String merchantRefundNo){ - return selectOne("trade_no", tradeNo, "merchant_refund_no", merchantRefundNo); - } - -} diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/package-info.java b/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/package-info.java deleted file mode 100644 index 8f5ba6ac3..000000000 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/** - * pay 包下,我们放支付业务,æ供业务的支付能力。 - * 例如说:商户ã€åº”用ã€æ”¯ä»˜ã€é€€æ¬¾ç­‰ç­‰ - * - * 缩写:pay - */ -package cn.iocoder.yudao.coreservice.modules.pay; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/merchant/PayAppCoreService.java b/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/merchant/PayAppCoreService.java deleted file mode 100644 index ab6f3f27f..000000000 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/merchant/PayAppCoreService.java +++ /dev/null @@ -1,23 +0,0 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service.merchant; - -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.framework.common.exception.ServiceException; - -/** - * 支付应用 Core Service æŽ¥å£ - * - * @author 芋é“æºç  - */ -public interface PayAppCoreService { - - /** - * 支付应用的åˆæ³•æ€§ - * - * 如果ä¸åˆæ³•ï¼ŒæŠ›å‡º {@link ServiceException} 业务异常 - * - * @param id åº”ç”¨ç¼–å· - * @return åº”ç”¨ä¿¡æ¯ - */ - PayAppDO validPayApp(Long id); - -} diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/merchant/PayChannelCoreService.java b/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/merchant/PayChannelCoreService.java deleted file mode 100644 index 76d467875..000000000 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/merchant/PayChannelCoreService.java +++ /dev/null @@ -1,39 +0,0 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service.merchant; - -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayChannelDO; -import cn.iocoder.yudao.framework.common.exception.ServiceException; - -/** - * æ”¯ä»˜æ¸ é“ Core Service æŽ¥å£ - * - * @author 芋é“æºç  - */ -public interface PayChannelCoreService { - - /** - * åˆå§‹åŒ–支付客户端 - */ - void initPayClients(); - - /** - * 支付渠é“çš„åˆæ³•æ€§ - * - * 如果ä¸åˆæ³•ï¼ŒæŠ›å‡º {@link ServiceException} 业务异常 - * - * @param id 渠é“ç¼–å· - * @return 渠é“ä¿¡æ¯ - */ - PayChannelDO validPayChannel(Long id); - - /** - * 支付渠é“çš„åˆæ³•æ€§ - * - * 如果ä¸åˆæ³•ï¼ŒæŠ›å‡º {@link ServiceException} 业务异常 - * - * @param appId åº”ç”¨ç¼–å· - * @param code æ”¯ä»˜æ¸ é“ - * @return 渠é“ä¿¡æ¯ - */ - PayChannelDO validPayChannel(Long appId, String code); - -} diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/merchant/impl/PayAppCoreServiceImpl.java b/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/merchant/impl/PayAppCoreServiceImpl.java deleted file mode 100644 index 916b50137..000000000 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/merchant/impl/PayAppCoreServiceImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service.merchant.impl; - -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.mysql.merchant.PayAppCoreMapper; -import cn.iocoder.yudao.coreservice.modules.pay.service.merchant.PayAppCoreService; -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import javax.validation.Valid; - -import static cn.iocoder.yudao.coreservice.modules.pay.enums.PayErrorCodeCoreConstants.*; -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; - -/** - * 支付应用 Core Service 实现类 - * - * @author 芋é“æºç  - */ -@Service -@Valid -@Slf4j -public class PayAppCoreServiceImpl implements PayAppCoreService { - - @Resource - private PayAppCoreMapper payAppCoreMapper; - - @Override - public PayAppDO validPayApp(Long id) { - PayAppDO app = payAppCoreMapper.selectById(id); - // 校验是å¦å­˜åœ¨ - if (app == null) { - throw exception(PAY_APP_NOT_FOUND); - } - // 校验是å¦ç¦ç”¨ - if (CommonStatusEnum.DISABLE.getStatus().equals(app.getStatus())) { - throw exception(PAY_APP_IS_DISABLE); - } - return app; - } - -} diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/merchant/impl/PayChannelCoreServiceImpl.java b/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/merchant/impl/PayChannelCoreServiceImpl.java deleted file mode 100644 index 5029b6ebd..000000000 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/merchant/impl/PayChannelCoreServiceImpl.java +++ /dev/null @@ -1,121 +0,0 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service.merchant.impl; - -import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayChannelDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.mysql.merchant.PayChannelCoreMapper; -import cn.iocoder.yudao.coreservice.modules.pay.enums.PayErrorCodeCoreConstants; -import cn.iocoder.yudao.coreservice.modules.pay.service.merchant.PayChannelCoreService; -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import cn.iocoder.yudao.framework.pay.core.client.PayClientFactory; -import lombok.extern.slf4j.Slf4j; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Service; - -import javax.annotation.PostConstruct; -import javax.annotation.Resource; -import javax.validation.Valid; - -import java.util.Comparator; -import java.util.Date; -import java.util.List; - -import static cn.iocoder.yudao.coreservice.modules.pay.enums.PayErrorCodeCoreConstants.*; -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; - -/** - * æ”¯ä»˜æ¸ é“ Core Service 实现类 - * - * @author 芋é“æºç  - */ -@Service -@Valid -@Slf4j -public class PayChannelCoreServiceImpl implements PayChannelCoreService { - - /** - * 定时执行 {@link #schedulePeriodicRefresh()} 的周期 - * 因为已ç»é€šè¿‡ Redis Pub/Sub 机制,所以频率ä¸éœ€è¦é«˜ - */ - private static final long SCHEDULER_PERIOD = 5 * 60 * 1000L; - - /** - * 缓存èœå•çš„最大更新时间,用于åŽç»­çš„增é‡è½®è¯¢ï¼Œåˆ¤æ–­æ˜¯å¦æœ‰æ›´æ–° - */ - private volatile Date maxUpdateTime; - - @Resource - private PayChannelCoreMapper payChannelCoreMapper; - - @Resource - private PayClientFactory payClientFactory; - - @Override - @PostConstruct - public void initPayClients() { - // 获å–支付渠é“,如果有更新 - List payChannels = this.loadPayChannelIfUpdate(maxUpdateTime); - if (CollUtil.isEmpty(payChannels)) { - return; - } - - // 创建或更新支付 Client - payChannels.forEach(payChannel -> payClientFactory.createOrUpdatePayClient(payChannel.getId(), - payChannel.getCode(), payChannel.getConfig())); - - // 写入缓存 - assert payChannels.size() > 0; // 断言,é¿å…å‘Šè­¦ - maxUpdateTime = payChannels.stream().max(Comparator.comparing(BaseDO::getUpdateTime)).get().getUpdateTime(); - log.info("[initPayClients][åˆå§‹åŒ– PayChannel æ•°é‡ä¸º {}]", payChannels.size()); - } - - @Scheduled(fixedDelay = SCHEDULER_PERIOD, initialDelay = SCHEDULER_PERIOD) - public void schedulePeriodicRefresh() { - initPayClients(); - } - - /** - * 如果支付渠é“å‘生å˜åŒ–,从数æ®åº“中获å–最新的全é‡æ”¯ä»˜æ¸ é“。 - * 如果未å‘生å˜åŒ–,则返回空 - * - * @param maxUpdateTime 当å‰æ”¯ä»˜æ¸ é“的最大更新时间 - * @return 支付渠é“列表 - */ - private List loadPayChannelIfUpdate(Date maxUpdateTime) { - // 第一步,判断是å¦è¦æ›´æ–°ã€‚ - if (maxUpdateTime == null) { // 如果更新时间为空,说明 DB ä¸€å®šæœ‰æ–°æ•°æ® - log.info("[loadPayChannelIfUpdate][首次加载全é‡æ”¯ä»˜æ¸ é“]"); - } else { // 判断数æ®åº“中是å¦æœ‰æ›´æ–°çš„æ”¯ä»˜æ¸ é“ - if (payChannelCoreMapper.selectExistsByUpdateTimeAfter(maxUpdateTime) == null) { - return null; - } - log.info("[loadPayChannelIfUpdate][增é‡åŠ è½½å…¨é‡æ”¯ä»˜æ¸ é“]"); - } - // 第二步,如果有更新,则从数æ®åº“åŠ è½½æ‰€æœ‰æ”¯ä»˜æ¸ é“ - return payChannelCoreMapper.selectList(); - } - - @Override - public PayChannelDO validPayChannel(Long id) { - PayChannelDO channel = payChannelCoreMapper.selectById(id); - this.validPayChannel(channel); - return channel; - } - - @Override - public PayChannelDO validPayChannel(Long appId, String code) { - PayChannelDO channel = payChannelCoreMapper.selectByAppIdAndCode(appId, code); - this.validPayChannel(channel); - return channel; - } - - private void validPayChannel(PayChannelDO channel) { - if (channel == null) { - throw exception(PAY_CHANNEL_NOT_FOUND); - } - if (CommonStatusEnum.DISABLE.getStatus().equals(channel.getStatus())) { - throw exception(PayErrorCodeCoreConstants.PAY_CHANNEL_IS_DISABLE); - } - } - -} diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/vo/package-info.java b/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/vo/package-info.java deleted file mode 100644 index 78667d3ce..000000000 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/vo/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/** - * 这里的 VO 包有点特殊,是æ供给接入支付模å—的业务,æ供回调接å£æ—¶ï¼Œå¯ä»¥ç›´æŽ¥ä½¿ç”¨ VO - * - * 例如说,支付å•çš„回调,使用 - */ -package cn.iocoder.yudao.coreservice.modules.pay.service.notify.vo; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/PayOrderCoreService.java b/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/PayOrderCoreService.java deleted file mode 100644 index 07e659229..000000000 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/PayOrderCoreService.java +++ /dev/null @@ -1,50 +0,0 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service.order; - -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderDO; - -import cn.iocoder.yudao.coreservice.modules.pay.service.order.dto.*; -import cn.iocoder.yudao.framework.pay.core.client.dto.PayNotifyDataDTO; - -import javax.validation.Valid; - -/** - * æ”¯ä»˜è®¢å• Core Service - * - * @author 芋é“æºç  - */ -public interface PayOrderCoreService { - - /** - * èŽ·å¾—æ”¯ä»˜å• - * - * @param id 支付å•ç¼–å· - * @return æ”¯ä»˜å• - */ - PayOrderDO getPayOrder(Long id); - - /** - * åˆ›å»ºæ”¯ä»˜å• - * - * @param reqDTO 创建请求 - * @return 支付å•ç¼–å· - */ - Long createPayOrder(@Valid PayOrderCreateReqDTO reqDTO); - - /** - * æ交支付 - * 此时,会å‘起支付渠é“的调用 - * - * @param reqDTO æ交请求 - * @return æ交结果 - */ - PayOrderSubmitRespDTO submitPayOrder(@Valid PayOrderSubmitReqDTO reqDTO); - - /** - * 通知支付å•æˆåŠŸ - * - * @param channelId 渠é“ç¼–å· - * @param notifyData é€šçŸ¥æ•°æ® - */ - void notifyPayOrder(Long channelId, PayNotifyDataDTO notifyData) throws Exception; - -} diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/PayRefundCoreService.java b/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/PayRefundCoreService.java deleted file mode 100644 index b56384ed6..000000000 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/PayRefundCoreService.java +++ /dev/null @@ -1,31 +0,0 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service.order; - -import cn.iocoder.yudao.coreservice.modules.pay.service.order.dto.PayRefundReqDTO; -import cn.iocoder.yudao.coreservice.modules.pay.service.order.dto.PayRefundRespDTO; -import cn.iocoder.yudao.framework.pay.core.client.dto.PayNotifyDataDTO; - -/** - * é€€æ¬¾å• Core Service - * - * @author jason - */ -public interface PayRefundCoreService { - - /** - * æ交退款申请 - * - * @param reqDTO é€€æ¬¾ç”³è¯·ä¿¡æ¯ - * @return é€€æ¬¾ç”³è¯·è¿”å›žä¿¡æ¯ - */ - PayRefundRespDTO submitRefundOrder(PayRefundReqDTO reqDTO); - - /** - * 渠é“的退款通知 - * - * @param channelId 渠é“ç¼–å· - * @param notifyData é€šçŸ¥æ•°æ® - * @throws Exception 退款通知异常 - */ - void notifyPayRefund(Long channelId, PayNotifyDataDTO notifyData) throws Exception; - -} diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/package-info.java b/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/package-info.java deleted file mode 100644 index 13b4863a5..000000000 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service; diff --git a/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/enums/PayChannelEnum.java b/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/enums/PayChannelEnum.java index 418676fca..f8a4971a1 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/enums/PayChannelEnum.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/core/enums/PayChannelEnum.java @@ -17,10 +17,7 @@ import lombok.Getter; @AllArgsConstructor public enum PayChannelEnum { - /** - * 公众å·ç½‘页 - */ - WX_PUB("wx_pub", "微信 JSAPI 支付", WXPayClientConfig.class), + WX_PUB("wx_pub", "微信 JSAPI 支付", WXPayClientConfig.class), // 公众å·ç½‘页 WX_LITE("wx_lite", "微信å°ç¨‹åºæ”¯ä»˜", WXPayClientConfig.class), WX_APP("wx_app", "微信 App 支付", WXPayClientConfig.class), @@ -34,16 +31,16 @@ public enum PayChannelEnum { *

* å‚考 https://www.pingxx.com/api/支付渠é“属性值.html */ - private String code; + private final String code; /** * åå­— */ - private String name; + private final String name; /** * é…置类 */ - private Class configClass; + private final Class configClass; /** * 微信支付 @@ -58,6 +55,6 @@ public enum PayChannelEnum { public static PayChannelEnum getByCode(String code) { return ArrayUtil.firstMatch(o -> o.getCode().equals(code), values()); } - + } diff --git a/yudao-module-pay/pom.xml b/yudao-module-pay/pom.xml new file mode 100644 index 000000000..36fd9edb3 --- /dev/null +++ b/yudao-module-pay/pom.xml @@ -0,0 +1,25 @@ + + + + cn.iocoder.boot + yudao + ${revision} + + 4.0.0 + yudao-module-pay + pom + + yudao-module-pay-api + yudao-module-pay-impl + + + ${artifactId} + + pay 模å—,我们放支付业务,æ供业务的支付能力。 + 例如说:商户ã€åº”用ã€æ”¯ä»˜ã€é€€æ¬¾ç­‰ç­‰ + + + + diff --git a/yudao-module-pay/yudao-module-pay-api/pom.xml b/yudao-module-pay/yudao-module-pay-api/pom.xml new file mode 100644 index 000000000..d5ec95176 --- /dev/null +++ b/yudao-module-pay/yudao-module-pay-api/pom.xml @@ -0,0 +1,26 @@ + + + + yudao-module-pay + cn.iocoder.boot + 1.4.0-snapshot + + 4.0.0 + yudao-module-pay-api + jar + + ${artifactId} + + pay æ¨¡å— API,暴露给其它模å—调用 + + + + + cn.iocoder.boot + yudao-common + + + + diff --git a/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/DictTypeConstants.java b/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/DictTypeConstants.java new file mode 100644 index 000000000..2f40f2df4 --- /dev/null +++ b/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/DictTypeConstants.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.pay.enums; + +/** + * Pay 字典类型的枚举类 + * + * @author 芋é“æºç  + */ +public interface DictTypeConstants { + + /** + * 支付-订å•-订å•çŠ¶æ€ + */ + String PAY_ORDER_STATUS = "pay_order_status"; + + /** + * 支付-订å•-订å•å›žè°ƒå•†æˆ·çŠ¶æ€ + */ + String PAY_ORDER_NOTIFY_STATUS = "pay_order_notify_status"; + + /** + * 支付-订å•-订å•é€€æ¬¾çŠ¶æ€ + */ + String PAY_ORDER_REFUND_STATUS = "pay_order_refund_status"; + + /** + * 支付-退款订å•-é€€æ¬¾çŠ¶æ€ + */ + String PAY_REFUND_ORDER_STATUS = "pay_refund_order_status"; + + /** + * 支付-退款订å•-退款类别 + */ + String PAY_REFUND_ORDER_TYPE = "pay_refund_order_type"; + +} diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/PayErrorCodeCoreConstants.java b/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/ErrorCodeConstants.java similarity index 97% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/PayErrorCodeCoreConstants.java rename to yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/ErrorCodeConstants.java index f5133ad05..203cb0703 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/PayErrorCodeCoreConstants.java +++ b/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/ErrorCodeConstants.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.enums; +package cn.iocoder.yudao.module.pay.enums; import cn.iocoder.yudao.framework.common.exception.ErrorCode; @@ -7,7 +7,7 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode; * * pay 系统,使用 1-007-000-000 段 */ -public interface PayErrorCodeCoreConstants { +public interface ErrorCodeConstants { /** * ========== APP æ¨¡å— 1-007-000-000 ========== diff --git a/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/package-info.java b/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/package-info.java new file mode 100644 index 000000000..756410aa8 --- /dev/null +++ b/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.yudao.module.pay; diff --git a/yudao-module-pay/yudao-module-pay-impl/pom.xml b/yudao-module-pay/yudao-module-pay-impl/pom.xml new file mode 100644 index 000000000..f8e6da5dc --- /dev/null +++ b/yudao-module-pay/yudao-module-pay-impl/pom.xml @@ -0,0 +1,103 @@ + + + + yudao-module-pay + cn.iocoder.boot + 1.4.0-snapshot + + 4.0.0 + yudao-module-pay-impl + jar + + ${artifactId} + + pay 模å—,我们放支付业务,æ供业务的支付能力。 + 例如说:商户ã€åº”用ã€æ”¯ä»˜ã€é€€æ¬¾ç­‰ç­‰ + + + + + cn.iocoder.boot + yudao-module-pay-api + ${revision} + + + + + cn.iocoder.boot + yudao-spring-boot-starter-biz-operatelog + + + cn.iocoder.boot + yudao-spring-boot-starter-biz-pay + + + + + cn.iocoder.boot + yudao-spring-boot-starter-security + + + + + cn.iocoder.boot + yudao-spring-boot-starter-mybatis + + + + cn.iocoder.boot + yudao-spring-boot-starter-redis + + + + + cn.iocoder.boot + yudao-spring-boot-starter-job + + + + + cn.iocoder.boot + yudao-spring-boot-starter-mq + + + + + cn.iocoder.boot + yudao-spring-boot-starter-test + test + + + + + cn.iocoder.boot + yudao-spring-boot-starter-excel + + + + + + + ${artifactId} + + + + org.springframework.boot + spring-boot-maven-plugin + + true + + + + + repackage + + + + + + + + diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/PayAppController.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayAppController.java similarity index 88% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/PayAppController.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayAppController.java index 344624392..0d06c9e25 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/PayAppController.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayAppController.java @@ -1,20 +1,20 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.app; +package cn.iocoder.yudao.module.pay.controller.admin.merchant; import cn.hutool.core.collection.CollUtil; -import cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo.*; -import cn.iocoder.yudao.adminserver.modules.pay.convert.app.PayAppConvert; -import cn.iocoder.yudao.adminserver.modules.pay.service.app.PayAppService; -import cn.iocoder.yudao.adminserver.modules.pay.service.channel.PayChannelService; -import cn.iocoder.yudao.adminserver.modules.pay.service.merchant.PayMerchantService; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayChannelDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayMerchantDO; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.*; +import cn.iocoder.yudao.module.pay.convert.app.PayAppConvert; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.service.merchant.PayAppService; +import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; +import cn.iocoder.yudao.module.pay.service.merchant.PayMerchantService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; @@ -33,7 +33,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Slf4j -@Api(tags = "支付应用信æ¯") +@Api(tags = "管ç†åŽå° - 支付应用信æ¯") @RestController @RequestMapping("/pay/app") @Validated @@ -106,7 +106,7 @@ public class PayAppController { return success(new PageResult<>(pageResult.getTotal())); } - // 得到所有的应用编å·ï¼ŒæŸ¥å‡ºæ‰€æœ‰çš„é€šé“ + // 得到所有的应用编å·ï¼ŒæŸ¥å‡ºæ‰€æœ‰çš„æ¸ é“ Collection payAppIds = CollectionUtils.convertList(pageResult.getList(), PayAppDO::getId); List channels = channelService.getChannelListByAppIds(payAppIds); // TODO @aquan:å¯ä»¥åŸºäºŽ appId 简历一个 multiMap。这样下é¢ï¼Œç›´æŽ¥ get 到之åŽï¼ŒCollUtil buildSet å³å¯ @@ -116,7 +116,7 @@ public class PayAppController { Collection merchantIds = CollectionUtils.convertList(pageResult.getList(), PayAppDO::getMerchantId); Map deptMap = merchantService.getMerchantMap(merchantIds); - // 利用å射将通é“æ•°æ®å¤åˆ¶åˆ°è¿”回的数æ®ç»“构中去 + // 利用å射将渠é“æ•°æ®å¤åˆ¶åˆ°è¿”回的数æ®ç»“构中去 List appList = new ArrayList<>(pageResult.getList().size()); pageResult.getList().forEach(app -> { // 写入应用信æ¯çš„æ•°æ® diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/PayChannelController.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayChannelController.java similarity index 91% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/PayChannelController.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayChannelController.java index ae83ef9cc..82d3a354e 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/PayChannelController.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayChannelController.java @@ -1,9 +1,9 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.channel; +package cn.iocoder.yudao.module.pay.controller.admin.merchant; -import cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo.*; -import cn.iocoder.yudao.adminserver.modules.pay.convert.channel.PayChannelConvert; -import cn.iocoder.yudao.adminserver.modules.pay.service.channel.PayChannelService; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayChannelDO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.*; +import cn.iocoder.yudao.module.pay.convert.channel.PayChannelConvert; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; +import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; @@ -26,11 +26,7 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -/** - * æ”¯ä»˜æ¸ é“ controller 组件 - * @author aquan - */ -@Api(tags = "支付渠é“") +@Api(tags = "管ç†åŽå° - 支付渠é“") @RestController @RequestMapping("/pay/channel") @Validated @@ -39,7 +35,6 @@ public class PayChannelController { @Resource private PayChannelService channelService; - @PostMapping("/create") @ApiOperation("åˆ›å»ºæ”¯ä»˜æ¸ é“ ") @PreAuthorize("@ss.hasPermission('pay:channel:create')") @@ -116,7 +111,6 @@ public class PayChannelController { @PreAuthorize("@ss.hasPermission('pay:channel:query')") public CommonResult getChannel( @RequestParam Long merchantId, @RequestParam Long appId, @RequestParam String code) { - // ç²å–æ¸ é“ PayChannelDO channel = channelService.getChannelByConditions(merchantId, appId, code); if (channel == null) { @@ -126,4 +120,5 @@ public class PayChannelController { PayChannelRespVO respVo = PayChannelConvert.INSTANCE.convert(channel); return success(respVo); } + } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/PayMerchantController.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayMerchantController.java similarity index 92% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/PayMerchantController.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayMerchantController.java index ae0235efc..0882502aa 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/PayMerchantController.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayMerchantController.java @@ -1,9 +1,9 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.merchant; +package cn.iocoder.yudao.module.pay.controller.admin.merchant; -import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.*; -import cn.iocoder.yudao.adminserver.modules.pay.convert.merchant.PayMerchantConvert; -import cn.iocoder.yudao.adminserver.modules.pay.service.merchant.PayMerchantService; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.*; +import cn.iocoder.yudao.module.pay.convert.merchant.PayMerchantConvert; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.service.merchant.PayMerchantService; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppBaseVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppBaseVO.java similarity index 94% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppBaseVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppBaseVO.java index 6ffe565ec..795b3c643 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppBaseVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; import lombok.*; import io.swagger.annotations.*; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppCreateReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppCreateReqVO.java similarity index 50% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppCreateReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppCreateReqVO.java index 3b0e69b99..a66a71963 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppCreateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppCreateReqVO.java @@ -1,11 +1,9 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; import lombok.*; -import java.util.*; import io.swagger.annotations.*; -import javax.validation.constraints.*; -@ApiModel("支付应用信æ¯åˆ›å»º Request VO") +@ApiModel("管ç†åŽå° - 支付应用信æ¯åˆ›å»º Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppExcelVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExcelVO.java similarity index 83% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppExcelVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExcelVO.java index f81b53bd0..3fc274a03 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppExcelVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExcelVO.java @@ -1,10 +1,9 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo; - -import lombok.*; -import java.util.*; -import io.swagger.annotations.*; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + +import java.util.Date; /** * æ”¯ä»˜åº”ç”¨ä¿¡æ¯ Excel VO diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppExportReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExportReqVO.java similarity index 84% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppExportReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExportReqVO.java index b5d284447..d8b464250 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppExportReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; import lombok.*; import java.util.*; @@ -8,7 +8,7 @@ import org.springframework.format.annotation.DateTimeFormat; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "æ”¯ä»˜åº”ç”¨ä¿¡æ¯ Excel 导出 Request VO", description = "å‚æ•°å’Œ PayAppPageReqVO 是一致的") +@ApiModel(value = "管ç†åŽå° - æ”¯ä»˜åº”ç”¨ä¿¡æ¯ Excel 导出 Request VO", description = "å‚æ•°å’Œ PayAppPageReqVO 是一致的") @Data public class PayAppExportReqVO { diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppPageItemRespVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageItemRespVO.java similarity index 78% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppPageItemRespVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageItemRespVO.java index 6d8144afe..e5ad0825f 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppPageItemRespVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageItemRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,12 +9,7 @@ import lombok.ToString; import java.util.Date; import java.util.Set; -/** - * 支付应用信æ¯åˆ†é¡µæŸ¥è¯¢ Response VO - * - * @author aquan - */ -@ApiModel(value = "支付应用信æ¯åˆ†é¡µæŸ¥è¯¢ Response VO", description = "相比于支付信æ¯ï¼Œè¿˜ä¼šå¤šå‡ºåº”用渠é“的开关信æ¯") +@ApiModel(value = "管ç†åŽå° - 支付应用信æ¯åˆ†é¡µæŸ¥è¯¢ Response VO", description = "相比于支付信æ¯ï¼Œè¿˜ä¼šå¤šå‡ºåº”用渠é“的开关信æ¯") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppPageReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageReqVO.java similarity index 90% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppPageReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageReqVO.java index 62156e993..62af7e19f 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppPageReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; import lombok.*; import java.util.*; @@ -8,7 +8,7 @@ import org.springframework.format.annotation.DateTimeFormat; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("支付应用信æ¯åˆ†é¡µ Request VO") +@ApiModel("管ç†åŽå° - 支付应用信æ¯åˆ†é¡µ Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppRespVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppRespVO.java similarity index 74% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppRespVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppRespVO.java index 565491f92..e0ac450a2 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppRespVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppRespVO.java @@ -1,10 +1,10 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; import lombok.*; import java.util.*; import io.swagger.annotations.*; -@ApiModel("æ”¯ä»˜åº”ç”¨ä¿¡æ¯ Response VO") +@ApiModel("管ç†åŽå° - æ”¯ä»˜åº”ç”¨ä¿¡æ¯ Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppUpdateReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateReqVO.java similarity index 72% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppUpdateReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateReqVO.java index 426366fc1..9bdd04254 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppUpdateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateReqVO.java @@ -1,11 +1,10 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; import lombok.*; -import java.util.*; import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("支付应用信æ¯æ›´æ–° Request VO") +@ApiModel("管ç†åŽå° - 支付应用信æ¯æ›´æ–° Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppUpdateStatusReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateStatusReqVO.java similarity index 81% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppUpdateStatusReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateStatusReqVO.java index 28a3218ae..2ccce684c 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/app/vo/PayAppUpdateStatusReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateStatusReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -6,7 +6,7 @@ import lombok.Data; import javax.validation.constraints.NotNull; -@ApiModel("åº”ç”¨æ›´æ–°çŠ¶æ€ Request VO") +@ApiModel("管ç†åŽå° - åº”ç”¨æ›´æ–°çŠ¶æ€ Request VO") @Data public class PayAppUpdateStatusReqVO { diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelBaseVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelBaseVO.java similarity index 86% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelBaseVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelBaseVO.java index 42a98b972..8b9f53490 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelBaseVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelBaseVO.java @@ -1,13 +1,11 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; import lombok.*; -import java.util.*; import io.swagger.annotations.*; import javax.validation.constraints.*; /** -* æ”¯ä»˜æ¸ é“ - Base VO,æ供给添加ã€ä¿®æ”¹ã€è¯¦ç»†çš„å­ VO 使用 +* æ”¯ä»˜æ¸ é“ Base VO,æ供给添加ã€ä¿®æ”¹ã€è¯¦ç»†çš„å­ VO 使用 * å¦‚æžœå­ VO 存在差异的字段,请ä¸è¦æ·»åŠ åˆ°è¿™é‡Œï¼Œå½±å“ Swagger æ–‡æ¡£ç”Ÿæˆ */ @Data diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelCreateReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelCreateReqVO.java similarity index 60% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelCreateReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelCreateReqVO.java index a814b7b86..5852f9bb1 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelCreateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,14 +8,14 @@ import lombok.ToString; import javax.validation.constraints.NotBlank; -@ApiModel("æ”¯ä»˜æ¸ é“ åˆ›å»º Request VO") +@ApiModel("管ç†åŽå° - æ”¯ä»˜æ¸ é“ åˆ›å»º Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class PayChannelCreateReqVO extends PayChannelBaseVO { - @ApiModelProperty(value = "通é“é…置的 json 字符串") - @NotBlank(message = "通é“é…ç½®ä¸èƒ½ä¸ºç©º") + @ApiModelProperty(value = "渠é“é…置的 json 字符串") + @NotBlank(message = "渠é“é…ç½®ä¸èƒ½ä¸ºç©º") private String config; } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelExcelVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExcelVO.java similarity index 91% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelExcelVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExcelVO.java index a4618780a..780abb18f 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelExcelVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExcelVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; import lombok.*; import java.util.*; @@ -7,8 +7,7 @@ import io.swagger.annotations.*; import com.alibaba.excel.annotation.ExcelProperty; /** - * æ”¯ä»˜æ¸ é“ - Excel VO + * æ”¯ä»˜æ¸ é“ Excel VO * * @author 芋艿 */ diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelExportReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExportReqVO.java similarity index 85% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelExportReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExportReqVO.java index 29e3acdaf..d4d6e6653 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelExportReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; import lombok.*; import java.util.*; @@ -8,7 +8,7 @@ import org.springframework.format.annotation.DateTimeFormat; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "æ”¯ä»˜æ¸ é“ Excel 导出 Request VO", description = "å‚æ•°å’Œ PayChannelPageReqVO 是一致的") +@ApiModel(value = "管ç†åŽå° - æ”¯ä»˜æ¸ é“ Excel 导出 Request VO", description = "å‚æ•°å’Œ PayChannelPageReqVO 是一致的") @Data public class PayChannelExportReqVO { diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelPageReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelPageReqVO.java similarity index 90% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelPageReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelPageReqVO.java index 83851f944..29995d07a 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelPageReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelPageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; import lombok.*; import java.util.*; @@ -8,7 +8,7 @@ import org.springframework.format.annotation.DateTimeFormat; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("æ”¯ä»˜æ¸ é“ åˆ†é¡µ Request VO") +@ApiModel("管ç†åŽå° - æ”¯ä»˜æ¸ é“ åˆ†é¡µ Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelRespVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelRespVO.java similarity index 78% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelRespVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelRespVO.java index 02873b9f5..b2644f4d0 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelRespVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelRespVO.java @@ -1,10 +1,10 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; import lombok.*; import java.util.*; import io.swagger.annotations.*; -@ApiModel("æ”¯ä»˜æ¸ é“ Response VO") +@ApiModel("管ç†åŽå° - æ”¯ä»˜æ¸ é“ Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelUpdateReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelUpdateReqVO.java similarity index 60% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelUpdateReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelUpdateReqVO.java index fdefc7bad..c216de9ae 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/channel/vo/PayChannelUpdateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelUpdateReqVO.java @@ -1,11 +1,10 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; import lombok.*; -import java.util.*; import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("æ”¯ä»˜æ¸ é“ æ›´æ–° Request VO") +@ApiModel("管ç†åŽå° - æ”¯ä»˜æ¸ é“ æ›´æ–° Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @@ -15,7 +14,7 @@ public class PayChannelUpdateReqVO extends PayChannelBaseVO { @NotNull(message = "商户编å·ä¸èƒ½ä¸ºç©º") private Long id; - @ApiModelProperty(value = "通é“é…置的json字符串") - @NotBlank(message = "通é“é…ç½®ä¸èƒ½ä¸ºç©º") + @ApiModelProperty(value = "渠é“é…置的json字符串") + @NotBlank(message = "渠é“é…ç½®ä¸èƒ½ä¸ºç©º") private String config; } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantBaseVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantBaseVO.java similarity index 91% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantBaseVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantBaseVO.java index ed7b69a3f..1052fdd03 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantBaseVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantCreateReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantCreateReqVO.java similarity index 51% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantCreateReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantCreateReqVO.java index 2128de88b..018db180b 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantCreateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantCreateReqVO.java @@ -1,11 +1,9 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; import lombok.*; -import java.util.*; import io.swagger.annotations.*; -import javax.validation.constraints.*; -@ApiModel("支付商户信æ¯åˆ›å»º Request VO") +@ApiModel("管ç†åŽå° - 支付商户信æ¯åˆ›å»º Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantExcelVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExcelVO.java similarity index 91% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantExcelVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExcelVO.java index cb229fb11..b399a111d 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantExcelVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExcelVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantExportReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExportReqVO.java similarity index 82% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantExportReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExportReqVO.java index c6c322282..680b04b35 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantExportReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; import lombok.*; import java.util.*; @@ -8,7 +8,7 @@ import org.springframework.format.annotation.DateTimeFormat; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "æ”¯ä»˜å•†æˆ·ä¿¡æ¯ Excel 导出 Request VO", description = "å‚æ•°å’Œ PayMerchantPageReqVO 是一致的") +@ApiModel(value = "管ç†åŽå° - æ”¯ä»˜å•†æˆ·ä¿¡æ¯ Excel 导出 Request VO", description = "å‚æ•°å’Œ PayMerchantPageReqVO 是一致的") @Data public class PayMerchantExportReqVO { diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantPageReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantPageReqVO.java similarity index 88% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantPageReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantPageReqVO.java index 8a66ac953..241287c98 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantPageReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantPageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; import lombok.*; import java.util.*; @@ -8,7 +8,7 @@ import org.springframework.format.annotation.DateTimeFormat; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("支付商户信æ¯åˆ†é¡µ Request VO") +@ApiModel("管ç†åŽå° - 支付商户信æ¯åˆ†é¡µ Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantRespVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantRespVO.java similarity index 69% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantRespVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantRespVO.java index d5b194359..a27c591a1 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantRespVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,7 +8,7 @@ import lombok.ToString; import java.util.Date; -@ApiModel("æ”¯ä»˜å•†æˆ·ä¿¡æ¯ Response VO") +@ApiModel("管ç†åŽå° - æ”¯ä»˜å•†æˆ·ä¿¡æ¯ Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @@ -20,11 +20,7 @@ public class PayMerchantRespVO extends PayMerchantBaseVO { @ApiModelProperty(value = "创建时间", required = true) private Date createTime; - /** - * å•†æˆ·å· - * 例如说,M233666999 - * åªæœ‰æ–°å¢žæ—¶æ’入,ä¸å…许修改 - */ + @ApiModelProperty(value = "商户å·", required = true, example = "M233666999") private String no; } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantUpdateReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateReqVO.java similarity index 71% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantUpdateReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateReqVO.java index 031d34fd5..d270a3d84 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantUpdateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateReqVO.java @@ -1,11 +1,10 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; import lombok.*; -import java.util.*; import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("支付商户信æ¯æ›´æ–° Request VO") +@ApiModel("管ç†åŽå° - 支付商户信æ¯æ›´æ–° Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantUpdateStatusReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateStatusReqVO.java similarity index 80% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantUpdateStatusReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateStatusReqVO.java index 635876954..39e26b8b7 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/merchant/vo/PayMerchantUpdateStatusReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateStatusReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo; +package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -6,7 +6,7 @@ import lombok.Data; import javax.validation.constraints.NotNull; -@ApiModel("å•†æˆ·æ›´æ–°çŠ¶æ€ Request VO") +@ApiModel("管ç†åŽå° - å•†æˆ·æ›´æ–°çŠ¶æ€ Request VO") @Data public class PayMerchantUpdateStatusReqVO { diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/PayOrderController.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java similarity index 85% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/PayOrderController.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java index 2ac44c66e..2219204c4 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/PayOrderController.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java @@ -1,17 +1,17 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.order; +package cn.iocoder.yudao.module.pay.controller.admin.order; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order.*; -import cn.iocoder.yudao.adminserver.modules.pay.convert.order.PayOrderConvert; -import cn.iocoder.yudao.adminserver.modules.pay.service.app.PayAppService; -import cn.iocoder.yudao.adminserver.modules.pay.service.merchant.PayMerchantService; -import cn.iocoder.yudao.adminserver.modules.pay.service.order.PayOrderExtensionService; -import cn.iocoder.yudao.adminserver.modules.pay.service.order.PayOrderService; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayMerchantDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderExtensionDO; +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.*; +import cn.iocoder.yudao.module.pay.convert.order.PayOrderConvert; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO; +import cn.iocoder.yudao.module.pay.service.merchant.PayAppService; +import cn.iocoder.yudao.module.pay.service.merchant.PayMerchantService; +import cn.iocoder.yudao.module.pay.service.order.PayOrderExtensionService; +import cn.iocoder.yudao.module.pay.service.order.PayOrderService; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; @@ -39,38 +39,18 @@ import java.util.Map; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -/** - * æ”¯ä»˜è®¢å• controller 组件 - * - * @author aquan - */ -@Api(tags = "支付订å•") +@Api(tags = "管ç†åŽå° - 支付订å•") @RestController @RequestMapping("/pay/order") @Validated public class PayOrderController { - /** - * è®¢å• service 组件 - */ @Resource private PayOrderService orderService; - - /** - * 订å•æ‰©å±• service 组件 - */ @Resource private PayOrderExtensionService orderExtensionService; - - /** - * 商户 service 组件 - */ @Resource private PayMerchantService merchantService; - - /** - * 应用 service 组件 - */ @Resource private PayAppService appService; @@ -88,6 +68,7 @@ public class PayOrderController { PayAppDO appDO = appService.getApp(order.getAppId()); PayChannelEnum channelEnum = PayChannelEnum.getByCode(order.getChannelCode()); + // TODO @aquan:文案,都是å‰ç«¯ formatï¼› PayOrderDetailsRespVO respVO = PayOrderConvert.INSTANCE.orderDetailConvert(order); respVO.setMerchantName(ObjectUtil.isNotNull(merchantDO) ? merchantDO.getName() : "未知商户"); respVO.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用"); diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderBaseVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderBaseVO.java similarity index 95% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderBaseVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderBaseVO.java index 320125a40..1064720fb 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderBaseVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order; +package cn.iocoder.yudao.module.pay.controller.admin.order.vo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -10,8 +10,7 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; /** - * æ”¯ä»˜è®¢å• - * Base VO,æ供给添加ã€ä¿®æ”¹ã€è¯¦ç»†çš„å­ VO 使用 + * æ”¯ä»˜è®¢å• Base VO,æ供给添加ã€ä¿®æ”¹ã€è¯¦ç»†çš„å­ VO 使用 * å¦‚æžœå­ VO 存在差异的字段,请ä¸è¦æ·»åŠ åˆ°è¿™é‡Œï¼Œå½±å“ Swagger æ–‡æ¡£ç”Ÿæˆ * * @author aquan diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderDetailsRespVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderDetailsRespVO.java similarity index 82% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderDetailsRespVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderDetailsRespVO.java index d85a9bcb1..6bf7152b5 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderDetailsRespVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderDetailsRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order; +package cn.iocoder.yudao.module.pay.controller.admin.order.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,12 +8,7 @@ import lombok.ToString; import java.util.Date; -/** - * 支付订å•è¯¦ç»†ä¿¡æ¯ï¼Œç”±æ”¯ä»˜è®¢å•å’Œæ”¯ä»˜è®¢å•æ‰©å±•ä¿¡æ¯ç»„æˆ - * - * @author aquan - */ -@ApiModel("支付订å•è¯¦ç»†ä¿¡æ¯ Response VO") +@ApiModel("管ç†åŽå° - 支付订å•è¯¦ç»†ä¿¡æ¯ Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderExcelVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExcelVO.java similarity index 94% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderExcelVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExcelVO.java index f6836bc8c..c620e2d1b 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderExcelVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExcelVO.java @@ -1,8 +1,8 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order; +package cn.iocoder.yudao.module.pay.controller.admin.order.vo; -import cn.iocoder.yudao.module.system.enums.DictTypeConstants; import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.module.pay.enums.DictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderExportReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExportReqVO.java similarity index 92% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderExportReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExportReqVO.java index 3445c86b9..c079ea144 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderExportReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order; +package cn.iocoder.yudao.module.pay.controller.admin.order.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,11 +9,7 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -/** - * æ”¯ä»˜è®¢å• Excel 导出 Request VO - * @author aquan - */ -@ApiModel(value = "æ”¯ä»˜è®¢å• Excel 导出 Request VO", description = "å‚æ•°å’Œ PayOrderPageReqVO 是一致的") +@ApiModel(value = "管ç†åŽå° - æ”¯ä»˜è®¢å• Excel 导出 Request VO", description = "å‚æ•°å’Œ PayOrderPageReqVO 是一致的") @Data public class PayOrderExportReqVO { diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderPageItemRespVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageItemRespVO.java similarity index 82% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderPageItemRespVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageItemRespVO.java index b24b27a47..3c0b4e635 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderPageItemRespVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageItemRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order; +package cn.iocoder.yudao.module.pay.controller.admin.order.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,12 +8,7 @@ import lombok.ToString; import java.util.Date; -/** - * 支付订å•åˆ†é¡µ Request VO - * - * @author aquan - */ -@ApiModel("支付订å•åˆ†é¡µ Request VO") +@ApiModel("管ç†åŽå° - 支付订å•åˆ†é¡µ Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderPageReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageReqVO.java similarity index 95% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderPageReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageReqVO.java index 07fa6a820..5787ba285 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderPageReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order; +package cn.iocoder.yudao.module.pay.controller.admin.order.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; @@ -12,12 +12,7 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -/** - * 支付订å•åˆ†é¡µ Request VO - * - * @author aquan - */ -@ApiModel("支付订å•åˆ†é¡µ Request VO") +@ApiModel("管ç†åŽå° - 支付订å•åˆ†é¡µ Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderRespVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderRespVO.java similarity index 74% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderRespVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderRespVO.java index c46693635..29d0cb611 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/order/PayOrderRespVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order; +package cn.iocoder.yudao.module.pay.controller.admin.order.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,12 +8,7 @@ import lombok.ToString; import java.util.Date; -/** - * æ”¯ä»˜è®¢å• Response VO - * - * @author aquan - */ -@ApiModel("æ”¯ä»˜è®¢å• Response VO") +@ApiModel("管ç†åŽå° - æ”¯ä»˜è®¢å• Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/PayRefundController.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java similarity index 86% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/PayRefundController.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java index 912d35254..58cb24fa3 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/PayRefundController.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java @@ -1,17 +1,17 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.order; +package cn.iocoder.yudao.module.pay.controller.admin.refund; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo.*; -import cn.iocoder.yudao.adminserver.modules.pay.convert.refund.PayRefundConvert; -import cn.iocoder.yudao.adminserver.modules.pay.service.app.PayAppService; -import cn.iocoder.yudao.adminserver.modules.pay.service.merchant.PayMerchantService; -import cn.iocoder.yudao.adminserver.modules.pay.service.order.PayOrderService; -import cn.iocoder.yudao.adminserver.modules.pay.service.order.PayRefundService; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayMerchantDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayRefundDO; +import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.*; +import cn.iocoder.yudao.module.pay.convert.refund.PayRefundConvert; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; +import cn.iocoder.yudao.module.pay.service.merchant.PayAppService; +import cn.iocoder.yudao.module.pay.service.merchant.PayMerchantService; +import cn.iocoder.yudao.module.pay.service.order.PayOrderService; +import cn.iocoder.yudao.module.pay.service.refund.PayRefundService; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; @@ -39,12 +39,7 @@ import java.util.Map; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; -/** - * é€€æ¬¾è®¢å• Controller 组件 - * - * @author aquan - */ -@Api(tags = "退款订å•") +@Api(tags = "管ç†åŽå° - 退款订å•") @RestController @RequestMapping("/pay/refund") @Validated @@ -52,26 +47,13 @@ public class PayRefundController { @Resource private PayRefundService refundService; - - /** - * 商户 service 组件 - */ @Resource private PayMerchantService merchantService; - - /** - * 应用 service 组件 - */ @Resource private PayAppService appService; - - /** - * è®¢å• service 组件 - */ @Resource private PayOrderService orderService; - @GetMapping("/get") @ApiOperation("获得退款订å•") @ApiImplicitParam(name = "id", value = "ç¼–å·", required = true, example = "1024", dataTypeClass = Long.class) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundBaseVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundBaseVO.java similarity index 98% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundBaseVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundBaseVO.java index c8421b035..594496c77 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundBaseVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo; +package cn.iocoder.yudao.module.pay.controller.admin.refund.vo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundCreateReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundCreateReqVO.java similarity index 60% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundCreateReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundCreateReqVO.java index 79b05c625..cc09111ef 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundCreateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundCreateReqVO.java @@ -1,9 +1,9 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo; +package cn.iocoder.yudao.module.pay.controller.admin.refund.vo; import lombok.*; import io.swagger.annotations.*; -@ApiModel("退款订å•åˆ›å»º Request VO") +@ApiModel("管ç†åŽå° - 退款订å•åˆ›å»º Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundDetailsRespVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundDetailsRespVO.java similarity index 83% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundDetailsRespVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundDetailsRespVO.java index d1d6739ee..e8a70ecd8 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundDetailsRespVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundDetailsRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo; +package cn.iocoder.yudao.module.pay.controller.admin.refund.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,12 +9,7 @@ import lombok.ToString; import javax.validation.constraints.NotNull; import java.util.Date; -/** - * 退款订å•è¯¦æƒ… Response VO - * - * @author aquan - */ -@ApiModel("退款订å•è¯¦æƒ… Response VO") +@ApiModel("管ç†åŽå° - 退款订å•è¯¦æƒ… Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundExcelVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExcelVO.java similarity index 93% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundExcelVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExcelVO.java index 793493eaa..75e72c8be 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundExcelVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExcelVO.java @@ -1,8 +1,8 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo; +package cn.iocoder.yudao.module.pay.controller.admin.refund.vo; -import cn.iocoder.yudao.module.system.enums.DictTypeConstants; import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.module.pay.enums.DictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundExportReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExportReqVO.java similarity index 94% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundExportReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExportReqVO.java index 5a0e9c4e0..c0498239f 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundExportReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExportReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo; +package cn.iocoder.yudao.module.pay.controller.admin.refund.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,7 +9,7 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel(value = "é€€æ¬¾è®¢å• Excel 导出 Request VO", description = "å‚æ•°å’Œ PayRefundPageReqVO 是一致的") +@ApiModel(value = "管ç†åŽå° - é€€æ¬¾è®¢å• Excel 导出 Request VO", description = "å‚æ•°å’Œ PayRefundPageReqVO 是一致的") @Data public class PayRefundExportReqVO { diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundPageItemRespVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageItemRespVO.java similarity index 79% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundPageItemRespVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageItemRespVO.java index 69e881bce..03fe650ee 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundPageItemRespVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageItemRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo; +package cn.iocoder.yudao.module.pay.controller.admin.refund.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,11 +8,7 @@ import lombok.ToString; import java.util.Date; -/** - * 退款订å•åˆ†é¡µæŸ¥è¯¢ Response VO - * @author aquan - */ -@ApiModel("退款订å•åˆ†é¡µæŸ¥è¯¢ Response VO") +@ApiModel("管ç†åŽå° - 退款订å•åˆ†é¡µæŸ¥è¯¢ Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundPageReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageReqVO.java similarity index 96% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundPageReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageReqVO.java index 103a7a27c..78272009f 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundPageReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo; +package cn.iocoder.yudao.module.pay.controller.admin.refund.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.annotations.ApiModel; @@ -12,7 +12,7 @@ import java.util.Date; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; -@ApiModel("退款订å•åˆ†é¡µ Request VO") +@ApiModel("管ç†åŽå° - 退款订å•åˆ†é¡µ Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundRespVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundRespVO.java similarity index 81% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundRespVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundRespVO.java index 901a0fe85..97445d77f 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundRespVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo; +package cn.iocoder.yudao.module.pay.controller.admin.refund.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,7 +8,7 @@ import lombok.ToString; import java.util.Date; -@ApiModel("é€€æ¬¾è®¢å• Response VO") +@ApiModel("管ç†åŽå° - é€€æ¬¾è®¢å• Response VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundUpdateReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundUpdateReqVO.java similarity index 75% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundUpdateReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundUpdateReqVO.java index 8cb2dcf67..b7d555563 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/controller/order/vo/refund/vo/PayRefundUpdateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundUpdateReqVO.java @@ -1,10 +1,10 @@ -package cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo; +package cn.iocoder.yudao.module.pay.controller.admin.refund.vo; import lombok.*; import io.swagger.annotations.*; import javax.validation.constraints.*; -@ApiModel("退款订å•æ›´æ–° Request VO") +@ApiModel("管ç†åŽå° - 退款订å•æ›´æ–° Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/PayOrderController.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/AppPayOrderController.java similarity index 69% rename from yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/PayOrderController.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/AppPayOrderController.java index fb022b106..e01f7f4f4 100644 --- a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/PayOrderController.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/AppPayOrderController.java @@ -1,17 +1,17 @@ -package cn.iocoder.yudao.userserver.modules.pay.controller.order; +package cn.iocoder.yudao.module.pay.controller.app.order; import cn.hutool.core.bean.BeanUtil; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderDO; -import cn.iocoder.yudao.coreservice.modules.pay.service.order.PayOrderCoreService; -import cn.iocoder.yudao.coreservice.modules.pay.service.order.PayRefundCoreService; -import cn.iocoder.yudao.coreservice.modules.pay.service.order.dto.PayOrderSubmitReqDTO; -import cn.iocoder.yudao.coreservice.modules.pay.service.order.dto.PayOrderSubmitRespDTO; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.pay.core.client.PayClient; import cn.iocoder.yudao.framework.pay.core.client.PayClientFactory; import cn.iocoder.yudao.framework.pay.core.client.dto.PayNotifyDataDTO; -import cn.iocoder.yudao.userserver.modules.pay.controller.order.vo.PayOrderSubmitReqVO; -import cn.iocoder.yudao.userserver.modules.pay.controller.order.vo.PayOrderSubmitRespVO; +import cn.iocoder.yudao.module.pay.controller.app.order.vo.AppPayOrderSubmitReqVO; +import cn.iocoder.yudao.module.pay.controller.app.order.vo.AppPayOrderSubmitRespVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; +import cn.iocoder.yudao.module.pay.service.order.PayOrderService; +import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitReqDTO; +import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitRespDTO; +import cn.iocoder.yudao.module.pay.service.refund.PayRefundService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; @@ -21,52 +21,52 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.Map; -import static cn.iocoder.yudao.coreservice.modules.pay.enums.PayErrorCodeCoreConstants.PAY_CHANNEL_CLIENT_NOT_FOUND; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; +import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*; -@Api(tags = "支付订å•") +@Api(tags = "用户 APP - 支付订å•") @RestController @RequestMapping("/pay/order") @Validated @Slf4j -public class PayOrderController { +public class AppPayOrderController { @Resource - private PayOrderCoreService payOrderCoreService; + private PayOrderService orderService; @Resource - private PayRefundCoreService payRefundCoreService; + private PayRefundService refundService; @Resource private PayClientFactory payClientFactory; - @PostMapping("/submit") @ApiOperation("æ交支付订å•") // @PreAuthenticated // TODO æš‚æ—¶ä¸åŠ ç™»é™†éªŒè¯ï¼Œå‰ç«¯æš‚时没åšå¥½ - public CommonResult submitPayOrder(@RequestBody PayOrderSubmitReqVO reqVO) { + public CommonResult submitPayOrder(@RequestBody AppPayOrderSubmitReqVO reqVO) { // èŽ·å¾—è®¢å• - PayOrderDO payOrder = payOrderCoreService.getPayOrder(reqVO.getId()); + PayOrderDO payOrder = orderService.getOrder(reqVO.getId()); // æ交支付 PayOrderSubmitReqDTO reqDTO = new PayOrderSubmitReqDTO(); BeanUtil.copyProperties(reqVO, reqDTO, false); reqDTO.setUserIp(getClientIP()); reqDTO.setAppId(payOrder.getAppId()); - PayOrderSubmitRespDTO respDTO = payOrderCoreService.submitPayOrder(reqDTO); + PayOrderSubmitRespDTO respDTO = orderService.submitPayOrder(reqDTO); // 拼接返回 - return success(PayOrderSubmitRespVO.builder().invokeResponse(respDTO.getInvokeResponse()).build()); + return success(AppPayOrderSubmitRespVO.builder().invokeResponse(respDTO.getInvokeResponse()).build()); } // ========== 支付渠é“的回调 ========== + // TODO @芋艿:是ä¸æ˜¯æ”¾åˆ° notify 模å—æ›´åˆé€‚ //TODO 芋é“æºç  æ¢æˆäº†ç»Ÿä¸€çš„地å€äº† /notify/{channelId},测试通过å¯ä»¥åˆ é™¤ @PostMapping("/notify/wx-pub/{channelId}") @ApiOperation("通知微信公众å·æ”¯ä»˜çš„结果") public String notifyWxPayOrder(@PathVariable("channelId") Long channelId, @RequestBody String xmlData) throws Exception { - payOrderCoreService.notifyPayOrder(channelId, PayNotifyDataDTO.builder().body(xmlData).build()); + orderService.notifyPayOrder(channelId, PayNotifyDataDTO.builder().body(xmlData).build()); return "success"; } @@ -110,12 +110,12 @@ public class PayOrderController { // 如果是退款,则å‘起退款通知 if (payClient.isRefundNotify(notifyData)) { - payRefundCoreService.notifyPayRefund(channelId, PayNotifyDataDTO.builder().params(params).body(originData).build()); + refundService.notifyPayRefund(channelId, PayNotifyDataDTO.builder().params(params).body(originData).build()); return "success"; } // 如果éžé€€æ¬¾ï¼Œåˆ™å‘起支付通知 - payOrderCoreService.notifyPayOrder(channelId, PayNotifyDataDTO.builder().params(params).body(originData).build()); + orderService.notifyPayOrder(channelId, PayNotifyDataDTO.builder().params(params).body(originData).build()); return "success"; } diff --git a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/vo/PayOrderSubmitReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitReqVO.java similarity index 83% rename from yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/vo/PayOrderSubmitReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitReqVO.java index 407edb171..6834c3838 100644 --- a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/vo/PayOrderSubmitReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.userserver.modules.pay.controller.order.vo; +package cn.iocoder.yudao.module.pay.controller.app.order.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -9,10 +9,10 @@ import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.Map; -@ApiModel("支付订å•æ交 Request VO") +@ApiModel("用户 APP - 支付订å•æ交 Request VO") @Data @Accessors(chain = true) -public class PayOrderSubmitReqVO { +public class AppPayOrderSubmitReqVO { @ApiModelProperty(value = "支付å•ç¼–å·", required = true, example = "1024") @NotNull(message = "支付å•ç¼–å·ä¸èƒ½ä¸ºç©º") diff --git a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/vo/PayOrderSubmitRespVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitRespVO.java similarity index 69% rename from yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/vo/PayOrderSubmitRespVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitRespVO.java index 907a97946..7fcffd097 100644 --- a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/vo/PayOrderSubmitRespVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/order/vo/AppPayOrderSubmitRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.userserver.modules.pay.controller.order.vo; +package cn.iocoder.yudao.module.pay.controller.app.order.vo; import io.swagger.annotations.ApiModel; import lombok.AllArgsConstructor; @@ -7,13 +7,13 @@ import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; -@ApiModel("支付订å•æ交 Response VO") +@ApiModel("用户 APP - 支付订å•æ交 Response VO") @Data @Accessors(chain = true) @Builder @NoArgsConstructor @AllArgsConstructor -public class PayOrderSubmitRespVO { +public class AppPayOrderSubmitRespVO { /** * 调用支付渠é“çš„å“应结果 diff --git a/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/package-info.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/package-info.java new file mode 100644 index 000000000..333cbe659 --- /dev/null +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.yudao.module.pay.controller.app; diff --git a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/PayRefundController.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/AppPayRefundController.java similarity index 51% rename from yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/PayRefundController.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/AppPayRefundController.java index ba62bdd8a..42fdc5dcb 100644 --- a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/PayRefundController.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/AppPayRefundController.java @@ -1,13 +1,13 @@ -package cn.iocoder.yudao.userserver.modules.pay.controller.order; +package cn.iocoder.yudao.module.pay.controller.app.refund; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.coreservice.modules.pay.service.order.PayRefundCoreService; -import cn.iocoder.yudao.coreservice.modules.pay.service.order.dto.PayRefundReqDTO; -import cn.iocoder.yudao.coreservice.modules.pay.util.PaySeqUtils; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.userserver.modules.pay.controller.order.vo.PayRefundReqVO; -import cn.iocoder.yudao.userserver.modules.pay.controller.order.vo.PayRefundRespVO; -import cn.iocoder.yudao.userserver.modules.pay.convert.order.PayRefundConvert; +import cn.iocoder.yudao.module.pay.controller.app.refund.vo.AppPayRefundReqVO; +import cn.iocoder.yudao.module.pay.controller.app.refund.vo.AppPayRefundRespVO; +import cn.iocoder.yudao.module.pay.convert.refund.PayRefundConvert; +import cn.iocoder.yudao.module.pay.service.order.dto.PayRefundReqDTO; +import cn.iocoder.yudao.module.pay.service.refund.PayRefundService; +import cn.iocoder.yudao.module.pay.util.PaySeqUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; @@ -19,28 +19,29 @@ import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.servlet.ServletUtils.getClientIP; -@Api(tags = "退款订å•") +@Api(tags = "用户 APP - 退款订å•") @RestController -@RequestMapping("/pay/order") +@RequestMapping("/pay/refund") @Validated @Slf4j -public class PayRefundController { +public class AppPayRefundController { @Resource - private PayRefundCoreService payRefundCoreService; + private PayRefundService refundService; @PostMapping("/refund") @ApiOperation("æ交退款订å•") - public CommonResult submitRefundOrder(@RequestBody PayRefundReqVO reqVO){ + public CommonResult submitRefundOrder(@RequestBody AppPayRefundReqVO reqVO){ PayRefundReqDTO req = PayRefundConvert.INSTANCE.convert(reqVO); req.setUserIp(getClientIP()); - //TODO 测试暂时模拟生æˆå•†æˆ·é€€æ¬¾è®¢å• + // TODO 测试暂时模拟生æˆå•†æˆ·é€€æ¬¾è®¢å• if(StrUtil.isEmpty(reqVO.getMerchantRefundId())) { req.setMerchantRefundId(PaySeqUtils.genMerchantRefundNo()); } - return CommonResult.success( PayRefundConvert.INSTANCE.convert(payRefundCoreService.submitRefundOrder(req))); + return success(PayRefundConvert.INSTANCE.convert(refundService.submitRefundOrder(req))); } } diff --git a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/vo/PayRefundReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/vo/AppPayRefundReqVO.java similarity index 87% rename from yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/vo/PayRefundReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/vo/AppPayRefundReqVO.java index 8287ba036..c810f3829 100644 --- a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/vo/PayRefundReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/vo/AppPayRefundReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.userserver.modules.pay.controller.order.vo; +package cn.iocoder.yudao.module.pay.controller.app.refund.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,11 +8,11 @@ import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; -@ApiModel("é€€æ¬¾è®¢å• Req VO") +@ApiModel("用户 APP - é€€æ¬¾è®¢å• Req VO") @Data @NoArgsConstructor @AllArgsConstructor -public class PayRefundReqVO { +public class AppPayRefundReqVO { @ApiModelProperty(value = "支付订å•ç¼–å·è‡ªå¢ž", required = true, example = "10") @NotEmpty(message = "支付订å•ç¼–å·è‡ªå¢ž") diff --git a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/vo/PayRefundRespVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/vo/AppPayRefundRespVO.java similarity index 51% rename from yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/vo/PayRefundRespVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/vo/AppPayRefundRespVO.java index 29059ab28..534243281 100644 --- a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/controller/order/vo/PayRefundRespVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/app/refund/vo/AppPayRefundRespVO.java @@ -1,22 +1,22 @@ -package cn.iocoder.yudao.userserver.modules.pay.controller.order.vo; +package cn.iocoder.yudao.module.pay.controller.app.refund.vo; import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; -@ApiModel("æäº¤é€€æ¬¾è®¢å• Response VO") +@ApiModel("用户 APP - æäº¤é€€æ¬¾è®¢å• Response VO") @Data @Accessors(chain = true) @Builder @NoArgsConstructor @AllArgsConstructor -public class PayRefundRespVO { +public class AppPayRefundRespVO { - /** - * 支付退款å•ç¼–å·ï¼Œ 自增 - */ + @ApiModelProperty(value = "退款订å•ç¼–å·", required = true, example = "10") private Long refundId; + } diff --git a/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/package-info.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/package-info.java new file mode 100644 index 000000000..652122752 --- /dev/null +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/controller/package-info.java @@ -0,0 +1,6 @@ +/** + * æä¾› RESTful API ç»™å‰ç«¯ï¼š + * 1. admin 包:æ供给管ç†åŽå° yudao-ui-admin å‰ç«¯é¡¹ç›® + * 2. app 包:æ供给用户 APP yudao-ui-app å‰ç«¯é¡¹ç›®ï¼Œå®ƒçš„ Controller å’Œ VO 都è¦æ·»åŠ  App å‰ç¼€ï¼Œç”¨äºŽå’Œç®¡ç†åŽå°è¿›è¡ŒåŒºåˆ† + */ +package cn.iocoder.yudao.module.pay.controller; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/app/PayAppConvert.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/app/PayAppConvert.java similarity index 71% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/app/PayAppConvert.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/app/PayAppConvert.java index c7e17467d..432699bc2 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/app/PayAppConvert.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/app/PayAppConvert.java @@ -1,14 +1,14 @@ -package cn.iocoder.yudao.adminserver.modules.pay.convert.app; +package cn.iocoder.yudao.module.pay.convert.app; import java.util.*; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayMerchantDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.*; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; -import cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo.*; /** * æ”¯ä»˜åº”ç”¨ä¿¡æ¯ Convert diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/channel/PayChannelConvert.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/channel/PayChannelConvert.java similarity index 64% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/channel/PayChannelConvert.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/channel/PayChannelConvert.java index ee0473c23..2535008ea 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/channel/PayChannelConvert.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/channel/PayChannelConvert.java @@ -1,22 +1,18 @@ -package cn.iocoder.yudao.adminserver.modules.pay.convert.channel; +package cn.iocoder.yudao.module.pay.convert.channel; import java.util.*; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayChannelDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXPayClientConfig; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelExcelVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelRespVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelUpdateReqVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.factory.Mappers; -import cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo.*; -/** - * æ”¯ä»˜æ¸ é“ - Convert - * - * @author 芋艿 - */ @Mapper public interface PayChannelConvert { diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/merchant/PayMerchantConvert.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/merchant/PayMerchantConvert.java similarity index 56% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/merchant/PayMerchantConvert.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/merchant/PayMerchantConvert.java index 9483ff120..1cb51a2bb 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/merchant/PayMerchantConvert.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/merchant/PayMerchantConvert.java @@ -1,19 +1,17 @@ -package cn.iocoder.yudao.adminserver.modules.pay.convert.merchant; +package cn.iocoder.yudao.module.pay.convert.merchant; import java.util.*; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayMerchantDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantExcelVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantRespVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantUpdateReqVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; -import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.*; -/** - * æ”¯ä»˜å•†æˆ·ä¿¡æ¯ Convert - * - * @author 芋艿 - */ @Mapper public interface PayMerchantConvert { diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/order/PayOrderConvert.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/order/PayOrderConvert.java similarity index 72% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/order/PayOrderConvert.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/order/PayOrderConvert.java index 308298ac6..49df1ea64 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/order/PayOrderConvert.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/order/PayOrderConvert.java @@ -1,12 +1,15 @@ -package cn.iocoder.yudao.adminserver.modules.pay.convert.order; +package cn.iocoder.yudao.module.pay.convert.order; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order.PayOrderDetailsRespVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order.PayOrderExcelVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order.PayOrderPageItemRespVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order.PayOrderRespVO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderExtensionDO; +import cn.iocoder.yudao.framework.pay.core.client.dto.PayOrderUnifiedReqDTO; +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderDetailsRespVO; +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderExcelVO; +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderPageItemRespVO; +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderRespVO; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO; +import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderCreateReqDTO; +import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitReqDTO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; @@ -24,24 +27,10 @@ public interface PayOrderConvert { PayOrderConvert INSTANCE = Mappers.getMapper(PayOrderConvert.class); - - PayOrderRespVO convert(PayOrderDO bean); - /** - * 订å•DO 转æ¢ä¸º è¯¦ç»†è®¢å• RespVO - * - * @param bean 订å•DO - * @return è¯¦ç»†è®¢å• RespVO - */ PayOrderDetailsRespVO orderDetailConvert(PayOrderDO bean); - /** - * 订å•æ‰©å±•DO 转æ¢ä¸º 详细订å•æ‰©å±• RespVO - * - * @param bean 订å•æ‰©å±•DO - * @return 详细订å•æ‰©å±• RespVO - */ PayOrderDetailsRespVO.PayOrderExtension orderDetailExtensionConvert(PayOrderExtensionDO bean); List convertList(List list); @@ -58,12 +47,6 @@ public interface PayOrderConvert { */ PayOrderPageItemRespVO pageConvertItemPage(PayOrderDO bean); - /** - * 订å•DO 转 订å•å¯¼å‡ºexcel VO - * - * @param bean è®¢å• DO - * @return 订å•å¯¼å‡ºexcel VO - */ default PayOrderExcelVO excelConvert(PayOrderDO bean) { if (bean == null) { return null; @@ -101,4 +84,12 @@ public interface PayOrderConvert { return payOrderExcelVO; } + + + PayOrderDO convert(PayOrderCreateReqDTO bean); + + PayOrderExtensionDO convert(PayOrderSubmitReqDTO bean); + + PayOrderUnifiedReqDTO convert2(PayOrderSubmitReqDTO bean); + } diff --git a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/convert/package-info.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/package-info.java similarity index 57% rename from yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/convert/package-info.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/package-info.java index 3f27f0b4b..df43d5ac3 100644 --- a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/convert/package-info.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/package-info.java @@ -3,4 +3,4 @@ * * ç›®å‰ä½¿ç”¨ MapStruct 框架 */ -package cn.iocoder.yudao.userserver.modules.pay.convert; +package cn.iocoder.yudao.module.pay.convert; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/refund/PayRefundConvert.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/refund/PayRefundConvert.java similarity index 73% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/refund/PayRefundConvert.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/refund/PayRefundConvert.java index 8f5ee66d3..2e034c63e 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/refund/PayRefundConvert.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/refund/PayRefundConvert.java @@ -1,9 +1,16 @@ -package cn.iocoder.yudao.adminserver.modules.pay.convert.refund; +package cn.iocoder.yudao.module.pay.convert.refund; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo.*; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayRefundDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.*; +import cn.iocoder.yudao.module.pay.controller.app.refund.vo.AppPayRefundReqVO; +import cn.iocoder.yudao.module.pay.controller.app.refund.vo.AppPayRefundRespVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; +import cn.iocoder.yudao.module.pay.service.order.dto.PayRefundReqDTO; +import cn.iocoder.yudao.module.pay.service.order.dto.PayRefundRespDTO; import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.mapstruct.Mappings; import org.mapstruct.factory.Mappers; import java.math.BigDecimal; @@ -87,4 +94,16 @@ public interface PayRefundConvert { return payRefundExcelVO; } + //TODO 太多需è¦å¤„ç†äº†ï¼Œ æš‚æ—¶ä¸ç”¨ + @Mappings(value = { + @Mapping(source = "amount", target = "payAmount"), + @Mapping(source = "id", target = "orderId"), + @Mapping(target = "status",ignore = true) + }) + PayRefundDO convert(PayOrderDO orderDO); + + PayRefundReqDTO convert(AppPayRefundReqVO bean); + + AppPayRefundRespVO convert(PayRefundRespDTO bean); + } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/ã€ŠèŠ‹é“ Spring Boot å¯¹è±¡è½¬æ¢ MapStruct 入门》.md b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/ã€ŠèŠ‹é“ Spring Boot å¯¹è±¡è½¬æ¢ MapStruct 入门》.md similarity index 100% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/convert/ã€ŠèŠ‹é“ Spring Boot å¯¹è±¡è½¬æ¢ MapStruct 入门》.md rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/convert/ã€ŠèŠ‹é“ Spring Boot å¯¹è±¡è½¬æ¢ MapStruct 入门》.md diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/merchant/PayAppDO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayAppDO.java similarity index 94% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/merchant/PayAppDO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayAppDO.java index acc849cbc..371a92b39 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/merchant/PayAppDO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayAppDO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant; +package cn.iocoder.yudao.module.pay.dal.dataobject.merchant; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/merchant/PayChannelDO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayChannelDO.java similarity index 95% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/merchant/PayChannelDO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayChannelDO.java index 5275dd428..a670db463 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/merchant/PayChannelDO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayChannelDO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant; +package cn.iocoder.yudao.module.pay.dal.dataobject.merchant; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/merchant/PayMerchantDO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayMerchantDO.java similarity index 94% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/merchant/PayMerchantDO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayMerchantDO.java index a0c72b9ec..ebd735b03 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/merchant/PayMerchantDO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayMerchantDO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant; +package cn.iocoder.yudao.module.pay.dal.dataobject.merchant; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/notify/PayNotifyLogDO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/notify/PayNotifyLogDO.java similarity index 86% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/notify/PayNotifyLogDO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/notify/PayNotifyLogDO.java index 85626006c..92ecc39e6 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/notify/PayNotifyLogDO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/notify/PayNotifyLogDO.java @@ -1,6 +1,6 @@ -package cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.notify; +package cn.iocoder.yudao.module.pay.dal.dataobject.notify; -import cn.iocoder.yudao.coreservice.modules.pay.enums.notify.PayNotifyStatusEnum; +import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyStatusEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/notify/PayNotifyTaskDO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/notify/PayNotifyTaskDO.java similarity index 78% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/notify/PayNotifyTaskDO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/notify/PayNotifyTaskDO.java index 3d10ac83a..3884f152f 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/notify/PayNotifyTaskDO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/notify/PayNotifyTaskDO.java @@ -1,11 +1,11 @@ -package cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.notify; +package cn.iocoder.yudao.module.pay.dal.dataobject.notify; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayMerchantDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayRefundDO; -import cn.iocoder.yudao.coreservice.modules.pay.enums.notify.PayNotifyStatusEnum; -import cn.iocoder.yudao.coreservice.modules.pay.enums.notify.PayNotifyTypeEnum; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; +import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyStatusEnum; +import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyTypeEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/order/PayOrderDO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderDO.java similarity index 84% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/order/PayOrderDO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderDO.java index 65cf94bf2..931b85651 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/order/PayOrderDO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderDO.java @@ -1,11 +1,11 @@ -package cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order; +package cn.iocoder.yudao.module.pay.dal.dataobject.order; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayChannelDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayMerchantDO; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayOrderNotifyStatusEnum; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayRefundTypeEnum; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayOrderStatusEnum; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum; +import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum; +import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/order/PayOrderExtensionDO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderExtensionDO.java similarity index 89% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/order/PayOrderExtensionDO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderExtensionDO.java index 5a6b8431a..8606e082b 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/order/PayOrderExtensionDO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderExtensionDO.java @@ -1,7 +1,7 @@ -package cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order; +package cn.iocoder.yudao.module.pay.dal.dataobject.order; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayChannelDO; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayOrderStatusEnum; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; +import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/order/PayRefundDO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/refund/PayRefundDO.java similarity index 90% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/order/PayRefundDO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/refund/PayRefundDO.java index fc897a5e0..f5e3a1f7c 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/dataobject/order/PayRefundDO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/refund/PayRefundDO.java @@ -1,10 +1,11 @@ -package cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order; +package cn.iocoder.yudao.module.pay.dal.dataobject.refund; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayChannelDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayMerchantDO; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayRefundStatusEnum; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayRefundTypeEnum; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; +import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum; +import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum; import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/app/PayAppMapper.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayAppMapper.java similarity index 68% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/app/PayAppMapper.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayAppMapper.java index c6e3b38e9..03cb0439d 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/app/PayAppMapper.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayAppMapper.java @@ -1,32 +1,20 @@ -package cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.app; +package cn.iocoder.yudao.module.pay.dal.mysql.merchant; -import cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo.PayAppExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo.PayAppPageReqVO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayAppDO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppPageReqVO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import org.apache.ibatis.annotations.Mapper; import java.util.Collection; import java.util.List; -/** - * æ”¯ä»˜åº”ç”¨ä¿¡æ¯ Mapper - * - * @author aquan - */ @Mapper public interface PayAppMapper extends BaseMapperX { - /** - * 分页查询 - * - * @param reqVO 支付应用信æ¯åˆ†é¡µæŸ¥è¯¢æ¡ä»¶ - * @param merchantIds 商户 ID é›†åˆ - * @return æ”¯ä»˜åº”ç”¨ä¿¡æ¯ - */ default PageResult selectPage(PayAppPageReqVO reqVO, Collection merchantIds) { return selectPage(reqVO, new QueryWrapperX() .likeIfPresent("name", reqVO.getName()) @@ -39,13 +27,6 @@ public interface PayAppMapper extends BaseMapperX { .orderByDesc("id")); } - /** - * 列表查询 - * - * @param reqVO æ”¯ä»˜åº”ç”¨ä¿¡æ¯ Excel 导出查询æ¡ä»¶ - * @param merchantIds 商户 ID é›†åˆ - * @return æ”¯ä»˜åº”ç”¨ä¿¡æ¯ - */ default List selectList(PayAppExportReqVO reqVO, Collection merchantIds) { return selectList(new QueryWrapperX() .likeIfPresent("name", reqVO.getName()) @@ -58,24 +39,13 @@ public interface PayAppMapper extends BaseMapperX { .orderByDesc("id")); } - /** - * æ ¹æ® å•†æˆ· ID æŸ¥è¯¢æ”¯ä»˜åº”ç”¨ä¿¡æ¯ - * - * @param merchantId 商户 ID - * @return 支付应用信æ¯åˆ—表 - */ default List getListByMerchantId(String merchantId) { return selectList(new LambdaQueryWrapper() .select(PayAppDO::getId, PayAppDO::getName) .eq(PayAppDO::getMerchantId, merchantId)); } - /** - * æ ¹æ®å•†æˆ·å·ç»Ÿè®¡å­˜åœ¨çš„æ”¯ä»˜åº”ç”¨æ•°é‡ - * - * @param merchantId 商户 ID - * @return æ”¯ä»˜åº”ç”¨æ•°é‡ - */ + // TODO @aquan:方法å补充 ByMerchantId default Long selectCount(Long merchantId) { return selectCount(new LambdaQueryWrapper().eq(PayAppDO::getMerchantId, merchantId)); } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/channel/PayChannelMapper.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayChannelMapper.java similarity index 76% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/channel/PayChannelMapper.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayChannelMapper.java index 54a4829a9..c1871531e 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/channel/PayChannelMapper.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayChannelMapper.java @@ -1,26 +1,29 @@ -package cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.channel; +package cn.iocoder.yudao.module.pay.dal.mysql.merchant; -import cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo.PayChannelExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo.PayChannelPageReqVO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayChannelDO; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelPageReqVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Select; import java.util.Collection; +import java.util.Date; import java.util.List; -/** - * æ”¯ä»˜æ¸ é“ - Mapper - * - * @author 芋艿 - */ @Mapper public interface PayChannelMapper extends BaseMapperX { + default PayChannelDO selectByAppIdAndCode(Long appId, String code) { + return selectOne(PayChannelDO::getAppId, appId, PayChannelDO::getCode, code); + } + + @Select("SELECT id FROM pay_channel WHERE update_time > #{maxUpdateTime} LIMIT 1") + Long selectExistsByUpdateTimeAfter(Date maxUpdateTime); + default PageResult selectPage(PayChannelPageReqVO reqVO) { return selectPage(reqVO, new QueryWrapperX() .eqIfPresent("code", reqVO.getCode()) @@ -48,11 +51,11 @@ public interface PayChannelMapper extends BaseMapperX { } /** - * æ ¹æ®æ¡ä»¶èŽ·å–通é“æ•°é‡ + * æ ¹æ®æ¡ä»¶èŽ·å–渠é“æ•°é‡ * * @param merchantId å•†æˆ·ç¼–å· * @param appid åº”ç”¨ç¼–å· - * @param code 通é“ç¼–ç  + * @param code 渠é“ç¼–ç  * @return æ•°é‡ */ default Integer selectCount(Long merchantId, Long appid, String code) { @@ -63,11 +66,11 @@ public interface PayChannelMapper extends BaseMapperX { } /** - * æ ¹æ®æ¡ä»¶èŽ·å–é€šé“ + * æ ¹æ®æ¡ä»¶èŽ·å–æ¸ é“ * * @param merchantId å•†æˆ·ç¼–å· - * @param appid åº”ç”¨ç¼–å· - * @param code 通é“ç¼–ç  + * @param appid åº”ç”¨ç¼–å· // TODO @aquan:appid =》appId + * @param code 渠é“ç¼–ç  * @return æ•°é‡ */ default PayChannelDO selectOne(Long merchantId, Long appid, String code) { @@ -78,6 +81,7 @@ public interface PayChannelMapper extends BaseMapperX { )); } + // TODO @aquan:select 命å /** * æ ¹æ®æ”¯ä»˜åº”用ID集åˆèŽ·å¾—支付渠é“列表 * @@ -88,4 +92,5 @@ public interface PayChannelMapper extends BaseMapperX { return this.selectList(new QueryWrapper().lambda() .in(PayChannelDO::getAppId, appIds)); } + } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/merchant/PayMerchantMapper.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayMerchantMapper.java similarity index 82% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/merchant/PayMerchantMapper.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayMerchantMapper.java index f143b1857..050302b4c 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/merchant/PayMerchantMapper.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayMerchantMapper.java @@ -1,20 +1,15 @@ -package cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.merchant; +package cn.iocoder.yudao.module.pay.dal.mysql.merchant; -import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.PayMerchantExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.PayMerchantPageReqVO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantPageReqVO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; import org.apache.ibatis.annotations.Mapper; import java.util.List; -/** - * æ”¯ä»˜å•†æˆ·ä¿¡æ¯ Mapper - * - * @author 芋艿 - */ @Mapper public interface PayMerchantMapper extends BaseMapperX { diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/notify/PayNotifyLogCoreMapper.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/notify/PayNotifyLogCoreMapper.java similarity index 56% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/notify/PayNotifyLogCoreMapper.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/notify/PayNotifyLogCoreMapper.java index e3f90d614..c95621933 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/notify/PayNotifyLogCoreMapper.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/notify/PayNotifyLogCoreMapper.java @@ -1,6 +1,6 @@ -package cn.iocoder.yudao.coreservice.modules.pay.dal.mysql.notify; +package cn.iocoder.yudao.module.pay.dal.mysql.notify; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.notify.PayNotifyLogDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.notify.PayNotifyLogDO; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import org.apache.ibatis.annotations.Mapper; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/notify/PayNotifyTaskCoreMapper.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/notify/PayNotifyTaskCoreMapper.java similarity index 79% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/notify/PayNotifyTaskCoreMapper.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/notify/PayNotifyTaskCoreMapper.java index 276c6710b..1107a19f4 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/notify/PayNotifyTaskCoreMapper.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/notify/PayNotifyTaskCoreMapper.java @@ -1,7 +1,7 @@ -package cn.iocoder.yudao.coreservice.modules.pay.dal.mysql.notify; +package cn.iocoder.yudao.module.pay.dal.mysql.notify; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.notify.PayNotifyTaskDO; -import cn.iocoder.yudao.coreservice.modules.pay.enums.notify.PayNotifyStatusEnum; +import cn.iocoder.yudao.module.pay.dal.dataobject.notify.PayNotifyTaskDO; +import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyStatusEnum; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/order/PayOrderExtensionCoreMapper.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/order/PayOrderExtensionMapper.java old mode 100644 new mode 100755 similarity index 70% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/order/PayOrderExtensionCoreMapper.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/order/PayOrderExtensionMapper.java index 08c95cea6..a8918f441 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/mysql/order/PayOrderExtensionCoreMapper.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/order/PayOrderExtensionMapper.java @@ -1,12 +1,12 @@ -package cn.iocoder.yudao.coreservice.modules.pay.dal.mysql.order; +package cn.iocoder.yudao.module.pay.dal.mysql.order; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderExtensionDO; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import org.apache.ibatis.annotations.Mapper; @Mapper -public interface PayOrderExtensionCoreMapper extends BaseMapperX { +public interface PayOrderExtensionMapper extends BaseMapperX { default PayOrderExtensionDO selectByNo(String no) { return selectOne(PayOrderExtensionDO::getNo, no); diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/order/PayOrderMapper.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/order/PayOrderMapper.java similarity index 78% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/order/PayOrderMapper.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/order/PayOrderMapper.java index 1fb9e870a..4ff345dae 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/order/PayOrderMapper.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/order/PayOrderMapper.java @@ -1,22 +1,18 @@ -package cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.order; +package cn.iocoder.yudao.module.pay.dal.mysql.order; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order.PayOrderExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order.PayOrderPageReqVO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderDO; +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderPageReqVO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; import java.util.Collection; import java.util.List; -/** - * æ”¯ä»˜è®¢å• Mapper 组件 - * - * @author aquan - */ @Mapper public interface PayOrderMapper extends BaseMapperX { @@ -50,12 +46,6 @@ public interface PayOrderMapper extends BaseMapperX { .orderByDesc("id")); } - /** - * æ ¹æ®è®¢å• ID 集åˆæŸ¥è¯¢è®¢å•å•†å“å称 - * - * @param idList è®¢å• ID é›†åˆ - * @return åªåŒ…å«å•†å“å称和标题的订å•é›†åˆå¯¹è±¡ - */ default List findByIdListQueryOrderSubject(Collection idList) { return selectList(new LambdaQueryWrapper() .select(PayOrderDO::getId, PayOrderDO::getSubject) @@ -70,10 +60,19 @@ public interface PayOrderMapper extends BaseMapperX { * @return æ¡æ•° */ default Long selectCount(Long appId, Integer status) { - return selectCount(new LambdaQueryWrapper() .eq(PayOrderDO::getAppId, appId) .in(PayOrderDO::getStatus, status)); } + default PayOrderDO selectByAppIdAndMerchantOrderId(Long appId, String merchantOrderId) { + return selectOne(new QueryWrapper().eq("app_id", appId) + .eq("merchant_order_id", merchantOrderId)); + } + + default int updateByIdAndStatus(Long id, Integer status, PayOrderDO update) { + return update(update, new QueryWrapper() + .eq("id", id).eq("status", status)); + } + } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/order/PayRefundMapper.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/refund/PayRefundMapper.java similarity index 78% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/order/PayRefundMapper.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/refund/PayRefundMapper.java index 2fd3f2299..ba8f521e9 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/dal/mysql/order/PayRefundMapper.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/refund/PayRefundMapper.java @@ -1,21 +1,16 @@ -package cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.order; +package cn.iocoder.yudao.module.pay.dal.mysql.refund; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo.PayRefundExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo.PayRefundPageReqVO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayRefundDO; +import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundPageReqVO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import org.apache.ibatis.annotations.Mapper; import java.util.List; -/** - * é€€æ¬¾è®¢å• Mapper - * - * @author aquan - */ @Mapper public interface PayRefundMapper extends BaseMapperX { @@ -45,17 +40,18 @@ public interface PayRefundMapper extends BaseMapperX { .orderByDesc("id")); } - /** - * 查询符åˆçš„订å•æ•°é‡ - * - * @param appId åº”ç”¨ç¼–å· - * @param status 订å•çŠ¶æ€ - * @return æ¡æ•° - */ default Long selectCount(Long appId, Integer status) { return selectCount(new LambdaQueryWrapper() .eq(PayRefundDO::getAppId, appId) .eq(PayRefundDO::getStatus, status)); } + + default PayRefundDO selectByReqNo(String reqNo) { + return selectOne("req_no", reqNo); + } + + default PayRefundDO selectByTradeNoAndMerchantRefundNo(String tradeNo, String merchantRefundNo){ + return selectOne("trade_no", tradeNo, "merchant_refund_no", merchantRefundNo); + } } diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/redis/PayRedisKeyCoreConstants.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/redis/PayRedisKeyCoreConstants.java similarity index 65% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/redis/PayRedisKeyCoreConstants.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/redis/PayRedisKeyCoreConstants.java index 99384ec12..acba20be9 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/redis/PayRedisKeyCoreConstants.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/redis/PayRedisKeyCoreConstants.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.dal.redis; +package cn.iocoder.yudao.module.pay.dal.redis; import cn.iocoder.yudao.framework.redis.core.RedisKeyDefine; import org.redisson.api.RLock; @@ -6,7 +6,7 @@ import org.redisson.api.RLock; import static cn.iocoder.yudao.framework.redis.core.RedisKeyDefine.KeyTypeEnum.HASH; /** - * Lock4j Redis Key 枚举类 + * 支付 Redis Key 枚举类 * * @author 芋é“æºç  */ @@ -14,6 +14,6 @@ public interface PayRedisKeyCoreConstants { RedisKeyDefine PAY_NOTIFY_LOCK = new RedisKeyDefine("通知任务的分布å¼é”", "pay_notify:lock:", // å‚æ•°æ¥è‡ª DefaultLockKeyBuilder ç±» - HASH, RLock.class, RedisKeyDefine.TimeoutTypeEnum.DYNAMIC); // Redisson çš„ Lock é”,使用 Hash æ•°æ®ç»“æž„ + RedisKeyDefine.KeyTypeEnum.HASH, RLock.class, RedisKeyDefine.TimeoutTypeEnum.DYNAMIC); // Redisson çš„ Lock é”,使用 Hash æ•°æ®ç»“æž„ } diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/redis/notify/PayNotifyLockCoreRedisDAO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/redis/notify/PayNotifyLockRedisDAO.java similarity index 79% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/redis/notify/PayNotifyLockCoreRedisDAO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/redis/notify/PayNotifyLockRedisDAO.java index 5ce6b44b3..227eda28a 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/dal/redis/notify/PayNotifyLockCoreRedisDAO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/dal/redis/notify/PayNotifyLockRedisDAO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.dal.redis.notify; +package cn.iocoder.yudao.module.pay.dal.redis.notify; import org.redisson.api.RLock; import org.redisson.api.RedissonClient; @@ -7,7 +7,7 @@ import org.springframework.stereotype.Repository; import javax.annotation.Resource; import java.util.concurrent.TimeUnit; -import static cn.iocoder.yudao.coreservice.modules.pay.dal.redis.PayRedisKeyCoreConstants.PAY_NOTIFY_LOCK; +import static cn.iocoder.yudao.module.pay.dal.redis.PayRedisKeyCoreConstants.PAY_NOTIFY_LOCK; /** * æ”¯ä»˜é€šçŸ¥çš„é” Redis DAO @@ -15,7 +15,7 @@ import static cn.iocoder.yudao.coreservice.modules.pay.dal.redis.PayRedisKeyCore * @author 芋é“æºç  */ @Repository -public class PayNotifyLockCoreRedisDAO { +public class PayNotifyLockRedisDAO { @Resource private RedissonClient redissonClient; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/notify/PayNotifyStatusEnum.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/notify/PayNotifyStatusEnum.java similarity index 89% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/notify/PayNotifyStatusEnum.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/notify/PayNotifyStatusEnum.java index 2c3c6b592..d1b7c1015 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/notify/PayNotifyStatusEnum.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/notify/PayNotifyStatusEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.enums.notify; +package cn.iocoder.yudao.module.pay.enums.notify; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/notify/PayNotifyTypeEnum.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/notify/PayNotifyTypeEnum.java similarity index 85% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/notify/PayNotifyTypeEnum.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/notify/PayNotifyTypeEnum.java index a501bc55f..8c259d93c 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/notify/PayNotifyTypeEnum.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/notify/PayNotifyTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.enums.notify; +package cn.iocoder.yudao.module.pay.enums.notify; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/order/PayOrderNotifyStatusEnum.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/order/PayOrderNotifyStatusEnum.java similarity index 89% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/order/PayOrderNotifyStatusEnum.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/order/PayOrderNotifyStatusEnum.java index 4bda485d2..b7161a9f4 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/order/PayOrderNotifyStatusEnum.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/order/PayOrderNotifyStatusEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.enums.order; +package cn.iocoder.yudao.module.pay.enums.order; import cn.iocoder.yudao.framework.common.core.IntArrayValuable; import lombok.AllArgsConstructor; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/order/PayOrderStatusEnum.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/order/PayOrderStatusEnum.java similarity index 90% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/order/PayOrderStatusEnum.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/order/PayOrderStatusEnum.java index b61c0400c..ab542a97c 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/order/PayOrderStatusEnum.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/order/PayOrderStatusEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.enums.order; +package cn.iocoder.yudao.module.pay.enums.order; import cn.iocoder.yudao.framework.common.core.IntArrayValuable; import lombok.AllArgsConstructor; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/order/PayRefundStatusEnum.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/refund/PayRefundStatusEnum.java similarity index 83% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/order/PayRefundStatusEnum.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/refund/PayRefundStatusEnum.java index 2a28ae9fc..390804dd3 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/order/PayRefundStatusEnum.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/refund/PayRefundStatusEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.enums.order; +package cn.iocoder.yudao.module.pay.enums.refund; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/order/PayRefundTypeEnum.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/refund/PayRefundTypeEnum.java similarity index 89% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/order/PayRefundTypeEnum.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/refund/PayRefundTypeEnum.java index ba7ee2fcc..5fb10a399 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/enums/order/PayRefundTypeEnum.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/enums/refund/PayRefundTypeEnum.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.enums.order; +package cn.iocoder.yudao.module.pay.enums.refund; import cn.iocoder.yudao.framework.common.core.IntArrayValuable; import lombok.AllArgsConstructor; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/job/notify/PayNotifyJob.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/job/notify/PayNotifyJob.java similarity index 75% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/job/notify/PayNotifyJob.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/job/notify/PayNotifyJob.java index 58685f1b5..820bca471 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/job/notify/PayNotifyJob.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/job/notify/PayNotifyJob.java @@ -1,7 +1,7 @@ -package cn.iocoder.yudao.adminserver.modules.pay.job.notify; +package cn.iocoder.yudao.module.pay.job.notify; -import cn.iocoder.yudao.coreservice.modules.pay.service.notify.PayNotifyCoreService; import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler; +import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @@ -18,7 +18,7 @@ import javax.annotation.Resource; public class PayNotifyJob implements JobHandler { @Resource - private PayNotifyCoreService payNotifyCoreService; + private PayNotifyService payNotifyCoreService; @Override public String execute(String param) throws Exception { diff --git a/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/job/package-info.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/job/package-info.java new file mode 100644 index 000000000..c45bf497f --- /dev/null +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/job/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.yudao.module.pay.job; diff --git a/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/package-info.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/package-info.java new file mode 100644 index 000000000..1421e4e65 --- /dev/null +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/package-info.java @@ -0,0 +1,10 @@ +/** + * pay 模å—,我们放支付业务,æ供业务的支付能力。 + * 例如说:商户ã€åº”用ã€æ”¯ä»˜ã€é€€æ¬¾ç­‰ç­‰ + * + * 1. Controller URL:以 /member/ 开头,é¿å…和其它 Module å†²çª + * 2. DataObject 表å:以 member_ 开头,方便在数æ®åº“中区分 + * + * 注æ„,由于 Pay 模å—å’Œ Trade 模å—,容易é‡å,所以类å都加载 Pay çš„å‰ç¼€~ + */ +package cn.iocoder.yudao.module.pay; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/app/PayAppService.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppService.java similarity index 75% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/app/PayAppService.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppService.java index da83ca825..62935e4dd 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/app/PayAppService.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppService.java @@ -1,12 +1,13 @@ -package cn.iocoder.yudao.adminserver.modules.pay.service.app; +package cn.iocoder.yudao.module.pay.service.merchant; -import cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo.PayAppCreateReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo.PayAppExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo.PayAppPageReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo.PayAppUpdateReqVO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayAppDO; +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppPageReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppUpdateReqVO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; import javax.validation.Valid; import java.util.Collection; @@ -100,4 +101,16 @@ public interface PayAppService { List list = this.getAppList(appIdList); return CollectionUtils.convertMap(list, PayAppDO::getId); } + + + /** + * 支付应用的åˆæ³•æ€§ + * + * 如果ä¸åˆæ³•ï¼ŒæŠ›å‡º {@link ServiceException} 业务异常 + * + * @param id åº”ç”¨ç¼–å· + * @return åº”ç”¨ä¿¡æ¯ + */ + PayAppDO validPayApp(Long id); + } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/app/impl/PayAppServiceImpl.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppServiceImpl.java similarity index 72% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/app/impl/PayAppServiceImpl.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppServiceImpl.java index bb6e765b3..f7d1a4e28 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/app/impl/PayAppServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppServiceImpl.java @@ -1,23 +1,24 @@ -package cn.iocoder.yudao.adminserver.modules.pay.service.app.impl; +package cn.iocoder.yudao.module.pay.service.merchant; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo.PayAppCreateReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo.PayAppExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo.PayAppPageReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo.PayAppUpdateReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.convert.app.PayAppConvert; -import cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.app.PayAppMapper; -import cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.merchant.PayMerchantMapper; -import cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.order.PayOrderMapper; -import cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.order.PayRefundMapper; -import cn.iocoder.yudao.adminserver.modules.pay.service.app.PayAppService; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayMerchantDO; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayOrderStatusEnum; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayRefundStatusEnum; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppPageReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppUpdateReqVO; +import cn.iocoder.yudao.module.pay.convert.app.PayAppConvert; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayAppMapper; +import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayMerchantMapper; +import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderMapper; +import cn.iocoder.yudao.module.pay.dal.mysql.refund.PayRefundMapper; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants; +import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; +import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum; import com.google.common.annotations.VisibleForTesting; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; @@ -25,9 +26,9 @@ import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; import java.util.*; -import static cn.iocoder.yudao.coreservice.modules.pay.enums.PayErrorCodeCoreConstants.*; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; +import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*; /** * æ”¯ä»˜åº”ç”¨ä¿¡æ¯ Service 实现类 @@ -40,17 +41,14 @@ public class PayAppServiceImpl implements PayAppService { @Resource private PayAppMapper appMapper; - + // TODO @aquan:使用对方的 Service。模å—与模å—之间,é¿å…直接调用对方的 mapper @Resource private PayMerchantMapper merchantMapper; - @Resource private PayOrderMapper orderMapper; - @Resource private PayRefundMapper refundMapper; - @Override public Long createApp(PayAppCreateReqVO createReqVO) { // æ’å…¥ @@ -126,12 +124,6 @@ public class PayAppServiceImpl implements PayAppService { return convertSet(merchantMapper.getMerchantListByName(merchantName), PayMerchantDO::getId); } - /** - * 修改应用信æ¯çŠ¶æ€ - * - * @param id åº”ç”¨ç¼–å· - * @param status 状æ€{@link CommonStatusEnum} - */ @Override public void updateAppStatus(Long id, Integer status) { // 校验商户存在 @@ -143,12 +135,6 @@ public class PayAppServiceImpl implements PayAppService { appMapper.updateById(app); } - /** - * æ ¹æ®å•†æˆ· ID 获得支付应用信æ¯åˆ—表, - * - * @param merchantId 商户 ID - * @return 支付应用信æ¯åˆ—表 - */ @Override public List getListByMerchantId(String merchantId) { return appMapper.getListByMerchantId(merchantId); @@ -186,4 +172,18 @@ public class PayAppServiceImpl implements PayAppService { } } + @Override + public PayAppDO validPayApp(Long id) { + PayAppDO app = appMapper.selectById(id); + // 校验是å¦å­˜åœ¨ + if (app == null) { + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_APP_NOT_FOUND); + } + // 校验是å¦ç¦ç”¨ + if (CommonStatusEnum.DISABLE.getStatus().equals(app.getStatus())) { + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_APP_IS_DISABLE); + } + return app; + } + } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/channel/PayChannelService.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelService.java similarity index 59% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/channel/PayChannelService.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelService.java index 1eeb567dd..3907b0eca 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/channel/PayChannelService.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelService.java @@ -1,9 +1,12 @@ -package cn.iocoder.yudao.adminserver.modules.pay.service.channel; +package cn.iocoder.yudao.module.pay.service.merchant; -import cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo.*; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayChannelDO; +import cn.iocoder.yudao.framework.common.exception.ServiceException; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelPageReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelUpdateReqVO; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import org.springframework.web.multipart.MultipartFile; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; import javax.validation.Valid; import java.util.Collection; @@ -16,6 +19,11 @@ import java.util.List; */ public interface PayChannelService { + /** + * åˆå§‹åŒ–支付客户端 + */ + void initPayClients(); + /** * åˆ›å»ºæ”¯ä»˜æ¸ é“ * @@ -47,8 +55,7 @@ public interface PayChannelService { PayChannelDO getChannel(Long id); /** - * èŽ·å¾—æ”¯ä»˜æ¸ é“ - * 列表 + * 获得支付渠é“列表 * * @param ids ç¼–å· * @return æ”¯ä»˜æ¸ é“ @@ -57,8 +64,7 @@ public interface PayChannelService { List getChannelList(Collection ids); /** - * èŽ·å¾—æ”¯ä»˜æ¸ é“ - * 分页 + * 获得支付渠é“分页 * * @param pageReqVO 分页查询 * @return æ”¯ä»˜æ¸ é“ @@ -84,24 +90,44 @@ public interface PayChannelService { List getChannelListByAppIds(Collection appIds); /** - * æ ¹æ®æ¡ä»¶èŽ·å–通é“æ•°é‡ + * æ ¹æ®æ¡ä»¶èŽ·å–渠é“æ•°é‡ * * @param merchantId å•†æˆ·ç¼–å· * @param appid åº”ç”¨ç¼–å· - * @param code 通é“ç¼–ç  + * @param code 渠é“ç¼–ç  * @return æ•°é‡ */ Integer getChannelCountByConditions(Long merchantId, Long appid, String code); /** - * æ ¹æ®æ¡ä»¶èŽ·å–é€šé“ + * æ ¹æ®æ¡ä»¶èŽ·å–æ¸ é“ * * @param merchantId å•†æˆ·ç¼–å· * @param appid åº”ç”¨ç¼–å· - * @param code 通é“ç¼–ç  + * @param code 渠é“ç¼–ç  * @return æ•°é‡ */ PayChannelDO getChannelByConditions(Long merchantId, Long appid, String code); + /** + * 支付渠é“çš„åˆæ³•æ€§ + * + * 如果ä¸åˆæ³•ï¼ŒæŠ›å‡º {@link ServiceException} 业务异常 + * + * @param id 渠é“ç¼–å· + * @return 渠é“ä¿¡æ¯ + */ + PayChannelDO validPayChannel(Long id); + + /** + * 支付渠é“çš„åˆæ³•æ€§ + * + * 如果ä¸åˆæ³•ï¼ŒæŠ›å‡º {@link ServiceException} 业务异常 + * + * @param appId åº”ç”¨ç¼–å· + * @param code æ”¯ä»˜æ¸ é“ + * @return 渠é“ä¿¡æ¯ + */ + PayChannelDO validPayChannel(Long appId, String code); } diff --git a/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelServiceImpl.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelServiceImpl.java new file mode 100644 index 000000000..68b6ff10d --- /dev/null +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelServiceImpl.java @@ -0,0 +1,250 @@ +package cn.iocoder.yudao.module.pay.service.merchant; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.json.JSONUtil; +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.pay.core.client.PayClientFactory; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelPageReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelUpdateReqVO; +import cn.iocoder.yudao.module.pay.convert.channel.PayChannelConvert; +import cn.iocoder.yudao.framework.pay.core.client.PayClientConfig; +import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; +import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayChannelMapper; +import cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants; +import lombok.extern.slf4j.Slf4j; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import javax.annotation.PostConstruct; +import javax.annotation.Resource; +import javax.validation.Validator; +import java.util.Collection; +import java.util.Comparator; +import java.util.Date; +import java.util.List; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*; + +/** + * æ”¯ä»˜æ¸ é“ Service 实现类 + * + * @author aquan + */ +@Service +@Slf4j +@Validated +public class PayChannelServiceImpl implements PayChannelService { + + /** + * 定时执行 {@link #schedulePeriodicRefresh()} 的周期 + * 因为已ç»é€šè¿‡ Redis Pub/Sub 机制,所以频率ä¸éœ€è¦é«˜ + */ + private static final long SCHEDULER_PERIOD = 5 * 60 * 1000L; + + /** + * 缓存èœå•çš„最大更新时间,用于åŽç»­çš„增é‡è½®è¯¢ï¼Œåˆ¤æ–­æ˜¯å¦æœ‰æ›´æ–° + */ + private volatile Date maxUpdateTime; + + @Resource + private PayClientFactory payClientFactory; + + @Resource + private PayChannelMapper channelMapper; + + @Resource + private Validator validator; + + @Override + @PostConstruct + public void initPayClients() { + // 获å–支付渠é“,如果有更新 + List payChannels = this.loadPayChannelIfUpdate(maxUpdateTime); + if (CollUtil.isEmpty(payChannels)) { + return; + } + + // 创建或更新支付 Client + payChannels.forEach(payChannel -> payClientFactory.createOrUpdatePayClient(payChannel.getId(), + payChannel.getCode(), payChannel.getConfig())); + + // 写入缓存 + assert payChannels.size() > 0; // 断言,é¿å…å‘Šè­¦ + maxUpdateTime = payChannels.stream().max(Comparator.comparing(BaseDO::getUpdateTime)).get().getUpdateTime(); + log.info("[initPayClients][åˆå§‹åŒ– PayChannel æ•°é‡ä¸º {}]", payChannels.size()); + } + + @Scheduled(fixedDelay = SCHEDULER_PERIOD, initialDelay = SCHEDULER_PERIOD) + public void schedulePeriodicRefresh() { + initPayClients(); + } + + /** + * 如果支付渠é“å‘生å˜åŒ–,从数æ®åº“中获å–最新的全é‡æ”¯ä»˜æ¸ é“。 + * 如果未å‘生å˜åŒ–,则返回空 + * + * @param maxUpdateTime 当å‰æ”¯ä»˜æ¸ é“的最大更新时间 + * @return 支付渠é“列表 + */ + private List loadPayChannelIfUpdate(Date maxUpdateTime) { + // 第一步,判断是å¦è¦æ›´æ–°ã€‚ + if (maxUpdateTime == null) { // 如果更新时间为空,说明 DB ä¸€å®šæœ‰æ–°æ•°æ® + log.info("[loadPayChannelIfUpdate][首次加载全é‡æ”¯ä»˜æ¸ é“]"); + } else { // 判断数æ®åº“中是å¦æœ‰æ›´æ–°çš„æ”¯ä»˜æ¸ é“ + if (channelMapper.selectExistsByUpdateTimeAfter(maxUpdateTime) == null) { + return null; + } + log.info("[loadPayChannelIfUpdate][增é‡åŠ è½½å…¨é‡æ”¯ä»˜æ¸ é“]"); + } + // 第二步,如果有更新,则从数æ®åº“åŠ è½½æ‰€æœ‰æ”¯ä»˜æ¸ é“ + return channelMapper.selectList(); + } + + @Override + public Long createChannel(PayChannelCreateReqVO reqVO) { + // 断言是å¦æœ‰é‡å¤çš„ + PayChannelDO channelDO = this.getChannelByConditions(reqVO.getMerchantId(), reqVO.getAppId(), reqVO.getCode()); + if (ObjectUtil.isNotNull(channelDO)) { + throw exception(CHANNEL_EXIST_SAME_CHANNEL_ERROR); + } + + // æ–°å¢žæ¸ é“ + PayChannelDO channel = PayChannelConvert.INSTANCE.convert(reqVO); + settingConfigAndCheckParam(channel, reqVO.getConfig()); + channelMapper.insert(channel); + return channel.getId(); + } + + @Override + public void updateChannel(PayChannelUpdateReqVO updateReqVO) { + // 校验存在 + this.validateChannelExists(updateReqVO.getId()); + // æ›´æ–° + PayChannelDO channel = PayChannelConvert.INSTANCE.convert(updateReqVO); + settingConfigAndCheckParam(channel, updateReqVO.getConfig()); + channelMapper.updateById(channel); + } + + @Override + public void deleteChannel(Long id) { + // 校验存在 + this.validateChannelExists(id); + // 删除 + channelMapper.deleteById(id); + } + + private void validateChannelExists(Long id) { + if (channelMapper.selectById(id) == null) { + throw exception(CHANNEL_NOT_EXISTS); + } + } + + @Override + public PayChannelDO getChannel(Long id) { + return channelMapper.selectById(id); + } + + @Override + public List getChannelList(Collection ids) { + return channelMapper.selectBatchIds(ids); + } + + @Override + public PageResult getChannelPage(PayChannelPageReqVO pageReqVO) { + return channelMapper.selectPage(pageReqVO); + } + + @Override + public List getChannelList(PayChannelExportReqVO exportReqVO) { + return channelMapper.selectList(exportReqVO); + } + + /** + * æ ¹æ®æ”¯ä»˜åº”用ID集åˆèŽ·å¾—支付渠é“列表 + * + * @param appIds 应用编å·é›†åˆ + * @return 支付渠é“列表 + */ + @Override + public List getChannelListByAppIds(Collection appIds) { + return channelMapper.getChannelListByAppIds(appIds); + } + + + /** + * æ ¹æ®æ¡ä»¶èŽ·å–渠é“æ•°é‡ + * + * @param merchantId å•†æˆ·ç¼–å· + * @param appid åº”ç”¨ç¼–å· + * @param code 渠é“ç¼–ç  + * @return æ•°é‡ + */ + @Override + public Integer getChannelCountByConditions(Long merchantId, Long appid, String code) { + return this.channelMapper.selectCount(merchantId, appid, code); + } + + /** + * æ ¹æ®æ¡ä»¶èŽ·å–æ¸ é“ + * + * @param merchantId å•†æˆ·ç¼–å· + * @param appid åº”ç”¨ç¼–å· + * @param code 渠é“ç¼–ç  + * @return æ•°é‡ + */ + @Override + public PayChannelDO getChannelByConditions(Long merchantId, Long appid, String code) { + return this.channelMapper.selectOne(merchantId, appid, code); + } + + /** + * 设置渠é“é…置以åŠå‚数校验 + * + * @param channel æ¸ é“ + * @param configStr é…ç½® + */ + private void settingConfigAndCheckParam(PayChannelDO channel, String configStr) { + // 得到这个渠é“是微信的还是支付å®çš„ + Class payClass = PayChannelEnum.getByCode(channel.getCode()).getConfigClass(); + if (ObjectUtil.isNull(payClass)) { + throw exception(CHANNEL_NOT_EXISTS); + } + PayClientConfig config = JSONUtil.toBean(configStr, payClass); + + // 验è¯å‚æ•° + config.validate(validator); + channel.setConfig(config); + } + + @Override + public PayChannelDO validPayChannel(Long id) { + PayChannelDO channel = channelMapper.selectById(id); + this.validPayChannel(channel); + return channel; + } + + @Override + public PayChannelDO validPayChannel(Long appId, String code) { + PayChannelDO channel = channelMapper.selectByAppIdAndCode(appId, code); + this.validPayChannel(channel); + return channel; + } + + private void validPayChannel(PayChannelDO channel) { + if (channel == null) { + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_CHANNEL_NOT_FOUND); + } + if (CommonStatusEnum.DISABLE.getStatus().equals(channel.getStatus())) { + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_CHANNEL_IS_DISABLE); + } + } +} diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/merchant/PayMerchantService.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantService.java similarity index 81% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/merchant/PayMerchantService.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantService.java index b8e74dd75..40f02b99c 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/merchant/PayMerchantService.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantService.java @@ -1,12 +1,12 @@ -package cn.iocoder.yudao.adminserver.modules.pay.service.merchant; +package cn.iocoder.yudao.module.pay.service.merchant; -import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.PayMerchantCreateReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.PayMerchantExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.PayMerchantPageReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.PayMerchantUpdateReqVO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantPageReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantUpdateReqVO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; import javax.validation.Valid; import java.util.Collection; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/merchant/impl/PayMerchantServiceImpl.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantServiceImpl.java similarity index 77% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/merchant/impl/PayMerchantServiceImpl.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantServiceImpl.java index b80132a1f..c14a87d7d 100644 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/merchant/impl/PayMerchantServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantServiceImpl.java @@ -1,16 +1,15 @@ -package cn.iocoder.yudao.adminserver.modules.pay.service.merchant.impl; +package cn.iocoder.yudao.module.pay.service.merchant; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.ObjectUtil; -import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.PayMerchantCreateReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.PayMerchantExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.PayMerchantPageReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.PayMerchantUpdateReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.convert.merchant.PayMerchantConvert; -import cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.app.PayAppMapper; -import cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.merchant.PayMerchantMapper; -import cn.iocoder.yudao.adminserver.modules.pay.service.merchant.PayMerchantService; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantPageReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantUpdateReqVO; +import cn.iocoder.yudao.module.pay.convert.merchant.PayMerchantConvert; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayAppMapper; +import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayMerchantMapper; import cn.iocoder.yudao.framework.common.pojo.PageResult; import com.google.common.annotations.VisibleForTesting; import org.springframework.stereotype.Service; @@ -21,9 +20,8 @@ import java.time.LocalDateTime; import java.util.Collection; import java.util.List; -import static cn.iocoder.yudao.coreservice.modules.pay.enums.PayErrorCodeCoreConstants.PAY_MERCHANT_EXIST_APP_CANT_DELETE; -import static cn.iocoder.yudao.coreservice.modules.pay.enums.PayErrorCodeCoreConstants.PAY_MERCHANT_NOT_EXISTS; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*; /** * æ”¯ä»˜å•†æˆ·ä¿¡æ¯ Service 实现类 diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/PayNotifyCoreService.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyService.java similarity index 66% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/PayNotifyCoreService.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyService.java index 468375709..92358e471 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/PayNotifyCoreService.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyService.java @@ -1,15 +1,15 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service.notify; +package cn.iocoder.yudao.module.pay.service.notify; -import cn.iocoder.yudao.coreservice.modules.pay.service.notify.dto.PayNotifyTaskCreateReqDTO; +import cn.iocoder.yudao.module.pay.service.notify.dto.PayNotifyTaskCreateReqDTO; import javax.validation.Valid; /** - * 支付通知 Core Service æŽ¥å£ + * 支付通知 Service æŽ¥å£ * * @author 芋é“æºç  */ -public interface PayNotifyCoreService { +public interface PayNotifyService { /** * 创建支付通知任务 diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/impl/PayNotifyCoreServiceImpl.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyServiceImpl.java similarity index 77% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/impl/PayNotifyCoreServiceImpl.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyServiceImpl.java index dff6de7fc..1d5091a5b 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/impl/PayNotifyCoreServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyServiceImpl.java @@ -1,25 +1,25 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service.notify.impl; +package cn.iocoder.yudao.module.pay.service.notify; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.exceptions.ExceptionUtil; import cn.hutool.http.HttpUtil; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.notify.PayNotifyLogDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.notify.PayNotifyTaskDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayRefundDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.mysql.notify.PayNotifyLogCoreMapper; -import cn.iocoder.yudao.coreservice.modules.pay.dal.mysql.notify.PayNotifyTaskCoreMapper; -import cn.iocoder.yudao.coreservice.modules.pay.dal.mysql.order.PayRefundCoreMapper; -import cn.iocoder.yudao.coreservice.modules.pay.dal.redis.notify.PayNotifyLockCoreRedisDAO; -import cn.iocoder.yudao.coreservice.modules.pay.enums.notify.PayNotifyStatusEnum; -import cn.iocoder.yudao.coreservice.modules.pay.enums.notify.PayNotifyTypeEnum; -import cn.iocoder.yudao.coreservice.modules.pay.service.notify.PayNotifyCoreService; -import cn.iocoder.yudao.coreservice.modules.pay.service.notify.dto.PayNotifyTaskCreateReqDTO; -import cn.iocoder.yudao.coreservice.modules.pay.service.notify.vo.PayNotifyOrderReqVO; -import cn.iocoder.yudao.coreservice.modules.pay.service.notify.vo.PayRefundOrderReqVO; -import cn.iocoder.yudao.coreservice.modules.pay.service.order.PayOrderCoreService; +import cn.iocoder.yudao.module.pay.dal.dataobject.notify.PayNotifyLogDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.notify.PayNotifyTaskDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; +import cn.iocoder.yudao.module.pay.dal.mysql.notify.PayNotifyLogCoreMapper; +import cn.iocoder.yudao.module.pay.dal.mysql.notify.PayNotifyTaskCoreMapper; +import cn.iocoder.yudao.module.pay.dal.redis.notify.PayNotifyLockRedisDAO; +import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyStatusEnum; +import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyTypeEnum; +import cn.iocoder.yudao.module.pay.service.notify.dto.PayNotifyTaskCreateReqDTO; +import cn.iocoder.yudao.module.pay.service.notify.vo.PayNotifyOrderReqVO; +import cn.iocoder.yudao.module.pay.service.notify.vo.PayRefundOrderReqVO; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; +import cn.iocoder.yudao.module.pay.service.order.PayOrderService; +import cn.iocoder.yudao.module.pay.service.refund.PayRefundService; import lombok.extern.slf4j.Slf4j; import org.springframework.context.annotation.Lazy; import org.springframework.scheduling.annotation.Async; @@ -36,10 +36,6 @@ import java.util.Objects; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import static cn.hutool.core.exceptions.ExceptionUtil.getRootCauseMessage; -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.SECOND_MILLIS; -import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString; - /** * 支付通知 Core Service 实现类 * @@ -48,7 +44,7 @@ import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString @Service @Valid @Slf4j -public class PayNotifyCoreServiceImpl implements PayNotifyCoreService { +public class PayNotifyServiceImpl implements PayNotifyService { /** * 通知超时时间,å•ä½ï¼šç§’ @@ -57,11 +53,14 @@ public class PayNotifyCoreServiceImpl implements PayNotifyCoreService { /** * {@link #NOTIFY_TIMEOUT} 的毫秒 */ - public static final long NOTIFY_TIMEOUT_MILLIS = 120 * SECOND_MILLIS; + public static final long NOTIFY_TIMEOUT_MILLIS = 120 * DateUtils.SECOND_MILLIS; @Resource @Lazy // 循环ä¾èµ–,é¿å…报错 - private PayOrderCoreService payOrderCoreService; + private PayOrderService orderService; + @Resource + @Lazy // 循环ä¾èµ–,é¿å…报错 + private PayRefundService refundService; @Resource private PayNotifyTaskCoreMapper payNotifyTaskCoreMapper; @@ -72,14 +71,11 @@ public class PayNotifyCoreServiceImpl implements PayNotifyCoreService { private ThreadPoolTaskExecutor threadPoolTaskExecutor; // TODO 芋艿:未æ¥æ供独立的线程池 @Resource - private PayNotifyLockCoreRedisDAO payNotifyLockCoreRedisDAO; - - @Resource - private PayRefundCoreMapper payRefundCoreMapper; + private PayNotifyLockRedisDAO payNotifyLockCoreRedisDAO; @Resource @Lazy // 循环ä¾èµ–(自己ä¾èµ–自己),é¿å…报错 - private PayNotifyCoreServiceImpl self; + private PayNotifyServiceImpl self; @Override public void createPayNotifyTask(PayNotifyTaskCreateReqDTO reqDTO) { @@ -89,12 +85,11 @@ public class PayNotifyCoreServiceImpl implements PayNotifyCoreService { .setNotifyTimes(0).setMaxNotifyTimes(PayNotifyTaskDO.NOTIFY_FREQUENCY.length + 1); // 补充 merchantId + appId + notifyUrl 字段 if (Objects.equals(task.getType(), PayNotifyTypeEnum.ORDER.getType())) { - PayOrderDO order = payOrderCoreService.getPayOrder(task.getDataId()); // ä¸è¿›è¡Œéžç©ºåˆ¤æ–­ï¼Œæœ‰é—®é¢˜ç›´æŽ¥å¼‚常 + PayOrderDO order = orderService.getOrder(task.getDataId()); // ä¸è¿›è¡Œéžç©ºåˆ¤æ–­ï¼Œæœ‰é—®é¢˜ç›´æŽ¥å¼‚常 task.setMerchantId(order.getMerchantId()).setAppId(order.getAppId()). setMerchantOrderId(order.getMerchantOrderId()).setNotifyUrl(order.getNotifyUrl()); } else if (Objects.equals(task.getType(), PayNotifyTypeEnum.REFUND.getType())) { - // TODO 芋艿,需è¦å®žçŽ°ä¸‹å“ˆ - PayRefundDO refundDO = payRefundCoreMapper.selectById(task.getDataId()); + PayRefundDO refundDO = refundService.getRefund(task.getDataId()); task.setMerchantId(refundDO.getMerchantId()).setAppId(refundDO.getAppId()) .setMerchantOrderId(refundDO.getMerchantOrderId()).setNotifyUrl(refundDO.getNotifyUrl()); } @@ -169,7 +164,7 @@ public class PayNotifyCoreServiceImpl implements PayNotifyCoreService { // 虽然已ç»é€šè¿‡åˆ†å¸ƒå¼åŠ é”,但是å¯èƒ½åŒæ—¶æ»¡è¶³é€šçŸ¥çš„æ¡ä»¶ï¼Œç„¶åŽéƒ½åŽ»èŽ·å¾—é”。此时,第一个执行完åŽï¼Œç¬¬äºŒä¸ªè¿˜æ˜¯èƒ½æ‹¿åˆ°é”,然åŽä¼šå†æ‰§è¡Œä¸€æ¬¡ã€‚ PayNotifyTaskDO dbTask = payNotifyTaskCoreMapper.selectById(task.getId()); if (DateUtils.afterNow(dbTask.getNextNotifyTime())) { - log.info("[executeNotify][dbTask({}) 任务被忽略,原因是未到达下次通知时间,å¯èƒ½æ˜¯å› ä¸ºå¹¶å‘执行了]", toJsonString(dbTask)); + log.info("[executeNotify][dbTask({}) 任务被忽略,原因是未到达下次通知时间,å¯èƒ½æ˜¯å› ä¸ºå¹¶å‘执行了]", JsonUtils.toJsonString(dbTask)); return; } @@ -193,7 +188,7 @@ public class PayNotifyCoreServiceImpl implements PayNotifyCoreService { Integer newStatus = this.processNotifyResult(task, invokeResult, invokeException); // 记录 PayNotifyLog 日志 - String response = invokeException != null ? getRootCauseMessage(invokeException) : toJsonString(invokeResult); + String response = invokeException != null ? ExceptionUtil.getRootCauseMessage(invokeException) : JsonUtils.toJsonString(invokeResult); payNotifyLogCoreMapper.insert(PayNotifyLogDO.builder().taskId(task.getId()) .notifyTimes(task.getNotifyTimes() + 1).status(newStatus).response(response).build()); } @@ -214,10 +209,10 @@ public class PayNotifyCoreServiceImpl implements PayNotifyCoreService { request = PayRefundOrderReqVO.builder().merchantOrderId(task.getMerchantOrderId()) .payRefundId(task.getDataId()).build(); } else { - throw new RuntimeException("未知的通知任务类型:" + toJsonString(task)); + throw new RuntimeException("未知的通知任务类型:" + JsonUtils.toJsonString(task)); } // è¯·æ±‚åœ°å€ - String response = HttpUtil.post(task.getNotifyUrl(), toJsonString(request), + String response = HttpUtil.post(task.getNotifyUrl(), JsonUtils.toJsonString(request), (int) NOTIFY_TIMEOUT_MILLIS); // 解æžç»“æžœ return JsonUtils.parseObject(response, CommonResult.class); diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/dto/PayNotifyTaskCreateReqDTO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/dto/PayNotifyTaskCreateReqDTO.java similarity index 88% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/dto/PayNotifyTaskCreateReqDTO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/dto/PayNotifyTaskCreateReqDTO.java index 8d40ffb91..49d570d4e 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/dto/PayNotifyTaskCreateReqDTO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/dto/PayNotifyTaskCreateReqDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service.notify.dto; +package cn.iocoder.yudao.module.pay.service.notify.dto; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/vo/PayNotifyOrderReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/vo/PayNotifyOrderReqVO.java similarity index 92% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/vo/PayNotifyOrderReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/vo/PayNotifyOrderReqVO.java index 94b1fec56..d4f6c1eae 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/vo/PayNotifyOrderReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/vo/PayNotifyOrderReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service.notify.vo; +package cn.iocoder.yudao.module.pay.service.notify.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/vo/PayRefundOrderReqVO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/vo/PayRefundOrderReqVO.java similarity index 93% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/vo/PayRefundOrderReqVO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/vo/PayRefundOrderReqVO.java index d436d759b..978283d1b 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/notify/vo/PayRefundOrderReqVO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/vo/PayRefundOrderReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service.notify.vo; +package cn.iocoder.yudao.module.pay.service.notify.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/vo/package-info.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/vo/package-info.java new file mode 100644 index 000000000..fb006dd68 --- /dev/null +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/notify/vo/package-info.java @@ -0,0 +1,6 @@ +/** + * 这里的 VO 包有点特殊,是æ供给接入支付模å—的业务,æ供回调接å£æ—¶ï¼Œå¯ä»¥ç›´æŽ¥ä½¿ç”¨ VO + * + * 例如说,支付å•çš„回调,使用 TODO 芋艿:想下怎么优化下 + */ +package cn.iocoder.yudao.module.pay.service.notify.vo; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/PayOrderExtensionService.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderExtensionService.java similarity index 80% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/PayOrderExtensionService.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderExtensionService.java index a139956b4..f707bc0df 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/PayOrderExtensionService.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderExtensionService.java @@ -1,7 +1,7 @@ -package cn.iocoder.yudao.adminserver.modules.pay.service.order; +package cn.iocoder.yudao.module.pay.service.order; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderExtensionDO; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO; import java.util.Collection; import java.util.List; @@ -32,7 +32,6 @@ public interface PayOrderExtensionService { */ List getOrderExtensionList(Collection ids); - /** * æ ¹æ®è®¢å•æˆåŠŸçš„ 扩展订å•ID 查询所有的扩展订å•è½¬ æˆ map 返回 * @@ -40,9 +39,8 @@ public interface PayOrderExtensionService { * @return 订å•æ‰©å±• map é›†åˆ */ default Map getOrderExtensionMap(Collection successExtensionIdList) { - List list = this.getOrderExtensionList(successExtensionIdList); + List list = getOrderExtensionList(successExtensionIdList); return CollectionUtils.convertMap(list, PayOrderExtensionDO::getId); } - } diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/impl/PayOrderExtensionServiceImpl.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderExtensionServiceImpl.java similarity index 68% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/impl/PayOrderExtensionServiceImpl.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderExtensionServiceImpl.java index 197275657..a97e3beff 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/impl/PayOrderExtensionServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderExtensionServiceImpl.java @@ -1,8 +1,7 @@ -package cn.iocoder.yudao.adminserver.modules.pay.service.order.impl; +package cn.iocoder.yudao.module.pay.service.order; -import cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.order.PayOrderExtensionMapper; -import cn.iocoder.yudao.adminserver.modules.pay.service.order.PayOrderExtensionService; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderExtensionDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO; +import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderExtensionMapper; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; diff --git a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/PayOrderService.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderService.java similarity index 55% rename from yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/PayOrderService.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderService.java index ebdf7e340..40ed287fc 100755 --- a/yudao-admin-server/src/main/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/PayOrderService.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderService.java @@ -1,11 +1,16 @@ -package cn.iocoder.yudao.adminserver.modules.pay.service.order; +package cn.iocoder.yudao.module.pay.service.order; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order.PayOrderExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order.PayOrderPageReqVO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderDO; +import cn.iocoder.yudao.framework.pay.core.client.dto.PayNotifyDataDTO; +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderPageReqVO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; +import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderCreateReqDTO; +import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitReqDTO; +import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitRespDTO; +import javax.validation.Valid; import java.util.Collection; import java.util.List; import java.util.Map; @@ -64,4 +69,29 @@ public interface PayOrderService { return CollectionUtils.convertMap(list, PayOrderDO::getId); } + /** + * åˆ›å»ºæ”¯ä»˜å• + * + * @param reqDTO 创建请求 + * @return 支付å•ç¼–å· + */ + Long createPayOrder(@Valid PayOrderCreateReqDTO reqDTO); + + /** + * æ交支付 + * 此时,会å‘起支付渠é“的调用 + * + * @param reqDTO æ交请求 + * @return æ交结果 + */ + PayOrderSubmitRespDTO submitPayOrder(@Valid PayOrderSubmitReqDTO reqDTO); + + /** + * 通知支付å•æˆåŠŸ + * + * @param channelId 渠é“ç¼–å· + * @param notifyData é€šçŸ¥æ•°æ® + */ + void notifyPayOrder(Long channelId, PayNotifyDataDTO notifyData) throws Exception; + } diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/impl/PayOrderCoreServiceImpl.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceImpl.java old mode 100644 new mode 100755 similarity index 63% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/impl/PayOrderCoreServiceImpl.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceImpl.java index 50229b140..72bfac023 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/impl/PayOrderCoreServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceImpl.java @@ -1,25 +1,8 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service.order.impl; +package cn.iocoder.yudao.module.pay.service.order; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.RandomUtil; -import cn.iocoder.yudao.coreservice.modules.pay.convert.order.PayOrderCoreConvert; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayChannelDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderExtensionDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.mysql.order.PayOrderCoreMapper; -import cn.iocoder.yudao.coreservice.modules.pay.dal.mysql.order.PayOrderExtensionCoreMapper; -import cn.iocoder.yudao.coreservice.modules.pay.enums.notify.PayNotifyTypeEnum; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayOrderNotifyStatusEnum; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayOrderStatusEnum; -import cn.iocoder.yudao.coreservice.modules.pay.service.merchant.PayAppCoreService; -import cn.iocoder.yudao.coreservice.modules.pay.service.merchant.PayChannelCoreService; -import cn.iocoder.yudao.coreservice.modules.pay.service.notify.PayNotifyCoreService; -import cn.iocoder.yudao.coreservice.modules.pay.service.notify.dto.PayNotifyTaskCreateReqDTO; -import cn.iocoder.yudao.coreservice.modules.pay.service.order.PayOrderCoreService; -import cn.iocoder.yudao.coreservice.modules.pay.service.order.dto.PayOrderCreateReqDTO; -import cn.iocoder.yudao.coreservice.modules.pay.service.order.dto.PayOrderSubmitReqDTO; -import cn.iocoder.yudao.coreservice.modules.pay.service.order.dto.PayOrderSubmitRespDTO; +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.framework.pay.config.PayProperties; @@ -28,58 +11,94 @@ import cn.iocoder.yudao.framework.pay.core.client.PayClientFactory; import cn.iocoder.yudao.framework.pay.core.client.dto.PayNotifyDataDTO; import cn.iocoder.yudao.framework.pay.core.client.dto.PayOrderNotifyRespDTO; import cn.iocoder.yudao.framework.pay.core.client.dto.PayOrderUnifiedReqDTO; +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderPageReqVO; +import cn.iocoder.yudao.module.pay.convert.order.PayOrderConvert; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO; +import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderExtensionMapper; +import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderMapper; +import cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants; +import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyTypeEnum; +import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum; +import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; +import cn.iocoder.yudao.module.pay.service.merchant.PayAppService; +import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; +import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService; +import cn.iocoder.yudao.module.pay.service.notify.dto.PayNotifyTaskCreateReqDTO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderCreateReqDTO; +import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitReqDTO; +import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitRespDTO; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; +import java.util.Collection; import java.util.Date; +import java.util.List; import java.util.Objects; -import static cn.iocoder.yudao.coreservice.modules.pay.enums.PayErrorCodeCoreConstants.*; -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; - /** - * æ”¯ä»˜è®¢å• Core Service 实现类 + * æ”¯ä»˜è®¢å• Service 实现类 * - * @author 芋é“æºç  + * @author aquan */ @Service @Validated @Slf4j -public class PayOrderCoreServiceImpl implements PayOrderCoreService { +public class PayOrderServiceImpl implements PayOrderService { @Resource private PayProperties payProperties; - @Resource - private PayAppCoreService payAppCoreService; - @Resource - private PayChannelCoreService payChannelCoreService; - @Resource - private PayNotifyCoreService payNotifyCoreService; - @Resource private PayClientFactory payClientFactory; @Resource - private PayOrderCoreMapper payOrderCoreMapper; + private PayOrderMapper orderMapper; @Resource - private PayOrderExtensionCoreMapper payOrderExtensionCoreMapper; + private PayOrderExtensionMapper orderExtensionMapper; + + @Resource + private PayAppService appService; + @Resource + private PayChannelService channelService; + @Resource + private PayNotifyService notifyService; @Override - public PayOrderDO getPayOrder(Long id) { - return payOrderCoreMapper.selectById(id); + public PayOrderDO getOrder(Long id) { + return orderMapper.selectById(id); + } + + @Override + public PageResult getOrderPage(PayOrderPageReqVO pageReqVO) { + return orderMapper.selectPage(pageReqVO); + } + + @Override + public List getOrderList(PayOrderExportReqVO exportReqVO) { + return orderMapper.selectList(exportReqVO); + } + + // TODO @艿艿:需è¦ä¼˜åŒ–。ä¸ç¡®å®šè¿™ä¸ªæ–¹æ³•çš„作用 + @Override + public List getOrderSubjectList(Collection idList) { + return orderMapper.findByIdListQueryOrderSubject(idList); } @Override public Long createPayOrder(PayOrderCreateReqDTO reqDTO) { // 校验 App - PayAppDO app = payAppCoreService.validPayApp(reqDTO.getAppId()); + PayAppDO app = appService.validPayApp(reqDTO.getAppId()); // 查询对应的支付交易å•æ˜¯å¦å·²ç»å­˜åœ¨ã€‚如果是,则直接返回 - PayOrderDO order = payOrderCoreMapper.selectByAppIdAndMerchantOrderId( + PayOrderDO order = orderMapper.selectByAppIdAndMerchantOrderId( reqDTO.getAppId(), reqDTO.getMerchantOrderId()); if (order != null) { log.warn("[createPayOrder][appId({}) merchantOrderId({}) å·²ç»å­˜åœ¨å¯¹åº”的支付å•({})]", order.getAppId(), @@ -88,7 +107,7 @@ public class PayOrderCoreServiceImpl implements PayOrderCoreService { } // åˆ›å»ºæ”¯ä»˜äº¤æ˜“å• - order = PayOrderCoreConvert.INSTANCE.convert(reqDTO) + order = PayOrderConvert.INSTANCE.convert(reqDTO) .setMerchantId(app.getMerchantId()).setAppId(app.getId()); // 商户相关字段 order.setNotifyUrl(app.getPayNotifyUrl()) @@ -99,7 +118,7 @@ public class PayOrderCoreServiceImpl implements PayOrderCoreService { // todo @芋艿 创建支付的订å•çš„退款状æ€æžšä¸¾æ˜¯ä¸æ˜¯æœ‰é—®é¢˜ï¼Œåº”该是 PayRefundTypeEnum å§ æ‚¨è¿™å¡«å†™çš„æ˜¯ PayOrderNotifyStatusEnum 回调状æ€æžšä¸¾ order.setRefundStatus(PayOrderNotifyStatusEnum.NO.getStatus()) .setRefundTimes(0).setRefundAmount(0L); - payOrderCoreMapper.insert(order); + orderMapper.insert(order); // 最终返回 return order.getId(); } @@ -107,34 +126,34 @@ public class PayOrderCoreServiceImpl implements PayOrderCoreService { @Override public PayOrderSubmitRespDTO submitPayOrder(PayOrderSubmitReqDTO reqDTO) { // 校验 App - payAppCoreService.validPayApp(reqDTO.getAppId()); + appService.validPayApp(reqDTO.getAppId()); // 校验支付渠é“是å¦æœ‰æ•ˆ - PayChannelDO channel = payChannelCoreService.validPayChannel(reqDTO.getAppId(), reqDTO.getChannelCode()); + PayChannelDO channel = channelService.validPayChannel(reqDTO.getAppId(), reqDTO.getChannelCode()); // 校验支付客户端是å¦æ­£ç¡®åˆå§‹åŒ– PayClient client = payClientFactory.getPayClient(channel.getId()); if (client == null) { log.error("[submitPayOrder][渠é“ç¼–å·({}) 找ä¸åˆ°å¯¹åº”的支付客户端]", channel.getId()); - throw exception(PAY_CHANNEL_CLIENT_NOT_FOUND); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_CHANNEL_CLIENT_NOT_FOUND); } // 获得 PayOrderDO ,并校验其是å¦å­˜åœ¨ - PayOrderDO order = payOrderCoreMapper.selectById(reqDTO.getId()); + PayOrderDO order = orderMapper.selectById(reqDTO.getId()); if (order == null || !Objects.equals(order.getAppId(), reqDTO.getAppId())) { // 是å¦å­˜åœ¨ - throw exception(PAY_ORDER_NOT_FOUND); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_ORDER_NOT_FOUND); } if (!PayOrderStatusEnum.WAITING.getStatus().equals(order.getStatus())) { // 校验状æ€ï¼Œå¿…须是待支付 - throw exception(PAY_ORDER_STATUS_IS_NOT_WAITING); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_ORDER_STATUS_IS_NOT_WAITING); } // æ’å…¥ PayOrderExtensionDO - PayOrderExtensionDO orderExtension = PayOrderCoreConvert.INSTANCE.convert(reqDTO) + PayOrderExtensionDO orderExtension = PayOrderConvert.INSTANCE.convert(reqDTO) .setOrderId(order.getId()).setNo(generateOrderExtensionNo()) .setChannelId(channel.getId()).setChannelCode(channel.getCode()) .setStatus(PayOrderStatusEnum.WAITING.getStatus()); - payOrderExtensionCoreMapper.insert(orderExtension); + orderExtensionMapper.insert(orderExtension); // è°ƒç”¨ä¸‰æ–¹æŽ¥å£ - PayOrderUnifiedReqDTO unifiedOrderReqDTO = PayOrderCoreConvert.INSTANCE.convert2(reqDTO); + PayOrderUnifiedReqDTO unifiedOrderReqDTO = PayOrderConvert.INSTANCE.convert2(reqDTO); // 商户相关字段 //TODO jason @芋艿 是å¦åŠ ä¸€ä¸ªå±žæ€§ 如tradeNo 支付订å•å·ï¼Œ 用这个merchantOrderId让人迷糊 unifiedOrderReqDTO.setMerchantOrderId(orderExtension.getNo()) // 注æ„,此处使用的是 PayOrderExtensionDO.no å±žæ€§ï¼ @@ -197,12 +216,12 @@ public class PayOrderCoreServiceImpl implements PayOrderCoreService { log.info("[notifyPayOrder][channelId({}) 回调数æ®({})]", channelId, notifyData.getBody()); // 校验支付渠é“是å¦æœ‰æ•ˆ - PayChannelDO channel = payChannelCoreService.validPayChannel(channelId); + PayChannelDO channel = channelService.validPayChannel(channelId); // 校验支付客户端是å¦æ­£ç¡®åˆå§‹åŒ– PayClient client = payClientFactory.getPayClient(channel.getId()); if (client == null) { log.error("[notifyPayOrder][渠é“ç¼–å·({}) 找ä¸åˆ°å¯¹åº”的支付客户端]", channel.getId()); - throw exception(PAY_CHANNEL_CLIENT_NOT_FOUND); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_CHANNEL_CLIENT_NOT_FOUND); } // 解æžæ”¯ä»˜ç»“æžœ @@ -210,45 +229,44 @@ public class PayOrderCoreServiceImpl implements PayOrderCoreService { // TODO 芋艿,先最严格的校验。å³ä½¿è°ƒç”¨æ–¹é‡å¤è°ƒç”¨ï¼Œå®žé™…哪个订å•å·²ç»è¢«é‡å¤å›žè°ƒçš„支付,也返回 false 。也没问题,因为实际已ç»å›žè°ƒæˆåŠŸäº†ã€‚ // 1.1 查询 PayOrderExtensionDO - PayOrderExtensionDO orderExtension = payOrderExtensionCoreMapper.selectByNo( - notifyRespDTO.getOrderExtensionNo()); + PayOrderExtensionDO orderExtension = orderExtensionMapper.selectByNo(notifyRespDTO.getOrderExtensionNo()); if (orderExtension == null) { - throw exception(PAY_ORDER_EXTENSION_NOT_FOUND); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_ORDER_EXTENSION_NOT_FOUND); } if (!PayOrderStatusEnum.WAITING.getStatus().equals(orderExtension.getStatus())) { // 校验状æ€ï¼Œå¿…须是待支付 - throw exception(PAY_ORDER_EXTENSION_STATUS_IS_NOT_WAITING); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_ORDER_EXTENSION_STATUS_IS_NOT_WAITING); } // 1.2 æ›´æ–° PayOrderExtensionDO //TODO 支付å®äº¤æ˜“超时 TRADE_FINISHED 需è¦æ›´æ–°äº¤æ˜“关闭 - int updateCounts = payOrderExtensionCoreMapper.updateByIdAndStatus(orderExtension.getId(), + int updateCounts = orderExtensionMapper.updateByIdAndStatus(orderExtension.getId(), PayOrderStatusEnum.WAITING.getStatus(), PayOrderExtensionDO.builder().id(orderExtension.getId()) .status(PayOrderStatusEnum.SUCCESS.getStatus()).channelNotifyData(notifyData.getBody()).build()); if (updateCounts == 0) { // 校验状æ€ï¼Œå¿…须是待支付 - throw exception(PAY_ORDER_EXTENSION_STATUS_IS_NOT_WAITING); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_ORDER_EXTENSION_STATUS_IS_NOT_WAITING); } log.info("[notifyPayOrder][支付拓展å•({}) 更新为已支付]", orderExtension.getId()); // 2.1 判断 PayOrderDO 是å¦å¤„于待支付 - PayOrderDO order = payOrderCoreMapper.selectById(orderExtension.getOrderId()); + PayOrderDO order = orderMapper.selectById(orderExtension.getOrderId()); if (order == null) { - throw exception(PAY_ORDER_NOT_FOUND); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_ORDER_NOT_FOUND); } if (!PayOrderStatusEnum.WAITING.getStatus().equals(order.getStatus())) { // 校验状æ€ï¼Œå¿…须是待支付 - throw exception(PAY_ORDER_STATUS_IS_NOT_WAITING); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_ORDER_STATUS_IS_NOT_WAITING); } // 2.2 æ›´æ–° PayOrderDO - updateCounts = payOrderCoreMapper.updateByIdAndStatus(order.getId(), PayOrderStatusEnum.WAITING.getStatus(), + updateCounts = orderMapper.updateByIdAndStatus(order.getId(), PayOrderStatusEnum.WAITING.getStatus(), PayOrderDO.builder().status(PayOrderStatusEnum.SUCCESS.getStatus()).channelId(channelId).channelCode(channel.getCode()) .successTime(notifyRespDTO.getSuccessTime()).successExtensionId(orderExtension.getId()) .channelOrderNo(notifyRespDTO.getChannelOrderNo()).channelUserId(notifyRespDTO.getChannelUserId()) .notifyTime(new Date()).build()); if (updateCounts == 0) { // 校验状æ€ï¼Œå¿…须是待支付 - throw exception(PAY_ORDER_STATUS_IS_NOT_WAITING); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_ORDER_STATUS_IS_NOT_WAITING); } log.info("[notifyPayOrder][支付订å•({}) 更新为已支付]", order.getId()); // 3. æ’入支付通知记录 - payNotifyCoreService.createPayNotifyTask(PayNotifyTaskCreateReqDTO.builder() + notifyService.createPayNotifyTask(PayNotifyTaskCreateReqDTO.builder() .type(PayNotifyTypeEnum.ORDER.getType()).dataId(order.getId()).build()); } diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/dto/PayOrderCreateReqDTO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayOrderCreateReqDTO.java similarity index 95% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/dto/PayOrderCreateReqDTO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayOrderCreateReqDTO.java index a5d2b0f4e..62bf511de 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/dto/PayOrderCreateReqDTO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayOrderCreateReqDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service.order.dto; +package cn.iocoder.yudao.module.pay.service.order.dto; import lombok.Data; import org.hibernate.validator.constraints.Length; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/dto/PayOrderSubmitReqDTO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayOrderSubmitReqDTO.java similarity index 92% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/dto/PayOrderSubmitReqDTO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayOrderSubmitReqDTO.java index eb08fbb3e..20f6ab264 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/dto/PayOrderSubmitReqDTO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayOrderSubmitReqDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service.order.dto; +package cn.iocoder.yudao.module.pay.service.order.dto; import lombok.Data; import lombok.experimental.Accessors; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/dto/PayOrderSubmitRespDTO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayOrderSubmitRespDTO.java similarity index 83% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/dto/PayOrderSubmitRespDTO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayOrderSubmitRespDTO.java index 2bcb504e8..a594253f5 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/dto/PayOrderSubmitRespDTO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayOrderSubmitRespDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service.order.dto; +package cn.iocoder.yudao.module.pay.service.order.dto; import lombok.Data; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/dto/PayRefundReqDTO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayRefundReqDTO.java similarity index 93% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/dto/PayRefundReqDTO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayRefundReqDTO.java index 6ec3fb13d..0eb24dbe2 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/dto/PayRefundReqDTO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayRefundReqDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service.order.dto; +package cn.iocoder.yudao.module.pay.service.order.dto; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/dto/PayRefundRespDTO.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayRefundRespDTO.java similarity index 85% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/dto/PayRefundRespDTO.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayRefundRespDTO.java index d065f3852..2e1a6fcd4 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/dto/PayRefundRespDTO.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/order/dto/PayRefundRespDTO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service.order.dto; +package cn.iocoder.yudao.module.pay.service.order.dto; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/package-info.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/package-info.java new file mode 100644 index 000000000..2cad91eba --- /dev/null +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.yudao.module.pay.service; diff --git a/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundService.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundService.java new file mode 100755 index 000000000..7ffd52b10 --- /dev/null +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundService.java @@ -0,0 +1,61 @@ +package cn.iocoder.yudao.module.pay.service.refund; + +import cn.iocoder.yudao.framework.pay.core.client.dto.PayNotifyDataDTO; +import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundPageReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; +import cn.iocoder.yudao.module.pay.service.order.dto.PayRefundReqDTO; +import cn.iocoder.yudao.module.pay.service.order.dto.PayRefundRespDTO; + +import java.util.List; + +/** + * é€€æ¬¾è®¢å• Service æŽ¥å£ + * + * @author aquan + */ +public interface PayRefundService { + + /** + * èŽ·å¾—é€€æ¬¾è®¢å• + * + * @param id ç¼–å· + * @return é€€æ¬¾è®¢å• + */ + PayRefundDO getRefund(Long id); + + /** + * 获得退款订å•åˆ†é¡µ + * + * @param pageReqVO 分页查询 + * @return 退款订å•åˆ†é¡µ + */ + PageResult getRefundPage(PayRefundPageReqVO pageReqVO); + + /** + * 获得退款订å•åˆ—表, 用于 Excel 导出 + * + * @param exportReqVO 查询æ¡ä»¶ + * @return 退款订å•åˆ—表 + */ + List getRefundList(PayRefundExportReqVO exportReqVO); + + /** + * æ交退款申请 + * + * @param reqDTO é€€æ¬¾ç”³è¯·ä¿¡æ¯ + * @return é€€æ¬¾ç”³è¯·è¿”å›žä¿¡æ¯ + */ + PayRefundRespDTO submitRefundOrder(PayRefundReqDTO reqDTO); + + /** + * 渠é“的退款通知 + * + * @param channelId 渠é“ç¼–å· + * @param notifyData é€šçŸ¥æ•°æ® + * @throws Exception 退款通知异常 + */ + void notifyPayRefund(Long channelId, PayNotifyDataDTO notifyData) throws Exception; + +} diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/impl/PayRefundCoreServiceImpl.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceImpl.java old mode 100644 new mode 100755 similarity index 62% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/impl/PayRefundCoreServiceImpl.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceImpl.java index 944c62aa6..4e3a151fb --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/service/order/impl/PayRefundCoreServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceImpl.java @@ -1,26 +1,7 @@ -package cn.iocoder.yudao.coreservice.modules.pay.service.order.impl; +package cn.iocoder.yudao.module.pay.service.refund; import cn.hutool.core.util.StrUtil; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayChannelDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderExtensionDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayRefundDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.mysql.order.PayOrderCoreMapper; -import cn.iocoder.yudao.coreservice.modules.pay.dal.mysql.order.PayOrderExtensionCoreMapper; -import cn.iocoder.yudao.coreservice.modules.pay.dal.mysql.order.PayRefundCoreMapper; -import cn.iocoder.yudao.coreservice.modules.pay.enums.notify.PayNotifyTypeEnum; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayOrderNotifyStatusEnum; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayOrderStatusEnum; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayRefundStatusEnum; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayRefundTypeEnum; -import cn.iocoder.yudao.coreservice.modules.pay.service.merchant.PayAppCoreService; -import cn.iocoder.yudao.coreservice.modules.pay.service.merchant.PayChannelCoreService; -import cn.iocoder.yudao.coreservice.modules.pay.service.notify.PayNotifyCoreService; -import cn.iocoder.yudao.coreservice.modules.pay.service.notify.dto.PayNotifyTaskCreateReqDTO; -import cn.iocoder.yudao.coreservice.modules.pay.service.order.PayRefundCoreService; -import cn.iocoder.yudao.coreservice.modules.pay.service.order.dto.PayRefundReqDTO; -import cn.iocoder.yudao.coreservice.modules.pay.service.order.dto.PayRefundRespDTO; +import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; import cn.iocoder.yudao.framework.pay.core.client.PayClient; import cn.iocoder.yudao.framework.pay.core.client.PayClientFactory; import cn.iocoder.yudao.framework.pay.core.client.PayCommonResult; @@ -29,56 +10,102 @@ import cn.iocoder.yudao.framework.pay.core.client.dto.PayRefundNotifyDTO; import cn.iocoder.yudao.framework.pay.core.client.dto.PayRefundUnifiedReqDTO; import cn.iocoder.yudao.framework.pay.core.client.dto.PayRefundUnifiedRespDTO; import cn.iocoder.yudao.framework.pay.core.enums.PayNotifyRefundStatusEnum; +import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundPageReqVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; +import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderMapper; +import cn.iocoder.yudao.module.pay.dal.mysql.refund.PayRefundMapper; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants; +import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyTypeEnum; +import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum; +import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; +import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum; +import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum; +import cn.iocoder.yudao.module.pay.service.merchant.PayAppService; +import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; +import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService; +import cn.iocoder.yudao.module.pay.service.notify.dto.PayNotifyTaskCreateReqDTO; +import cn.iocoder.yudao.module.pay.service.order.PayOrderExtensionService; +import cn.iocoder.yudao.module.pay.service.order.PayOrderService; +import cn.iocoder.yudao.module.pay.service.order.dto.PayRefundReqDTO; +import cn.iocoder.yudao.module.pay.service.order.dto.PayRefundRespDTO; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; import java.util.Date; +import java.util.List; import java.util.Objects; -import static cn.iocoder.yudao.coreservice.modules.pay.enums.PayErrorCodeCoreConstants.*; -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; - +/** + * é€€æ¬¾è®¢å• Service 实现类 + * + * @author aquan + */ @Service @Slf4j -public class PayRefundCoreServiceImpl implements PayRefundCoreService { - - @Resource - private PayOrderCoreMapper payOrderCoreMapper; - @Resource - private PayRefundCoreMapper payRefundCoreMapper; - @Resource - private PayOrderExtensionCoreMapper payOrderExtensionCoreMapper; - - @Resource - private PayAppCoreService payAppCoreService; - @Resource - private PayChannelCoreService payChannelCoreService; - @Resource - private PayNotifyCoreService payNotifyCoreService; +@Validated +public class PayRefundServiceImpl implements PayRefundService { @Resource private PayClientFactory payClientFactory; + @Resource + private PayRefundMapper refundMapper; + @Resource + private PayOrderMapper orderMapper; // TODO @jason:需è¦æ”¹æˆä¸ç›´æŽ¥æ“作 dbï¼› + + @Resource + private PayOrderService orderService; + @Resource + private PayOrderExtensionService orderExtensionService; + @Resource + private PayAppService appService; + @Resource + private PayChannelService channelService; + @Resource + private PayNotifyService notifyService; + + @Override + public PayRefundDO getRefund(Long id) { + return refundMapper.selectById(id); + } + + @Override + public PageResult getRefundPage(PayRefundPageReqVO pageReqVO) { + return refundMapper.selectPage(pageReqVO); + } + + @Override + public List getRefundList(PayRefundExportReqVO exportReqVO) { + return refundMapper.selectList(exportReqVO); + } + @Override @Transactional(rollbackFor = Exception.class) public PayRefundRespDTO submitRefundOrder(PayRefundReqDTO req) { // 获得 PayOrderDO - PayOrderDO order = payOrderCoreMapper.selectById(req.getPayOrderId()); + PayOrderDO order = orderService.getOrder(req.getPayOrderId()); // 校验订å•æ˜¯å¦å­˜åœ¨ if (Objects.isNull(order) ) { - throw exception(PAY_ORDER_NOT_FOUND); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_ORDER_NOT_FOUND); } // 校验 App - PayAppDO app = payAppCoreService.validPayApp(order.getAppId()); + PayAppDO app = appService.validPayApp(order.getAppId()); // 校验支付渠é“是å¦æœ‰æ•ˆ - PayChannelDO channel = payChannelCoreService.validPayChannel(order.getChannelId()); + PayChannelDO channel = channelService.validPayChannel(order.getChannelId()); // 校验支付客户端是å¦æ­£ç¡®åˆå§‹åŒ– PayClient client = payClientFactory.getPayClient(channel.getId()); if (client == null) { log.error("[refund][渠é“ç¼–å·({}) 找ä¸åˆ°å¯¹åº”的支付客户端]", channel.getId()); - throw exception(PAY_CHANNEL_CLIENT_NOT_FOUND); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_CHANNEL_CLIENT_NOT_FOUND); } // 校验退款的æ¡ä»¶ @@ -88,19 +115,19 @@ public class PayRefundCoreServiceImpl implements PayRefundCoreService { if (Objects.equals(req.getAmount(), order.getAmount())) { refundType = PayRefundTypeEnum.ALL; } - PayOrderExtensionDO orderExtensionDO = payOrderExtensionCoreMapper.selectById(order.getSuccessExtensionId()); - PayRefundDO payRefundDO = payRefundCoreMapper.selectByTradeNoAndMerchantRefundNo(orderExtensionDO.getNo(), req.getMerchantRefundId()); + PayOrderExtensionDO orderExtensionDO = orderExtensionService.getOrderExtension(order.getSuccessExtensionId()); + PayRefundDO payRefundDO = refundMapper.selectByTradeNoAndMerchantRefundNo(orderExtensionDO.getNo(), req.getMerchantRefundId()); if(Objects.nonNull(payRefundDO)){ // 退款订å•å·²ç»æ交过。 //TODO 校验相åŒé€€æ¬¾å•çš„é‡‘é¢ // TODO @jason:咱è¦ä¸å°è£…一个 ObjectUtils.equalsAny if (Objects.equals(PayRefundStatusEnum.SUCCESS.getStatus(), payRefundDO.getStatus()) - || Objects.equals(PayRefundStatusEnum.CLOSE.getStatus(), payRefundDO.getStatus())) { + || Objects.equals(PayRefundStatusEnum.CLOSE.getStatus(), payRefundDO.getStatus())) { //å·²æˆåŠŸé€€æ¬¾ - throw exception(PAY_REFUND_SUCCEED); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_REFUND_SUCCEED); } //å¯ä»¥é‡å¤æ交,ä¿è¯ é€€æ¬¾è¯·æ±‚å· ä¸€è‡´ï¼Œç”±æ¸ é“ä¿è¯å¹‚ç­‰ - }else { + } else { // æˆåŠŸï¼Œæ’å…¥é€€æ¬¾å• çŠ¶æ€ä¸ºç”Ÿæˆ.没有和渠é“交互 // TODO @jason:æžåˆ° convert 里。一些é¢å¤–的自动,手动 set 下; payRefundDO = PayRefundDO.builder().channelOrderNo(order.getChannelOrderNo()) @@ -122,7 +149,7 @@ public class PayRefundCoreServiceImpl implements PayRefundCoreService { .notifyStatus(PayOrderNotifyStatusEnum.NO.getStatus()) .type(refundType.getStatus()) .build(); - payRefundCoreMapper.insert(payRefundDO); + refundMapper.insert(payRefundDO); } // TODO @jason:æžåˆ° convert 里。一些é¢å¤–的自动,手动 set 下; PayRefundUnifiedReqDTO unifiedReqDTO = new PayRefundUnifiedReqDTO(); @@ -142,18 +169,17 @@ public class PayRefundCoreServiceImpl implements PayRefundCoreService { return PayRefundRespDTO.builder().refundId(payRefundDO.getId()).build(); } - @Override @Transactional(rollbackFor = Exception.class) public void notifyPayRefund(Long channelId, PayNotifyDataDTO notifyData) { log.info("[notifyPayRefund][channelId({}) 回调数æ®({})]", channelId, notifyData.getBody()); // 校验支付渠é“是å¦æœ‰æ•ˆ - PayChannelDO channel = payChannelCoreService.validPayChannel(channelId); + PayChannelDO channel = channelService.validPayChannel(channelId); // 校验支付客户端是å¦æ­£ç¡®åˆå§‹åŒ– PayClient client = payClientFactory.getPayClient(channel.getId()); if (client == null) { log.error("[notifyPayOrder][渠é“ç¼–å·({}) 找ä¸åˆ°å¯¹åº”的支付客户端]", channel.getId()); - throw exception(PAY_CHANNEL_CLIENT_NOT_FOUND); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_CHANNEL_CLIENT_NOT_FOUND); } // 解æžæ¸ é“退款通知数æ®ï¼Œ ç»Ÿä¸€å¤„ç† PayRefundNotifyDTO refundNotify = client.parseRefundNotify(notifyData); @@ -167,14 +193,14 @@ public class PayRefundCoreServiceImpl implements PayRefundCoreService { private void payRefundSuccess(PayRefundNotifyDTO refundNotify) { // 校验退款å•å­˜åœ¨ - PayRefundDO refundDO = payRefundCoreMapper.selectByTradeNoAndMerchantRefundNo(refundNotify.getTradeNo(), refundNotify.getReqNo()); + PayRefundDO refundDO = refundMapper.selectByTradeNoAndMerchantRefundNo(refundNotify.getTradeNo(), refundNotify.getReqNo()); if (refundDO == null) { log.error("[payRefundSuccess][ä¸å­˜åœ¨ seqNo 为{} 的支付退款å•]", refundNotify.getReqNo()); - throw exception(PAY_REFUND_NOT_FOUND); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_REFUND_NOT_FOUND); } // å¾—åˆ°å·²é€€é‡‘é¢ - PayOrderDO payOrderDO = payOrderCoreMapper.selectById(refundDO.getOrderId()); + PayOrderDO payOrderDO = orderService.getOrder(refundDO.getOrderId()); Long refundedAmount = payOrderDO.getRefundAmount(); PayOrderStatusEnum orderStatus = PayOrderStatusEnum.SUCCESS; @@ -189,7 +215,7 @@ public class PayRefundCoreServiceImpl implements PayRefundCoreService { .setStatus(orderStatus.getStatus()) .setRefundTimes(payOrderDO.getRefundTimes() + 1) .setRefundStatus(refundDO.getType()); - payOrderCoreMapper.updateById(updateOrderDO); + orderMapper.updateById(updateOrderDO); // æ›´æ–°é€€æ¬¾è®¢å• PayRefundDO updateRefundDO = new PayRefundDO(); @@ -199,11 +225,11 @@ public class PayRefundCoreServiceImpl implements PayRefundCoreService { .setTradeNo(refundNotify.getTradeNo()) .setNotifyTime(new Date()) .setStatus(PayRefundStatusEnum.SUCCESS.getStatus()); - payRefundCoreMapper.updateById(updateRefundDO); + refundMapper.updateById(updateRefundDO); // æ’入退款通知记录 // TODO 通知商户æˆåŠŸæˆ–者失败. 现在通知似乎没有实现, åªæ˜¯å›žè°ƒ - payNotifyCoreService.createPayNotifyTask(PayNotifyTaskCreateReqDTO.builder() + notifyService.createPayNotifyTask(PayNotifyTaskCreateReqDTO.builder() .type(PayNotifyTypeEnum.REFUND.getType()).dataId(refundDO.getId()).build()); } @@ -215,19 +241,19 @@ public class PayRefundCoreServiceImpl implements PayRefundCoreService { private void validatePayRefund(PayRefundReqDTO req, PayOrderDO order) { // 校验状æ€ï¼Œå¿…é¡»æ˜¯æ”¯ä»˜çŠ¶æ€ if (!PayOrderStatusEnum.SUCCESS.getStatus().equals(order.getStatus())) { - throw exception(PAY_ORDER_STATUS_IS_NOT_SUCCESS); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_ORDER_STATUS_IS_NOT_SUCCESS); } // 是å¦å·²ç»å…¨é¢é€€æ¬¾ if (PayRefundTypeEnum.ALL.getStatus().equals(order.getRefundStatus())) { - throw exception(PAY_REFUND_ALL_REFUNDED); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_REFUND_ALL_REFUNDED); } // æ ¡éªŒé‡‘é¢ é€€æ¬¾é‡‘é¢ä¸èƒ½å¤§äºŽ åŽŸå®šçš„é‡‘é¢ if (req.getAmount() + order.getRefundAmount() > order.getAmount()){ - throw exception(PAY_REFUND_AMOUNT_EXCEED); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_REFUND_AMOUNT_EXCEED); } // 校验渠é“订å•å· if (StrUtil.isEmpty(order.getChannelOrderNo())) { - throw exception(PAY_REFUND_CHN_ORDER_NO_IS_NULL); + throw ServiceExceptionUtil.exception(ErrorCodeConstants.PAY_REFUND_CHN_ORDER_NO_IS_NULL); } //TODO é€€æ¬¾çš„æœŸé™ é€€æ¬¾æ¬¡æ•°çš„æŽ§åˆ¶ } diff --git a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/util/PaySeqUtils.java b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/util/PaySeqUtils.java similarity index 94% rename from yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/util/PaySeqUtils.java rename to yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/util/PaySeqUtils.java index 959cef746..e6409e960 100644 --- a/yudao-core-service/src/main/java/cn/iocoder/yudao/coreservice/modules/pay/util/PaySeqUtils.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/main/java/cn/iocoder/yudao/module/pay/util/PaySeqUtils.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.coreservice.modules.pay.util; +package cn.iocoder.yudao.module.pay.util; import cn.hutool.core.date.DatePattern; import cn.hutool.core.date.DateUtil; @@ -10,6 +10,7 @@ import java.util.concurrent.atomic.AtomicLong; /** * 支付相关编å·çš„生产 */ +// TODO @jason:需è¦æ”¹é€ ï¼ŒåŸºäºŽ dbï¼› public class PaySeqUtils { private static final AtomicLong REFUND_REQ_NO_SEQ = new AtomicLong(0L); @@ -47,4 +48,5 @@ public class PaySeqUtils { DateUtil.format(new Date(), DatePattern.PURE_DATETIME_MS_PATTERN), (int) MER_ORDER_NO_SEQ.getAndIncrement() % 10000); } + } diff --git a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/app/PayAppServiceTest.java b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppServiceTest.java similarity index 90% rename from yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/app/PayAppServiceTest.java rename to yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppServiceTest.java index 7dee06402..0939ade8b 100644 --- a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/app/PayAppServiceTest.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppServiceTest.java @@ -1,18 +1,17 @@ -package cn.iocoder.yudao.adminserver.modules.pay.service.app; +package cn.iocoder.yudao.module.pay.service.merchant; import cn.hutool.core.util.RandomUtil; -import cn.iocoder.yudao.adminserver.BaseDbUnitTest; -import cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo.PayAppCreateReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo.PayAppExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo.PayAppPageReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.app.vo.PayAppUpdateReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.app.PayAppMapper; -import cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.merchant.PayMerchantMapper; -import cn.iocoder.yudao.adminserver.modules.pay.service.app.impl.PayAppServiceImpl; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppPageReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppUpdateReqVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayAppMapper; +import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayMerchantMapper; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.pay.test.BaseDbUnitTest; import org.junit.jupiter.api.Test; import org.mockito.Mockito; import org.springframework.boot.test.mock.mockito.MockBean; @@ -22,13 +21,13 @@ import javax.annotation.Resource; import java.util.Collections; import java.util.List; -import static cn.iocoder.yudao.coreservice.modules.pay.enums.PayErrorCodeCoreConstants.PAY_APP_NOT_FOUND; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; +import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*; import static org.junit.jupiter.api.Assertions.*; /** diff --git a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/channel/PayChannelServiceTest.java b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelServiceTest.java similarity index 93% rename from yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/channel/PayChannelServiceTest.java rename to yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelServiceTest.java index b8d2bc917..6397bb413 100644 --- a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/channel/PayChannelServiceTest.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelServiceTest.java @@ -1,18 +1,17 @@ -package cn.iocoder.yudao.adminserver.modules.pay.service.channel; +package cn.iocoder.yudao.module.pay.service.merchant; -import cn.iocoder.yudao.adminserver.BaseDbUnitTest; -import cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo.PayChannelCreateReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo.PayChannelExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo.PayChannelPageReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.channel.vo.PayChannelUpdateReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.channel.PayChannelMapper; -import cn.iocoder.yudao.adminserver.modules.pay.service.channel.impl.PayChannelServiceImpl; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayChannelDO; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.pay.core.client.impl.alipay.AlipayPayClientConfig; import cn.iocoder.yudao.framework.pay.core.client.impl.wx.WXPayClientConfig; import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelPageReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelUpdateReqVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; +import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayChannelMapper; +import cn.iocoder.yudao.module.pay.test.BaseDbUnitTest; import com.alibaba.fastjson.JSON; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Import; @@ -20,24 +19,16 @@ import org.springframework.context.annotation.Import; import javax.annotation.Resource; import java.util.List; -import static cn.iocoder.yudao.coreservice.modules.pay.enums.PayErrorCodeCoreConstants.CHANNEL_NOT_EXISTS; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; +import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.CHANNEL_NOT_EXISTS; import static org.junit.jupiter.api.Assertions.*; -/** - * {@link PayChannelServiceImpl} çš„å•å…ƒæµ‹è¯•ç±» - * - * @author 芋艿 - */ -@Import({ - PayChannelServiceImpl.class, - PayChannelConfig.class -}) +@Import({PayChannelServiceImpl.class}) public class PayChannelServiceTest extends BaseDbUnitTest { @Resource @@ -66,7 +57,6 @@ public class PayChannelServiceTest extends BaseDbUnitTest { assertPojoEquals(reqVO, channel, "config"); // 关于config 对象应该拿出æ¥é‡æ–°å¯¹æ¯” assertPojoEquals(v2Config, channel.getConfig()); - } @Test @@ -350,7 +340,6 @@ public class PayChannelServiceTest extends BaseDbUnitTest { assertPojoEquals(payClientConfig, list.get(0).getConfig()); } - public WXPayClientConfig getV2Config() { return new WXPayClientConfig() .setAppId("APP00001") @@ -400,5 +389,4 @@ public class PayChannelServiceTest extends BaseDbUnitTest { .setRootCertContent("13321321321dsad"); } - } diff --git a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/merchant/PayMerchantServiceTest.java b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantServiceTest.java similarity index 89% rename from yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/merchant/PayMerchantServiceTest.java rename to yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantServiceTest.java index 0e7cf135d..08d097083 100644 --- a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/merchant/PayMerchantServiceTest.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantServiceTest.java @@ -1,29 +1,28 @@ -package cn.iocoder.yudao.adminserver.modules.pay.service.merchant; +package cn.iocoder.yudao.module.pay.service.merchant; import cn.hutool.core.util.RandomUtil; -import cn.iocoder.yudao.adminserver.BaseDbUnitTest; -import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.PayMerchantCreateReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.PayMerchantExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.PayMerchantPageReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.merchant.vo.PayMerchantUpdateReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.merchant.PayMerchantMapper; -import cn.iocoder.yudao.adminserver.modules.pay.service.merchant.impl.PayMerchantServiceImpl; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantPageReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantUpdateReqVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayMerchantMapper; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.pay.test.BaseDbUnitTest; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Import; import javax.annotation.Resource; import java.util.List; -import static cn.iocoder.yudao.coreservice.modules.pay.enums.PayErrorCodeCoreConstants.PAY_MERCHANT_NOT_EXISTS; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.buildTime; import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; +import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*; import static org.junit.jupiter.api.Assertions.*; /** diff --git a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/PayOrderServiceTest.java b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceTest.java similarity index 91% rename from yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/PayOrderServiceTest.java rename to yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceTest.java index 85b00a2d0..e3ac7394c 100755 --- a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/order/PayOrderServiceTest.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceTest.java @@ -1,19 +1,18 @@ -package cn.iocoder.yudao.adminserver.modules.pay.service.order; +package cn.iocoder.yudao.module.pay.service.order; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.RandomUtil; -import cn.iocoder.yudao.adminserver.BaseDbUnitTest; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order.PayOrderExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.order.PayOrderPageReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.order.PayOrderMapper; -import cn.iocoder.yudao.adminserver.modules.pay.service.order.impl.PayOrderServiceImpl; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayOrderDO; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayOrderNotifyStatusEnum; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayOrderStatusEnum; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayRefundTypeEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderPageReqVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; +import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderMapper; +import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum; +import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; +import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum; +import cn.iocoder.yudao.module.pay.test.BaseDbUnitTest; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Import; diff --git a/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/package-info.java b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/package-info.java new file mode 100644 index 000000000..2cad91eba --- /dev/null +++ b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/package-info.java @@ -0,0 +1 @@ +package cn.iocoder.yudao.module.pay.service; diff --git a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/refund/PayRefundServiceTest.java b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceTest.java similarity index 90% rename from yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/refund/PayRefundServiceTest.java rename to yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceTest.java index ee19dba14..1d9173217 100755 --- a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/modules/pay/service/refund/PayRefundServiceTest.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceTest.java @@ -1,17 +1,16 @@ -package cn.iocoder.yudao.adminserver.modules.pay.service.refund; +package cn.iocoder.yudao.module.pay.service.refund; -import cn.iocoder.yudao.adminserver.BaseDbUnitTest; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo.PayRefundExportReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.controller.order.vo.refund.vo.PayRefundPageReqVO; -import cn.iocoder.yudao.adminserver.modules.pay.dal.mysql.order.PayRefundMapper; -import cn.iocoder.yudao.adminserver.modules.pay.service.order.impl.PayRefundServiceImpl; -import cn.iocoder.yudao.coreservice.modules.pay.dal.dataobject.order.PayRefundDO; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayOrderNotifyStatusEnum; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayRefundStatusEnum; -import cn.iocoder.yudao.coreservice.modules.pay.enums.order.PayRefundTypeEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.date.DateUtils; import cn.iocoder.yudao.framework.pay.core.enums.PayChannelEnum; +import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundExportReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundPageReqVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; +import cn.iocoder.yudao.module.pay.dal.mysql.refund.PayRefundMapper; +import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum; +import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum; +import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum; +import cn.iocoder.yudao.module.pay.test.BaseDbUnitTest; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Import; diff --git a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseDbAndRedisUnitTest.java b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/test/BaseDbAndRedisUnitTest.java similarity index 95% rename from yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseDbAndRedisUnitTest.java rename to yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/test/BaseDbAndRedisUnitTest.java index 2cc60cc30..1c6d3278d 100644 --- a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseDbAndRedisUnitTest.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/test/BaseDbAndRedisUnitTest.java @@ -1,9 +1,8 @@ -package cn.iocoder.yudao.adminserver; +package cn.iocoder.yudao.module.pay.test; -import cn.iocoder.yudao.adminserver.config.RedisTestConfiguration; -import cn.iocoder.yudao.framework.redis.config.YudaoRedisAutoConfiguration; import cn.iocoder.yudao.framework.datasource.config.YudaoDataSourceAutoConfiguration; import cn.iocoder.yudao.framework.mybatis.config.YudaoMybatisAutoConfiguration; +import cn.iocoder.yudao.framework.redis.config.YudaoRedisAutoConfiguration; import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure; import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration; import org.redisson.spring.starter.RedissonAutoConfiguration; diff --git a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseDbUnitTest.java b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/test/BaseDbUnitTest.java similarity index 97% rename from yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseDbUnitTest.java rename to yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/test/BaseDbUnitTest.java index 5f7daeded..27affbfc6 100644 --- a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseDbUnitTest.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/test/BaseDbUnitTest.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver; +package cn.iocoder.yudao.module.pay.test; import cn.iocoder.yudao.framework.datasource.config.YudaoDataSourceAutoConfiguration; import cn.iocoder.yudao.framework.mybatis.config.YudaoMybatisAutoConfiguration; diff --git a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseRedisUnitTest.java b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/test/BaseRedisUnitTest.java similarity index 86% rename from yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseRedisUnitTest.java rename to yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/test/BaseRedisUnitTest.java index 7e650bc3e..11933c9fd 100644 --- a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/BaseRedisUnitTest.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/test/BaseRedisUnitTest.java @@ -1,8 +1,6 @@ -package cn.iocoder.yudao.adminserver; +package cn.iocoder.yudao.module.pay.test; -import cn.iocoder.yudao.adminserver.config.RedisTestConfiguration; import cn.iocoder.yudao.framework.redis.config.YudaoRedisAutoConfiguration; -import cn.iocoder.yudao.framework.tracer.config.YudaoTracerAutoConfiguration; import org.redisson.spring.starter.RedissonAutoConfiguration; import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; diff --git a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/config/RedisTestConfiguration.java b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/test/RedisTestConfiguration.java similarity index 96% rename from yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/config/RedisTestConfiguration.java rename to yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/test/RedisTestConfiguration.java index 15a39f757..c8742129a 100644 --- a/yudao-admin-server/src/test/java/cn/iocoder/yudao/adminserver/config/RedisTestConfiguration.java +++ b/yudao-module-pay/yudao-module-pay-impl/src/test/java/cn/iocoder/yudao/module/pay/test/RedisTestConfiguration.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.adminserver.config; +package cn.iocoder.yudao.module.pay.test; import com.github.fppt.jedismock.RedisServer; import org.springframework.boot.autoconfigure.data.redis.RedisProperties; diff --git a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/DictTypeConstants.java b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/DictTypeConstants.java index 9b73264e1..ab6d1b3a2 100644 --- a/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/DictTypeConstants.java +++ b/yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/DictTypeConstants.java @@ -20,31 +20,6 @@ public interface DictTypeConstants { String SMS_SEND_STATUS = "sys_sms_send_status"; // 短信å‘é€çŠ¶æ€ String SMS_RECEIVE_STATUS = "sys_sms_receive_status"; // çŸ­ä¿¡æŽ¥æ”¶çŠ¶æ€ - /** - * 支付-订å•-订å•çŠ¶æ€ - */ - String PAY_ORDER_STATUS = "pay_order_status"; - - /** - * 支付-订å•-订å•å›žè°ƒå•†æˆ·çŠ¶æ€ - */ - String PAY_ORDER_NOTIFY_STATUS = "pay_order_notify_status"; - - /** - * 支付-订å•-订å•é€€æ¬¾çŠ¶æ€ - */ - String PAY_ORDER_REFUND_STATUS = "pay_order_refund_status"; - - /** - * 支付-退款订å•-é€€æ¬¾çŠ¶æ€ - */ - String PAY_REFUND_ORDER_STATUS = "pay_refund_order_status"; - - /** - * 支付-退款订å•-退款类别 - */ - String PAY_REFUND_ORDER_TYPE = "pay_refund_order_type"; - String BPM_TASK_ASSIGN_RULE_TYPE = "bpm_task_assign_rule_type"; // 任务分é…规则类型 String BPM_TASK_ASSIGN_SCRIPT = "bpm_task_assign_script"; // 任务分é…自定义脚本 diff --git a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/convert/order/PayRefundConvert.java b/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/convert/order/PayRefundConvert.java deleted file mode 100644 index 999a3ba56..000000000 --- a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/convert/order/PayRefundConvert.java +++ /dev/null @@ -1,23 +0,0 @@ -package cn.iocoder.yudao.userserver.modules.pay.convert.order; - -import cn.iocoder.yudao.coreservice.modules.pay.service.order.dto.PayRefundReqDTO; -import cn.iocoder.yudao.coreservice.modules.pay.service.order.dto.PayRefundRespDTO; -import cn.iocoder.yudao.userserver.modules.pay.controller.order.vo.PayRefundReqVO; -import cn.iocoder.yudao.userserver.modules.pay.controller.order.vo.PayRefundRespVO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -/** - * 支付退款 Convert - * - * @author jason - */ -@Mapper -public interface PayRefundConvert { - - PayRefundConvert INSTANCE = Mappers.getMapper(PayRefundConvert.class); - - PayRefundReqDTO convert(PayRefundReqVO reqVO); - - PayRefundRespVO convert(PayRefundRespDTO req); -} diff --git a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/convert/ã€ŠèŠ‹é“ Spring Boot å¯¹è±¡è½¬æ¢ MapStruct 入门》.md b/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/convert/ã€ŠèŠ‹é“ Spring Boot å¯¹è±¡è½¬æ¢ MapStruct 入门》.md deleted file mode 100644 index 8153487b7..000000000 --- a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/convert/ã€ŠèŠ‹é“ Spring Boot å¯¹è±¡è½¬æ¢ MapStruct 入门》.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/package-info.java b/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/package-info.java deleted file mode 100644 index 1aa11cdd2..000000000 --- a/yudao-user-server/src/main/java/cn/iocoder/yudao/userserver/modules/pay/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/** - * pay 包下,我们放支付业务,æ供业务的支付能力。 - * 例如说:商户ã€åº”用ã€æ”¯ä»˜ã€é€€æ¬¾ç­‰ç­‰ - * - * 缩写:pay - */ -package cn.iocoder.yudao.userserver.modules.pay;