Browse Source

1、退款功能补充

master
Aug 2 weeks ago
parent
commit
551f464b56
41 changed files with 2373 additions and 50 deletions
  1. +13
    -0
      .idea/libraries/Maven__com_github_wechatpay_apiv3_wechatpay_java_0_2_15.xml
  2. +13
    -0
      .idea/libraries/Maven__com_github_wechatpay_apiv3_wechatpay_java_core_0_2_15.xml
  3. +185
    -45
      .idea/workspace.xml
  4. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/controller/MassageOrderController.java
  5. +5
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/entity/MassageOrder.java
  6. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/mapper/MassageOrderMapper.java
  7. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/service/IMassageOrderService.java
  8. +1
    -1
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/service/impl/MassageOrderServiceImpl.java
  9. +6
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/vue/MassageOrderList.vue
  10. +5
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/vue/modules/MassageOrderForm.vue
  11. +10
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/vue3/MassageOrder.data.ts
  12. +171
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/controller/MassageRefoundLogController.java
  13. +71
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/entity/MassageRefoundLog.java
  14. +17
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/mapper/MassageRefoundLogMapper.java
  15. +5
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/mapper/xml/MassageRefoundLogMapper.xml
  16. +14
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/service/IMassageRefoundLogService.java
  17. +19
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/service/impl/MassageRefoundLogServiceImpl.java
  18. +196
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue/MassageRefoundLogList.vue
  19. +124
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue/modules/MassageRefoundLogForm.vue
  20. +84
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue/modules/MassageRefoundLogModal.Style#Drawer.vue
  21. +60
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue/modules/MassageRefoundLogModal.vue
  22. +61
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue3/MassageRefoundLog.api.ts
  23. +69
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue3/MassageRefoundLog.data.ts
  24. +162
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue3/MassageRefoundLogList.vue
  25. +58
    -0
      jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue3/components/MassageRefoundLogModal.vue
  26. +2
    -0
      jeecg-boot-module-system/jeecg-boot-module-system.iml
  27. +7
    -0
      jeecg-boot-module-system/pom.xml
  28. +61
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/massageController/RefoundController.java
  29. +29
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/WxMiniappPayService.java
  30. +422
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/WxMiniappPayServiceImpl.java
  31. +8
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/CreateOrderReq.java
  32. +47
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/HttpServletUtils.java
  33. +31
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/PayOrderInfo.java
  34. +23
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/QueryOrderReq.java
  35. +36
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/RefundOrderReq.java
  36. +164
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/Response.java
  37. +113
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/WxPayAutoCertificateConfig.java
  38. +13
    -0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/WxPayConfig.java
  39. +28
    -0
      jeecg-boot-module-system/src/main/resources/apiclient_key.pem
  40. +28
    -0
      jeecg-boot-module-system/src/main/resources/application-dev.yml
  41. +9
    -0
      jeecg-boot-module-system/src/main/resources/pub_key.pem

+ 13
- 0
.idea/libraries/Maven__com_github_wechatpay_apiv3_wechatpay_java_0_2_15.xml View File

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Maven: com.github.wechatpay-apiv3:wechatpay-java:0.2.15">
<CLASSES>
<root url="jar://D:/Softwares/Environments/Maven/apache-maven-3.6.1/Repository/com/github/wechatpay-apiv3/wechatpay-java/0.2.15/wechatpay-java-0.2.15.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://D:/Softwares/Environments/Maven/apache-maven-3.6.1/Repository/com/github/wechatpay-apiv3/wechatpay-java/0.2.15/wechatpay-java-0.2.15-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://D:/Softwares/Environments/Maven/apache-maven-3.6.1/Repository/com/github/wechatpay-apiv3/wechatpay-java/0.2.15/wechatpay-java-0.2.15-sources.jar!/" />
</SOURCES>
</library>
</component>

+ 13
- 0
.idea/libraries/Maven__com_github_wechatpay_apiv3_wechatpay_java_core_0_2_15.xml View File

@ -0,0 +1,13 @@
<component name="libraryTable">
<library name="Maven: com.github.wechatpay-apiv3:wechatpay-java-core:0.2.15">
<CLASSES>
<root url="jar://D:/Softwares/Environments/Maven/apache-maven-3.6.1/Repository/com/github/wechatpay-apiv3/wechatpay-java-core/0.2.15/wechatpay-java-core-0.2.15.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://D:/Softwares/Environments/Maven/apache-maven-3.6.1/Repository/com/github/wechatpay-apiv3/wechatpay-java-core/0.2.15/wechatpay-java-core-0.2.15-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://D:/Softwares/Environments/Maven/apache-maven-3.6.1/Repository/com/github/wechatpay-apiv3/wechatpay-java-core/0.2.15/wechatpay-java-core-0.2.15-sources.jar!/" />
</SOURCES>
</library>
</component>

+ 185
- 45
.idea/workspace.xml View File

@ -1,9 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="8b88b979-c3fa-4858-8fa6-d3a5d334cf69" name="Default Changelist" comment="优惠券列表接口调整">
<list default="true" id="8b88b979-c3fa-4858-8fa6-d3a5d334cf69" name="Default Changelist" comment="1、">
<change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__com_github_wechatpay_apiv3_wechatpay_java_0_2_15.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__com_github_wechatpay_apiv3_wechatpay_java_core_0_2_15.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/admin-hanhai-vue/dist.zip" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/controller/MassageRefoundLogController.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/entity/MassageRefoundLog.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/mapper/MassageRefoundLogMapper.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/mapper/xml/MassageRefoundLogMapper.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/service/IMassageRefoundLogService.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/service/impl/MassageRefoundLogServiceImpl.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue/MassageRefoundLogList.vue" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue/modules/MassageRefoundLogForm.vue" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue/modules/MassageRefoundLogModal.Style#Drawer.vue" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue/modules/MassageRefoundLogModal.vue" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue3/MassageRefoundLog.api.ts" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue3/MassageRefoundLog.data.ts" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue3/MassageRefoundLogList.vue" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue3/components/MassageRefoundLogModal.vue" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/massageController/RefoundController.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/WxMiniappPayService.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/WxMiniappPayServiceImpl.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/CreateOrderReq.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/HttpServletUtils.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/PayOrderInfo.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/QueryOrderReq.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/RefundOrderReq.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/Response.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/WxPayAutoCertificateConfig.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/WxPayConfig.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-module-system/src/main/resources/apiclient_key.pem" afterDir="false" />
<change afterPath="$PROJECT_DIR$/jeecg-boot-module-system/src/main/resources/pub_key.pem" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/admin-hanhai-vue/.env.development" beforeDir="false" afterPath="$PROJECT_DIR$/admin-hanhai-vue/.env.development" afterDir="false" />
<change beforePath="$PROJECT_DIR$/admin-hanhai-vue/.env.production" beforeDir="false" afterPath="$PROJECT_DIR$/admin-hanhai-vue/.env.production" afterDir="false" />
<change beforePath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/controller/MassageOrderController.java" beforeDir="false" afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/controller/MassageOrderController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/entity/MassageOrder.java" beforeDir="false" afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/entity/MassageOrder.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/mapper/MassageOrderMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/mapper/MassageOrderMapper.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/service/IMassageOrderService.java" beforeDir="false" afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/service/IMassageOrderService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/service/impl/MassageOrderServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/service/impl/MassageOrderServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/vue/MassageOrderList.vue" beforeDir="false" afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/vue/MassageOrderList.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/vue/modules/MassageOrderForm.vue" beforeDir="false" afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/vue/modules/MassageOrderForm.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/vue3/MassageOrder.data.ts" beforeDir="false" afterPath="$PROJECT_DIR$/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/vue3/MassageOrder.data.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/jeecg-boot-module-system/jeecg-boot-module-system.iml" beforeDir="false" afterPath="$PROJECT_DIR$/jeecg-boot-module-system/jeecg-boot-module-system.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/jeecg-boot-module-system/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/jeecg-boot-module-system/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/UserInfoServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/UserInfoServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/jeecg-boot-module-system/src/main/resources/application-dev.yml" beforeDir="false" afterPath="$PROJECT_DIR$/jeecg-boot-module-system/src/main/resources/application-dev.yml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@ -56,7 +98,7 @@
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../.." />
<property name="last_opened_file_path" value="$PROJECT_DIR$/jeecg-boot-module-system/src/main/resources" />
<property name="nodejs_package_manager_path" value="yarn" />
<property name="project.structure.last.edited" value="Project" />
<property name="project.structure.proportion" value="0.0" />
@ -68,12 +110,19 @@
</component>
<component name="RecentsManager">
<key name="CopyClassDialog.RECENTS_KEY">
<recent name="org.jeecg.modules.apiBean" />
<recent name="org.jeecg.modules.apiService" />
<recent name="org.jeecg.modules.api.massageController" />
<recent name="org.jeecg.modules.apiBean" />
<recent name="org.jeecg.modules.apiService.impl" />
</key>
<key name="CopyFile.RECENT_KEYS">
<recent name="D:\Projects\massage\massage-admin\jeecg-boot-module-system\src\main\resources" />
<recent name="D:\Projects\massage\massage-admin\jeecg-boot-module-system\src\main\resources\templates" />
<recent name="D:\Projects\massage\massage-admin\jeecg-boot-module-system\src\main\java\org\jeecg\modules" />
<recent name="D:\Projects\massage\massage-admin\han-hai-module-pay\src\main\resources" />
</key>
</component>
<component name="RunManager" selected="Spring Boot.JeecgSystemApplication">
<component name="RunManager" selected="Application.CommonUtils">
<configuration name="CommonUtils" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="ALTERNATIVE_JRE_PATH" value="1.8" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
@ -191,7 +240,10 @@
<workItem from="1741573016746" duration="4323000" />
<workItem from="1741580646045" duration="5038000" />
<workItem from="1741852577555" duration="74613000" />
<workItem from="1744268260382" duration="6123000" />
<workItem from="1744268260382" duration="15845000" />
<workItem from="1746000753098" duration="13433000" />
<workItem from="1746752649258" duration="24956000" />
<workItem from="1747350180318" duration="76266000" />
</task>
<task id="LOCAL-00001" summary="1、项目初始化">
<created>1741919155045</created>
@ -284,7 +336,70 @@
<option name="project" value="LOCAL" />
<updated>1743674700893</updated>
</task>
<option name="localTasksCounter" value="14" />
<task id="LOCAL-00014" summary="1、更换技术参数">
<created>1745658480340</created>
<option name="number" value="00014" />
<option name="presentableId" value="LOCAL-00014" />
<option name="project" value="LOCAL" />
<updated>1745658480340</updated>
</task>
<task id="LOCAL-00015" summary="1、支付参数修改">
<created>1745924917363</created>
<option name="number" value="00015" />
<option name="presentableId" value="LOCAL-00015" />
<option name="project" value="LOCAL" />
<updated>1745924917363</updated>
</task>
<task id="LOCAL-00016" summary="1、微信支付参数修改">
<created>1746374418272</created>
<option name="number" value="00016" />
<option name="presentableId" value="LOCAL-00016" />
<option name="project" value="LOCAL" />
<updated>1746374418272</updated>
</task>
<task id="LOCAL-00017" summary="1、商家信息模块调整">
<created>1746374539012</created>
<option name="number" value="00017" />
<option name="presentableId" value="LOCAL-00017" />
<option name="project" value="LOCAL" />
<updated>1746374539012</updated>
</task>
<task id="LOCAL-00018" summary="1、支付模块修复">
<created>1746964474717</created>
<option name="number" value="00018" />
<option name="presentableId" value="LOCAL-00018" />
<option name="project" value="LOCAL" />
<updated>1746964474717</updated>
</task>
<task id="LOCAL-00019" summary="1、bug修复">
<created>1747481841675</created>
<option name="number" value="00019" />
<option name="presentableId" value="LOCAL-00019" />
<option name="project" value="LOCAL" />
<updated>1747481841675</updated>
</task>
<task id="LOCAL-00020" summary="1、bug修复">
<created>1747564827951</created>
<option name="number" value="00020" />
<option name="presentableId" value="LOCAL-00020" />
<option name="project" value="LOCAL" />
<updated>1747564827951</updated>
</task>
<task id="LOCAL-00021" summary="1、bug修复">
<created>1747624880660</created>
<option name="number" value="00021" />
<option name="presentableId" value="LOCAL-00021" />
<option name="project" value="LOCAL" />
<updated>1747624880660</updated>
</task>
<task id="LOCAL-00022" summary="1、基础数据bug修复">
<created>1747651365497</created>
<option name="number" value="00022" />
<option name="presentableId" value="LOCAL-00022" />
<option name="project" value="LOCAL" />
<updated>1747651365497</updated>
</task>
<option name="localTasksCounter" value="23" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@ -318,17 +433,28 @@
<MESSAGE value="优惠券列表接口调整" />
<MESSAGE value="1、用户表新增字段:是否商家" />
<MESSAGE value="1、订单模块修改" />
<option name="LAST_COMMIT_MESSAGE" value="1、订单模块修改" />
<MESSAGE value="1、更换技术参数" />
<MESSAGE value="1、支付参数修改" />
<MESSAGE value="1、微信支付参数修改" />
<MESSAGE value="1、商家信息模块调整" />
<MESSAGE value="1、支付模块修复" />
<MESSAGE value="1、bug修复" />
<MESSAGE value="1、基础数据bug修复" />
<option name="LAST_COMMIT_MESSAGE" value="1、基础数据bug修复" />
</component>
<component name="WindowStateProjectService">
<state x="734" y="358" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1743581020633">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="734" y="358" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1743581020633" />
<state x="1085" y="408" key="#com.intellij.ide.util.MemberChooser" timestamp="1742378026634">
<state x="991" y="508" key="#com.intellij.fileTypes.FileTypeChooser" timestamp="1747709307430">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="1085" y="408" key="#com.intellij.ide.util.MemberChooser/0.0.2560.1400@0.0.2560.1400" timestamp="1742378026634" />
<state x="991" y="508" key="#com.intellij.fileTypes.FileTypeChooser/0.0.2560.1400@0.0.2560.1400" timestamp="1747709307430" />
<state x="1085" y="408" key="#com.intellij.ide.util.MemberChooser" timestamp="1747362074359">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="1085" y="408" key="#com.intellij.ide.util.MemberChooser/0.0.2560.1400@0.0.2560.1400" timestamp="1747362074359" />
<state x="1033" y="0" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog" timestamp="1742351128151">
<screen x="0" y="0" width="2560" height="1400" />
</state>
@ -337,74 +463,78 @@
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="1010" y="449" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1741587414527" />
<state x="679" y="297" key="CommitChangelistDialog2" timestamp="1743674700028">
<state x="679" y="297" key="CommitChangelistDialog2" timestamp="1747796047643">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="679" y="297" key="CommitChangelistDialog2/0.0.2560.1400@0.0.2560.1400" timestamp="1747796047643" />
<state x="92" y="92" width="2376" height="1216" key="DiffContextDialog" timestamp="1747796045011">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="679" y="297" key="CommitChangelistDialog2/0.0.2560.1400@0.0.2560.1400" timestamp="1743674700028" />
<state x="92" y="92" width="2376" height="1216" key="DiffContextDialog" timestamp="1743674688479">
<state x="92" y="92" width="2376" height="1216" key="DiffContextDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1747796045011" />
<state x="1060" y="458" key="FileChooserDialogImpl" timestamp="1747551674976">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="92" y="92" width="2376" height="1216" key="DiffContextDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1743674688479" />
<state x="1060" y="458" key="FileChooserDialogImpl" timestamp="1743043710794">
<state x="1060" y="458" key="FileChooserDialogImpl/0.0.2560.1400@0.0.2560.1400" timestamp="1747551674976" />
<state width="2517" height="388" key="GridCell.Tab.0.bottom" timestamp="1747808992777">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="1060" y="458" key="FileChooserDialogImpl/0.0.2560.1400@0.0.2560.1400" timestamp="1743043710794" />
<state width="2517" height="388" key="GridCell.Tab.0.bottom" timestamp="1745658342152">
<state width="2517" height="388" key="GridCell.Tab.0.bottom/0.0.2560.1400@0.0.2560.1400" timestamp="1747808992777" />
<state width="2517" height="388" key="GridCell.Tab.0.center" timestamp="1747808992777">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="388" key="GridCell.Tab.0.bottom/0.0.2560.1400@0.0.2560.1400" timestamp="1745658342152" />
<state width="2517" height="388" key="GridCell.Tab.0.center" timestamp="1745658342152">
<state width="2517" height="388" key="GridCell.Tab.0.center/0.0.2560.1400@0.0.2560.1400" timestamp="1747808992777" />
<state width="2517" height="388" key="GridCell.Tab.0.left" timestamp="1747808992777">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="388" key="GridCell.Tab.0.center/0.0.2560.1400@0.0.2560.1400" timestamp="1745658342152" />
<state width="2517" height="388" key="GridCell.Tab.0.left" timestamp="1745658342152">
<state width="2517" height="388" key="GridCell.Tab.0.left/0.0.2560.1400@0.0.2560.1400" timestamp="1747808992777" />
<state width="2517" height="388" key="GridCell.Tab.0.right" timestamp="1747808992777">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="388" key="GridCell.Tab.0.left/0.0.2560.1400@0.0.2560.1400" timestamp="1745658342152" />
<state width="2517" height="388" key="GridCell.Tab.0.right" timestamp="1745658342152">
<state width="2517" height="388" key="GridCell.Tab.0.right/0.0.2560.1400@0.0.2560.1400" timestamp="1747808992777" />
<state width="2517" height="388" key="GridCell.Tab.1.bottom" timestamp="1747808992698">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="388" key="GridCell.Tab.0.right/0.0.2560.1400@0.0.2560.1400" timestamp="1745658342152" />
<state width="2517" height="388" key="GridCell.Tab.1.bottom" timestamp="1745658342071">
<state width="2517" height="388" key="GridCell.Tab.1.bottom/0.0.2560.1400@0.0.2560.1400" timestamp="1747808992698" />
<state width="2517" height="388" key="GridCell.Tab.1.center" timestamp="1747808992698">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="388" key="GridCell.Tab.1.bottom/0.0.2560.1400@0.0.2560.1400" timestamp="1745658342071" />
<state width="2517" height="388" key="GridCell.Tab.1.center" timestamp="1745658342071">
<state width="2517" height="388" key="GridCell.Tab.1.center/0.0.2560.1400@0.0.2560.1400" timestamp="1747808992698" />
<state width="2517" height="388" key="GridCell.Tab.1.left" timestamp="1747808992698">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="388" key="GridCell.Tab.1.center/0.0.2560.1400@0.0.2560.1400" timestamp="1745658342071" />
<state width="2517" height="388" key="GridCell.Tab.1.left" timestamp="1745658342071">
<state width="2517" height="388" key="GridCell.Tab.1.left/0.0.2560.1400@0.0.2560.1400" timestamp="1747808992698" />
<state width="2517" height="388" key="GridCell.Tab.1.right" timestamp="1747808992698">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="388" key="GridCell.Tab.1.left/0.0.2560.1400@0.0.2560.1400" timestamp="1745658342071" />
<state width="2517" height="388" key="GridCell.Tab.1.right" timestamp="1745658342071">
<state width="2517" height="388" key="GridCell.Tab.1.right/0.0.2560.1400@0.0.2560.1400" timestamp="1747808992698" />
<state width="2517" height="388" key="GridCell.Tab.2.bottom" timestamp="1747808992698">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="388" key="GridCell.Tab.1.right/0.0.2560.1400@0.0.2560.1400" timestamp="1745658342071" />
<state width="2517" height="388" key="GridCell.Tab.2.bottom" timestamp="1743674795181">
<state width="2517" height="388" key="GridCell.Tab.2.bottom/0.0.2560.1400@0.0.2560.1400" timestamp="1747808992698" />
<state width="2517" height="388" key="GridCell.Tab.2.center" timestamp="1747808992698">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="388" key="GridCell.Tab.2.bottom/0.0.2560.1400@0.0.2560.1400" timestamp="1743674795181" />
<state width="2517" height="388" key="GridCell.Tab.2.center" timestamp="1743674795181">
<state width="2517" height="388" key="GridCell.Tab.2.center/0.0.2560.1400@0.0.2560.1400" timestamp="1747808992698" />
<state width="2517" height="388" key="GridCell.Tab.2.left" timestamp="1747808992698">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="388" key="GridCell.Tab.2.center/0.0.2560.1400@0.0.2560.1400" timestamp="1743674795181" />
<state width="2517" height="388" key="GridCell.Tab.2.left" timestamp="1743674795181">
<state width="2517" height="388" key="GridCell.Tab.2.left/0.0.2560.1400@0.0.2560.1400" timestamp="1747808992698" />
<state width="2517" height="388" key="GridCell.Tab.2.right" timestamp="1747808992698">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="388" key="GridCell.Tab.2.left/0.0.2560.1400@0.0.2560.1400" timestamp="1743674795181" />
<state width="2517" height="388" key="GridCell.Tab.2.right" timestamp="1743674795181">
<state width="2517" height="388" key="GridCell.Tab.2.right/0.0.2560.1400@0.0.2560.1400" timestamp="1747808992698" />
<state x="903" y="413" key="RollbackChangesDialog" timestamp="1747651622845">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state width="2517" height="388" key="GridCell.Tab.2.right/0.0.2560.1400@0.0.2560.1400" timestamp="1743674795181" />
<state x="903" y="413" key="RollbackChangesDialog/0.0.2560.1400@0.0.2560.1400" timestamp="1747651622845" />
<state x="783" y="345" key="SettingsEditor" timestamp="1741573035388">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="783" y="345" key="SettingsEditor/0.0.2560.1400@0.0.2560.1400" timestamp="1741573035388" />
<state x="872" y="436" key="Vcs.Push.Dialog.v2" timestamp="1743674705512">
<state x="872" y="436" key="Vcs.Push.Dialog.v2" timestamp="1747651367913">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="872" y="436" key="Vcs.Push.Dialog.v2/0.0.2560.1400@0.0.2560.1400" timestamp="1743674705512" />
<state x="872" y="436" key="Vcs.Push.Dialog.v2/0.0.2560.1400@0.0.2560.1400" timestamp="1747651367913" />
<state x="972" y="527" key="com.intellij.ide.util.TipDialog" timestamp="1741580728988">
<screen x="0" y="0" width="2560" height="1400" />
</state>
@ -413,20 +543,30 @@
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="900" y="426" width="759" height="548" key="find.popup/0.0.2560.1400@0.0.2560.1400" timestamp="1742204627580" />
<state x="943" y="315" width="672" height="678" key="search.everywhere.popup" timestamp="1742211424843">
<state x="943" y="315" width="672" height="678" key="search.everywhere.popup" timestamp="1747351903626">
<screen x="0" y="0" width="2560" height="1400" />
</state>
<state x="943" y="315" width="672" height="678" key="search.everywhere.popup/0.0.2560.1400@0.0.2560.1400" timestamp="1742211424843" />
<state x="943" y="315" width="672" height="678" key="search.everywhere.popup/0.0.2560.1400@0.0.2560.1400" timestamp="1747351903626" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/OrderServiceImpl.java</url>
<line>265</line>
<option name="timeStamp" value="9" />
<line>471</line>
<option name="timeStamp" value="31" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/WxMiniappPayServiceImpl.java</url>
<line>249</line>
<option name="timeStamp" value="36" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
<watches-manager>
<configuration name="SpringBootApplicationConfigurationType">
<watch expression="productId" />
</configuration>
</watches-manager>
</component>
</project>

+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/controller/MassageOrderController.java View File

@ -39,7 +39,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 订单信息表
* @Author: jeecg-boot
* @Date: 2025-05-18
* @Date: 2025-05-20
* @Version: V1.0
*/
@Api(tags="订单信息表")


+ 5
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/entity/MassageOrder.java View File

@ -22,7 +22,7 @@ import lombok.experimental.Accessors;
/**
* @Description: 订单信息表
* @Author: jeecg-boot
* @Date: 2025-05-18
* @Date: 2025-05-20
* @Version: V1.0
*/
@Data
@ -98,6 +98,10 @@ public class MassageOrder implements Serializable {
@Dict(dicCode = "is_del")
@ApiModelProperty(value = "是否删除")
private java.lang.String isDel;
/**是否已退款*/
@Excel(name = "是否已退款", width = 15)
@ApiModelProperty(value = "是否已退款")
private java.lang.String isRefound;
//项目信息
@TableField(exist = false)


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/mapper/MassageOrderMapper.java View File

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 订单信息表
* @Author: jeecg-boot
* @Date: 2025-05-18
* @Date: 2025-05-20
* @Version: V1.0
*/
public interface MassageOrderMapper extends BaseMapper<MassageOrder> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/service/IMassageOrderService.java View File

@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 订单信息表
* @Author: jeecg-boot
* @Date: 2025-05-18
* @Date: 2025-05-20
* @Version: V1.0
*/
public interface IMassageOrderService extends IService<MassageOrder> {


+ 1
- 1
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/service/impl/MassageOrderServiceImpl.java View File

@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 订单信息表
* @Author: jeecg-boot
* @Date: 2025-05-18
* @Date: 2025-05-20
* @Version: V1.0
*/
@Service


+ 6
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/vue/MassageOrderList.vue View File

@ -177,6 +177,11 @@
align:"center",
dataIndex: 'isDel_dictText'
},
{
title:'是否已退款',
align:"center",
dataIndex: 'isRefound'
},
{
title: '操作',
dataIndex: 'action',
@ -222,6 +227,7 @@
fieldList.push({type:'string',value:'itemId',text:'关联项目id',dictCode:"massage_item,title,id"})
fieldList.push({type:'string',value:'userId',text:'关联用户id',dictCode:"han_hai_member,nick_name,id"})
fieldList.push({type:'string',value:'isDel',text:'是否删除',dictCode:'is_del'})
fieldList.push({type:'string',value:'isRefound',text:'是否已退款',dictCode:''})
this.superFieldList = fieldList
}
}


+ 5
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/vue/modules/MassageOrderForm.vue View File

@ -58,6 +58,11 @@
<j-dict-select-tag type="list" v-model="model.isDel" dictCode="is_del" placeholder="请选择是否删除" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否已退款" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isRefound">
<a-input v-model="model.isRefound" placeholder="请输入是否已退款" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>


+ 10
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageOrder/vue3/MassageOrder.data.ts View File

@ -59,6 +59,11 @@ export const columns: BasicColumn[] = [
align:"center",
dataIndex: 'isDel_dictText'
},
{
title: '是否已退款',
align:"center",
dataIndex: 'isRefound'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
@ -135,4 +140,9 @@ export const formSchema: FormSchema[] = [
dictCode:"is_del"
},
},
{
label: '是否已退款',
field: 'isRefound',
component: 'Input',
},
];

+ 171
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/controller/MassageRefoundLogController.java View File

@ -0,0 +1,171 @@
package org.jeecg.modules.massageRefoundLog.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.massageRefoundLog.entity.MassageRefoundLog;
import org.jeecg.modules.massageRefoundLog.service.IMassageRefoundLogService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 退款记录表
* @Author: jeecg-boot
* @Date: 2025-05-20
* @Version: V1.0
*/
@Api(tags="退款记录表")
@RestController
@RequestMapping("/massageRefoundLog/massageRefoundLog")
@Slf4j
public class MassageRefoundLogController extends JeecgController<MassageRefoundLog, IMassageRefoundLogService> {
@Autowired
private IMassageRefoundLogService massageRefoundLogService;
/**
* 分页列表查询
*
* @param massageRefoundLog
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "退款记录表-分页列表查询")
@ApiOperation(value="退款记录表-分页列表查询", notes="退款记录表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<MassageRefoundLog>> queryPageList(MassageRefoundLog massageRefoundLog,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<MassageRefoundLog> queryWrapper = QueryGenerator.initQueryWrapper(massageRefoundLog, req.getParameterMap());
Page<MassageRefoundLog> page = new Page<MassageRefoundLog>(pageNo, pageSize);
IPage<MassageRefoundLog> pageList = massageRefoundLogService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param massageRefoundLog
* @return
*/
@AutoLog(value = "退款记录表-添加")
@ApiOperation(value="退款记录表-添加", notes="退款记录表-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody MassageRefoundLog massageRefoundLog) {
massageRefoundLogService.save(massageRefoundLog);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param massageRefoundLog
* @return
*/
@AutoLog(value = "退款记录表-编辑")
@ApiOperation(value="退款记录表-编辑", notes="退款记录表-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody MassageRefoundLog massageRefoundLog) {
massageRefoundLogService.updateById(massageRefoundLog);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "退款记录表-通过id删除")
@ApiOperation(value="退款记录表-通过id删除", notes="退款记录表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
massageRefoundLogService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "退款记录表-批量删除")
@ApiOperation(value="退款记录表-批量删除", notes="退款记录表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.massageRefoundLogService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "退款记录表-通过id查询")
@ApiOperation(value="退款记录表-通过id查询", notes="退款记录表-通过id查询")
@GetMapping(value = "/queryById")
public Result<MassageRefoundLog> queryById(@RequestParam(name="id",required=true) String id) {
MassageRefoundLog massageRefoundLog = massageRefoundLogService.getById(id);
if(massageRefoundLog==null) {
return Result.error("未找到对应数据");
}
return Result.OK(massageRefoundLog);
}
/**
* 导出excel
*
* @param request
* @param massageRefoundLog
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, MassageRefoundLog massageRefoundLog) {
return super.exportXls(request, massageRefoundLog, MassageRefoundLog.class, "退款记录表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, MassageRefoundLog.class);
}
}

+ 71
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/entity/MassageRefoundLog.java View File

@ -0,0 +1,71 @@
package org.jeecg.modules.massageRefoundLog.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 退款记录表
* @Author: jeecg-boot
* @Date: 2025-05-20
* @Version: V1.0
*/
@Data
@TableName("massage_refound_log")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="massage_refound_log对象", description="退款记录表")
public class MassageRefoundLog implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**关联订单id*/
@Excel(name = "关联订单id", width = 15)
@ApiModelProperty(value = "关联订单id")
private java.lang.String orderId;
/**退款时间*/
@Excel(name = "退款时间", width = 15)
@ApiModelProperty(value = "退款时间")
private java.util.Date refoundTime;
/**退款金额*/
@Excel(name = "退款金额", width = 15)
@ApiModelProperty(value = "退款金额")
private java.math.BigDecimal refoundAmount;
/**退款状态*/
@Excel(name = "退款状态", width = 15)
@ApiModelProperty(value = "退款状态")
private java.lang.String status;
/**关联用户id*/
@Excel(name = "关联用户id", width = 15, dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id")
@Dict(dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id")
@ApiModelProperty(value = "关联用户id")
private java.lang.String userId;
}

+ 17
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/mapper/MassageRefoundLogMapper.java View File

@ -0,0 +1,17 @@
package org.jeecg.modules.massageRefoundLog.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.massageRefoundLog.entity.MassageRefoundLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 退款记录表
* @Author: jeecg-boot
* @Date: 2025-05-20
* @Version: V1.0
*/
public interface MassageRefoundLogMapper extends BaseMapper<MassageRefoundLog> {
}

+ 5
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/mapper/xml/MassageRefoundLogMapper.xml View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.massageRefoundLog.mapper.MassageRefoundLogMapper">
</mapper>

+ 14
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/service/IMassageRefoundLogService.java View File

@ -0,0 +1,14 @@
package org.jeecg.modules.massageRefoundLog.service;
import org.jeecg.modules.massageRefoundLog.entity.MassageRefoundLog;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 退款记录表
* @Author: jeecg-boot
* @Date: 2025-05-20
* @Version: V1.0
*/
public interface IMassageRefoundLogService extends IService<MassageRefoundLog> {
}

+ 19
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/service/impl/MassageRefoundLogServiceImpl.java View File

@ -0,0 +1,19 @@
package org.jeecg.modules.massageRefoundLog.service.impl;
import org.jeecg.modules.massageRefoundLog.entity.MassageRefoundLog;
import org.jeecg.modules.massageRefoundLog.mapper.MassageRefoundLogMapper;
import org.jeecg.modules.massageRefoundLog.service.IMassageRefoundLogService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 退款记录表
* @Author: jeecg-boot
* @Date: 2025-05-20
* @Version: V1.0
*/
@Service
public class MassageRefoundLogServiceImpl extends ServiceImpl<MassageRefoundLogMapper, MassageRefoundLog> implements IMassageRefoundLogService {
}

+ 196
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue/MassageRefoundLogList.vue View File

@ -0,0 +1,196 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('退款记录表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<massage-refound-log-modal ref="modalForm" @ok="modalFormOk"></massage-refound-log-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import MassageRefoundLogModal from './modules/MassageRefoundLogModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
export default {
name: 'MassageRefoundLogList',
mixins:[JeecgListMixin, mixinDevice],
components: {
MassageRefoundLogModal
},
data () {
return {
description: '退款记录表管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'关联订单id',
align:"center",
dataIndex: 'orderId'
},
{
title:'退款时间',
align:"center",
dataIndex: 'refoundTime'
},
{
title:'退款金额',
align:"center",
dataIndex: 'refoundAmount'
},
{
title:'退款状态',
align:"center",
dataIndex: 'status_dictText'
},
{
title:'关联用户id',
align:"center",
dataIndex: 'userId_dictText'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/massageRefoundLog/massageRefoundLog/list",
delete: "/massageRefoundLog/massageRefoundLog/delete",
deleteBatch: "/massageRefoundLog/massageRefoundLog/deleteBatch",
exportXlsUrl: "/massageRefoundLog/massageRefoundLog/exportXls",
importExcelUrl: "massageRefoundLog/massageRefoundLog/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'orderId',text:'关联订单id',dictCode:''})
fieldList.push({type:'datetime',value:'refoundTime',text:'退款时间'})
fieldList.push({type:'BigDecimal',value:'refoundAmount',text:'退款金额',dictCode:''})
fieldList.push({type:'string',value:'status',text:'退款状态',dictCode:''})
fieldList.push({type:'string',value:'userId',text:'关联用户id',dictCode:"han_hai_member,nick_name,id"})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

+ 124
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue/modules/MassageRefoundLogForm.vue View File

@ -0,0 +1,124 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="关联订单id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderId">
<a-input v-model="model.orderId" placeholder="请输入关联订单id" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="退款时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="refoundTime">
<j-date placeholder="请选择退款时间" v-model="model.refoundTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="退款金额" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="refoundAmount">
<a-input-number v-model="model.refoundAmount" placeholder="请输入退款金额" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="退款状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
<j-dict-select-tag type="list" v-model="model.status" dictCode="" placeholder="请选择退款状态" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="关联用户id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<j-dict-select-tag type="list" v-model="model.userId" dictCode="han_hai_member,nick_name,id" placeholder="请选择关联用户id" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'MassageRefoundLogForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/massageRefoundLog/massageRefoundLog/add",
edit: "/massageRefoundLog/massageRefoundLog/edit",
queryById: "/massageRefoundLog/massageRefoundLog/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

+ 84
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue/modules/MassageRefoundLogModal.Style#Drawer.vue View File

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<massage-refound-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></massage-refound-log-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import MassageRefoundLogForm from './MassageRefoundLogForm'
export default {
name: 'MassageRefoundLogModal',
components: {
MassageRefoundLogForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

+ 60
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue/modules/MassageRefoundLogModal.vue View File

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<massage-refound-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></massage-refound-log-form>
</j-modal>
</template>
<script>
import MassageRefoundLogForm from './MassageRefoundLogForm'
export default {
name: 'MassageRefoundLogModal',
components: {
MassageRefoundLogForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

+ 61
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue3/MassageRefoundLog.api.ts View File

@ -0,0 +1,61 @@
import {defHttp} from '/@/utils/http/axios';
import {Modal} from 'ant-design-vue';
enum Api {
list = '/massageRefoundLog/massageRefoundLog/list',
save='/massageRefoundLog/massageRefoundLog/add',
edit='/massageRefoundLog/massageRefoundLog/edit',
deleteOne = '/massageRefoundLog/massageRefoundLog/delete',
deleteBatch = '/massageRefoundLog/massageRefoundLog/deleteBatch',
importExcel = '/massageRefoundLog/massageRefoundLog/importExcel',
exportXls = '/massageRefoundLog/massageRefoundLog/exportXls',
}
/**
* api
* @param params
*/
export const getExportUrl = Api.exportXls;
/**
* api
*/
export const getImportUrl = Api.importExcel;
/**
*
* @param params
*/
export const list = (params) =>
defHttp.get({url: Api.list, params});
/**
*
*/
export const deleteOne = (params,handleSuccess) => {
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
/**
*
* @param params
*/
export const batchDelete = (params, handleSuccess) => {
Modal.confirm({
title: '确认删除',
content: '是否删除选中数据',
okText: '确认',
cancelText: '取消',
onOk: () => {
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
handleSuccess();
});
}
});
}
/**
*
* @param params
*/
export const saveOrUpdate = (params, isUpdate) => {
let url = isUpdate ? Api.edit : Api.save;
return defHttp.post({url: url, params});
}

+ 69
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue3/MassageRefoundLog.data.ts View File

@ -0,0 +1,69 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
title: '关联订单id',
align:"center",
dataIndex: 'orderId'
},
{
title: '退款时间',
align:"center",
dataIndex: 'refoundTime'
},
{
title: '退款金额',
align:"center",
dataIndex: 'refoundAmount'
},
{
title: '退款状态',
align:"center",
dataIndex: 'status_dictText'
},
{
title: '关联用户id',
align:"center",
dataIndex: 'userId_dictText'
},
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
{
label: '关联订单id',
field: 'orderId',
component: 'Input',
},
{
label: '退款时间',
field: 'refoundTime',
component: 'Input',
},
{
label: '退款金额',
field: 'refoundAmount',
component: 'InputNumber',
},
{
label: '退款状态',
field: 'status',
component: 'JDictSelectTag',
componentProps:{
dictCode:""
},
},
{
label: '关联用户id',
field: 'userId',
component: 'JDictSelectTag',
componentProps:{
dictCode:"han_hai_member,nick_name,id"
},
},
];

+ 162
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue3/MassageRefoundLogList.vue View File

@ -0,0 +1,162 @@
<template>
<div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<a-dropdown v-if="checkedKeys.length > 0">
<template #overlay>
<a-menu>
<a-menu-item key="1" @click="batchHandleDelete">
<Icon icon="ant-design:delete-outlined"></Icon>
删除
</a-menu-item>
</a-menu>
</template>
<a-button>批量操作
<Icon icon="mdi:chevron-down"></Icon>
</a-button>
</a-dropdown>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
<!--字段回显插槽-->
<template #htmlSlot="{text}">
<div v-html="text"></div>
</template>
<template #fileSlot="{text}">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
</template>
</BasicTable>
<!-- 表单区域 -->
<MassageRefoundLogModal @register="registerModal" @success="handleSuccess"></MassageRefoundLogModal>
</div>
</template>
<script lang="ts" name="massageRefoundLog-massageRefoundLog" setup>
import {ref, computed, unref} from 'vue';
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import {useModal} from '/@/components/Modal';
import { useListPage } from '/@/hooks/system/useListPage'
import MassageRefoundLogModal from './components/MassageRefoundLogModal.vue'
import {columns, searchFormSchema} from './massageRefoundLog.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './massageRefoundLog.api';
const checkedKeys = ref<Array<string | number>>([]);
//model
const [registerModal, {openModal}] = useModal();
//table
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '退款记录表',
api: list,
columns,
canResize:false,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToTime: [
],
},
actionColumn: {
width: 120,
},
},
exportConfig: {
name:"退款记录表",
url: getExportUrl,
},
importConfig: {
url: getImportUrl
},
})
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
/**
* 新增事件
*/
function handleAdd() {
openModal(true, {
isUpdate: false,
showFooter: true,
});
}
/**
* 编辑事件
*/
function handleEdit(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: true,
});
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
openModal(true, {
record,
isUpdate: true,
showFooter: false,
});
}
/**
* 删除事件
*/
async function handleDelete(record) {
await deleteOne({id: record.id}, reload);
}
/**
* 批量删除事件
*/
async function batchHandleDelete() {
await batchDelete({ids: checkedKeys.value}, reload);
}
/**
* 成功回调
*/
function handleSuccess() {
reload();
}
/**
* 操作栏
*/
function getTableAction(record){
return [
{
label: '编辑',
onClick: handleEdit.bind(null, record),
}
]
}
/**
* 下拉操作栏
*/
function getDropDownAction(record){
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
}
}
]
}
</script>
<style scoped>
</style>

+ 58
- 0
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/massageRefoundLog/vue3/components/MassageRefoundLogModal.vue View File

@ -0,0 +1,58 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit">
<BasicForm @register="registerForm"/>
</BasicModal>
</template>
<script lang="ts" setup>
import {ref, computed, unref} from 'vue';
import {BasicModal, useModalInner} from '/@/components/Modal';
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../massageRefoundLog.data';
import {saveOrUpdate} from '../massageRefoundLog.api';
// Emits
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
//
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({
labelWidth: 150,
schemas: formSchema,
showActionButtonGroup: false,
});
//
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
//
await resetFields();
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
//
await setFieldsValue({
...data.record,
});
}
//
setProps({ disabled: !data?.showFooter })
});
//
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
//
async function handleSubmit(v) {
try {
let values = await validate();
setModalProps({confirmLoading: true});
//
await saveOrUpdate(values, isUpdate.value);
//
closeModal();
//
emit('success');
} finally {
setModalProps({confirmLoading: false});
}
}
</script>
<style lang="less" scoped>
</style>

+ 2
- 0
jeecg-boot-module-system/jeecg-boot-module-system.iml View File

@ -289,6 +289,8 @@
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.59" level="project" />
<orderEntry type="library" name="Maven: com.github.binarywang:weixin-java-miniapp:3.5.0" level="project" />
<orderEntry type="library" name="Maven: com.github.binarywang:weixin-java-mp:3.5.0" level="project" />
<orderEntry type="library" name="Maven: com.github.wechatpay-apiv3:wechatpay-java:0.2.15" level="project" />
<orderEntry type="library" name="Maven: com.github.wechatpay-apiv3:wechatpay-java-core:0.2.15" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.6.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.6.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.6.6" level="project" />


+ 7
- 0
jeecg-boot-module-system/pom.xml View File

@ -74,6 +74,13 @@
<scope>compile</scope>
</dependency>
<!--微信支付-->
<dependency>
<groupId>com.github.wechatpay-apiv3</groupId>
<artifactId>wechatpay-java</artifactId>
<version>0.2.15</version>
</dependency>
</dependencies>
<build>


+ 61
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/massageController/RefoundController.java View File

@ -0,0 +1,61 @@
package org.jeecg.modules.api.massageController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.apiService.WxMiniappPayService;
import org.jeecg.modules.wxUtils.RefundOrderReq;
import org.jeecg.modules.wxUtils.Response;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
@Api(tags="退款-退款相关接口")
@RestController
@RequestMapping("/massage/refound")
@Slf4j
public class RefoundController {
@Resource
private WxMiniappPayService wxMiniappPayService;
/**
* 退款申请
* @param orderId
* @return
*/
@ApiOperation(
value="退款",
notes="退款")
@PostMapping("/refund")
public Response<?> refund(@RequestHeader("X-Access-Token") String token, String orderId) {
log.info("------微信支付退款------");
return wxMiniappPayService.refund(token, orderId);
}
// /**
// * 查询单笔退款通过商户退款单号
// * @param outRefundNo 商户退款单号
// * @return
// */
// @ApiOperation(
// value="查询单笔退款(通过商户退款单号)",
// notes="查询单笔退款(通过商户退款单号)")
// @GetMapping("/queryByOutRefundNo")
// public Response<?> queryByOutRefundNo(String outRefundNo) {
// log.info("------微信支付查询单笔退款------");
// return wxMiniappPayService.queryByOutRefundNo(outRefundNo);
// }
/**
* 微信小程序退款回调
* @param request
* @return
* @throws Exception
*/
@PostMapping("/refundNotify")
public String refundNotify(HttpServletRequest request) throws Exception {
log.info("------微信支付微信小程序退款回调------");
return wxMiniappPayService.refundNotify(request);
}
}

+ 29
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/WxMiniappPayService.java View File

@ -0,0 +1,29 @@
package org.jeecg.modules.apiService;
import org.jeecg.modules.wxUtils.RefundOrderReq;
import org.jeecg.modules.wxUtils.Response;
import javax.servlet.http.HttpServletRequest;
public interface WxMiniappPayService {
/**
* 退款
* @param orderId
* @return
*/
Response<?> refund(String token, String orderId);
/**
* 查询单笔退款通过商户退款单号
* @param outRefundNo 商户退款单号
* @return
*/
Response<?> queryByOutRefundNo(String outRefundNo);
/**
* 微信小程序退款回调
* @param request
* @return
*/
String refundNotify(HttpServletRequest request);
}

+ 422
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/WxMiniappPayServiceImpl.java View File

@ -0,0 +1,422 @@
package org.jeecg.modules.apiService.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.wechat.pay.java.core.Config;
import com.wechat.pay.java.core.exception.HttpException;
import com.wechat.pay.java.core.exception.MalformedMessageException;
import com.wechat.pay.java.core.exception.ServiceException;
import com.wechat.pay.java.core.exception.ValidationException;
import com.wechat.pay.java.core.notification.NotificationConfig;
import com.wechat.pay.java.core.notification.NotificationParser;
import com.wechat.pay.java.core.notification.RequestParam;
import com.wechat.pay.java.service.refund.RefundService;
import com.wechat.pay.java.service.refund.model.*;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.config.shiro.ShiroRealm;
import org.jeecg.modules.apiService.WxMiniappPayService;
import org.jeecg.modules.apiUtils.CommonUtils;
import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService;
import org.jeecg.modules.massageOrder.entity.MassageOrder;
import org.jeecg.modules.massageOrder.service.IMassageOrderService;
import org.jeecg.modules.massageRefoundLog.entity.MassageRefoundLog;
import org.jeecg.modules.massageRefoundLog.service.IMassageRefoundLogService;
import org.jeecg.modules.wxUtils.HttpServletUtils;
import org.jeecg.modules.wxUtils.RefundOrderReq;
import org.jeecg.modules.wxUtils.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@Slf4j
@Service
public class WxMiniappPayServiceImpl implements WxMiniappPayService {
/**
* 微信小程序的 AppID
*/
@Value("${wx.miniapp.appid}")
private String appid;
/**
* 微信小程序的密钥
*/
@Value("${wx.miniapp.secret}")
private String secret;
/**
* 商户号
*/
@Value("${wx.miniapp.merchantId}")
private String merchantId;
/**
* 商户API私钥路径
*/
@Value("${wx.miniapp.privateKeyPath}")
private String privateKeyPath;
/**
* 商户证书序列号
*/
@Value("${wx.miniapp.merchantSerialNumber}")
private String merchantSerialNumber;
/**
* 商户APIV3密钥
*/
@Value("${wx.miniapp.apiV3Key}")
private String apiV3Key;
/**
* 支付通知地址
*/
@Value("${wx.miniapp.payNotifyUrl}")
private String payNotifyUrl;
/**
* 退款通知地址
*/
@Value("${wx.miniapp.refundNotifyUrl}")
private String refundNotifyUrl;
@Autowired
@Qualifier("rsaAutoCertificateConfig")
private Config config;
@Autowired
@Qualifier("rsaAutoCertificateConfig")
private Config notificationConfig;
// @Autowired
// private IPopularizeOrderService popularizeOrderService;
//
// @Autowired
// private IPopularizeOrderTuiLogService popularizeOrderTuiLogService;
//权限验证
@Resource
private ShiroRealm shiroRealm;
//退款记录
@Autowired
private IHanHaiMemberService hanHaiMemberService;
//订单信息
@Autowired
private IMassageOrderService massageOrderService;
//退款记录
@Autowired
private IMassageRefoundLogService massageRefoundLogService;
/**
* 退款
* <pre>
* 交易时间超过一年的订单无法提交退款按支付成功时间+365天计算
* 微信支付退款支持单笔交易分多次退款多次退款需要提交原支付订单的商户订单号和设置不同的退款单号申请退款总金额不能超过订单金额 一笔退款失败后重新提交请不要更换退款单号请使用原商户退款单号
* 请求频率限制150qps即每秒钟正常的申请退款请求次数不超过150次
* 每个支付订单的部分退款次数不能超过50次
* 如果同一个用户有多笔退款建议分不同批次进行退款避免并发退款导致退款失败
* 申请退款接口的返回仅代表业务的受理情况具体退款是否成功需要通过退款查询接口获取结果
* 错误或无效请求频率限制6qps即每秒钟异常或错误的退款申请请求不超过6次
* 一个月之前的订单申请退款频率限制为5000/min
* 同一笔订单多次退款的请求需相隔1分钟
* </pre>
*
* @param orderId
* @return
*/
@Override
public Response refund(String token, String orderId) {
//权限验证
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token);
//HanHaiMember hanHaiMember = hanHaiMemberService.getById("1919297392365035521");
// 初始化服务
RefundService service = new RefundService.Builder().config(config).build();
//根据订单标识查询订单
MassageOrder payOrder = massageOrderService.lambdaQuery()
.eq(MassageOrder::getId, orderId)
.eq(MassageOrder::getUserId, hanHaiMember.getId())
.one();
if (payOrder == null) {
return Response.error("订单不存在");
}
//查询订单是否已经退款过
MassageRefoundLog check = massageRefoundLogService
.lambdaQuery()
.eq(MassageRefoundLog::getOrderId, orderId)
.eq(MassageRefoundLog::getUserId, hanHaiMember.getId())
.one();
if(null != check){
return Response.error("该订单已经退款过:"+orderId);
}
//添加退款记录
MassageRefoundLog massageRefoundLog = new MassageRefoundLog();
massageRefoundLog.setStatus("0");//退款状态
massageRefoundLog.setOrderId(orderId);//退款订单号
massageRefoundLog.setRefoundAmount(payOrder.getAmount());//退款金额
massageRefoundLog.setUserId(hanHaiMember.getId());//退款用户
massageRefoundLogService.save(massageRefoundLog);
// if (payOrder.getAmount().compareTo(req.getRefundAmount()) < 0) {
// return Response.error("退款金额不能大于支付金额");
// }
CreateRequest request = new CreateRequest();
// 调用request.setXxx(val)设置所需参数具体参数可见Request定义
request.setOutTradeNo(orderId);
request.setOutRefundNo("REFUND_" + orderId);
AmountReq amount = new AmountReq();
// 订单总金额单位为分只能为整数详见支付金额
amount.setTotal(decimalToLong(payOrder.getAmount()));
// 退款金额单位为分只能为整数不能超过支付总额
amount.setRefund(decimalToLong(payOrder.getAmount()));
amount.setCurrency("CNY");
request.setAmount(amount);
request.setNotifyUrl(refundNotifyUrl);
// 调用接口
Refund refund = null;
try {
refund = service.create(request);
} catch (HttpException e) {
log.error("退款申请失败,发送HTTP请求失败:", e);
return Response.error("退款失败");
} catch (MalformedMessageException e) {
log.error("退款申请失败,解析微信支付应答或回调报文异常,返回信息:", e);
return Response.error("退款失败");
} catch (ValidationException e) {
log.error("退款申请失败,验证签名失败,返回信息:", e);
return Response.error("验证签名失败");
} catch (ServiceException e) {
log.error("退款申请失败,发送HTTP请求成功,返回异常,返回码:{},返回信息:", e.getErrorCode(), e);
return Response.error("退款失败:" + e.getErrorMessage());
} catch (Exception e) {
log.error("退款申请失败,异常:", e);
return Response.error("退款失败");
}
if (Status.SUCCESS.equals(refund.getStatus())) {
log.info("退款成功!-订单号:{}", payOrder.getId());
//修改退款记录订单状态
MassageRefoundLog refoundLog = massageRefoundLogService.lambdaQuery()
.eq(MassageRefoundLog::getOrderId, payOrder.getId())
.one();
refoundLog.setRefoundTime(CommonUtils.getCurrentTime());
refoundLog.setStatus("1");
massageRefoundLogService.updateById(refoundLog);
return Response.success("退款成功");
} else if (Status.CLOSED.equals(refund.getStatus())) {
log.info("退款关闭!-订单号:{}", payOrder.getId());
return Response.error("退款关闭");
} else if (Status.PROCESSING.equals(refund.getStatus())) {
log.info("退款处理中!-订单号:{}", payOrder.getId());
return Response.error("退款处理中");
} else if (Status.ABNORMAL.equals(refund.getStatus())) {
log.info("退款异常!-订单号:{}", payOrder.getId());
return Response.error("退款异常");
}
return Response.error("退款失败");
}
/**
* 查询单笔退款通过商户退款单号
* <pre>
* 提交退款申请后通过调用该接口查询退款状态退款有一定延时建议查询退款状态在提交退款申请后1分钟发起一般来说零钱支付的退款5分钟内到账银行卡支付的退款1-3个工作日到账
* </pre>
*
* @param outRefundNo 商户退款单号
* @return
*/
@Override
public Response queryByOutRefundNo(String outRefundNo) {
// 初始化服务
RefundService service = new RefundService.Builder().config(config).build();
QueryByOutRefundNoRequest request = new QueryByOutRefundNoRequest();
// 调用request.setXxx(val)设置所需参数具体参数可见Request定义
request.setOutRefundNo(outRefundNo.trim());
// 调用接口
Refund refund = null;
try {
refund = service.queryByOutRefundNo(request);
log.info("退款查询结果:{}", JSONObject.toJSONString(refund));
//退款状态退款到银行发现用户的卡作废或者冻结了导致原路退款银行卡失败可前往商户平台pay.weixin.qq.com-交易中心手动处理此笔退款可选取值SUCCESS:退款成功CLOSED:退款关闭PROCESSING:退款处理中ABNORMAL:退款异常退款状态退款到银行发现用户的卡作废或者冻结了导致原路退款银行卡失败可前往商户平台pay.weixin.qq.com-交易中心手动处理此笔退款可选取值SUCCESS:退款成功CLOSED:退款关闭PROCESSING:退款处理中ABNORMAL:退款异常
if (Status.SUCCESS.equals(refund.getStatus())) {
log.info("退款成功!-订单号:{}", outRefundNo);
return Response.success("退款成功");
} else if (Status.CLOSED.equals(refund.getStatus())) {
log.info("退款关闭!-订单号:{}", outRefundNo);
return Response.error("退款关闭");
} else if (Status.PROCESSING.equals(refund.getStatus())) {
log.info("退款处理中!-订单号:{}", outRefundNo);
return Response.success("退款处理中");
} else if (Status.ABNORMAL.equals(refund.getStatus())) {
log.info("退款异常!-订单号:{}", outRefundNo);
return Response.error("退款异常");
}
} catch (HttpException e) {
log.error("退款查询失败,发送HTTP请求失败:", e);
return Response.error("退款查询失败");
} catch (MalformedMessageException e) {
log.error("退款查询失败,解析微信支付应答或回调报文异常,返回信息:", e);
return Response.error("退款查询失败");
} catch (ValidationException e) {
log.error("退款查询失败,验证签名失败,返回信息:", e);
return Response.error("退款查询失败");
} catch (ServiceException e) {
log.error("退款查询失败,发送HTTP请求成功,返回异常,返回码:{},返回信息:", e.getErrorCode(), e);
return Response.error("退款查询失败");
} catch (Exception e) {
log.error("退款查询失败,异常:", e);
return Response.error("退款查询失败");
}
return Response.success(refund);
}
/**
* 微信小程序退款回调
* <pre>
* 注意:
* 对后台通知交互时如果微信收到应答不是成功或超时微信认为通知失败微信会通过一定的策略定期重新发起通知尽可能提高通知的成功率但微信不保证通知最终能成功
*
* 同样的通知可能会多次发送给商户系统商户系统必须能够正确处理重复的通知 推荐的做法是当商户系统收到通知进行处理时先检查对应业务数据的状态并判断该通知是否已经处理如果未处理则再进行处理如果已处理则直接返回结果成功在对业务数据进行状态检查和处理之前要采用数据锁进行并发控制以避免函数重入造成的数据混乱
* 如果在所有通知频率后没有收到微信侧回调商户应调用查询订单接口确认订单状态
* </pre>
*
* @param request
* @return
*/
@Override
public String refundNotify(HttpServletRequest request) {
Map<String, String> returnMap = new HashMap<>(2);
returnMap.put("code", "FAIL");
returnMap.put("message", "失败");
try {
// 请求头Wechatpay-Signature
String signature = request.getHeader("Wechatpay-Signature");
// 请求头Wechatpay-nonce
String nonce = request.getHeader("Wechatpay-Nonce");
// 请求头Wechatpay-Timestamp
String timestamp = request.getHeader("Wechatpay-Timestamp");
// 微信支付证书序列号
String serial = request.getHeader("Wechatpay-Serial");
// 签名方式
String signType = request.getHeader("Wechatpay-Signature-Type");
// 构造解析器和请求参数
NotificationParser parser = new NotificationParser((NotificationConfig) notificationConfig);
RequestParam requestParam = new RequestParam.Builder()
.serialNumber(serial)
.nonce(nonce)
.signature(signature)
.timestamp(timestamp)
.signType(signType)
.body(HttpServletUtils.getRequestBody(request))
.build();
log.info("微信小程序支付退款回调验签参数: {}", JSON.toJSONString(requestParam));
// 解析通知
RefundNotification notification = null;
try {
notification = parser.parse(requestParam, RefundNotification.class);
} catch (MalformedMessageException e) {
log.error("微信小程序支付退款回调:回调通知参数不正确、解析通知数据失败:", e);
returnMap.put("message", "回调通知参数不正确");
return JSONObject.toJSONString(returnMap);
} catch (ValidationException e) {
log.error("微信小程序支付退款回调:签名验证失败 ", e);
returnMap.put("message", "签名验证失败");
return JSONObject.toJSONString(returnMap);
} catch (Exception e) {
log.error("微信小程序支付退款回调:未知异常 ", e);
returnMap.put("message", "未知异常");
return JSONObject.toJSONString(returnMap);
}
log.info("微信小程序支付退款回调解析成功: {}", JSON.toJSONString(notification));
// 根据退款状态处理
Status refundStatus = notification.getRefundStatus();
switch (refundStatus) {
case SUCCESS:
// TODO 退款成功逻辑
returnMap.put("code", "SUCCESS");
returnMap.put("message", "退款成功");
//修改订单退款状态
MassageOrder order = massageOrderService
.lambdaQuery()
.eq(MassageOrder::getId, notification.getOutTradeNo())
.eq(MassageOrder::getIsRefound, "0")
.one();
if(null != order){
order.setStatus("3");
order.setIsRefound("1");
massageOrderService.updateById(order);
}
//修改退款记录状态
MassageRefoundLog refoundLog = massageRefoundLogService
.lambdaQuery()
.eq(MassageRefoundLog::getOrderId, notification.getOutTradeNo())
.eq(MassageRefoundLog::getStatus, "0")
.one();
if(null != refoundLog){
refoundLog.setStatus("1");
refoundLog.setRefoundTime(CommonUtils.getCurrentTime());
massageRefoundLogService.updateById(refoundLog);
}
return JSONObject.toJSONString(returnMap);
case PROCESSING:
log.warn("退款处理中: {}", notification);
returnMap.put("message", "退款处理中,请稍后查询");
return JSONObject.toJSONString(returnMap);
case ABNORMAL:
log.error("退款异常: {}", notification);
returnMap.put("message", "退款异常,请联系客服");
return JSONObject.toJSONString(returnMap);
case CLOSED:
log.warn("退款已关闭: {}", notification);
returnMap.put("message", "退款已关闭,操作失败");
return JSONObject.toJSONString(returnMap);
default:
log.error("未知退款状态: {}", refundStatus);
returnMap.put("message", "未知退款状态");
return JSONObject.toJSONString(returnMap);
}
} catch (Exception e) {
log.error("退款回调处理异常", e);
returnMap.put("message", "退款处理异常");
return JSONObject.toJSONString(returnMap);
}
}
/**
* 金额转换
*
* @param money
* @return
*/
private static long decimalToLong(BigDecimal money) {
return money.multiply(BigDecimal.valueOf(100)).longValue();
}
}

+ 8
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/CreateOrderReq.java View File

@ -0,0 +1,8 @@
package org.jeecg.modules.wxUtils;
public class CreateOrderReq {
/**
* 微信用户openid前端不用传参
*/
private String wxOpenId;
}

+ 47
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/HttpServletUtils.java View File

@ -0,0 +1,47 @@
package org.jeecg.modules.wxUtils;
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
/**
* <p>
* HttpServletRequest 获取请求体
* </p>
*
* @author songfayuan
* @date 2024/9/30 19:11
*/
public class HttpServletUtils {
/**
* 获取请求体
*
* @param request
* @return
* @throws IOException
*/
public static String getRequestBody(HttpServletRequest request) throws IOException {
ServletInputStream stream = null;
BufferedReader reader = null;
StringBuffer sb = new StringBuffer();
try {
stream = request.getInputStream();
// 获取响应
reader = new BufferedReader(new InputStreamReader(stream, StandardCharsets.UTF_8));
String line;
while ((line = reader.readLine()) != null) {
sb.append(line);
}
} catch (IOException e) {
throw new IOException("读取返回支付接口数据流出现异常!");
} finally {
reader.close();
}
return sb.toString();
}
}

+ 31
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/PayOrderInfo.java View File

@ -0,0 +1,31 @@
package org.jeecg.modules.wxUtils;
import lombok.Data;
import java.math.BigDecimal;
/**
* <p>
* 支付订单信息
* </p>
*
* @author songfayuan
* @date 2024/9/30 17:46
*/
@Data
public class PayOrderInfo {
/**
* 订单标题
*/
private String description;
/**
* 商户订单号
* 只能是数字大小写字母_-*且在同一个商户号下唯一
*/
private String outTradeNo;
/**
* 支付金额单位
*/
private BigDecimal amount;
}

+ 23
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/QueryOrderReq.java View File

@ -0,0 +1,23 @@
package org.jeecg.modules.wxUtils;
import lombok.Data;
/**
* <p>
* 订单查询请求
* </p>
*
* @author songfayuan
* @date 2024/9/30 19:19
*/
@Data
public class QueryOrderReq {
/**
* 订单号业务侧的订单号
*/
private String transactionId;
/**
* 商户订单号
*/
private String outTradeNo;
}

+ 36
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/RefundOrderReq.java View File

@ -0,0 +1,36 @@
package org.jeecg.modules.wxUtils;
import lombok.Data;
import java.math.BigDecimal;
/**
* <p>
* 退款订单请求参数
* </p>
*
* @author songfayuan
* @date 2024/9/30 19:19
*/
@Data
public class RefundOrderReq {
/**
* 订单号业务侧的订单号
*/
private String transactionId;
/**
* 商户订单号
*/
private String outTradeNo;
/**
* 原订单金额 说明原支付交易的订单总金额这里单位为元
*/
private BigDecimal totalAmount;
/**
* 退款金额 说明退款金额这里单位为元不能超过原订单支付金额
*/
private BigDecimal refundAmount;
}

+ 164
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/Response.java View File

@ -0,0 +1,164 @@
package org.jeecg.modules.wxUtils;
import lombok.Data;
/**
* 返回参数封装类
*
* @param <T>
* @author songfayuan
*/
@Data
public class Response<T> {
/**
* 状态码
*/
protected int code;
/**
* 提示信息
*/
protected String msg;
/**
* 数据
*/
protected T data;
/**
* 成功时状态码
*/
private static final int SUCCESS_CODE = 200;
/**
* 成功时提示信息
*/
private static final String SUCCESS_MSG = "success";
/**
* 异常错误信息状态码
*/
private static final int ERROR_CODE = 500;
/**
* 异常错误提示信息
*/
private static final String ERROR_MSG = "服务器内部异常,请联系技术人员!";
/**
* 返回成功消息
*
* @param <T>
* @return
*/
public static <T> Response<T> success() {
Response resp = new Response();
resp.code = (SUCCESS_CODE);
resp.msg = (SUCCESS_MSG);
return resp;
}
/**
* 返回成功消息
*
* @param <T>
* @param msg
* @return
*/
public static <T> Response<T> successResponse(String msg) {
Response resp = new Response();
resp.code = SUCCESS_CODE;
resp.msg = msg;
return resp;
}
/**
* 返回错误消息
*
* @param <T>
* @return
*/
public static <T> Response<T> error() {
Response resp = new Response();
resp.code = (ERROR_CODE);
resp.msg = (ERROR_MSG);
return resp;
}
/**
* 返回错误消息
*
* @param <T>
* @param msg
* @return
*/
public static <T> Response<T> errorResponse(String msg) {
Response resp = new Response();
resp.code = ERROR_CODE;
resp.msg = msg;
return resp;
}
/**
* 自定义状态码提示信息
*
* @param <T>
* @param code 状态码
* @param msg 提示信息
* @return
*/
public static <T> Response<T> response(int code, String msg) {
Response resp = new Response();
resp.code = (code);
resp.msg = (msg);
return resp;
}
/**
* 自定义状态码提示信息业务数据
*
* @param <T>
* @param code 状态码
* @param msg 提示信息
* @param data 业务数据
* @return
*/
public static <T> Response<T> response(int code, String msg, T data) {
Response<T> resp = new Response<>();
resp.code = (code);
resp.msg = (msg);
resp.data = data;
return resp;
}
/**
* 返回成功数据
*
* @param <T>
* @param data 业务数据
* @return
*/
public static <T> Response<T> success(T data) {
Response<T> resp = new Response<>();
resp.code = (SUCCESS_CODE);
resp.msg = (SUCCESS_MSG);
resp.data = data;
return resp;
}
/**
* 返回错误消息
*
* @param <T>
* @param data 业务数据
* @return
*/
public static <T> Response<T> error(T data) {
Response<T> resp = new Response<>();
resp.code = (ERROR_CODE);
resp.msg = (ERROR_MSG);
resp.data = data;
return resp;
}
}

+ 113
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/WxPayAutoCertificateConfig.java View File

@ -0,0 +1,113 @@
package org.jeecg.modules.wxUtils;
import com.wechat.pay.java.core.Config;
import com.wechat.pay.java.core.RSAAutoCertificateConfig;
import com.wechat.pay.java.core.RSAPublicKeyConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Slf4j
@Configuration
public class WxPayAutoCertificateConfig {
/**
* 微信小程序的 AppID
*/
@Value("${wx.miniapp.appid}")
private String appid;
/**
* 微信小程序的密钥
*/
@Value("${wx.miniapp.secret}")
private String secret;
/**
* 商户号
*/
@Value("${wx.miniapp.merchantId}")
private String merchantId;
/**
* 商户API私钥路径
*/
@Value("${wx.miniapp.privateKeyPath}")
private String privateKeyPath;
/**
* 商户API公钥路径
*/
@Value("${wx.miniapp.publicKeyPath}")
private String publicKeyPath;
/**
* 公钥
*/
@Value("${wx.miniapp.publicKeyId}")
private String publicKeyId;
/**
* 商户证书序列号
*/
@Value("${wx.miniapp.merchantSerialNumber}")
private String merchantSerialNumber;
/**
* 商户APIV3密钥
*/
@Value("${wx.miniapp.apiV3Key}")
private String apiV3Key;
/**
* 支付通知地址
*/
@Value("${wx.miniapp.payNotifyUrl}")
private String payNotifyUrl;
/**
* 退款通知地址
*/
@Value("${wx.miniapp.refundNotifyUrl}")
private String refundNotifyUrl;
/**
* 初始化商户配置
* @return
*/
@Bean
public Config rsaAutoCertificateConfig() {
// 这里把Config作为配置Bean是为了避免多次创建资源一般项目运行的时候这些东西都确定了
// 具体的参数改为申请的数据可以通过读配置文件的形式获取
// Config config = new RSAAutoCertificateConfig.Builder()
// .merchantId("1659066870")
// .privateKeyFromPath("E:\\git_java\\api_java\\popularize-admin\\popularize-admin\\popularize-admin\\module-pay\\src\\main\\resources\\apiclient_key.pem")
// .merchantSerialNumber("7BE56DC695B2B612BD1C6C710A7FBFA1AC46B10F")
// .apiV3Key("vtribevtribevtribevtribevtribe12")
// .build();
Config config = new RSAPublicKeyConfig.Builder()
.merchantId(merchantId)
.privateKeyFromPath(privateKeyPath)
.publicKeyFromPath(publicKeyPath)
.publicKeyId(publicKeyId)
.merchantSerialNumber(merchantSerialNumber)
.apiV3Key(apiV3Key)
.build();
// Config config = new RSAAutoCertificateConfig.Builder()
// .merchantId(merchantId)
// .privateKeyFromPath(privateKeyPath)
// .merchantSerialNumber(merchantSerialNumber)
// .apiV3Key(apiV3Key)
// .build();
log.info("初始化微信支付商户配置完成...");
return config;
}
}

+ 13
- 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/wxUtils/WxPayConfig.java View File

@ -0,0 +1,13 @@
package org.jeecg.modules.wxUtils;
import lombok.Data;
import org.springframework.stereotype.Component;
@Data
@Component
public class WxPayConfig {
}

+ 28
- 0
jeecg-boot-module-system/src/main/resources/apiclient_key.pem View File

@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC8an3vcCIsBgcy
wG+H5tZZ0/qZJIEeqFHYDvKxqs69slnT4pUxG7wir66o+SQP7bPBpHDh7OGghuhP
8KTSYMnG100k44Rfm7Ch+P2/mdexfgu4aC2CBFf6ziOjopBzBfc3TEOuwCdPTcFL
4G3yZ65xldiO+stiDdeXa5EQrD9LFWL4YADOkd8RPxUGFQaWWWnUR+7VdWCHsYZ7
J1qrwmyVsNXsbcWAdQKwiXy7fws6IOyRUj4p8tUc/GDqz1vwCTZQJ6Km3b+nCLqb
SDbZ82XhSJJzZRzGzcY/IqdeQT9Lrb0SYWs3HDmN5/NngU2cihiUqw4LrzWy/ui0
+Fvt46AVAgMBAAECggEBAJbphO0fF3/DZEiWMb7ceZuBWhsHThRMJSG091auxODT
1XcM6QpoeIwfwvm8c9H+Rhg3qeKLZTy6UaCV0q5er77/+94sDX62qQdS84tfoY+c
sa6GYszcxcsxCQKr1p8KjDRSdXOmnNW8JbKsk+Owf9yidM4wum5TP/ccRRjhneB4
YmN+cw93bl+5yqebvaRwC1S7WcUspj2lmaSLE/IvFOBU91Wnn6XvjkAU7QnuUxlV
0NVWgJqhykng6E/lsXkEB6Akk5fZXHDvJCgP6zCDHZs0LC8MTl984fDtr1CB1lnw
n/B6gQEYhVnqlvGxLhjGwZbfYzFuPZqgnDkVbBWflYECgYEA99s7k74edmVkOriI
KYuYctDkU22HsoKHaB+VhKfeaZWWr25RPpWk0yQWNr1SxkdEJopzxVMuCoxrGy6F
MUpgM0By6QBoU3WFZONSzDalqFJANIVj+o3/RCnI5w4na6MAaw4t/hMd2avxSje/
k1A2CeBYm7eN7bYaFXe+hwFGyz0CgYEAwptLctRG3R35beRBXMccuvvxjXmSNfpW
qIBCnNn0KzBu7r8JyxHVI8mIdA5jD8C0G91wFnm0hG+fcZ+9eFpLZCaHbfVI55GS
NsOBwkO5WrOj2LcWd9yi4cKPxFceOLrEBKmxTXFGnoeVoA4468ec8kEQywG96dvb
QKFZ4JM11bkCgYEAhRA9u+Ollwp39M58y1EWVw2uhtuWrk9FQrEyJDW7QhP9AdHH
7EGKa5BEHL8nYSuBeu95l8ZAQYmBNuaSuxOi8eD3z/9YAvZk1vTzzo7IAMWnkorK
UglJsd587Q68Ox0XbGIAbxb0P5f/wkiLoRq+6C55Y5/3olbRShUvRGt7BkECgYBw
zuCvkcn6R3PddeFFzM4kvgNKBVzyGUm+p4r1rYpStuK3Vtpwcsfg1ORakjRuX0CI
npZpEOfJlYMRtI16hK0LQyJiZTt7sPDW+gHwAJ4jq9qgt5E4rhdlUwlPwUhtjiYu
pcd3ouBS6Tmc7GGmm7Go5Hq9kybpt16jWmTlP7CHUQKBgGaJwRKkIjJsvpGEkxcx
ReFyK5avL+ky/q/Q/TyCmEr8uVZGe1kEXdDk53+VR1YzwX/K+7Bjx0vlH3T57Z9J
vv1fiJZimmLy17mkRQurREvWfICTH/WJxzMF5ALJLpqGzr451fzaupMNhI04Ln/e
dTDkCyho1MMaRP+2a12AIEex
-----END PRIVATE KEY-----

+ 28
- 0
jeecg-boot-module-system/src/main/resources/application-dev.yml View File

@ -329,3 +329,31 @@ third-app:
client-secret: ??
agent-id: ??
## 微信商户
wx:
miniapp:
appid: wx77ba4c7131677a74 # 微信小程序appid
secret: fb915d623f92d455f2e70934f75fb96c # 微信小程序密钥
merchantId: 1712378227 # 商户号
privateKeyPath: jeecg-boot-module-system/src/main/resources/apiclient_key.pem #本地私钥路径
publicKeyPath: jeecg-boot-module-system/src/main/resources/pub_key.pem #本地公钥路径
# privateKeyPath: /root/massage/cerFile/apiclient_key.pem #线上私钥路径
# publicKeyPath: /root/massage/cerFile/pub_key.pem #线上公钥路径
publicKeyId: PUB_KEY_ID_0117123782272025033100396400002931 #公钥
merchantSerialNumber: 33E9FE8076531A7C7AD401DC34E053DBD7C28E22 # 商户API证书序列号
apiV3Key: 0fdb77429ffdf206c151af76a663041c # 商户APIV3密钥
payNotifyUrl: https://www.yurangongfang.com/massage-admin/massage/order/payOrderNotify/ # 支付通知地址(测试环境)
refundNotifyUrl: https://www.yurangongfang.com/massage-admin/massage/refound/refundNotify/ # 退款通知地址(正式环境)
# refundNotifyUrl: http://augcl.natapp1.cc/massage-admin/massage/refound/refundNotify/ # 退款通知地址(测试环境)
### 微信商户
#wx:
# miniapp:
# appid: wx797abcfb479c75ec # 微信小程序appid
# secret: c4565acc18698a7000be1b2bb748be81 # 微信小程序密钥
# merchantId: 1659066870 # 商户号
# privateKeyPath: jeecg-boot-module-system/src/main/resources/apiclient_key.pem
# merchantSerialNumber: 7BE56DC695B2B612BD1C6C710A7FBFA1AC46B10F # 商户API证书序列号
# apiV3Key: vtribevtribevtribevtribevtribe12 # 商户APIV3密钥
# payNotifyUrl: http://h5.xzaiyp.top/popularize-admin/order_pay/refundNotify # 支付通知地址(测试环境)
# refundNotifyUrl: http://h5.xzaiyp.top/popularize-admin/order_pay/refundNotify # 退款通知地址(测试环境)

+ 9
- 0
jeecg-boot-module-system/src/main/resources/pub_key.pem View File

@ -0,0 +1,9 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6xCzq1CjrZYTqtE52f7t
4AU9rgRZYKNn94tmkIuYa1wGX13gWNIlo1muExV/Ejg4H9Xe0RCQwNNJieeyfhU7
Vl/qms4Ukj8sqIrvKqw9j81AVHK2BSk87aRs0ha+gvV1tDDmcCLHrY8SeGcJ2U2z
I9iu5X1kLdkXNiojWrMngGslki2FSfJelftoZUDk30mf18AoG5iBzIPJ4/Gy5Rh0
U+FDwpWzERR7XjMoAZ7YiRYUdV/SpQkx6CrM4Em3AKxmpxvwSVg7NiMDoTljfgq+
6ZHB9DMQPbeqkQ9qkCMg0sVjpB/aI9tObE0mtU8zP/mBg7TDTs0qa2SXFem5ZTDg
JQIDAQAB
-----END PUBLIC KEY-----

Loading…
Cancel
Save