wang_xy 2 роки тому
батько
коміт
a176213bd9
100 змінених файлів з 5733 додано та 1201 видалено
  1. 15 0
      .idea/inspectionProfiles/Project_Default.xml
  2. 13 0
      .idea/libraries/Maven__com_aliyun_aliyun_java_sdk_core_4_0_6.xml
  3. 13 0
      .idea/libraries/Maven__com_aliyun_aliyun_java_sdk_dysmsapi_1_1_0.xml
  4. 13 0
      .idea/libraries/Maven__com_beust_jcommander_1_48.xml
  5. 13 0
      .idea/libraries/Maven__com_github_jai_imageio_jai_imageio_core_1_3_1.xml
  6. 13 0
      .idea/libraries/Maven__com_github_jsqlparser_jsqlparser_1_2.xml
  7. 13 0
      .idea/libraries/Maven__com_github_pagehelper_pagehelper_5_1_6.xml
  8. 13 0
      .idea/libraries/Maven__com_github_pagehelper_pagehelper_spring_boot_autoconfigure_1_2_7.xml
  9. 13 0
      .idea/libraries/Maven__com_github_pagehelper_pagehelper_spring_boot_starter_1_2_7.xml
  10. 13 0
      .idea/libraries/Maven__com_github_wechatpay_apiv3_wechatpay_apache_httpclient_0_4_4.xml
  11. 13 0
      .idea/libraries/Maven__com_google_code_gson_gson_2_8_9.xml
  12. 13 0
      .idea/libraries/Maven__com_google_zxing_core_3_3_0.xml
  13. 13 0
      .idea/libraries/Maven__com_google_zxing_javase_3_3_0.xml
  14. 13 0
      .idea/libraries/Maven__com_squareup_okhttp3_okhttp_3_14_9.xml
  15. 13 0
      .idea/libraries/Maven__com_squareup_okhttp3_okhttp_3_6_0.xml
  16. 13 0
      .idea/libraries/Maven__com_squareup_okio_okio_1_11_0.xml
  17. 13 0
      .idea/libraries/Maven__com_squareup_okio_okio_1_17_2.xml
  18. 13 0
      .idea/libraries/Maven__com_sun_xml_bind_jaxb_core_2_1_14.xml
  19. 13 0
      .idea/libraries/Maven__com_sun_xml_bind_jaxb_impl_2_1.xml
  20. 13 0
      .idea/libraries/Maven__io_lettuce_lettuce_core_6_1_8_RELEASE.xml
  21. 13 0
      .idea/libraries/Maven__io_netty_netty_buffer_4_1_77_Final.xml
  22. 13 0
      .idea/libraries/Maven__io_netty_netty_codec_4_1_77_Final.xml
  23. 13 0
      .idea/libraries/Maven__io_netty_netty_common_4_1_77_Final.xml
  24. 13 0
      .idea/libraries/Maven__io_netty_netty_handler_4_1_77_Final.xml
  25. 13 0
      .idea/libraries/Maven__io_netty_netty_resolver_4_1_77_Final.xml
  26. 13 0
      .idea/libraries/Maven__io_netty_netty_transport_4_1_77_Final.xml
  27. 13 0
      .idea/libraries/Maven__io_projectreactor_reactor_core_3_4_18.xml
  28. 13 0
      .idea/libraries/Maven__javax_activation_activation_1_1_1.xml
  29. 13 0
      .idea/libraries/Maven__javax_activation_javax_activation_api_1_2_0.xml
  30. 13 0
      .idea/libraries/Maven__javax_xml_bind_jaxb_api_2_3_1.xml
  31. 13 0
      .idea/libraries/Maven__org_apache_httpcomponents_httpmime_4_5_13.xml
  32. 13 0
      .idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_3.xml
  33. 13 0
      .idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_redis_2_1_5_RELEASE.xml
  34. 13 0
      .idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_redis_2_5_14.xml
  35. 13 0
      .idea/libraries/Maven__org_springframework_data_spring_data_commons_2_5_11.xml
  36. 13 0
      .idea/libraries/Maven__org_springframework_data_spring_data_keyvalue_2_5_11.xml
  37. 13 0
      .idea/libraries/Maven__org_springframework_data_spring_data_redis_2_5_11.xml
  38. 13 0
      .idea/libraries/Maven__org_springframework_spring_oxm_5_3_20.xml
  39. 1231 153
      .idea/workspace.xml
  40. 76 14
      mybusiness/mybusiness.iml
  41. 46 1
      mybusiness/pom.xml
  42. 51 0
      mybusiness/src/main/java/com/ruoyi/business/config/KeyPairFactory.java
  43. 6 6
      mybusiness/src/main/java/com/ruoyi/business/config/SessionHelper.java
  44. 4 4
      mybusiness/src/main/java/com/ruoyi/business/config/Token.java
  45. 234 0
      mybusiness/src/main/java/com/ruoyi/business/config/WxPayConfig.java
  46. 7 8
      mybusiness/src/main/java/com/ruoyi/business/domain/WxPay.java
  47. 88 12
      mybusiness/src/main/java/com/ruoyi/business/domain/HttpClientUtil.java
  48. 64 0
      mybusiness/src/main/java/com/ruoyi/business/utils/PayUtils.java
  49. 97 0
      mybusiness/src/main/java/com/ruoyi/business/utils/WxSignV3Utils.java
  50. 546 19
      mybusiness/src/main/java/com/ruoyi/business/xhn/controller/XhnController.java
  51. 0 67
      mybusiness/src/main/java/com/ruoyi/business/xhn/domain/WxUserInfo.java
  52. 0 19
      mybusiness/src/main/java/com/ruoyi/business/xhn/mapper/WxUserMapper.java
  53. 113 3
      mybusiness/src/main/java/com/ruoyi/business/xhn/service/WxService.java
  54. 345 29
      mybusiness/src/main/java/com/ruoyi/business/xhn/service/impl/WxServiceImpl.java
  55. 2 2
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/activityInfo/controller/XhnActivityInfoController.java
  56. 131 7
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/activityInfo/domain/XhnActivityInfo.java
  57. 22 3
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/activityInfo/mapper/XhnActivityInfoMapper.java
  58. 19 3
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/activityInfo/service/IXhnActivityInfoService.java
  59. 13 10
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/activityInfo/service/impl/XhnActivityInfoServiceImpl.java
  60. 16 4
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/gift/domain/XhnGift.java
  61. 2 2
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/matchmaker/controller/XhnMatchmakerController.java
  62. 88 4
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/matchmaker/domain/XhnMatchmaker.java
  63. 3 3
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/matchmaker/mapper/XhnMatchmakerMapper.java
  64. 3 3
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/matchmaker/service/IXhnMatchmakerService.java
  65. 3 3
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/matchmaker/service/impl/XhnMatchmakerServiceImpl.java
  66. 1 1
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/moneybyintegral/controller/XhnMoneybyintegralController.java
  67. 3 3
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/moneybyintegral/domain/XhnMoneybyintegral.java
  68. 1 1
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/moneybyintegral/mapper/XhnMoneybyintegralMapper.java
  69. 1 1
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/moneybyintegral/service/IXhnMoneybyintegralService.java
  70. 4 1
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/moneybyintegral/service/impl/XhnMoneybyintegralServiceImpl.java
  71. 66 51
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/registeruser/controller/XhnRegisterUserController.java
  72. 63 8
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/registeruser/domain/XhnRegisterUser.java
  73. 18 0
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/registeruser/mapper/XhnRegisterUserMapper.java
  74. 18 0
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/registeruser/service/IXhnRegisterUserService.java
  75. 29 0
      mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/registeruser/service/impl/XhnRegisterUserServiceImpl.java
  76. BIN
      mybusiness/src/main/resources/apiclient_cert.p12
  77. 23 0
      mybusiness/src/main/resources/apiclient_cert.pem
  78. 28 0
      mybusiness/src/main/resources/apiclient_key.pem
  79. 95 3
      mybusiness/src/main/resources/mapper/xhnnotsingle/XhnActivityInfoMapper.xml
  80. 10 1
      mybusiness/src/main/resources/mapper/xhnnotsingle/XhnGiftMapper.xml
  81. 120 54
      mybusiness/src/main/resources/mapper/xhnnotsingle/XhnMatchmakerMapper.xml
  82. 2 2
      mybusiness/src/main/resources/mapper/xhnnotsingle/XhnMoneybyintegralMapper.xml
  83. 97 4
      mybusiness/src/main/resources/mapper/xhnnotsingle/XhnRegisterUserMapper.xml
  84. 19 15
      mybusiness/target/classes/templates/xhn/xhnIndex.html
  85. 2 2
      mybusiness/src/main/resources/templates/xhn/xhnlogin.html
  86. 0 84
      mybusiness/src/main/resources/templates/xhn/xhnIndex.html
  87. 48 10
      mybusiness/src/main/resources/templates/xhnnotsingle/activityInfo/activityInfo.html
  88. 176 14
      mybusiness/src/main/resources/templates/xhnnotsingle/activityInfo/add.html
  89. 299 16
      mybusiness/src/main/resources/templates/xhnnotsingle/activityInfo/edit.html
  90. 71 32
      mybusiness/src/main/resources/templates/xhnnotsingle/gift/add.html
  91. 160 2
      mybusiness/src/main/resources/templates/xhnnotsingle/gift/edit.html
  92. 13 4
      mybusiness/src/main/resources/templates/xhnnotsingle/gift/gift.html
  93. 53 15
      mybusiness/src/main/resources/templates/xhnnotsingle/matchmaker/add.html
  94. 97 64
      mybusiness/src/main/resources/templates/xhnnotsingle/matchmaker/edit.html
  95. 63 10
      mybusiness/src/main/resources/templates/xhnnotsingle/matchmaker/matchmaker.html
  96. 2 2
      mybusiness/src/main/resources/templates/xhnnotsingle/moneybyintegral/add.html
  97. 2 2
      mybusiness/src/main/resources/templates/xhnnotsingle/moneybyintegral/edit.html
  98. 207 196
      mybusiness/src/main/resources/templates/xhnnotsingle/registeruser/add.html
  99. 236 224
      mybusiness/src/main/resources/templates/xhnnotsingle/registeruser/edit.html
  100. 0 0
      mybusiness/src/main/resources/templates/xhnnotsingle/registeruser/registeruser.html

+ 15 - 0
.idea/inspectionProfiles/Project_Default.xml

@@ -0,0 +1,15 @@
+<component name="InspectionProjectProfileManager">
+  <profile version="1.0">
+    <option name="myName" value="Project Default" />
+    <inspection_tool class="HtmlUnknownAttribute" enabled="true" level="WARNING" enabled_by_default="true">
+      <option name="myValues">
+        <value>
+          <list size="1">
+            <item index="0" class="java.lang.String" itemvalue="th:href" />
+          </list>
+        </value>
+      </option>
+      <option name="myCustomValuesEnabled" value="true" />
+    </inspection_tool>
+  </profile>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_aliyun_aliyun_java_sdk_core_4_0_6.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.aliyun:aliyun-java-sdk-core:4.0.6">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/aliyun/aliyun-java-sdk-core/4.0.6/aliyun-java-sdk-core-4.0.6.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/aliyun/aliyun-java-sdk-core/4.0.6/aliyun-java-sdk-core-4.0.6-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/aliyun/aliyun-java-sdk-core/4.0.6/aliyun-java-sdk-core-4.0.6-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_aliyun_aliyun_java_sdk_dysmsapi_1_1_0.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.aliyun:aliyun-java-sdk-dysmsapi:1.1.0">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/aliyun/aliyun-java-sdk-dysmsapi/1.1.0/aliyun-java-sdk-dysmsapi-1.1.0.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/aliyun/aliyun-java-sdk-dysmsapi/1.1.0/aliyun-java-sdk-dysmsapi-1.1.0-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/aliyun/aliyun-java-sdk-dysmsapi/1.1.0/aliyun-java-sdk-dysmsapi-1.1.0-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_beust_jcommander_1_48.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.beust:jcommander:1.48">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/beust/jcommander/1.48/jcommander-1.48.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/beust/jcommander/1.48/jcommander-1.48-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/beust/jcommander/1.48/jcommander-1.48-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_github_jai_imageio_jai_imageio_core_1_3_1.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.github.jai-imageio:jai-imageio-core:1.3.1">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/jai-imageio/jai-imageio-core/1.3.1/jai-imageio-core-1.3.1.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/jai-imageio/jai-imageio-core/1.3.1/jai-imageio-core-1.3.1-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/jai-imageio/jai-imageio-core/1.3.1/jai-imageio-core-1.3.1-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_github_jsqlparser_jsqlparser_1_2.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.github.jsqlparser:jsqlparser:1.2">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/jsqlparser/jsqlparser/1.2/jsqlparser-1.2.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/jsqlparser/jsqlparser/1.2/jsqlparser-1.2-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/jsqlparser/jsqlparser/1.2/jsqlparser-1.2-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_github_pagehelper_pagehelper_5_1_6.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.github.pagehelper:pagehelper:5.1.6">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/pagehelper/pagehelper/5.1.6/pagehelper-5.1.6.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/pagehelper/pagehelper/5.1.6/pagehelper-5.1.6-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/pagehelper/pagehelper/5.1.6/pagehelper-5.1.6-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_github_pagehelper_pagehelper_spring_boot_autoconfigure_1_2_7.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.7">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/pagehelper/pagehelper-spring-boot-autoconfigure/1.2.7/pagehelper-spring-boot-autoconfigure-1.2.7.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/pagehelper/pagehelper-spring-boot-autoconfigure/1.2.7/pagehelper-spring-boot-autoconfigure-1.2.7-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/pagehelper/pagehelper-spring-boot-autoconfigure/1.2.7/pagehelper-spring-boot-autoconfigure-1.2.7-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_github_pagehelper_pagehelper_spring_boot_starter_1_2_7.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.7">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/pagehelper/pagehelper-spring-boot-starter/1.2.7/pagehelper-spring-boot-starter-1.2.7.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/pagehelper/pagehelper-spring-boot-starter/1.2.7/pagehelper-spring-boot-starter-1.2.7-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/pagehelper/pagehelper-spring-boot-starter/1.2.7/pagehelper-spring-boot-starter-1.2.7-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_github_wechatpay_apiv3_wechatpay_apache_httpclient_0_4_4.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.github.wechatpay-apiv3:wechatpay-apache-httpclient:0.4.4">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/wechatpay-apiv3/wechatpay-apache-httpclient/0.4.4/wechatpay-apache-httpclient-0.4.4.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/wechatpay-apiv3/wechatpay-apache-httpclient/0.4.4/wechatpay-apache-httpclient-0.4.4-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/github/wechatpay-apiv3/wechatpay-apache-httpclient/0.4.4/wechatpay-apache-httpclient-0.4.4-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_google_code_gson_gson_2_8_9.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.google.code.gson:gson:2.8.9">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/google/code/gson/gson/2.8.9/gson-2.8.9.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/google/code/gson/gson/2.8.9/gson-2.8.9-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/google/code/gson/gson/2.8.9/gson-2.8.9-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_google_zxing_core_3_3_0.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.google.zxing:core:3.3.0">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/google/zxing/core/3.3.0/core-3.3.0.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/google/zxing/core/3.3.0/core-3.3.0-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/google/zxing/core/3.3.0/core-3.3.0-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_google_zxing_javase_3_3_0.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.google.zxing:javase:3.3.0">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/google/zxing/javase/3.3.0/javase-3.3.0.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/google/zxing/javase/3.3.0/javase-3.3.0-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/google/zxing/javase/3.3.0/javase-3.3.0-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_squareup_okhttp3_okhttp_3_14_9.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.squareup.okhttp3:okhttp:3.14.9">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/squareup/okhttp3/okhttp/3.14.9/okhttp-3.14.9.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/squareup/okhttp3/okhttp/3.14.9/okhttp-3.14.9-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/squareup/okhttp3/okhttp/3.14.9/okhttp-3.14.9-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_squareup_okhttp3_okhttp_3_6_0.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.squareup.okhttp3:okhttp:3.6.0">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/squareup/okhttp3/okhttp/3.6.0/okhttp-3.6.0.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/squareup/okhttp3/okhttp/3.6.0/okhttp-3.6.0-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/squareup/okhttp3/okhttp/3.6.0/okhttp-3.6.0-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_squareup_okio_okio_1_11_0.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.squareup.okio:okio:1.11.0">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/squareup/okio/okio/1.11.0/okio-1.11.0.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/squareup/okio/okio/1.11.0/okio-1.11.0-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/squareup/okio/okio/1.11.0/okio-1.11.0-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_squareup_okio_okio_1_17_2.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.squareup.okio:okio:1.17.2">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/squareup/okio/okio/1.17.2/okio-1.17.2.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/squareup/okio/okio/1.17.2/okio-1.17.2-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/squareup/okio/okio/1.17.2/okio-1.17.2-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_sun_xml_bind_jaxb_core_2_1_14.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.sun.xml.bind:jaxb-core:2.1.14">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/sun/xml/bind/jaxb-core/2.1.14/jaxb-core-2.1.14.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/sun/xml/bind/jaxb-core/2.1.14/jaxb-core-2.1.14-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/sun/xml/bind/jaxb-core/2.1.14/jaxb-core-2.1.14-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__com_sun_xml_bind_jaxb_impl_2_1.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: com.sun.xml.bind:jaxb-impl:2.1">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/sun/xml/bind/jaxb-impl/2.1/jaxb-impl-2.1.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/com/sun/xml/bind/jaxb-impl/2.1/jaxb-impl-2.1-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/com/sun/xml/bind/jaxb-impl/2.1/jaxb-impl-2.1-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__io_lettuce_lettuce_core_6_1_8_RELEASE.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: io.lettuce:lettuce-core:6.1.8.RELEASE">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/io/lettuce/lettuce-core/6.1.8.RELEASE/lettuce-core-6.1.8.RELEASE.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/io/lettuce/lettuce-core/6.1.8.RELEASE/lettuce-core-6.1.8.RELEASE-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/io/lettuce/lettuce-core/6.1.8.RELEASE/lettuce-core-6.1.8.RELEASE-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__io_netty_netty_buffer_4_1_77_Final.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: io.netty:netty-buffer:4.1.77.Final">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-buffer/4.1.77.Final/netty-buffer-4.1.77.Final.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-buffer/4.1.77.Final/netty-buffer-4.1.77.Final-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-buffer/4.1.77.Final/netty-buffer-4.1.77.Final-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__io_netty_netty_codec_4_1_77_Final.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: io.netty:netty-codec:4.1.77.Final">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-codec/4.1.77.Final/netty-codec-4.1.77.Final.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-codec/4.1.77.Final/netty-codec-4.1.77.Final-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-codec/4.1.77.Final/netty-codec-4.1.77.Final-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__io_netty_netty_common_4_1_77_Final.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: io.netty:netty-common:4.1.77.Final">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-common/4.1.77.Final/netty-common-4.1.77.Final.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-common/4.1.77.Final/netty-common-4.1.77.Final-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-common/4.1.77.Final/netty-common-4.1.77.Final-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__io_netty_netty_handler_4_1_77_Final.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: io.netty:netty-handler:4.1.77.Final">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-handler/4.1.77.Final/netty-handler-4.1.77.Final.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-handler/4.1.77.Final/netty-handler-4.1.77.Final-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-handler/4.1.77.Final/netty-handler-4.1.77.Final-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__io_netty_netty_resolver_4_1_77_Final.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: io.netty:netty-resolver:4.1.77.Final">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-resolver/4.1.77.Final/netty-resolver-4.1.77.Final.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-resolver/4.1.77.Final/netty-resolver-4.1.77.Final-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-resolver/4.1.77.Final/netty-resolver-4.1.77.Final-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__io_netty_netty_transport_4_1_77_Final.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: io.netty:netty-transport:4.1.77.Final">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-transport/4.1.77.Final/netty-transport-4.1.77.Final.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-transport/4.1.77.Final/netty-transport-4.1.77.Final-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/io/netty/netty-transport/4.1.77.Final/netty-transport-4.1.77.Final-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__io_projectreactor_reactor_core_3_4_18.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: io.projectreactor:reactor-core:3.4.18">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/io/projectreactor/reactor-core/3.4.18/reactor-core-3.4.18.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/io/projectreactor/reactor-core/3.4.18/reactor-core-3.4.18-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/io/projectreactor/reactor-core/3.4.18/reactor-core-3.4.18-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__javax_activation_activation_1_1_1.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: javax.activation:activation:1.1.1">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/javax/activation/activation/1.1.1/activation-1.1.1.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/javax/activation/activation/1.1.1/activation-1.1.1-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/javax/activation/activation/1.1.1/activation-1.1.1-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__javax_activation_javax_activation_api_1_2_0.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: javax.activation:javax.activation-api:1.2.0">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__javax_xml_bind_jaxb_api_2_3_1.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: javax.xml.bind:jaxb-api:2.3.1">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__org_apache_httpcomponents_httpmime_4_5_13.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: org.apache.httpcomponents:httpmime:4.5.13">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpmime/4.5.13/httpmime-4.5.13.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpmime/4.5.13/httpmime-4.5.13-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpmime/4.5.13/httpmime-4.5.13-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__org_reactivestreams_reactive_streams_1_0_3.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: org.reactivestreams:reactive-streams:1.0.3">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/reactivestreams/reactive-streams/1.0.3/reactive-streams-1.0.3-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_redis_2_1_5_RELEASE.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.1.5.RELEASE">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-data-redis/2.1.5.RELEASE/spring-boot-starter-data-redis-2.1.5.RELEASE.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-data-redis/2.1.5.RELEASE/spring-boot-starter-data-redis-2.1.5.RELEASE-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-data-redis/2.1.5.RELEASE/spring-boot-starter-data-redis-2.1.5.RELEASE-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__org_springframework_boot_spring_boot_starter_data_redis_2_5_14.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.5.14">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-data-redis/2.5.14/spring-boot-starter-data-redis-2.5.14.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-data-redis/2.5.14/spring-boot-starter-data-redis-2.5.14-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/boot/spring-boot-starter-data-redis/2.5.14/spring-boot-starter-data-redis-2.5.14-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__org_springframework_data_spring_data_commons_2_5_11.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: org.springframework.data:spring-data-commons:2.5.11">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-commons/2.5.11/spring-data-commons-2.5.11.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-commons/2.5.11/spring-data-commons-2.5.11-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-commons/2.5.11/spring-data-commons-2.5.11-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__org_springframework_data_spring_data_keyvalue_2_5_11.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: org.springframework.data:spring-data-keyvalue:2.5.11">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-keyvalue/2.5.11/spring-data-keyvalue-2.5.11.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-keyvalue/2.5.11/spring-data-keyvalue-2.5.11-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-keyvalue/2.5.11/spring-data-keyvalue-2.5.11-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__org_springframework_data_spring_data_redis_2_5_11.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: org.springframework.data:spring-data-redis:2.5.11">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-redis/2.5.11/spring-data-redis-2.5.11.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-redis/2.5.11/spring-data-redis-2.5.11-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/data/spring-data-redis/2.5.11/spring-data-redis-2.5.11-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

+ 13 - 0
.idea/libraries/Maven__org_springframework_spring_oxm_5_3_20.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="Maven: org.springframework:spring-oxm:5.3.20">
+    <CLASSES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-oxm/5.3.20/spring-oxm-5.3.20.jar!/" />
+    </CLASSES>
+    <JAVADOC>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-oxm/5.3.20/spring-oxm-5.3.20-javadoc.jar!/" />
+    </JAVADOC>
+    <SOURCES>
+      <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-oxm/5.3.20/spring-oxm-5.3.20-sources.jar!/" />
+    </SOURCES>
+  </library>
+</component>

Різницю між файлами не показано, бо вона завелика
+ 1231 - 153
.idea/workspace.xml


+ 76 - 14
mybusiness/mybusiness.iml

@@ -25,6 +25,38 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Maven: com.github.wechatpay-apiv3:wechatpay-apache-httpclient:0.4.4" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpmime:4.5.13" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.1.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.5.11" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.5.11" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.5.11" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.3.20" level="project" />
+    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:6.1.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.77.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.77.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.77.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.77.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.77.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.77.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.4.18" level="project" />
+    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
+    <orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-core:4.0.6" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.9" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-core:2.1.14" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:activation:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-dysmsapi:1.1.0" level="project" />
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.7" level="project" />
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.7" level="project" />
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.6" level="project" />
+    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.2" level="project" />
+    <orderEntry type="library" name="Maven: com.google.zxing:core:3.3.0" level="project" />
+    <orderEntry type="library" name="Maven: com.google.zxing:javase:3.3.0" level="project" />
+    <orderEntry type="library" name="Maven: com.beust:jcommander:1.48" level="project" />
+    <orderEntry type="library" name="Maven: com.github.jai-imageio:jai-imageio-core:1.3.1" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-thymeleaf:2.5.14" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.5.14" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.5.14" level="project" />
@@ -92,26 +124,12 @@
     <orderEntry type="library" name="Maven: org.apache.shiro:shiro-event:1.10.0" level="project" />
     <orderEntry type="library" name="Maven: org.apache.shiro:shiro-ehcache:1.10.0" level="project" />
     <orderEntry type="library" name="Maven: net.sf.ehcache:ehcache-core:2.6.11" level="project" />
-    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.4.3" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.2.2" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.5.14" level="project" />
-    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:4.0.3" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.20" level="project" />
-    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.3.20" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.2.2" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.9" level="project" />
-    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.7" level="project" />
-    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.4.3" level="project" />
-    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.3.1" level="project" />
-    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.2" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.5.14" level="project" />
     <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.63" level="project" />
     <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.2.3.Final" level="project" />
     <orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
     <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.3.Final" level="project" />
     <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.12.0" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.12.6.1" level="project" />
-    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.12.6" level="project" />
     <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.83" level="project" />
     <orderEntry type="library" name="Maven: commons-io:commons-io:2.11.0" level="project" />
     <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" />
@@ -130,6 +148,8 @@
     <orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.2.14" level="project" />
     <orderEntry type="library" name="Maven: com.alibaba:druid:1.2.14" level="project" />
     <orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.16.16" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.6.0" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okio:okio:1.11.0" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-websocket:2.5.14" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.5.14" level="project" />
     <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.5.14" level="project" />
@@ -142,5 +162,47 @@
     <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.3.20" level="project" />
     <orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.3.20" level="project" />
     <orderEntry type="library" name="Maven: org.springframework:spring-websocket:5.3.20" level="project" />
+    <orderEntry type="library" name="Maven: com.github.wechatpay-apiv3:wechatpay-apache-httpclient:0.4.4" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpmime:4.5.13" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.12.6.1" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.12.6" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.1.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.5.11" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.5.11" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.5.11" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.3.20" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.3.20" level="project" />
+    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:6.1.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.77.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.77.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.77.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.77.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.77.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.77.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.4.18" level="project" />
+    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
+    <orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-core:4.0.6" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.9" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-core:2.1.14" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.1" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:activation:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-dysmsapi:1.1.0" level="project" />
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.7" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.5.14" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:4.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.20" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.9" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.7" level="project" />
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.7" level="project" />
+    <orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.6" level="project" />
+    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.2" level="project" />
+    <orderEntry type="library" name="Maven: com.google.zxing:core:3.3.0" level="project" />
+    <orderEntry type="library" name="Maven: com.google.zxing:javase:3.3.0" level="project" />
+    <orderEntry type="library" name="Maven: com.beust:jcommander:1.48" level="project" />
+    <orderEntry type="library" name="Maven: com.github.jai-imageio:jai-imageio-core:1.3.1" level="project" />
   </component>
 </module>

+ 46 - 1
mybusiness/pom.xml

@@ -100,13 +100,58 @@
             <version>1.16.16</version>
             <scope>provided</scope>
         </dependency>
-
+        <dependency>
+            <groupId>com.squareup.okhttp3</groupId>
+            <artifactId>okhttp</artifactId>
+            <version>3.6.0</version>
+        </dependency>
         <!--websocket-->
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-websocket</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>com.github.wechatpay-apiv3</groupId>
+            <artifactId>wechatpay-apache-httpclient</artifactId>
+            <version>0.4.4</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+            <version>2.1.5.RELEASE</version>
+        </dependency>
+
+        <!-- 发送短信验证码支持 -->
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-core</artifactId>
+            <version>4.0.6</version> <!-- 注:如提示报错,先升级基础包版,无法解决可联系技术支持 -->
+        </dependency>
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-dysmsapi</artifactId>
+            <version>1.1.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.pagehelper</groupId>
+            <artifactId>pagehelper-spring-boot-starter</artifactId>
+            <version>1.2.7</version>
+        </dependency>
+
+        <!--二维码生成器-->
+        <dependency>
+            <groupId>com.google.zxing</groupId>
+            <artifactId>core</artifactId>
+            <version>3.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.zxing</groupId>
+            <artifactId>javase</artifactId>
+            <version>3.3.0</version>
+        </dependency>
     </dependencies>
 
 </project>

+ 51 - 0
mybusiness/src/main/java/com/ruoyi/business/config/KeyPairFactory.java

@@ -0,0 +1,51 @@
+package com.ruoyi.business.config;
+
+import org.springframework.core.io.ClassPathResource;
+
+import java.security.KeyPair;
+import java.security.KeyStore;
+import java.security.PrivateKey;
+import java.security.PublicKey;
+import java.security.cert.X509Certificate;
+
+public class KeyPairFactory {
+
+    private KeyStore store;
+
+    private final Object lock = new Object();
+
+    /**
+     * 获取公私钥.
+     *
+     * @param keyPath the key path
+     * @param keyPass password
+     * @return the key pair
+     */
+    public KeyPair createPKCS12(String keyPath, String keyPass) {
+        ClassPathResource resource = new ClassPathResource(keyPath);
+        char[] pem = keyPass.toCharArray();
+        try {
+            synchronized (lock) {
+                if (store == null) {
+                    synchronized (lock) {
+                        store = KeyStore.getInstance("PKCS12");
+                        store.load(resource.getInputStream(), pem);
+                    }
+                }
+            }
+            X509Certificate certificate = (X509Certificate) store.getCertificate("Tenpay Certificate");
+            certificate.checkValidity();
+            // 证书的序列号
+            String serialNumber = certificate.getSerialNumber().toString(16).toUpperCase();
+            // 证书的公钥
+            PublicKey publicKey = certificate.getPublicKey();
+            // 证书的私钥
+            PrivateKey storeKey = (PrivateKey) store.getKey("Tenpay Certificate", pem);
+
+            return new KeyPair(publicKey, storeKey);
+
+        } catch (Exception e) {
+            throw new IllegalStateException("Cannot load keys from store: " + resource, e);
+        }
+    }
+}

+ 6 - 6
mybusiness/src/main/java/com/ruoyi/business/config/SessionHelper.java

@@ -1,6 +1,6 @@
 package com.ruoyi.business.config;
 
-import com.ruoyi.business.xhn.domain.WxUserInfo;
+import com.ruoyi.business.xhnnotsingle.registeruser.domain.XhnRegisterUser;
 import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.subject.Subject;
 import org.slf4j.Logger;
@@ -38,13 +38,13 @@ public final class SessionHelper {
     public static void login(Token token) {
         getSubject().login(token);
         setAttribute(CURRENT_USER, token.getUser());
-        setAttribute(CURRENT_USER_ID, token.getUser().getOpenId());
+        setAttribute(CURRENT_USER_ID, token.getUser().getOpenid());
         setAttribute(CURRENT_LOGIN_TIME, new Date());
     }
 
     public static boolean isLogined() {
-        WxUserInfo user = getCurrentUser();
-        return user != null && user.getOpenId().equals(getAttribute(CURRENT_USER_ID));
+        XhnRegisterUser user = getCurrentUser();
+        return user != null && user.getOpenid().equals(getAttribute(CURRENT_USER_ID));
     }
 
     public static void setAttribute(Object key, Object value) {
@@ -64,7 +64,7 @@ public final class SessionHelper {
         return (T) getSubject().getSession().removeAttribute(key);
     }
 
-    public static WxUserInfo getCurrentUser() {
+    public static XhnRegisterUser getCurrentUser() {
         return getAttribute(CURRENT_USER);
     }
 
@@ -72,7 +72,7 @@ public final class SessionHelper {
 
     public static String getCurrentUserId() {
         if(getCurrentUser() != null){
-            return getCurrentUser().getOpenId();
+            return getCurrentUser().getOpenid();
         }
         return "anonymous";
     }

+ 4 - 4
mybusiness/src/main/java/com/ruoyi/business/config/Token.java

@@ -1,6 +1,6 @@
 package com.ruoyi.business.config;
 
-import com.ruoyi.business.xhn.domain.WxUserInfo;
+import com.ruoyi.business.xhnnotsingle.registeruser.domain.XhnRegisterUser;
 import org.apache.shiro.authc.UsernamePasswordToken;
 
 import java.io.Serializable;
@@ -10,13 +10,13 @@ import java.io.Serializable;
  * @Description: 增加了implemens Serializable
  */
 public class Token extends UsernamePasswordToken implements Serializable {
-    private WxUserInfo user;
+    private XhnRegisterUser user;
 
-    public WxUserInfo getUser() {
+    public XhnRegisterUser getUser() {
         return user;
     }
 
-    public void setUser(WxUserInfo user) {
+    public void setUser(XhnRegisterUser user) {
         this.user = user;
     }
 

+ 234 - 0
mybusiness/src/main/java/com/ruoyi/business/config/WxPayConfig.java

@@ -0,0 +1,234 @@
+package com.ruoyi.business.config;
+
+import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.business.utils.PayUtils;
+import com.wechat.pay.contrib.apache.httpclient.WechatPayHttpClientBuilder;
+import com.wechat.pay.contrib.apache.httpclient.auth.PrivateKeySigner;
+import com.wechat.pay.contrib.apache.httpclient.auth.Verifier;
+import com.wechat.pay.contrib.apache.httpclient.auth.WechatPay2Credentials;
+import com.wechat.pay.contrib.apache.httpclient.auth.WechatPay2Validator;
+import com.wechat.pay.contrib.apache.httpclient.cert.CertificatesManager;
+import com.wechat.pay.contrib.apache.httpclient.util.AesUtil;
+import com.wechat.pay.contrib.apache.httpclient.util.PemUtil;
+import lombok.Data;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.security.GeneralSecurityException;
+import java.security.PrivateKey;
+import java.security.Signature;
+import java.time.Duration;
+import java.time.Instant;
+import java.util.Base64;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+import static com.wechat.pay.contrib.apache.httpclient.constant.WechatPayHttpHeaders.*;
+
+
+@Configuration
+@Data //使用set方法将wxpay节点中的值填充到当前类的属性中
+public class WxPayConfig {
+
+    private static final Logger log = LoggerFactory.getLogger("WxPayConfig");
+
+    /**
+     * 加载商户私钥
+     */
+    private PrivateKey getPrivateKey(String fail) {
+        try {
+            //示例:私钥存储在文件
+//            return PemUtil.loadPrivateKey(new FileInputStream(new ClassPathResource(fail).getFile()));
+            return PemUtil.loadPrivateKey(new FileInputStream(new File("D://tuodan/"+fail)));
+        } catch (FileNotFoundException e) {
+            throw new RuntimeException("私钥文件不存在", e);
+        } catch (IOException e) {
+            throw new RuntimeException("私钥文件不存在", e);
+        }
+    }
+
+//    /**
+//     * 加载商户私钥
+//     */
+//    private PrivateKey getPrivateKeyByStr(String privateKey) {
+//        try {
+//            //示例:私钥为String字符串
+//            return PemUtil.loadPrivateKey(new ByteArrayInputStream(privateKey.getBytes(StandardCharsets.UTF_8)));
+//        } catch (Exception e) {
+//            throw new RuntimeException("私钥文件不存在", e);
+//        }
+//    }
+
+
+    /**
+     * 签名验证器
+     *
+     * @return Verifier
+     */
+    @Bean
+    public Verifier getVerifier() throws Exception {
+
+        //获取商户私钥
+        PrivateKey privateKey = getPrivateKey(PayUtils.privateKeyPath);
+        //私钥签名对象
+        PrivateKeySigner keySigner = new PrivateKeySigner(PayUtils.mchSerialNo, privateKey);
+        //身份认证对象
+        WechatPay2Credentials pay2Credentials = new WechatPay2Credentials(PayUtils.mchId, keySigner);
+        // 获取证书管理器实例
+        CertificatesManager certificatesManager = CertificatesManager.getInstance();
+        // 向证书管理器增加需要自动更新平台证书的商户信息
+        certificatesManager.putMerchant(PayUtils.mchId, pay2Credentials,
+                //对称加密的秘钥
+                PayUtils.apiV3Key.getBytes(StandardCharsets.UTF_8));
+        // ... 若有多个商户号,可继续调用putMerchant添加商户信息
+
+        // 从证书管理器中获取verifier
+        Verifier verifier = certificatesManager.getVerifier(PayUtils.mchId);
+        return verifier;
+    }
+
+    /**
+     * 获取http请求对象
+     * 每次请求更新平台证书
+     *
+     * @param verifier
+     * @return
+     */
+    @Bean
+    public CloseableHttpClient getWxPayClient(Verifier verifier) {
+        //商户私钥
+        PrivateKey privateKey = getPrivateKey(PayUtils.privateKeyPath);
+        WechatPayHttpClientBuilder builder = WechatPayHttpClientBuilder.create()
+                .withMerchant(PayUtils.mchId, PayUtils.mchSerialNo, privateKey)
+                .withValidator(new WechatPay2Validator(verifier));
+        // ... 接下来,你仍然可以通过builder设置各种参数,来配置你的HttpClient
+
+        // 通过WechatPayHttpClientBuilder构造的HttpClient,会自动的处理签名和验签,并进行证书自动更新
+        CloseableHttpClient httpClient = builder.build();
+        return httpClient;
+
+    }
+
+    /**
+     * 签名校验
+     * url https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter5_1_13.shtml
+     */
+    public String verifySign(HttpServletRequest request) throws Exception {
+        //检查header
+        String[] headers = {WECHAT_PAY_SERIAL, WECHAT_PAY_SIGNATURE, WECHAT_PAY_NONCE, WECHAT_PAY_TIMESTAMP};
+        for (String headerName : headers) {
+            if (request.getHeader(headerName) == null) {
+                log.info("{} is null", headerName);
+                return null;
+            }
+        }
+        //检查时间
+        String timestamp = request.getHeader(WECHAT_PAY_TIMESTAMP);
+        Instant responseTime = Instant.ofEpochSecond(Long.parseLong(timestamp));
+        if (Duration.between(responseTime, Instant.now()).abs().toMinutes() >= 5) {
+            log.info("超过应答时间");
+            return null;
+        }
+        //获取微信返回的参数
+        String data;
+        try {
+            data = request.getReader().lines().collect(Collectors.joining());
+        } catch (IOException e) {
+            log.error("获取微信V3回调参数失败",e);
+            return null;
+        }
+        //校验签名
+        String nonce = request.getHeader(WECHAT_PAY_NONCE);
+        String message =  timestamp + "\n" + nonce + "\n" + data + "\n";
+        String serial = request.getHeader(WECHAT_PAY_SERIAL);
+        String signature = request.getHeader(WECHAT_PAY_SIGNATURE);
+        Verifier verifier = getVerifier();
+
+        if (!verifier.verify(serial, message.getBytes(StandardCharsets.UTF_8), signature)) {
+            log.info("签名校验失败");
+            return null;
+        }
+        return data;
+    }
+
+    /**
+     * v3支付回调数据校验
+     */
+    public String payRequestDecryption(HttpServletRequest request){
+        //校验签名
+        String data = null;
+        try {
+            data = this.verifySign(request);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        if (data == null){
+            return null;
+        }
+        JSONObject jsonObject = JSONObject.parseObject(data);
+        System.out.println(jsonObject);
+
+
+
+        String eventType = jsonObject.getString("event_type");
+        String resourceType = jsonObject.getString("resource_type");
+        if (!Objects.equals(eventType,"TRANSACTION.SUCCESS") || !Objects.equals(resourceType,"encrypt-resource")){
+            log.info("不是支付通知不处理:{}",data);
+            return null;
+        }
+        //参数解密
+        JSONObject resource = jsonObject.getJSONObject("resource");
+        String ciphertext = resource.getString("ciphertext");
+        String nonce = resource.getString("nonce");
+        String associatedData = resource.getString("associated_data");
+        AesUtil aesUtil = new AesUtil(PayUtils.apiV3Key.getBytes(StandardCharsets.UTF_8));
+        String result = null;
+        try {
+            result = aesUtil.decryptToString(associatedData.getBytes(StandardCharsets.UTF_8),nonce.getBytes(StandardCharsets.UTF_8),ciphertext);
+        } catch (GeneralSecurityException e) {
+            log.error("微信v3解密异常",e);
+        }
+        System.out.println("解密之后的数据是:"+result);
+        return result;
+    }
+
+
+    /**
+     * 作用:使用字段appId、timeStamp、nonceStr、package计算得出的签名值
+     * 场景:根据微信统一下单接口返回的 prepay_id 生成调启支付所需的签名值
+     * @param appId
+     * @param timestamp
+     * @param nonceStr
+     * @param pack package
+     * @return
+     * @throws Exception
+     */
+    public String getSign(String appId, long timestamp, String nonceStr, String pack) throws Exception{
+        String message = buildMessage(appId, timestamp, nonceStr, pack);
+        String paySign= sign(message.getBytes("utf-8"));
+        return paySign;
+    }
+
+    private String buildMessage(String appId, long timestamp, String nonceStr, String pack) {
+        return appId + "\n"
+                + timestamp + "\n"
+                + nonceStr + "\n"
+                + pack + "\n";
+    }
+    private String sign(byte[] message) throws Exception{
+        Signature sign = Signature.getInstance("SHA256withRSA");
+        //这里需要一个PrivateKey类型的参数,就是商户的私钥。
+        sign.initSign(this.getPrivateKey(PayUtils.privateKeyPath));
+        sign.update(message);
+        return Base64.getEncoder().encodeToString(sign.sign());
+    }
+}

+ 7 - 8
mybusiness/src/main/java/com/ruoyi/business/domain/WxPay.java

@@ -2,7 +2,10 @@ package com.ruoyi.business.domain;
 
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
+import java.text.SimpleDateFormat;
 import java.util.Arrays;
+import java.util.Date;
+import java.util.Random;
 
 /**
  * @author wang_xy
@@ -14,14 +17,10 @@ import java.util.Arrays;
  */
 public class WxPay {
 
-    public static final String TOKEN = "fuxiao";
-    public static final String APPID = "wx820da939d0dbe1ba";
-    public static final String APPSECRET = "9eb1105add72a37d39bc56ddd1d1b977";
-    public static final String APPAESKEY = "";
-
-    public static final String APPMCHID = "";// 微信支付商户号
-    public static final String APPMCHKEY = "";// 微信支付商户密钥
-    public static final String APPKEYPATH = "";// p12证书的位置,可以指定绝对路径,也可以指定类路径(以classpath:开头)
+//    public static final String TOKEN = "fuxiao";
+//    public static final String APPID = "wx820da939d0dbe1ba";
+//    public static final String APPSECRET = "9eb1105add72a37d39bc56ddd1d1b977";
+    public static final String TOKEN = "sjkj";
 
 
 

+ 88 - 12
mybusiness/src/main/java/com/ruoyi/business/domain/HttpClientUtil.java

@@ -1,16 +1,23 @@
-package com.ruoyi.business.domain;
+package com.ruoyi.business.utils;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
 import java.nio.charset.Charset;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.SignatureException;
+import java.security.spec.InvalidKeySpecException;
+import java.util.HashMap;
 
+import com.ruoyi.business.domain.HttpDeleteWithBody;
 import com.ruoyi.common.exception.ServiceException;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpDelete;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.client.methods.HttpPut;
+import org.apache.http.client.methods.*;
+import org.apache.http.entity.ContentType;
 import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.util.EntityUtils;
 import org.slf4j.Logger;
@@ -20,6 +27,7 @@ public class HttpClientUtil {
 	private static final Logger LOGGER = LoggerFactory.getLogger(HttpClientUtil.class);
 	private static final HttpClient client = HttpClients.createDefault();
 
+
 	/**
 	 * post请求
 	 *
@@ -29,20 +37,39 @@ public class HttpClientUtil {
 	 */
 	public static String post(HttpPost post, String paramStr, String cookie) {
 		String data = "";
-		post.addHeader("Content-type", "application/json; charset=utf-8");
-		post.setHeader("Accept", "application/json");
-		if (StringUtils.isNotEmpty(paramStr)) {
-			post.setEntity(new StringEntity(paramStr, Charset.forName("UTF-8")));
+		//获取签名请求头
+		HashMap<String, String> heads = null;
+		try {
+			heads = WxSignV3Utils.getSignMap("POST", post.getURI().toString(), paramStr);
+		} catch (InvalidKeySpecException e) {
+			e.printStackTrace();
+		} catch (NoSuchAlgorithmException e) {
+			e.printStackTrace();
+		} catch (UnsupportedEncodingException e) {
+			e.printStackTrace();
+		} catch (InvalidKeyException e) {
+			e.printStackTrace();
+		} catch (SignatureException e) {
+			e.printStackTrace();
 		}
-		if (StringUtils.isNotEmpty(cookie)) {
-			post.setHeader("Cookie", cookie);
+		post.addHeader("Authorization", heads.get("Authorization"));
+		post.addHeader("Accept", heads.get("Accept"));
+		post.addHeader("Content-Type",heads.get("Content-Type"));
+
+		if (StringUtils.isNotEmpty(paramStr)) {
+			StringEntity entity = new StringEntity(paramStr, ContentType.APPLICATION_JSON);
+			post.setEntity(entity);
+//			post.setEntity(new StringEntity(paramStr, Charset.forName("UTF-8")));
 		}
 		try {
 			HttpResponse resp = client.execute(post);
 			//获取HTTP状态码
 			int statusCode = resp.getStatusLine().getStatusCode();
 			if (statusCode != 200) {
-				throw new ServiceException("网络错误,状态码:" + statusCode);
+				System.out.println("Authorization"+heads.get("Authorization"));
+				System.out.println("Accept"+heads.get("Accept"));
+				System.out.println("Content-Type"+heads.get("Content-Type"));
+//				throw new ServiceException("网络错误,状态码:" + statusCode);
 			}
 			HttpEntity httpEntity = resp.getEntity();
 			data = EntityUtils.toString(httpEntity, "UTF-8");
@@ -54,6 +81,55 @@ public class HttpClientUtil {
 		return data;
 	}
 
+
+	public static String wxDoPostJson(String url, String json) {
+		// 创建Httpclient对象
+		CloseableHttpClient httpClient = HttpClients.createDefault();
+		CloseableHttpResponse response = null;
+		String resultString = "";
+		try {
+			// 创建Http Post请求
+			HttpPost httpPost = new HttpPost(url);
+
+			//获取签名请求头
+			HashMap<String, String> heads = null;
+			try {
+				heads = WxSignV3Utils.getSignMap("POST", url, json);
+			} catch (InvalidKeySpecException e) {
+				e.printStackTrace();
+			} catch (NoSuchAlgorithmException e) {
+				e.printStackTrace();
+			} catch (UnsupportedEncodingException e) {
+				e.printStackTrace();
+			} catch (InvalidKeyException e) {
+				e.printStackTrace();
+			} catch (SignatureException e) {
+				e.printStackTrace();
+			}
+
+			httpPost.addHeader("Authorization", heads.get("Authorization"));
+			httpPost.addHeader("Accept", heads.get("Accept"));
+			httpPost.addHeader("Content-Type",heads.get("Content-Type"));
+			// 创建请求内容
+			StringEntity entity = new StringEntity(json, ContentType.APPLICATION_JSON);
+			httpPost.setEntity(entity);
+			// 执行http请求
+			response = httpClient.execute(httpPost);
+//			resultString = EntityUtils.toString(response.getEntity(), getDefaultCharSet());
+		} catch (Exception e) {
+			e.printStackTrace();
+		} finally {
+			try {
+				response.close();
+			} catch (IOException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+		}
+
+		return resultString;
+	}
+
 	/**
 	 * put请求
 	 *

+ 64 - 0
mybusiness/src/main/java/com/ruoyi/business/utils/PayUtils.java

@@ -0,0 +1,64 @@
+package com.ruoyi.business.utils;
+
+/**
+ * @author wang_xy
+ * @description
+ * @Version 1.0
+ * @params
+ * @return
+ * @since 2022/11/24 11:02
+ */
+public class PayUtils {
+
+    /**
+     * 商户号
+     */
+    public static String mchId = "1540813091";
+
+    /**
+     * 商户API证书序列号
+     */
+    public static String mchSerialNo = "2F58A5CC25FD1760840F1AA4CED1EC61B592E90E";
+
+    /**
+     * 商户私钥文件
+     */
+    public static String privateKeyPath = "apiclient_key.pem";
+
+    /**
+     * 商户私钥文件
+     */
+    public static String keyPath = "apiclient_cert.p12";
+    /**
+     * 商户私钥文件
+     */
+    public static String privateCertPath;
+
+    /**
+     * APIv3密钥
+     */
+    public static String apiV3Key = "changchunshoujiakejigongsi1a2b3c";
+
+    /**
+     * APPID
+     */
+    public static String appid = "wx19ac981693d1a79a";
+    /**
+     * secret
+     */
+    public static String secret = "cc7d798b4ce862979bb8f1571ef8be2b";
+    /**
+     * 微信服务器地址
+     */
+    public static String domain="https://api.mch.weixin.qq.com";
+
+    /**
+     * 接收结果通知地址
+     */
+    public static String notifyDomain="http://qiyerenzibao.com/xhn/weixinotify";
+
+    /**
+     * 项目访问地址
+     */
+    public static String actionDomain="http://qiyerenzibao.com/xhn/";
+}

+ 97 - 0
mybusiness/src/main/java/com/ruoyi/business/utils/WxSignV3Utils.java

@@ -0,0 +1,97 @@
+package com.ruoyi.business.utils;
+
+import com.ruoyi.business.config.KeyPairFactory;
+import okhttp3.HttpUrl;
+import com.ruoyi.business.utils.PayUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.io.UnsupportedEncodingException;
+import java.security.*;
+import java.security.spec.InvalidKeySpecException;
+import java.util.Base64;
+import java.util.HashMap;
+import java.util.Random;
+
+
+/**
+ * Created by HCH on 2021/12/14.
+ */
+@Component
+public class WxSignV3Utils {
+
+    /**
+     * 使用方法
+     * @param method 请求方法
+     * @param url 请求url
+     * @param body 请求内容
+     * @return
+     */
+    public static HashMap<String, String> getSignMap(String method, String url, String body) throws InvalidKeySpecException, NoSuchAlgorithmException, UnsupportedEncodingException, InvalidKeyException, SignatureException {
+        String authorization = getSign(method, url, body);
+
+        HashMap<String, String> headsMap = new HashMap<>();
+        headsMap.put("Authorization", authorization);
+        headsMap.put("Content-Type", "application/json");
+        headsMap.put("Accept", "application/json");
+
+        return headsMap;
+    }
+
+    public static String getSign(String method, String url, String body) throws NoSuchAlgorithmException, SignatureException, InvalidKeySpecException, InvalidKeyException, UnsupportedEncodingException {
+        return "WECHATPAY2-SHA256-RSA2048 " + getToken(method, HttpUrl.parse(url), body);
+    }
+
+    public static String getToken(String method, HttpUrl url, String body) throws UnsupportedEncodingException, SignatureException, NoSuchAlgorithmException, InvalidKeySpecException, InvalidKeyException {
+        String nonceStr = nonceString();
+        long timestamp = System.currentTimeMillis() / 1000;
+        String message = buildMessage(method, url, timestamp, nonceStr, body);
+        String signature = sign(message.getBytes("utf-8"));
+        return "mchid=\"" + PayUtils.mchId + "\","
+                + "nonce_str=\"" + nonceStr + "\","
+                + "timestamp=\"" + timestamp + "\","
+                + "serial_no=\"" + PayUtils.mchSerialNo + "\","
+                + "signature=\"" + signature + "\"";
+    }
+
+    public static String sign(byte[] message) throws NoSuchAlgorithmException, InvalidKeySpecException, InvalidKeyException, SignatureException {
+        Signature sign = Signature.getInstance("SHA256withRSA");
+        //sign.initSign(getPKCS8PrivateKey(privateKey));
+        KeyPair pkcs12 = new KeyPairFactory().createPKCS12(PayUtils.keyPath,PayUtils.mchId);
+        PrivateKey aPrivate = pkcs12.getPrivate();
+        sign.initSign(aPrivate);
+
+        sign.update(message);
+
+        return Base64.getEncoder().encodeToString(sign.sign());
+    }
+
+    public static String buildMessage(String method, HttpUrl url, long timestamp, String nonceStr, String body) {
+        String canonicalUrl = url.encodedPath();
+        if (url.encodedQuery() != null) {
+            canonicalUrl += "?" + url.encodedQuery();
+        }
+
+        return method + "\n"
+                + canonicalUrl + "\n"
+                + timestamp + "\n"
+                + nonceStr + "\n"
+                + body + "\n";
+    }
+
+    public static String nonceString() {
+
+        String currTime = String.format("%d", (long) System.currentTimeMillis() / 1000);
+
+        String strTime = currTime.substring(8, currTime.length());
+
+        Random random = new Random();
+        int num = (int) (random.nextDouble() * (1000000 - 100000) + 100000);
+        String code = String.format("%06d", num);
+
+        String nonce_str = currTime.substring(2) + code;
+        return nonce_str;
+
+    }
+
+}

+ 546 - 19
mybusiness/src/main/java/com/ruoyi/business/xhn/controller/XhnController.java

@@ -1,18 +1,40 @@
 package com.ruoyi.business.xhn.controller;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.github.pagehelper.PageInfo;
 import com.ruoyi.business.config.SessionHelper;
+import com.ruoyi.business.config.WxPayConfig;
 import com.ruoyi.business.domain.WxPay;
-import com.ruoyi.business.xhn.domain.WxUserInfo;
+import com.ruoyi.business.utils.AliyunSendSmsUtil;
+import com.ruoyi.business.xhn.domain.PayDomain;
+import com.ruoyi.business.xhn.domain.RegisteruserUnpaid;
 import com.ruoyi.business.xhn.service.WxService;
+import com.ruoyi.business.xhn.service.impl.RedisService;
+import com.ruoyi.business.xhnnotsingle.activityInfo.domain.XhnActivityInfo;
+import com.ruoyi.business.xhnnotsingle.activityInfo.service.IXhnActivityInfoService;
+import com.ruoyi.business.xhnnotsingle.aliyunSms.domain.XhnAliyunSms;
+import com.ruoyi.business.xhnnotsingle.aliyunSms.service.IXhnAliyunSmsService;
+import com.ruoyi.business.xhnnotsingle.gift.domain.XhnGift;
+import com.ruoyi.business.xhnnotsingle.gift.service.IXhnGiftService;
+import com.ruoyi.business.xhnnotsingle.integral.domain.XhnIntegral;
+import com.ruoyi.business.xhnnotsingle.integral.service.IXhnIntegralService;
+import com.ruoyi.business.xhnnotsingle.matchmaker.domain.XhnMatchmaker;
+import com.ruoyi.business.xhnnotsingle.matchmaker.service.IXhnMatchmakerService;
+import com.ruoyi.business.xhnnotsingle.moneybyintegral.domain.XhnMoneybyintegral;
+import com.ruoyi.business.xhnnotsingle.moneybyintegral.service.IXhnMoneybyintegralService;
+import com.ruoyi.business.xhnnotsingle.registeruser.domain.XhnRegisterUser;
+import com.ruoyi.business.xhnnotsingle.registeruser.service.IXhnRegisterUserService;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.utils.StringUtils;
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.subject.Subject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 
@@ -21,6 +43,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.io.PrintWriter;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -36,32 +59,186 @@ import java.util.Map;
 @RequestMapping("/xhn")
 public class XhnController extends BaseController {
 
-    private String prefix = "xhn";
+    private static final Logger log = LoggerFactory.getLogger("app-xhn");
+
+    private String prefix = "appxhn";
 
     @Autowired
     private WxService wxService;
 
+    @Autowired
+    private IXhnMatchmakerService xhnMatchmakerService;
+
+    @Autowired
+    private IXhnRegisterUserService xhnRegisterUserService;
+
+    @Autowired
+    private WxPayConfig wxPayConfig;
+
+    @Autowired
+    protected RedisService redisService;
+
+    @Autowired
+    protected IXhnAliyunSmsService xhnAliyunSmsService;
+
+    @Autowired
+    protected IXhnActivityInfoService xhnActivityInfoService;
+
+    @Autowired
+    protected IXhnGiftService xhnGiftService;
+
+    @Autowired
+    protected IXhnIntegralService xhnIntegralService;
+
+    @Autowired
+    protected IXhnMoneybyintegralService xhnMoneybyintegralService;
+
+
     /**
-     * 进入程序登录页
+     * 启动
      * @return
      */
-    @GetMapping("/login")
-    public String login()
+    @GetMapping("/qidongye")
+    public String qidongye(HttpServletRequest request, HttpServletResponse response,ModelMap mmap)
     {
-        WxUserInfo user = SessionHelper.getCurrentUser();
+        XhnRegisterUser user = SessionHelper.getCurrentUser();
         if(user != null){
-            return prefix + "/xhnIndex";
+            try {
+                response.sendRedirect(request.getContextPath()+"/xhn/index");
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
         }
-        return prefix + "/xhnlogin";
+        return prefix + "/qidongye";
     }
+
+    /**
+     * 注册页面
+     * @return
+     */
+    @GetMapping("/register")
+    public String register(HttpServletRequest request, HttpServletResponse response,String code,String promoter,ModelMap mmap)
+    {
+        XhnRegisterUser user = wxService.wxLogin(code,promoter);
+        if(StringUtils.isNotBlank(user.getPhone())){//手机号不为空的情况是注册过的
+            try {
+                response.sendRedirect(request.getContextPath()+"/xhn/index");
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        mmap.put("user",user);
+        return prefix + "/register";
+    }
+
+    /**
+     * 修改个人信息
+     * @return
+     */
+    @GetMapping("/updateUser")
+    public String updateUser(ModelMap mmap)
+    {
+        mmap.put("user",SessionHelper.getCurrentUser());
+        return prefix + "/updateuser";
+    }
+
+    /**
+     * 余额充值页面
+     * @return
+     */
+    @GetMapping("/openRecharge")
+    public String openRecharge(ModelMap mmap)
+    {
+        mmap.put("brUser",SessionHelper.getCurrentUser());
+        mmap.put("jfList",xhnMoneybyintegralService.selectXhnMoneybyintegralList(new XhnMoneybyintegral()));
+        return prefix + "/openRecharge";
+    }
+
     /**
      * 进入程序首页
      * @return
      */
     @GetMapping("/index")
-    public String index()
+    public String index(ModelMap mmap)
+    {
+        XhnActivityInfo daohang = new XhnActivityInfo();
+        daohang.setType("1");
+        mmap.put("daohang",xhnActivityInfoService.selectXhnActivityInfoList(daohang));
+        RegisteruserUnpaid appuser = new RegisteruserUnpaid();
+        appuser.setOpenid(SessionHelper.getCurrentUserId());
+        PageInfo<RegisteruserUnpaid> pageInfo = xhnRegisterUserService.findXhnRegisterUserByApp(1, 10, appuser);
+        mmap.put("userList",pageInfo);
+        mmap.put("brUser",SessionHelper.getCurrentUser());
+        XhnActivityInfo xhnActivityInfo = new XhnActivityInfo();
+        xhnActivityInfo.setType("2");
+        mmap.put("huodongList",xhnActivityInfoService.selectXhnActivityInfoList(xhnActivityInfo));
+        mmap.put("hongniangList",xhnMatchmakerService.selectXhnMatchmakerList(new XhnMatchmaker()));
+        return prefix + "/index";
+    }
+
+    /**
+     * 活动页面详情页面
+     * @return
+     */
+    @GetMapping("/activityInfo")
+    public String activityInfo(ModelMap mmap,String huodongId)
     {
-        return prefix + "/xhnIndex";
+        XhnActivityInfo xhnActivityInfo = xhnActivityInfoService.selectXhnActivityInfoById(huodongId);
+        mmap.put("huodongInfo",xhnActivityInfo);
+        mmap.put("bmUserNum",xhnActivityInfoService.findApplicantsNumById(huodongId));
+        mmap.put("isBaoMing",xhnActivityInfoService.findApplicantsNumByIdAndOpenId(huodongId,SessionHelper.getCurrentUserId()));
+        mmap.put("brUser",SessionHelper.getCurrentUser());
+        mmap.put("date",new Date().compareTo(xhnActivityInfo.getActivityStartDate()) == -1 ? true:false);
+        return prefix + "/activity";
+    }
+
+    /**
+     * 进入盲盒详情页
+     * @return
+     */
+    @GetMapping("/chaitamh")
+    public String chaitamh(ModelMap mmap,String openid)
+    {
+        RegisteruserUnpaid user = wxService.findAppUserByOpenid(openid);
+        mmap.put("user",user);
+        mmap.put("bropenid",SessionHelper.getCurrentUserId());
+        XhnGift gift = new XhnGift();
+        gift.setState("Y");
+        mmap.put("giftList",xhnGiftService.selectXhnGiftList(gift));
+        return prefix + "/chaitamh";
+    }
+
+    /**
+     * 进入红娘详情页面
+     * @return
+     */
+    @GetMapping("/matchmaker")
+    public String matchmaker(ModelMap mmap,String hongniangid)
+    {
+        mmap.put("matchmaker",xhnMatchmakerService.selectXhnMatchmakerById(hongniangid));
+        return prefix + "/matchmaker";
+    }
+    /**
+     * 进入关于我们页面
+     * @return
+     */
+    @GetMapping("/goGywm")
+    public String goGywm(ModelMap mmap)
+    {
+        return prefix + "/gywm";
+    }
+
+    /**
+     * 打开盲盒按钮跳转支付页面
+     * @return
+     */
+    @GetMapping("/openBox")
+    public String openBox(ModelMap mmap,String url,String boxOpenid)
+    {
+        mmap.put("brUser",SessionHelper.getCurrentUser());
+        mmap.put("hdUrl",url);
+        mmap.put("boxOpenid",boxOpenid);
+        return prefix + "/openBox";
     }
 
     /**
@@ -107,17 +284,367 @@ public class XhnController extends BaseController {
     }
     /**
      * 微信登录授权获取用户微信信息
+     * code  微信授权所需code
+     * promoter  推广人id
      * @return
      */
     @GetMapping("/wxLogin")
     @ResponseBody
-    public AjaxResult access_token(HttpServletRequest request, HttpServletResponse response, String code) throws ServletException, IOException {
-//        `/xhn/access_token?appid=${this.APPID}&secret=${this.APPSECRET}&code=${code}&grant_type=authorization_code`
-        /*
-         * 参数
-         * code   填写第一步获取的 code 参数
-         */
-        WxUserInfo ret = wxService.wxLogin(code);
+    public AjaxResult access_token(HttpServletRequest request, HttpServletResponse response, String code,String promoter) throws ServletException, IOException {
+        XhnRegisterUser ret = wxService.wxLogin(code,promoter);
+        return AjaxResult.success(ret);
+    }
+
+    /**
+     * 微信支付发起接口
+     * description 订单汉字描述
+     * total 金额(分)
+     * purpose 用途 0:放入盲盒;1:开盲盒;2:充值余额;3:活动报名
+     * boxOpenid 盲盒信息id
+     * @return  返回订单等信息
+     */
+    @PostMapping("/getPayPrepayId")
+    @ResponseBody
+    public AjaxResult getPayPrepayId(HttpServletRequest request, HttpServletResponse response,String description,String total,String purpose,String boxOpenid) throws Exception {
+        XhnRegisterUser user = SessionHelper.getCurrentUser();
+        PayDomain ret = wxService.getPayPrepayId(user,description,total,purpose,boxOpenid);
         return AjaxResult.success(ret);
     }
+
+    /**
+     * 付款后回调函数接口
+     * @param request
+     * @param response
+     * @return
+     */
+    @PostMapping("/weixinotify")
+    public void weixinotify(HttpServletRequest request,HttpServletResponse response,ModelMap mmap) {
+        String ret = "";
+//        //给微信的回应
+        Map<String, String> result = new HashMap<>(2);
+//        //解密数据
+        String data = wxPayConfig.payRequestDecryption(request);
+        if (data == null){
+            result.put("code","FAILED");
+            result.put("message","失败");
+            String json = JSON.toJSONString(result);
+        }
+        log.info("微信支付处理后的数据data={}", data);
+        JSONObject jsonObject = JSONObject.parseObject(data);
+        //TODO .......业务逻辑处理
+        try {
+            wxService.payResult(jsonObject);
+        } catch (Exception e) {
+            System.out.println("支付成功,逻辑处理失败---,支付返回的数据---"+jsonObject);
+            e.printStackTrace();
+        }
+        log.info("微信支付回调成功");
+        result.put("code","SUCCESS");
+        result.put("message","成功");
+        log.info(ret);
+    }
+
+    /**
+     * 余额换积分接口
+     * openid 操作人id
+     * mbiId  对应兑换积分id
+     * @return
+     */
+    @PostMapping("/moneyConvertedIntegral")
+    @ResponseBody
+    public AjaxResult moneyConvertedIntegral(String openid,String mbiId) {
+        try {
+            wxService.moneyConvertedIntegral(openid,mbiId);
+            return AjaxResult.success();
+        } catch (Exception e) {
+            e.printStackTrace();
+            return AjaxResult.error();
+        }
+    }
+
+    /**
+     * 余额开盲盒接口
+     * @param openid  消费人openid
+     * @param boxOpenid  盲盒人openid
+     * @return
+     */
+    @PostMapping("/moneyOpenBlindBox")
+    @ResponseBody
+    public AjaxResult moneyOpenBlindBox(String openid,String boxOpenid) {
+        try {
+            wxService.moneyOpenBlindBox(openid,boxOpenid);
+            return AjaxResult.success();
+        } catch (Exception e) {
+            e.printStackTrace();
+            return AjaxResult.error();
+        }
+    }
+    /**
+     * 积分开盲盒接口
+     * @param openid  消费人openid
+     * @param boxOpenid  盲盒人openid
+     * @return
+     */
+    @PostMapping("/integralOpenBlindBox")
+    @ResponseBody
+    public AjaxResult integralOpenBlindBox(String openid,String boxOpenid) {
+        try {
+            wxService.integralOpenBlindBox(openid,boxOpenid);
+            return AjaxResult.success();
+        } catch (Exception e) {
+            e.printStackTrace();
+            return AjaxResult.error();
+        }
+    }
+
+    /**
+     * 放入盲盒免费开盲盒一次接口
+     * @param openid  消费人openid
+     * @param boxOpenid  盲盒人openid
+     * @return
+     */
+    @PostMapping("/freeOpenBlindBox")
+    @ResponseBody
+    public AjaxResult freeOpenBlindBox(String openid,String boxOpenid) {
+        try {
+            wxService.freeOpenBlindBox(openid,boxOpenid);
+            return AjaxResult.success();
+        } catch (Exception e) {
+            e.printStackTrace();
+            return AjaxResult.error();
+        }
+    }
+
+    /**
+     * 赠送礼物接口
+     * @param openid  赠送人openid
+     * @param bOpenid  被赠送人openid
+     * @param giftId  礼物id
+     * @param giftNum  礼物数量
+     * @return
+     */
+    @PostMapping("/giftGive")
+    @ResponseBody
+    public AjaxResult giftGive(String openid,String bOpenid,String giftId,Integer giftNum) {
+        try {
+            String ret = wxService.giftGive(openid,bOpenid,giftId,giftNum);
+            return AjaxResult.success(ret);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return AjaxResult.error();
+        }
+    }
+
+    /**
+     * 跳转购买记录页面查询本人开盲盒记录(购买记录)
+     * @return
+     */
+    @GetMapping("/lookBuy")
+    public String lookBuy(ModelMap mmap){
+        mmap.put("openid",SessionHelper.getCurrentUserId());
+        return prefix + "/lookBuy";
+    }
+
+    /**
+     * 查询本人开盲盒记录(购买记录)
+     * @param openid   消费人id(如果只有这个代表查询记录)
+     * @param boxOpenid  盲盒人id(如果有这个代表验证是否开过此人的盲盒)
+     * @return
+     */
+    @GetMapping("/getOpenBlindBoxList")
+    @ResponseBody
+    public AjaxResult getOpenBlindBoxList(String openid, String boxOpenid){
+        return AjaxResult.success(wxService.getOpenBlindBoxList(openid,boxOpenid));
+    }
+
+//    /**
+//     * 查询本人都收到过谁的礼物
+//     * @param openid
+//     * @return
+//     */
+//    @GetMapping("/getReceivedGiftList")
+//    @ResponseBody
+//    public AjaxResult getReceivedGiftList(String openid){
+//        return AjaxResult.success(wxService.getReceivedGiftList(openid));
+//    }
+
+    /**
+     * 跳转推广记录页面
+     * @return
+     */
+    @GetMapping("/lookExtension")
+    public String lookExtension(ModelMap mmap){
+        mmap.put("openid",SessionHelper.getCurrentUserId());
+        return prefix + "/lookExtension";
+    }
+
+    /**
+     * 推广记录
+     * @param openid
+     * @return
+     */
+    @GetMapping("/getExtensionList")
+    @ResponseBody
+    public AjaxResult getExtensionList(String openid){
+        XhnRegisterUser xhnRegisterUser = new XhnRegisterUser();
+        xhnRegisterUser.setPromoter(openid);
+        return AjaxResult.success( xhnRegisterUserService.selectXhnRegisterUserList(xhnRegisterUser));
+    }
+
+    /**
+     * 跳转积分账单页面
+     * @return
+     */
+    @GetMapping("/lookGiveGift")
+    public String lookGiveGift(ModelMap mmap){
+        mmap.put("user",SessionHelper.getCurrentUser());
+        return prefix + "/lookGiveGift";
+    }
+
+    /**
+     * 查询积分账单列表(积分账单)
+     * @param openid
+     * @return
+     */
+    @GetMapping("/getGiveGiftList")
+    @ResponseBody
+    public AjaxResult getGiveGiftList(String openid){
+        return AjaxResult.success(wxService.getGiveGiftList(openid));
+    }
+
+
+    /*************************************************** 短信验证码 *****************************************************/
+    /**
+     * create by xqh on 2019/5/31 17:59
+     * 短信验证码
+     * @params
+     */
+    @GetMapping(value = "/sendSmsVerify")
+    @ResponseBody
+    public AjaxResult sendSmsVerify(String phone){
+        XhnRegisterUser user = SessionHelper.getCurrentUser();
+        String json = (String) redisService.get(phone);
+        String s = Integer.toString((int)((Math.random()*9+1)*100000));
+        Map<String,String> data = new HashMap<>();
+        data.put("code",s);
+        try {
+            XhnAliyunSms xhnAliyunSms = AliyunSendSmsUtil.sendMsg((aliyunSms1)->{
+                aliyunSms1.setOpenid(user.getOpenid());
+                aliyunSms1.setCreateBy(user.getOpenid());
+                try {
+                    long expireTime = 60 * 5;
+                    Map<String, Object> map = new HashMap<>(2);
+                    map.put("code", s);
+                    map.put("date", System.currentTimeMillis());
+                    redisService.set(phone, s, expireTime);
+                    xhnAliyunSmsService.insertXhnAAliyunSms(aliyunSms1);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            } , AliyunSendSmsUtil.templCode.get("验证码"), data, phone);
+            return AjaxResult.success(xhnAliyunSms);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return AjaxResult.error("发送失败,请联系管理员");
+        }
+    }
+    /*************************************************** 短信验证码end *****************************************************/
+    /**
+     * 注册修改用户资料
+     */
+    @PostMapping(value = "/updateRegisterUser")
+    @ResponseBody
+    public AjaxResult updateRegisterUser(XhnRegisterUser xhnRegisterUser){
+        try{
+            //判断验证码
+            String code = (String) redisService.get(xhnRegisterUser.getPhone());
+            if (!xhnRegisterUser.getShortMsg().equals(code)) {
+                return AjaxResult.error("验证码错误");
+            }
+            redisService.remove(xhnRegisterUser.getPhone());
+            xhnRegisterUserService.updateXhnRegisterUser(xhnRegisterUser);
+            SessionHelper.setAttribute(SessionHelper.CURRENT_USER, xhnRegisterUser);//更新用户信息
+
+            return AjaxResult.success();
+        } catch (Exception e) {
+            e.printStackTrace();
+            return AjaxResult.error("发送失败,请联系管理员");
+        }
+    }
+
+    /**
+     * 获取随机一条盲盒信息
+     * @param registeruserUnpaid
+     * @return
+     */
+    @GetMapping(value = "/getRandomBlindBox")
+    @ResponseBody
+    public AjaxResult getRandomBlindBox(RegisteruserUnpaid registeruserUnpaid){
+        registeruserUnpaid.setTaLocation(registeruserUnpaid.getTaLocation().replaceAll("-undefined",""));
+        registeruserUnpaid.setOpenid(SessionHelper.getCurrentUserId());
+        return AjaxResult.success(wxService.getRandomBlindBox(registeruserUnpaid));
+    }
+
+    /**
+     * 每日签到增加积分
+     * @return
+     */
+    @GetMapping(value = "/signIn")
+    @ResponseBody
+    public AjaxResult signIn(){
+        XhnRegisterUser user = SessionHelper.getCurrentUser();
+        user.setMemberIntegral(user.getMemberIntegral()+1);
+        user.setSignIn("1");
+        xhnRegisterUserService.updateXhnRegisterUser(user);
+        SessionHelper.setAttribute(SessionHelper.CURRENT_USER, user);
+        return AjaxResult.success();
+    }
+
+    /**
+     * 获取开过的盲盒隐藏信息
+     * @return
+     */
+    @GetMapping(value = "/boxUserInfo")
+    @ResponseBody
+    public AjaxResult boxUserInfo(String boxOpenid){
+        return AjaxResult.success(xhnRegisterUserService.selectXhnRegisterUserByOpenid(boxOpenid));
+    }
+
+    /**
+     * 根据查询条件获取盲盒列表
+     */
+    @GetMapping(value = "/getBoxList")
+    @ResponseBody
+    public AjaxResult getBoxList(RegisteruserUnpaid appuser){
+        if(StringUtils.isNotBlank(appuser.getWorkNature())){
+            appuser.setWorkNatureArray(appuser.getWorkNature().split(","));
+        }
+        appuser.setOpenid(SessionHelper.getCurrentUserId());
+        PageInfo<RegisteruserUnpaid> pageInfo = xhnRegisterUserService.findXhnRegisterUserByApp(appuser.getPageNum(), 10, appuser);
+        return AjaxResult.success(pageInfo.getList());
+    }
+
+
+    /**
+     * 跳转金额||积分消费账单
+     */
+    @GetMapping("/getIntegralBill")
+    public String getIntegralBill(ModelMap mmap)
+    {
+        XhnIntegral xhnIntegral = new XhnIntegral();
+        xhnIntegral.setUserOpenid(SessionHelper.getCurrentUserId());
+        mmap.put("bill",xhnIntegralService.selectXhnIntegralList(xhnIntegral));
+        return prefix + "/bill";
+    }
+
+    /**
+     * 跳转金额||积分消费账单
+     */
+    @GetMapping("/getKefuInfo")
+    public String getKefuInfo(ModelMap mmap)
+    {
+        mmap.put("kefu",wxService.getKefuInfo());
+        return prefix + "/kefu";
+    }
+
 }

+ 0 - 67
mybusiness/src/main/java/com/ruoyi/business/xhn/domain/WxUserInfo.java

@@ -1,67 +0,0 @@
-package com.ruoyi.business.xhn.domain;
-
-/**
- * @author wang_xy
- * @description
- * @Version 1.0
- * @params
- * @return
- * @since 2022/11/21 10:14
- */
-public class WxUserInfo {
-
-    private String nickName;//微信名称
-    private String openId;
-    private String status;//状态
-    private String name;//用户名
-    private String phone;//电话
-    private String headimgurl;//电话
-
-    public String getNickName() {
-        return nickName;
-    }
-
-    public void setNickName(String nickName) {
-        this.nickName = nickName;
-    }
-
-    public String getOpenId() {
-        return openId;
-    }
-
-    public void setOpenId(String openId) {
-        this.openId = openId;
-    }
-
-    public String getStatus() {
-        return status;
-    }
-
-    public void setStatus(String status) {
-        this.status = status;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getPhone() {
-        return phone;
-    }
-
-    public void setPhone(String phone) {
-        this.phone = phone;
-    }
-
-    public String getHeadimgurl() {
-        return headimgurl;
-    }
-
-    public void setHeadimgurl(String headimgurl) {
-        this.headimgurl = headimgurl;
-    }
-}

+ 0 - 19
mybusiness/src/main/java/com/ruoyi/business/xhn/mapper/WxUserMapper.java

@@ -1,19 +0,0 @@
-package com.ruoyi.business.xhn.mapper;
-
-import com.ruoyi.business.xhn.domain.WxUserInfo;
-
-/**
- * @author wang_xy
- * @description
- * @Version 1.0
- * @params
- * @return
- * @since 2022/11/21 10:01
- */
-public interface WxUserMapper {
-
-
-    WxUserInfo findByOpenId(String openid);
-
-    void insert(WxUserInfo wxUserInfo);
-}

+ 113 - 3
mybusiness/src/main/java/com/ruoyi/business/xhn/service/WxService.java

@@ -1,7 +1,12 @@
 package com.ruoyi.business.xhn.service;
 
-import com.ruoyi.business.xhn.domain.WxUserInfo;
+import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.business.xhn.domain.PayDomain;
+import com.ruoyi.business.xhn.domain.RegisteruserUnpaid;
+import com.ruoyi.business.xhn.domain.XhnWxVo;
+import com.ruoyi.business.xhnnotsingle.registeruser.domain.XhnRegisterUser;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -19,8 +24,113 @@ public interface WxService {
      * @param code
      * @return
      */
-    public WxUserInfo wxLogin(String code);
+    public XhnRegisterUser wxLogin(String code,String promoter);
 
+    /**
+     * 根据微信openid查询会员表中该人员是否授权
+     * @param openId
+     * @return
+     * @throws Exception
+     */
+    public XhnRegisterUser findUserByOpenId(String openId);
+
+    /**
+     * 生成支付订单
+     * @param user
+     * @return
+     * @throws Exception
+     */
+    public PayDomain getPayPrepayId(XhnRegisterUser user,String description,String total,String purpose,String boxOpenid) throws Exception;
+    /**
+     * 处理订单付款成功后的业务逻辑
+     * @param json
+     * @return
+     * @throws Exception
+     */
+    public void payResult(JSONObject json) throws Exception;
+
+    /**
+     * 余额换积分接口
+     * openid 操作人id
+     * mbiId  对应兑换积分id
+     * @return
+     */
+    public void moneyConvertedIntegral(String openid,String mbiId) throws Exception;
+
+    /**
+     * 余额开盲盒接口
+     * @param openid  消费人openid
+     * @param boxOpenid  盲盒人openid
+     * @return
+     */
+    public String moneyOpenBlindBox(String openid,String boxOpenid) throws Exception;
+    /**
+     * 积分开盲盒接口
+     * @param openid  消费人openid
+     * @param boxOpenid  盲盒人openid
+     * @return
+     */
+    public String integralOpenBlindBox(String openid,String boxOpenid) throws Exception;
+
+    /**
+     * 放入盲盒免费开盲盒一次接口
+     * @param openid  消费人openid
+     * @param boxOpenid  盲盒人openid
+     * @return
+     */
+    public String freeOpenBlindBox(String openid,String boxOpenid) throws Exception;
+
+    /**
+     * 赠送礼物接口
+     * @param openid  赠送人openid
+     * @param bOpenid  被赠送人openid
+     * @param giftId  礼物id
+     * @param giftNum  礼物数量
+     * @return
+     */
+    public String giftGive(String openid,String bOpenid,String giftId,Integer giftNum) throws Exception;
+
+
+    /**
+     * 查询本人开盲盒记录
+     * @param openid   消费人id(如果只有这个代表查询记录)
+     * @param boxOpenid  盲盒人id(如果有这个代表验证是否开过此人的盲盒)
+     * @return
+     */
+    public List<XhnWxVo> getOpenBlindBoxList(String openid, String boxOpenid);
+
+    /**
+     * 查询本人都收到过谁的礼物
+     * @param openid
+     * @return
+     */
+    public List<XhnWxVo> getReceivedGiftList(String openid);
+
+    /**
+     * 查询本人都送过过谁礼物
+     * @param openid
+     * @return
+     */
+    public List<XhnWxVo> getGiveGiftList(String openid);
+
+    /**
+     * 获取随机一条盲盒信息
+     * @param registeruserUnpaid
+     * @return
+     */
+    public RegisteruserUnpaid getRandomBlindBox(RegisteruserUnpaid registeruserUnpaid);
+
+    /**
+     * 当然盲盒详情
+     * @param openid
+     * @return
+     */
+    public RegisteruserUnpaid findAppUserByOpenid(String openid);
+
+    /**
+     * 查询客服信息
+     * @return
+     */
+    public List<Map<String,Object>> getKefuInfo();
 
-    public WxUserInfo findUserByOpenId(String openId);
 }

+ 345 - 29
mybusiness/src/main/java/com/ruoyi/business/xhn/service/impl/WxServiceImpl.java

@@ -2,22 +2,44 @@ package com.ruoyi.business.xhn.service.impl;
 
 import com.ruoyi.business.config.SessionHelper;
 import com.ruoyi.business.config.Token;
+import com.ruoyi.business.config.WxPayConfig;
+import com.ruoyi.business.utils.PayUtils;
+import com.ruoyi.business.utils.QRCodeUtils;
+import com.ruoyi.business.xhn.domain.PayDomain;
+import com.ruoyi.business.xhn.domain.RegisteruserUnpaid;
+import com.ruoyi.business.xhn.domain.XhnWxVo;
+import com.ruoyi.business.xhn.mapper.XhnWxMapper;
 import com.ruoyi.business.xhn.service.WxService;
 import com.alibaba.fastjson.JSONObject;
-import com.ruoyi.business.domain.HttpClientUtil;
-import com.ruoyi.business.domain.WxPay;
-import com.ruoyi.business.xhn.domain.WxUserInfo;
-import com.ruoyi.business.xhn.mapper.WxUserMapper;
+import com.ruoyi.business.utils.HttpClientUtil;
+import com.ruoyi.business.xhnnotsingle.activityMiddle.domain.XhnActivityMiddle;
+import com.ruoyi.business.xhnnotsingle.activityMiddle.mapper.XhnActivityMiddleMapper;
+import com.ruoyi.business.xhnnotsingle.consumemiddle.domain.XhnConsumeMiddle;
+import com.ruoyi.business.xhnnotsingle.consumemiddle.mapper.XhnConsumeMiddleMapper;
+import com.ruoyi.business.xhnnotsingle.gift.domain.XhnGift;
+import com.ruoyi.business.xhnnotsingle.gift.mapper.XhnGiftMapper;
+import com.ruoyi.business.xhnnotsingle.integral.domain.XhnIntegral;
+import com.ruoyi.business.xhnnotsingle.integral.mapper.XhnIntegralMapper;
+import com.ruoyi.business.xhnnotsingle.moneybyintegral.domain.XhnMoneybyintegral;
+import com.ruoyi.business.xhnnotsingle.moneybyintegral.mapper.XhnMoneybyintegralMapper;
+import com.ruoyi.business.xhnnotsingle.order.domain.XhnOrder;
+import com.ruoyi.business.xhnnotsingle.order.mapper.XhnOrderMapper;
+import com.ruoyi.business.xhnnotsingle.registeruser.domain.XhnRegisterUser;
+import com.ruoyi.business.xhnnotsingle.registeruser.mapper.XhnRegisterUserMapper;
+import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.uuid.IdUtils;
+import io.swagger.models.auth.In;
 import org.apache.http.client.methods.HttpGet;
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.authc.UsernamePasswordToken;
-import org.apache.shiro.subject.Subject;
+import org.apache.http.client.methods.HttpPost;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
 import java.util.Date;
-import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -32,14 +54,30 @@ import java.util.Map;
 public class WxServiceImpl implements WxService {
 
     @Autowired
-    private WxUserMapper wxUserMapper;
+    private XhnWxMapper xhnWxMapper;
+    @Autowired
+    private XhnRegisterUserMapper xhnRegisterUserMapper;
+    @Autowired
+    private WxPayConfig wxPayConfig;
+    @Autowired
+    private XhnOrderMapper xhnOrderMapper;
+    @Autowired
+    private XhnConsumeMiddleMapper xhnConsumeMiddleMapper;
+    @Autowired
+    private XhnIntegralMapper xhnIntegralMapper;
+    @Autowired
+    private XhnMoneybyintegralMapper xhnMoneybyintegralMapper;
+    @Autowired
+    private XhnGiftMapper xhnGiftMapper;
+    @Autowired
+    private XhnActivityMiddleMapper xhnActivityMiddleMapper;
 
     /**
      * 微信登录
      * @param code
      * @return
      */
-    public WxUserInfo wxLogin(String code) {
+    public XhnRegisterUser wxLogin(String code,String promoter) {
         //1、获取微信回调接口的code
         //2、带着code,加上appid,appsecret,去请求微信官方固定地址,获取access_token
         StringBuffer baseAccessTokenUrl = new StringBuffer()
@@ -49,8 +87,8 @@ public class WxServiceImpl implements WxService {
                 .append("&code=%s")
                 .append("&grant_type=authorization_code");
         String accessTokenUrl = String.format(baseAccessTokenUrl.toString(),
-                WxPay.APPID,
-                WxPay.APPSECRET,
+                PayUtils.appid,
+                PayUtils.secret,
                 code);
 
         try {
@@ -62,9 +100,8 @@ public class WxServiceImpl implements WxService {
             String access_token = jsonObject.getString("access_token");
             String openid = jsonObject.getString("openid");
             //4、判断数据库是否存在微信的扫描人信息,根据openid判断
-//            WxUserInfo userInfo = wxUserMapper.findByOpenId(openid);
-            WxUserInfo userInfo = new WxUserInfo();
-//            if(userInfo == null){
+            XhnRegisterUser userInfo = xhnRegisterUserMapper.selectXhnRegisterUserByOpenid(openid);
+            if(userInfo == null){
                 //4.1、没有则进行注册,带上access_token,openid去请求微信固定地址,获取扫描人信息
                 String baseUserInfoUrl = "https://api.weixin.qq.com/sns/userinfo" +
                         "?access_token=%s" +
@@ -78,15 +115,29 @@ public class WxServiceImpl implements WxService {
                 //用户头像
                 String headimgurl = jsonUser.getString("headimgurl");
                 //4.2、获取到扫描人信息,添加进数据库
-                userInfo = new WxUserInfo();
-                userInfo.setNickName(nickname);
-                userInfo.setOpenId(openid);
-                userInfo.setStatus("0");
-                userInfo.setHeadimgurl(headimgurl);
-//                wxUserMapper.insert(userInfo);
-//            }
+                userInfo = new XhnRegisterUser();
+                userInfo.setWechatName(nickname);//微信昵称
+                userInfo.setOpenid(openid);//微信唯一openid
+                userInfo.setPortraitUrl(headimgurl);//用户头像
+                userInfo.setApproval("0");//个人信息放进盲盒审批是否通过
+                userInfo.setIsLogin("0");//是否允许登录
+                userInfo.setDelisting("0");//是否脱单
+                userInfo.setIsFree("0");//首充免费开盒标识
+                userInfo.setCode(Integer.toString((int)((Math.random()*9+1)*100000)));
+                if(StringUtils.isNotBlank(promoter) && !"null".equals(promoter)){//如果推广人不为空则保存推广人的id并为推广人加积分
+                    userInfo.setPromoter(promoter);
+                    XhnRegisterUser promoterUser = xhnRegisterUserMapper.selectXhnRegisterUserByOpenid(promoter);
+                    promoterUser.setMemberIntegral(promoterUser.getMemberIntegral()+5);
+                    xhnRegisterUserMapper.updateXhnRegisterUser(promoterUser);
+                }
+                String text = PayUtils.actionDomain+"qidongye?promoter="+openid;
+                String ewm = QRCodeUtils.encode(text, "",true);
+                userInfo.setPromoterEwm("/profile/"+ewm);
+                userInfo.setCreateDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) );
+                xhnRegisterUserMapper.insertXhnRegisterUser(userInfo);
+            }
             //5、token登录
-            Token token = new Token(userInfo.getOpenId(), userInfo.getOpenId());
+            Token token = new Token(userInfo.getOpenid(), userInfo.getOpenid());
             token.setUser(userInfo);
             SessionHelper.login(token);
             //8、返回参数,登录成功
@@ -98,12 +149,277 @@ public class WxServiceImpl implements WxService {
     }
 
     @Override
-    public WxUserInfo findUserByOpenId(String openId) {
-        WxUserInfo user = new WxUserInfo();
-        user.setOpenId("opUua6BvoAzmiBJBZXJajEmqjasE");
-        user.setNickName("王晓禹~视力养护");
-        user.setName("王晓禹");
-        user.setPhone("15144147683");
+    public XhnRegisterUser findUserByOpenId(String openId) {
+        XhnRegisterUser user = xhnRegisterUserMapper.selectXhnRegisterUserByOpenid(openId);
         return user;
     }
+
+    @Override
+    public PayDomain getPayPrepayId(XhnRegisterUser user,String description,String total,String purpose,String boxOpenid) throws Exception {
+        String out_trade_no = IdUtils.simpleUUID();//生成商品唯一订单号
+        //生成订单信息存入表中
+        XhnOrder order = new XhnOrder();
+        order.setOrderCode(out_trade_no);
+        order.setMoney("1");
+        order.setOrderDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
+        order.setState("0");
+        xhnOrderMapper.insertXhnOrder(order);
+        //生成订单信息存入表中
+        String baseUserInfoUrl = "https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi";
+        //请求体内容
+        JSONObject json = new JSONObject();
+        json.put("appid",PayUtils.appid);
+        json.put("mchid",PayUtils.mchId);
+        json.put("description",description);
+        json.put("out_trade_no",out_trade_no);
+        json.put("notify_url",PayUtils.notifyDomain);//回调地址
+        JSONObject amount = new JSONObject();
+        amount.put("total",Integer.valueOf(total));
+        amount.put("currency","CNY");
+        json.put("amount",amount);
+        JSONObject payer = new JSONObject();
+        payer.put("openid",user.getOpenid());
+        json.put("payer",payer);
+
+        JSONObject attach = new JSONObject();
+        attach.put("purpose",purpose);
+        attach.put("gainOpenid",boxOpenid);//获得人id   开的谁的盲盒
+        json.put("attach",attach.toString());//附加自定义数据用户支付成功后处理业务逻辑
+
+        System.out.println(json.toString());
+        String resultInfo = HttpClientUtil.post(new HttpPost(baseUserInfoUrl),json.toString(),"utf-8");
+        JSONObject jsonUser = JSONObject.parseObject(resultInfo);
+        String prepay_id = jsonUser.getString("prepay_id");
+
+        Long timeStamp = new Date().getTime();
+        String nonceStr = IdUtils.simpleUUID();
+        String package_ = "prepay_id="+prepay_id;
+        String paySign = wxPayConfig.getSign(PayUtils.appid, timeStamp, nonceStr, package_);
+        PayDomain ret = new PayDomain();
+        ret.setTimeStamp(timeStamp);
+        ret.setNonceStr(nonceStr);
+        ret.setPackage_(package_);
+        ret.setPaySign(paySign);
+        return ret;
+    }
+
+    @Override
+    public void payResult(JSONObject json) throws Exception {
+        String ret ="";
+        JSONObject attach = JSONObject.parseObject(json.getString("attach"));//自定义返回参数
+        JSONObject payer = JSONObject.parseObject(json.getString("payer"));//订单付款人信息
+        JSONObject amount = JSONObject.parseObject(json.getString("amount"));//订单付款人信息
+        String out_trade_no = json.getString("out_trade_no");//订单号
+        XhnOrder order = new XhnOrder();
+        order.setOrderCode(out_trade_no);
+        order.setOrderSuccessDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
+        order.setState("1");
+        xhnOrderMapper.updateXhnOrder(order);//修改订单支付成功状态
+
+        String purpose = attach.getString("purpose");
+        XhnRegisterUser user = xhnRegisterUserMapper.selectXhnRegisterUserByOpenid(payer.getString("openid"));
+        if("0".equals(purpose)){//如果是本人放入盲盒
+            /**
+             * 甲方要求如果是本人放入盲盒  在放入盲盒的同时有一次免费开启他人盲盒的机会
+             * 修改支付本人的信息
+             * 首先给支付人员一次免费的开他人盲盒机会
+             * 修改盲盒为已放入
+             */
+            user.setIsFree("1");
+            user.setApproval("1");
+            xhnRegisterUserMapper.updateXhnRegisterUser(user);
+            // 人员消费记录(充值)
+            insertIntegral(payer.getString("openid"),"1",Double.valueOf(amount.getString("payer_total"))/100.00,"充值");
+            // 人员消费记录(消费)
+            insertIntegral(payer.getString("openid"),"1",Double.valueOf("-"+amount.getString("payer_total"))/100.00,"放入盲盒消费");
+            ret = "my";
+            SessionHelper.setAttribute(SessionHelper.CURRENT_USER, user);//更新用户信息
+        }else if("1".equals(purpose)){//开其他人盲盒
+            /**
+             * 开其他人盲盒添加中间关联表
+             */
+            insertXCM(payer.getString("openid"),attach.getString("gainOpenid"),"1",null,null);
+            // 人员消费记录(充值)
+            insertIntegral(payer.getString("openid"),"1",Double.valueOf(amount.getString("payer_total"))/100.00,"充值");
+            // 人员消费记录(消费)
+            insertIntegral(payer.getString("openid"),"1",Double.valueOf("-"+amount.getString("payer_total"))/100.00,"开盲盒消费");
+            ret = "box,"+attach.getString("gainOpenid");
+        }else if("2".equals(purpose)){//余额充值
+            Double yuanMoney = Double.valueOf(user.getMemberMoney());//原账户金额
+            Double newMoney = Double.valueOf(amount.getString("payer_total"))/100.00;//充值金额
+            user.setMemberMoney(yuanMoney+newMoney);
+            xhnRegisterUserMapper.updateXhnRegisterUser(user);
+            // 人员消费记录(充值)
+            insertIntegral(payer.getString("openid"),"1",Double.valueOf(amount.getString("payer_total"))/100.00,"余额充值");
+            SessionHelper.setAttribute(SessionHelper.CURRENT_USER, user);//更新用户信息
+            ret = "my";
+        }else if("3".equals(purpose)){//活动报名
+            insertIntegral(payer.getString("openid"),"1",Double.valueOf("-"+amount.getString("payer_total"))/100.00,"活动报名消费");
+            XhnActivityMiddle xam = new XhnActivityMiddle();
+            xam.setId( IdUtils.simpleUUID());
+            xam.setHdId(attach.getString("gainOpenid"));
+            xam.setOpenid(payer.getString("openid"));
+            xhnActivityMiddleMapper.insertXhnActivityMiddle(xam);//活动报名关联表信息保存
+            SessionHelper.setAttribute(SessionHelper.CURRENT_USER, user);//更新用户信息
+            ret = "huodong,"+attach.getString("gainOpenid");
+        }
+    }
+
+    @Override
+    public void moneyConvertedIntegral(String openid, String mbiId) {
+        try{
+            XhnRegisterUser user = xhnRegisterUserMapper.selectXhnRegisterUserByOpenid(openid);//消费人信息
+            Double userMoney = user.getMemberMoney();//剩余金额
+            Double userIntegral = user.getMemberIntegral();//剩余积分
+
+            XhnMoneybyintegral xmbi = xhnMoneybyintegralMapper.selectXhnMoneybyintegralById(mbiId);//积分兑换表信息
+            user.setMemberMoney(userMoney-Double.valueOf(xmbi.getMoney()));
+            user.setMemberIntegral(userIntegral+Double.valueOf(xmbi.getIntegral()));
+            xhnRegisterUserMapper.updateXhnRegisterUser(user);
+
+            // 人员消费记录(充值)
+            insertIntegral(openid,"2",Double.valueOf(xmbi.getIntegral()),"余额兑换积分");
+            // 人员消费记录(消费)
+            insertIntegral(openid,"1",Double.valueOf("-"+xmbi.getMoney()),"积分兑换扣除余额");
+
+            SessionHelper.setAttribute(SessionHelper.CURRENT_USER, user);//更新用户信息
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    @Override
+    public String moneyOpenBlindBox(String openid, String boxOpenid) throws Exception {
+        XhnRegisterUser user = xhnRegisterUserMapper.selectXhnRegisterUserByOpenid(openid);
+        user.setMemberMoney(user.getMemberMoney()-19.90);
+        xhnRegisterUserMapper.updateXhnRegisterUser(user);
+
+        // 人员消费记录(消费)
+        insertIntegral(openid,"1",-19.90,"余额开盲盒");
+        // 开启盲盒中间关联表
+        insertXCM(openid,boxOpenid,"1",null,null);
+        SessionHelper.setAttribute(SessionHelper.CURRENT_USER, user);//更新用户信息
+        return null;
+    }
+
+    @Override
+    public String integralOpenBlindBox(String openid, String boxOpenid) throws Exception {
+        XhnRegisterUser user = xhnRegisterUserMapper.selectXhnRegisterUserByOpenid(openid);
+        user.setMemberIntegral(user.getMemberIntegral()-100.00);
+        xhnRegisterUserMapper.updateXhnRegisterUser(user);
+
+        // 人员消费记录(消费)
+        insertIntegral(openid,"2",-100.00,"积分开盲盒");
+        // 开启盲盒中间关联表
+        insertXCM(openid,boxOpenid,"1",null,null);
+        SessionHelper.setAttribute(SessionHelper.CURRENT_USER, user);//更新用户信息
+        return null;
+    }
+
+    @Override
+    public String freeOpenBlindBox(String openid, String boxOpenid) throws Exception {
+        XhnRegisterUser user = xhnRegisterUserMapper.selectXhnRegisterUserByOpenid(openid);
+        user.setIsFree("0");
+        xhnRegisterUserMapper.updateXhnRegisterUser(user);
+        insertXCM(openid,boxOpenid,"1",null,null);
+        SessionHelper.setAttribute(SessionHelper.CURRENT_USER, user);//更新用户信息
+        return null;
+    }
+
+    @Override
+    public String giftGive(String openid, String bOpenid, String giftId, Integer giftNum) throws Exception {
+        String ret = "您的积分剩余不足!";
+        XhnRegisterUser user = xhnRegisterUserMapper.selectXhnRegisterUserByOpenid(openid);//赠送人信息
+        XhnRegisterUser buser = xhnRegisterUserMapper.selectXhnRegisterUserByOpenid(bOpenid);//被赠送人信息
+        XhnGift gift = xhnGiftMapper.selectXhnGiftById(giftId);
+        //计算出此次礼物对应的积分数
+        Double giftIntegral = gift.getGiftNum();
+        Double spendIntegralAll = giftIntegral*giftNum;//总体花费积分数
+        if(user.getMemberIntegral()-spendIntegralAll >= 0){
+            user.setMemberIntegral(user.getMemberIntegral()-spendIntegralAll);//赠送人减去相应积分
+            xhnRegisterUserMapper.updateXhnRegisterUser(user);
+
+            buser.setMemberIntegral(buser.getMemberIntegral()+spendIntegralAll);//被赠送人加上相应积分
+            xhnRegisterUserMapper.updateXhnRegisterUser(buser);
+
+            insertXCM(openid,bOpenid,"2",giftId,giftNum);//赠送礼物后中间表记录信息
+
+            insertIntegral(openid,"2",-spendIntegralAll,"赠送礼物");
+            insertIntegral(bOpenid,"2",spendIntegralAll,"收取礼物获得");
+
+            SessionHelper.setAttribute(SessionHelper.CURRENT_USER, user);//更新用户信息
+            ret = "礼物赠送成功!";
+        }
+        return ret;
+    }
+
+    @Override
+    public List<XhnWxVo> getOpenBlindBoxList(String openid, String boxOpenid) {
+        return xhnWxMapper.getOpenBlindBoxList(openid,boxOpenid);
+    }
+
+    @Override
+    public List<XhnWxVo> getReceivedGiftList(String openid) {
+        return xhnWxMapper.getReceivedGiftList(openid);
+    }
+
+    @Override
+    public List<XhnWxVo> getGiveGiftList(String openid) {
+        return xhnWxMapper.getGiveGiftList(openid);
+    }
+
+    @Override
+    public RegisteruserUnpaid getRandomBlindBox(RegisteruserUnpaid registeruserUnpaid) {
+        return xhnWxMapper.getRandomBlindBox(registeruserUnpaid);
+    }
+
+    /**
+     * 盲盒礼物关联表统一保存方法
+     * @param openid  消费人id
+     * @param boxOpenid  获得人id
+     * @param type  类型  1盲盒  2礼物
+     * @param giftId  礼物id
+     * @param giftNum  礼物数量
+     */
+    public void insertXCM(String openid, String boxOpenid, String type, String giftId, Integer giftNum){
+        XhnConsumeMiddle xcm = new XhnConsumeMiddle();
+        xcm.setId(IdUtils.randomUUID());
+        xcm.setConsumeOpenid(openid);
+        xcm.setGainOpenid(boxOpenid);
+        xcm.setType(type);
+        if("2".equals(type)){
+            xcm.setGiftId(giftId);
+            xcm.setGiftNum(giftNum);
+        }
+        xcm.setCreateDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
+        xhnConsumeMiddleMapper.insertXhnConsumeMiddle(xcm);
+    }
+
+    /**
+     * 金额积分消费记录表
+     * @param openid   消费人员id
+     * @param orderType   消费类型   1金额消费  2积分消费
+     * @param money  消费金额   消费为负数   获得为正数
+     * @param purpose  用途   文字描述
+     */
+    public void insertIntegral(String openid, String orderType,Double money,String purpose){
+        XhnIntegral xhnIntegral = new XhnIntegral();
+        xhnIntegral.setId(IdUtils.randomUUID());
+        xhnIntegral.setUserOpenid(openid);
+        xhnIntegral.setMoney(money);
+        xhnIntegral.setConsumeDate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
+        xhnIntegral.setOrderType(orderType);
+        xhnIntegral.setPurpose(purpose);
+        xhnIntegralMapper.insertXhnIntegral(xhnIntegral);
+    }
+
+    @Override
+    public RegisteruserUnpaid findAppUserByOpenid(String openid) {
+        return xhnWxMapper.findAppUserByOpenid(openid);
+    }
+
+    @Override
+    public List<Map<String, Object>> getKefuInfo() {
+        return xhnWxMapper.getKefuInfo();
+    }
 }

+ 2 - 2
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/activityInfo/controller/XhnActivityInfoController.java

@@ -24,7 +24,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
  * 小红娘活动管理Controller
  *
  * @author ruoyi
- * @date 2022-11-23
+ * @date 2022-12-08
  */
 @Controller
 @RequestMapping("/xhnnotsingle/activityInfo")
@@ -89,7 +89,7 @@ public class XhnActivityInfoController extends BaseController {
      */
     @RequiresPermissions("xhnnotsingle:activityInfo:edit")
     @GetMapping("/edit/{id}")
-    public String edit(@PathVariable("id") Long id, ModelMap mmap) {
+    public String edit(@PathVariable("id") String id, ModelMap mmap) {
         XhnActivityInfo xhnActivityInfo =
             xhnActivityInfoService.selectXhnActivityInfoById(id);
         mmap.put("xhnActivityInfo" , xhnActivityInfo);

+ 131 - 7
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/activityInfo/domain/XhnActivityInfo.java

@@ -1,5 +1,7 @@
 package com.ruoyi.business.xhnnotsingle.activityInfo.domain;
 
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
@@ -9,14 +11,14 @@ import com.ruoyi.common.core.domain.BaseEntity;
  * 小红娘活动管理对象 xhn_activity_info
  *
  * @author ruoyi
- * @date 2022-11-23
+ * @date 2022-12-08
  */
 public class XhnActivityInfo extends BaseEntity
         {
 private static final long serialVersionUID=1L;
 
     /**  */
-    private Long id;
+    private String id;
 
     /** 展示图片路径 */
             @Excel(name = "展示图片路径")
@@ -26,16 +28,53 @@ private static final long serialVersionUID=1L;
             @Excel(name = "内容图片路径")
     private String nrPath;
 
-    /** 类型   导航还是活动 */
-            @Excel(name = "类型   导航还是活动")
+    /** 类型   1导航还是2活动 */
+            @Excel(name = "类型   1导航还是2活动")
     private String type;
 
-    public void setId(Long id)
+    /** 男士报名费 */
+            @Excel(name = "男士报名费")
+    private String nanMoney;
+
+    /** 女士报名费 */
+            @Excel(name = "女士报名费")
+    private String nvMoney;
+
+    /** 活动开始时间 */
+            @JsonFormat(pattern = "yyyy-MM-dd")
+            @Excel(name = "活动开始时间" , width = 30, dateFormat = "yyyy-MM-dd")
+    private Date activityStartDate;
+
+    /** 活动结束时间 */
+            @JsonFormat(pattern = "yyyy-MM-dd")
+            @Excel(name = "活动结束时间" , width = 30, dateFormat = "yyyy-MM-dd")
+    private Date activityEndDate;
+
+    /** 活动开始时间 */
+    private String activityStartDateYm;
+
+    /** 活动结束时间 */
+    private String activityEndDateYm;
+
+    /** 活动内容 */
+            @Excel(name = "活动内容")
+    private String activityContent;
+
+    /** 活动地点 */
+            @Excel(name = "活动地点")
+    private String activityAddress;
+    /** 活动名称 */
+            @Excel(name = "活动名称")
+    private String name;
+
+
+
+    public void setId(String id)
             {
             this.id = id;
             }
 
-    public Long getId()
+    public String getId()
             {
             return id;
             }
@@ -66,14 +105,99 @@ private static final long serialVersionUID=1L;
             {
             return type;
             }
+    public void setNanMoney(String nanMoney)
+            {
+            this.nanMoney = nanMoney;
+            }
+
+    public String getNanMoney()
+            {
+            return nanMoney;
+            }
+    public void setNvMoney(String nvMoney)
+            {
+            this.nvMoney = nvMoney;
+            }
+
+    public String getNvMoney()
+            {
+            return nvMoney;
+            }
+    public void setActivityStartDate(Date activityStartDate)
+            {
+            this.activityStartDate = activityStartDate;
+            }
+
+    public Date getActivityStartDate()
+            {
+            return activityStartDate;
+            }
+    public void setActivityEndDate(Date activityEndDate)
+            {
+            this.activityEndDate = activityEndDate;
+            }
+
+    public Date getActivityEndDate()
+            {
+            return activityEndDate;
+            }
+    public void setActivityContent(String activityContent)
+            {
+            this.activityContent = activityContent;
+            }
+
+    public String getActivityContent()
+            {
+            return activityContent;
+            }
+    public void setActivityAddress(String activityAddress)
+            {
+            this.activityAddress = activityAddress;
+            }
+
+    public String getActivityAddress()
+            {
+            return activityAddress;
+            }
+
+            public String getActivityStartDateYm() {
+                return activityStartDateYm;
+            }
+
+            public void setActivityStartDateYm(String activityStartDateYm) {
+                this.activityStartDateYm = activityStartDateYm;
+            }
+
+            public String getActivityEndDateYm() {
+                return activityEndDateYm;
+            }
+
+            public void setActivityEndDateYm(String activityEndDateYm) {
+                this.activityEndDateYm = activityEndDateYm;
+            }
+
+            public String getName() {
+                return name;
+            }
+
+            public void setName(String name) {
+                this.name = name;
+            }
 
-@Override
+            @Override
 public String toString(){
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("id" ,getId())
             .append("zsPath" ,getZsPath())
             .append("nrPath" ,getNrPath())
             .append("type" ,getType())
+            .append("nanMoney" ,getNanMoney())
+            .append("nvMoney" ,getNvMoney())
+            .append("activityStartDate" ,getActivityStartDate())
+            .append("activityEndDate" ,getActivityEndDate())
+            .append("activityContent" ,getActivityContent())
+            .append("activityAddress" ,getActivityAddress())
+            .append("name" ,getName())
         .toString();
         }
         }

+ 22 - 3
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/activityInfo/mapper/XhnActivityInfoMapper.java

@@ -3,12 +3,13 @@ package com.ruoyi.business.xhnnotsingle.activityInfo.mapper;
 import java.util.List;
 
 import com.ruoyi.business.xhnnotsingle.activityInfo.domain.XhnActivityInfo;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 小红娘活动管理Mapper接口
  *
  * @author ruoyi
- * @date 2022-11-23
+ * @date 2022-12-08
  */
 public interface XhnActivityInfoMapper {
     /**
@@ -17,7 +18,7 @@ public interface XhnActivityInfoMapper {
      * @param id 小红娘活动管理主键
      * @return 小红娘活动管理
      */
-    public XhnActivityInfo selectXhnActivityInfoById(Long id);
+    public XhnActivityInfo selectXhnActivityInfoById(String id);
 
     /**
      * 查询小红娘活动管理列表
@@ -49,7 +50,7 @@ public interface XhnActivityInfoMapper {
      * @param id 小红娘活动管理主键
      * @return 结果
      */
-    public int deleteXhnActivityInfoById(Long id);
+    public int deleteXhnActivityInfoById(String id);
 
     /**
      * 批量删除小红娘活动管理
@@ -58,4 +59,22 @@ public interface XhnActivityInfoMapper {
      * @return 结果
      */
     public int deleteXhnActivityInfoByIds(String[] ids);
+
+
+    /**
+     * 查询活动报名人数
+     *
+     * @param id 小红娘活动管理主键
+     * @return 结果
+     */
+    public Long findApplicantsNumById(String id);
+
+    /**
+     * 查询当前登录人是否报过名了
+     *
+     * @param id 小红娘活动管理主键
+     * @return 结果
+     */
+    public Long findApplicantsNumByIdAndOpenId(@Param("id") String id, @Param("openid") String openid);
+
 }

+ 19 - 3
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/activityInfo/service/IXhnActivityInfoService.java

@@ -8,7 +8,7 @@ import com.ruoyi.business.xhnnotsingle.activityInfo.domain.XhnActivityInfo;
  * 小红娘活动管理Service接口
  *
  * @author ruoyi
- * @date 2022-11-23
+ * @date 2022-12-08
  */
 public interface IXhnActivityInfoService {
     /**
@@ -17,7 +17,7 @@ public interface IXhnActivityInfoService {
      * @param id 小红娘活动管理主键
      * @return 小红娘活动管理
      */
-    public XhnActivityInfo selectXhnActivityInfoById(Long id);
+    public XhnActivityInfo selectXhnActivityInfoById(String id);
 
     /**
      * 查询小红娘活动管理列表
@@ -57,5 +57,21 @@ public interface IXhnActivityInfoService {
      * @param id 小红娘活动管理主键
      * @return 结果
      */
-    public int deleteXhnActivityInfoById(Long id);
+    public int deleteXhnActivityInfoById(String id);
+
+    /**
+     * 查询活动报名人数
+     *
+     * @param id 小红娘活动管理主键
+     * @return 结果
+     */
+    public Long findApplicantsNumById(String id);
+
+    /**
+     * 查询当前登录人是否报过名了
+     *
+     * @param id 小红娘活动管理主键
+     * @return 结果
+     */
+    public Long findApplicantsNumByIdAndOpenId(String id,String openid);
 }

+ 13 - 10
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/activityInfo/service/impl/XhnActivityInfoServiceImpl.java

@@ -1,10 +1,6 @@
 package com.ruoyi.business.xhnnotsingle.activityInfo.service.impl;
 
 import java.util.List;
-
-import com.ruoyi.common.core.domain.entity.SysUser;
-import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.common.utils.ShiroUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.business.xhnnotsingle.activityInfo.mapper.XhnActivityInfoMapper;
@@ -16,7 +12,7 @@ import com.ruoyi.common.core.text.Convert;
  * 小红娘活动管理Service业务层处理
  *
  * @author ruoyi
- * @date 2022-11-23
+ * @date 2022-12-08
  */
 @Service
 public class XhnActivityInfoServiceImpl implements IXhnActivityInfoService {
@@ -30,7 +26,7 @@ public class XhnActivityInfoServiceImpl implements IXhnActivityInfoService {
      * @return 小红娘活动管理
      */
     @Override
-    public XhnActivityInfo selectXhnActivityInfoById(Long id) {
+    public XhnActivityInfo selectXhnActivityInfoById(String id) {
         return xhnActivityInfoMapper.selectXhnActivityInfoById(id);
     }
 
@@ -53,9 +49,6 @@ public class XhnActivityInfoServiceImpl implements IXhnActivityInfoService {
      */
     @Override
     public int insertXhnActivityInfo(XhnActivityInfo xhnActivityInfo) {
-        SysUser sysUser = ShiroUtils.getSysUser();
-        xhnActivityInfo.setCreateBy(sysUser.getUserName());
-        xhnActivityInfo.setCreateTime(DateUtils.getNowDate());
             return xhnActivityInfoMapper.insertXhnActivityInfo(xhnActivityInfo);
     }
 
@@ -88,7 +81,17 @@ public class XhnActivityInfoServiceImpl implements IXhnActivityInfoService {
      * @return 结果
      */
     @Override
-    public int deleteXhnActivityInfoById(Long id) {
+    public int deleteXhnActivityInfoById(String id) {
         return xhnActivityInfoMapper.deleteXhnActivityInfoById(id);
     }
+
+    @Override
+    public Long findApplicantsNumById(String id) {
+        return xhnActivityInfoMapper.findApplicantsNumById(id);
+    }
+
+    @Override
+    public Long findApplicantsNumByIdAndOpenId(String id, String openid) {
+        return xhnActivityInfoMapper.findApplicantsNumByIdAndOpenId(id,openid);
+    }
 }

+ 16 - 4
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/gift/domain/XhnGift.java

@@ -24,12 +24,15 @@ private static final long serialVersionUID=1L;
 
     /** 礼物价值积分数 */
             @Excel(name = "礼物价值积分数")
-    private String giftNum;
+    private Double giftNum;
 
     /** 该礼物是否显示 */
             @Excel(name = "该礼物是否显示",dictType = "sys_yes_no")
     private String state;
 
+    /** 该礼物的图标地址 */
+    private String giftPath;
+
     public void setId(String id)
             {
             this.id = id;
@@ -48,12 +51,12 @@ private static final long serialVersionUID=1L;
             {
             return giftName;
             }
-    public void setGiftNum(String giftNum)
+    public void setGiftNum(Double giftNum)
             {
             this.giftNum = giftNum;
             }
 
-    public String getGiftNum()
+    public Double getGiftNum()
             {
             return giftNum;
             }
@@ -67,13 +70,22 @@ private static final long serialVersionUID=1L;
             return state;
             }
 
-@Override
+            public String getGiftPath() {
+                return giftPath;
+            }
+
+            public void setGiftPath(String giftPath) {
+                this.giftPath = giftPath;
+            }
+
+            @Override
 public String toString(){
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("id" ,getId())
             .append("giftName" ,getGiftName())
             .append("giftNum" ,getGiftNum())
             .append("state" ,getState())
+            .append("giftPath" ,getGiftPath())
         .toString();
         }
         }

+ 2 - 2
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/matchmaker/controller/XhnMatchmakerController.java

@@ -24,7 +24,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
  * 小红娘店铺红娘信息Controller
  *
  * @author ruoyi
- * @date 2022-11-23
+ * @date 2022-12-08
  */
 @Controller
 @RequestMapping("/xhnnotsingle/matchmaker")
@@ -89,7 +89,7 @@ public class XhnMatchmakerController extends BaseController {
      */
     @RequiresPermissions("xhnnotsingle:matchmaker:edit")
     @GetMapping("/edit/{id}")
-    public String edit(@PathVariable("id") Long id, ModelMap mmap) {
+    public String edit(@PathVariable("id") String id, ModelMap mmap) {
         XhnMatchmaker xhnMatchmaker =
             xhnMatchmakerService.selectXhnMatchmakerById(id);
         mmap.put("xhnMatchmaker" , xhnMatchmaker);

+ 88 - 4
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/matchmaker/domain/XhnMatchmaker.java

@@ -9,14 +9,14 @@ import com.ruoyi.common.core.domain.BaseEntity;
  * 小红娘店铺红娘信息对象 xhn_matchmaker
  *
  * @author ruoyi
- * @date 2022-11-23
+ * @date 2022-12-08
  */
 public class XhnMatchmaker extends BaseEntity
         {
 private static final long serialVersionUID=1L;
 
     /** 主键 */
-    private Long id;
+    private String id;
 
     /** 姓名 */
             @Excel(name = "姓名")
@@ -34,12 +34,36 @@ private static final long serialVersionUID=1L;
             @Excel(name = "简介")
     private String introduction;
 
-    public void setId(Long id)
+    /** 人物介绍 */
+            @Excel(name = "人物介绍")
+    private String talentIntroduction;
+
+    /** 从业时间 */
+            @Excel(name = "从业时间")
+    private String workingTime;
+
+    /** 擅长 */
+            @Excel(name = "擅长")
+    private String beGood;
+
+    /** 技能 */
+            @Excel(name = "技能")
+    private String skill;
+
+    /** 荣誉 */
+            @Excel(name = "荣誉")
+    private String honor;
+
+    /** 职称 */
+            @Excel(name = "职称")
+    private String title;
+
+    public void setId(String id)
             {
             this.id = id;
             }
 
-    public Long getId()
+    public String getId()
             {
             return id;
             }
@@ -79,6 +103,60 @@ private static final long serialVersionUID=1L;
             {
             return introduction;
             }
+    public void setTalentIntroduction(String talentIntroduction)
+            {
+            this.talentIntroduction = talentIntroduction;
+            }
+
+    public String getTalentIntroduction()
+            {
+            return talentIntroduction;
+            }
+    public void setWorkingTime(String workingTime)
+            {
+            this.workingTime = workingTime;
+            }
+
+    public String getWorkingTime()
+            {
+            return workingTime;
+            }
+    public void setBeGood(String beGood)
+            {
+            this.beGood = beGood;
+            }
+
+    public String getBeGood()
+            {
+            return beGood;
+            }
+    public void setSkill(String skill)
+            {
+            this.skill = skill;
+            }
+
+    public String getSkill()
+            {
+            return skill;
+            }
+    public void setHonor(String honor)
+            {
+            this.honor = honor;
+            }
+
+    public String getHonor()
+            {
+            return honor;
+            }
+    public void setTitle(String title)
+            {
+            this.title = title;
+            }
+
+    public String getTitle()
+            {
+            return title;
+            }
 
 @Override
 public String toString(){
@@ -88,6 +166,12 @@ public String toString(){
             .append("phone" ,getPhone())
             .append("wechatUrl" ,getWechatUrl())
             .append("introduction" ,getIntroduction())
+            .append("talentIntroduction" ,getTalentIntroduction())
+            .append("workingTime" ,getWorkingTime())
+            .append("beGood" ,getBeGood())
+            .append("skill" ,getSkill())
+            .append("honor" ,getHonor())
+            .append("title" ,getTitle())
         .toString();
         }
         }

+ 3 - 3
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/matchmaker/mapper/XhnMatchmakerMapper.java

@@ -8,7 +8,7 @@ import com.ruoyi.business.xhnnotsingle.matchmaker.domain.XhnMatchmaker;
  * 小红娘店铺红娘信息Mapper接口
  *
  * @author ruoyi
- * @date 2022-11-23
+ * @date 2022-12-08
  */
 public interface XhnMatchmakerMapper {
     /**
@@ -17,7 +17,7 @@ public interface XhnMatchmakerMapper {
      * @param id 小红娘店铺红娘信息主键
      * @return 小红娘店铺红娘信息
      */
-    public XhnMatchmaker selectXhnMatchmakerById(Long id);
+    public XhnMatchmaker selectXhnMatchmakerById(String id);
 
     /**
      * 查询小红娘店铺红娘信息列表
@@ -49,7 +49,7 @@ public interface XhnMatchmakerMapper {
      * @param id 小红娘店铺红娘信息主键
      * @return 结果
      */
-    public int deleteXhnMatchmakerById(Long id);
+    public int deleteXhnMatchmakerById(String id);
 
     /**
      * 批量删除小红娘店铺红娘信息

+ 3 - 3
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/matchmaker/service/IXhnMatchmakerService.java

@@ -8,7 +8,7 @@ import com.ruoyi.business.xhnnotsingle.matchmaker.domain.XhnMatchmaker;
  * 小红娘店铺红娘信息Service接口
  *
  * @author ruoyi
- * @date 2022-11-23
+ * @date 2022-12-08
  */
 public interface IXhnMatchmakerService {
     /**
@@ -17,7 +17,7 @@ public interface IXhnMatchmakerService {
      * @param id 小红娘店铺红娘信息主键
      * @return 小红娘店铺红娘信息
      */
-    public XhnMatchmaker selectXhnMatchmakerById(Long id);
+    public XhnMatchmaker selectXhnMatchmakerById(String id);
 
     /**
      * 查询小红娘店铺红娘信息列表
@@ -57,5 +57,5 @@ public interface IXhnMatchmakerService {
      * @param id 小红娘店铺红娘信息主键
      * @return 结果
      */
-    public int deleteXhnMatchmakerById(Long id);
+    public int deleteXhnMatchmakerById(String id);
 }

+ 3 - 3
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/matchmaker/service/impl/XhnMatchmakerServiceImpl.java

@@ -12,7 +12,7 @@ import com.ruoyi.common.core.text.Convert;
  * 小红娘店铺红娘信息Service业务层处理
  *
  * @author ruoyi
- * @date 2022-11-23
+ * @date 2022-12-08
  */
 @Service
 public class XhnMatchmakerServiceImpl implements IXhnMatchmakerService {
@@ -26,7 +26,7 @@ public class XhnMatchmakerServiceImpl implements IXhnMatchmakerService {
      * @return 小红娘店铺红娘信息
      */
     @Override
-    public XhnMatchmaker selectXhnMatchmakerById(Long id) {
+    public XhnMatchmaker selectXhnMatchmakerById(String id) {
         return xhnMatchmakerMapper.selectXhnMatchmakerById(id);
     }
 
@@ -81,7 +81,7 @@ public class XhnMatchmakerServiceImpl implements IXhnMatchmakerService {
      * @return 结果
      */
     @Override
-    public int deleteXhnMatchmakerById(Long id) {
+    public int deleteXhnMatchmakerById(String id) {
         return xhnMatchmakerMapper.deleteXhnMatchmakerById(id);
     }
 }

+ 1 - 1
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/moneybyintegral/controller/XhnMoneybyintegralController.java

@@ -89,7 +89,7 @@ public class XhnMoneybyintegralController extends BaseController {
      */
     @RequiresPermissions("xhnnotsingle:moneybyintegral:edit")
     @GetMapping("/edit/{id}")
-    public String edit(@PathVariable("id") Long id, ModelMap mmap) {
+    public String edit(@PathVariable("id") String id, ModelMap mmap) {
         XhnMoneybyintegral xhnMoneybyintegral =
             xhnMoneybyintegralService.selectXhnMoneybyintegralById(id);
         mmap.put("xhnMoneybyintegral" , xhnMoneybyintegral);

+ 3 - 3
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/moneybyintegral/domain/XhnMoneybyintegral.java

@@ -16,7 +16,7 @@ public class XhnMoneybyintegral extends BaseEntity
 private static final long serialVersionUID=1L;
 
     /** id */
-    private Long id;
+    private String id;
 
     /** 金额数 */
             @Excel(name = "金额数")
@@ -26,12 +26,12 @@ private static final long serialVersionUID=1L;
             @Excel(name = "积分数")
     private String integral;
 
-    public void setId(Long id)
+    public void setId(String id)
             {
             this.id = id;
             }
 
-    public Long getId()
+    public String getId()
             {
             return id;
             }

+ 1 - 1
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/moneybyintegral/mapper/XhnMoneybyintegralMapper.java

@@ -17,7 +17,7 @@ public interface XhnMoneybyintegralMapper {
      * @param id 小红娘金额兑换积分主键
      * @return 小红娘金额兑换积分
      */
-    public XhnMoneybyintegral selectXhnMoneybyintegralById(Long id);
+    public XhnMoneybyintegral selectXhnMoneybyintegralById(String id);
 
     /**
      * 查询小红娘金额兑换积分列表

+ 1 - 1
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/moneybyintegral/service/IXhnMoneybyintegralService.java

@@ -17,7 +17,7 @@ public interface IXhnMoneybyintegralService {
      * @param id 小红娘金额兑换积分主键
      * @return 小红娘金额兑换积分
      */
-    public XhnMoneybyintegral selectXhnMoneybyintegralById(Long id);
+    public XhnMoneybyintegral selectXhnMoneybyintegralById(String id);
 
     /**
      * 查询小红娘金额兑换积分列表

+ 4 - 1
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/moneybyintegral/service/impl/XhnMoneybyintegralServiceImpl.java

@@ -1,6 +1,8 @@
 package com.ruoyi.business.xhnnotsingle.moneybyintegral.service.impl;
 
 import java.util.List;
+
+import com.ruoyi.common.utils.uuid.IdUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.business.xhnnotsingle.moneybyintegral.mapper.XhnMoneybyintegralMapper;
@@ -26,7 +28,7 @@ public class XhnMoneybyintegralServiceImpl implements IXhnMoneybyintegralService
      * @return 小红娘金额兑换积分
      */
     @Override
-    public XhnMoneybyintegral selectXhnMoneybyintegralById(Long id) {
+    public XhnMoneybyintegral selectXhnMoneybyintegralById(String id) {
         return xhnMoneybyintegralMapper.selectXhnMoneybyintegralById(id);
     }
 
@@ -49,6 +51,7 @@ public class XhnMoneybyintegralServiceImpl implements IXhnMoneybyintegralService
      */
     @Override
     public int insertXhnMoneybyintegral(XhnMoneybyintegral xhnMoneybyintegral) {
+        xhnMoneybyintegral.setId(IdUtils.simpleUUID());
             return xhnMoneybyintegralMapper.insertXhnMoneybyintegral(xhnMoneybyintegral);
     }
 

+ 66 - 51
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/registeruser/controller/XhnRegisterUserController.java

@@ -1,24 +1,22 @@
 package com.ruoyi.business.xhnnotsingle.registeruser.controller;
 
-import java.util.List;
-
-import org.apache.shiro.authz.annotation.RequiresPermissions;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.ModelMap;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-import com.ruoyi.common.annotation.Log;
-import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.business.xhnnotsingle.registeruser.domain.XhnRegisterUser;
 import com.ruoyi.business.xhnnotsingle.registeruser.service.IXhnRegisterUserService;
+import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.page.TableDataInfo;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.utils.uuid.IdUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 /**
  * 小红娘会员注册信息Controller
@@ -29,7 +27,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
 @Controller
 @RequestMapping("/xhnnotsingle/registeruser")
 public class XhnRegisterUserController extends BaseController {
-    private String prefix = "xhnnotsingle/registeruser" ;
+    private String prefix = "xhnnotsingle/registeruser";
 
     @Autowired
     private IXhnRegisterUserService xhnRegisterUserService;
@@ -37,50 +35,53 @@ public class XhnRegisterUserController extends BaseController {
     @RequiresPermissions("xhnnotsingle:registeruser:view")
     @GetMapping()
     public String registeruser() {
-        return prefix + "/registeruser" ;
+        return prefix + "/registeruser";
     }
 
-        /**
-         * 查询小红娘会员注册信息列表
-         */
-        @RequiresPermissions("xhnnotsingle:registeruser:list")
-        @PostMapping("/list")
-        @ResponseBody
-        public TableDataInfo list(XhnRegisterUser xhnRegisterUser) {
-            startPage();
-            List<XhnRegisterUser> list = xhnRegisterUserService.selectXhnRegisterUserList(xhnRegisterUser);
-            return getDataTable(list);
-        }
+    /**
+     * 查询小红娘会员注册信息列表
+     */
+    @RequiresPermissions("xhnnotsingle:registeruser:list")
+    @PostMapping("/list")
+    @ResponseBody
+    public TableDataInfo list(XhnRegisterUser xhnRegisterUser) {
+        startPage();
+        List<XhnRegisterUser> list = xhnRegisterUserService.selectXhnRegisterUserList(xhnRegisterUser);
+        return getDataTable(list);
+    }
 
     /**
      * 导出小红娘会员注册信息列表
      */
     @RequiresPermissions("xhnnotsingle:registeruser:export")
-    @Log(title = "小红娘会员注册信息" , businessType = BusinessType.EXPORT)
+    @Log(title = "小红娘会员注册信息", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     @ResponseBody
     public AjaxResult export(XhnRegisterUser xhnRegisterUser) {
         List<XhnRegisterUser> list = xhnRegisterUserService.selectXhnRegisterUserList(xhnRegisterUser);
-        ExcelUtil<XhnRegisterUser> util = new ExcelUtil<XhnRegisterUser>(XhnRegisterUser. class);
+        ExcelUtil<XhnRegisterUser> util = new ExcelUtil<XhnRegisterUser>(XhnRegisterUser.class);
         return util.exportExcel(list, "小红娘会员注册信息数据");
     }
 
-        /**
-         * 新增小红娘会员注册信息
-         */
-        @GetMapping("/add")
-        public String add() {
-            return prefix + "/add" ;
-        }
+    /**
+     * 新增小红娘会员注册信息
+     */
+    @GetMapping("/add")
+    public String add() {
+        return prefix + "/add";
+    }
 
     /**
      * 新增保存小红娘会员注册信息
      */
     @RequiresPermissions("xhnnotsingle:registeruser:add")
-    @Log(title = "小红娘会员注册信息" , businessType = BusinessType.INSERT)
+    @Log(title = "小红娘会员注册信息", businessType = BusinessType.INSERT)
     @PostMapping("/add")
     @ResponseBody
     public AjaxResult addSave(XhnRegisterUser xhnRegisterUser) {
+        xhnRegisterUser.setOpenid(IdUtils.fastUUID());
+        xhnRegisterUser.setDelisting(String.valueOf(0));
+        xhnRegisterUser.setIsLogin(String.valueOf(3));
         return toAjax(xhnRegisterUserService.insertXhnRegisterUser(xhnRegisterUser));
     }
 
@@ -91,30 +92,44 @@ public class XhnRegisterUserController extends BaseController {
     @GetMapping("/edit/{openid}")
     public String edit(@PathVariable("openid") String openid, ModelMap mmap) {
         XhnRegisterUser xhnRegisterUser =
-            xhnRegisterUserService.selectXhnRegisterUserByOpenid(openid);
-        mmap.put("xhnRegisterUser" , xhnRegisterUser);
-        return prefix + "/edit" ;
+                xhnRegisterUserService.selectXhnRegisterUserByOpenid(openid);
+        mmap.put("xhnRegisterUser", xhnRegisterUser);
+        return prefix + "/edit";
     }
 
     /**
      * 修改保存小红娘会员注册信息
      */
     @RequiresPermissions("xhnnotsingle:registeruser:edit")
-    @Log(title = "小红娘会员注册信息" , businessType = BusinessType.UPDATE)
+    @Log(title = "小红娘会员注册信息", businessType = BusinessType.UPDATE)
     @PostMapping("/edit")
     @ResponseBody
     public AjaxResult editSave(XhnRegisterUser xhnRegisterUser) {
         return toAjax(xhnRegisterUserService.updateXhnRegisterUser(xhnRegisterUser));
     }
 
-        /**
-         * 删除小红娘会员注册信息
-         */
-        @RequiresPermissions("xhnnotsingle:registeruser:remove")
-        @Log(title = "小红娘会员注册信息" , businessType = BusinessType.DELETE)
-        @PostMapping("/remove")
-        @ResponseBody
-        public AjaxResult remove(String ids) {
-            return toAjax(xhnRegisterUserService.deleteXhnRegisterUserByOpenids(ids));
-        }
+    /**
+     * 删除小红娘会员注册信息
+     */
+    @RequiresPermissions("xhnnotsingle:registeruser:remove")
+    @Log(title = "小红娘会员注册信息", businessType = BusinessType.DELETE)
+    @PostMapping("/remove")
+    @ResponseBody
+    public AjaxResult remove(String ids) {
+        return toAjax(xhnRegisterUserService.deleteXhnRegisterUserByOpenids(ids));
+    }
+
+    /**
+     * 脱单状态
+     */
+    @PostMapping("/tuodan")
+    @ResponseBody
+    public AjaxResult tuodan(String openIds) {
+        XhnRegisterUser xhnRegisterUser = new XhnRegisterUser();
+        xhnRegisterUser.setOpenid(openIds);
+//        xhnRegisterUser.setUpdateBy(ShiroUtils.getUserId());
+        xhnRegisterUser.setUpdateTime(DateUtils.getNowDate());
+//        xhnRegisterUser.setup(ShiroUtils.getSysUser().getUserName());
+        return toAjax(xhnRegisterUserService.updateisLoginById(xhnRegisterUser));
+    }
 }

+ 63 - 8
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/registeruser/domain/XhnRegisterUser.java

@@ -54,6 +54,10 @@ private static final long serialVersionUID=1L;
             @Excel(name = "出生年月")
     private String birthDate;
 
+    /** 出生年月 */
+            @Excel(name = "出生年月")
+    private String age;
+
     /** 星座 */
             @Excel(name = "星座")
     private String constellation;
@@ -106,6 +110,7 @@ private static final long serialVersionUID=1L;
             @Excel(name = "微信暗号" , readConverterExp = "支=付后可查看")
     private String wechatArgot;
 
+            /**********************************************************************************************************************************/
     /** 个人信息放进盲盒审批是否通过 */
             @Excel(name = "个人信息放进盲盒审批是否通过")
     private String approval;
@@ -128,16 +133,25 @@ private static final long serialVersionUID=1L;
 
     /** 剩余金额 */
             @Excel(name = "剩余金额")
-    private String memberMoney;
+    private double memberMoney;
 
     /** 剩余积分 */
             @Excel(name = "剩余积分")
-    private String memberIntegral;
+    private double memberIntegral;
 
     /** 推广人id(根据二维码扫描后注册账号的) */
             @Excel(name = "推广人id" , readConverterExp = "根=据二维码扫描后注册账号的")
     private String promoter;
 
+    private String signIn;
+
+    private String shortMsg;//创建用户和修改用户时验证码
+
+    private String promoterEwm;
+
+    private String createDate;
+
+
     public void setOpenid(String openid)
             {
             this.openid = openid;
@@ -390,21 +404,21 @@ private static final long serialVersionUID=1L;
             {
             return isFree;
             }
-    public void setMemberMoney(String memberMoney)
+    public void setMemberMoney(double memberMoney)
             {
             this.memberMoney = memberMoney;
             }
 
-    public String getMemberMoney()
+    public double getMemberMoney()
             {
             return memberMoney;
             }
-    public void setMemberIntegral(String memberIntegral)
+    public void setMemberIntegral(double memberIntegral)
             {
             this.memberIntegral = memberIntegral;
             }
 
-    public String getMemberIntegral()
+    public double getMemberIntegral()
             {
             return memberIntegral;
             }
@@ -418,8 +432,48 @@ private static final long serialVersionUID=1L;
             return promoter;
             }
 
-@Override
-public String toString(){
+    public String getSignIn() {
+        return signIn;
+    }
+
+    public void setSignIn(String signIn) {
+        this.signIn = signIn;
+    }
+
+    public String getShortMsg() {
+        return shortMsg;
+    }
+
+    public void setShortMsg(String shortMsg) {
+        this.shortMsg = shortMsg;
+    }
+
+            public String getAge() {
+                return age;
+            }
+
+            public void setAge(String age) {
+                this.age = age;
+            }
+
+            public String getPromoterEwm() {
+                return promoterEwm;
+            }
+
+            public void setPromoterEwm(String promoterEwm) {
+                this.promoterEwm = promoterEwm;
+            }
+
+            public String getCreateDate() {
+                return createDate;
+            }
+
+            public void setCreateDate(String createDate) {
+                this.createDate = createDate;
+            }
+
+            @Override
+    public String toString(){
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("openid" ,getOpenid())
             .append("code" ,getCode())
@@ -452,6 +506,7 @@ public String toString(){
             .append("memberMoney" ,getMemberMoney())
             .append("memberIntegral" ,getMemberIntegral())
             .append("promoter" ,getPromoter())
+            .append("signIn" ,getSignIn())
         .toString();
         }
         }

+ 18 - 0
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/registeruser/mapper/XhnRegisterUserMapper.java

@@ -2,6 +2,8 @@ package com.ruoyi.business.xhnnotsingle.registeruser.mapper;
 
 import java.util.List;
 
+import com.github.pagehelper.PageInfo;
+import com.ruoyi.business.xhn.domain.RegisteruserUnpaid;
 import com.ruoyi.business.xhnnotsingle.registeruser.domain.XhnRegisterUser;
 
 /**
@@ -44,6 +46,14 @@ public interface XhnRegisterUserMapper {
     public int updateXhnRegisterUser(XhnRegisterUser xhnRegisterUser);
 
     /**
+     * 批量修改注册信息
+     *
+     * @param xhnRegisterUser 需要修改的数据ID
+     * @return 结果
+     */
+    public int updateisLoginById(XhnRegisterUser xhnRegisterUser);
+
+    /**
      * 删除小红娘会员注册信息
      *
      * @param openid 小红娘会员注册信息主键
@@ -58,4 +68,12 @@ public interface XhnRegisterUserMapper {
      * @return 结果
      */
     public int deleteXhnRegisterUserByOpenids(String[] openids);
+
+    /**
+     * app端盲盒列表
+     *
+     * @param registeruserUnpaid 筛选数据
+     * @return 结果
+     */
+    public List<RegisteruserUnpaid> findXhnRegisterUserByApp(RegisteruserUnpaid registeruserUnpaid);
 }

+ 18 - 0
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/registeruser/service/IXhnRegisterUserService.java

@@ -2,6 +2,8 @@ package com.ruoyi.business.xhnnotsingle.registeruser.service;
 
 import java.util.List;
 
+import com.github.pagehelper.PageInfo;
+import com.ruoyi.business.xhn.domain.RegisteruserUnpaid;
 import com.ruoyi.business.xhnnotsingle.registeruser.domain.XhnRegisterUser;
 
 /**
@@ -58,4 +60,20 @@ public interface IXhnRegisterUserService {
      * @return 结果
      */
     public int deleteXhnRegisterUserByOpenid(String openid);
+
+    /**
+     * 批量修改注册信息状态
+     *
+     * @param xhnRegisterUser 需要删除的数据IDs
+     * @return 结果
+     */
+    public int updateisLoginById(XhnRegisterUser xhnRegisterUser);
+
+    /**
+     * app端盲盒列表
+     *
+     * @param registeruserUnpaid 筛选数据
+     * @return 结果
+     */
+    public PageInfo<RegisteruserUnpaid> findXhnRegisterUserByApp(Integer pageNum, Integer pageSize,RegisteruserUnpaid registeruserUnpaid);
 }

+ 29 - 0
mybusiness/src/main/java/com/ruoyi/business/xhnnotsingle/registeruser/service/impl/XhnRegisterUserServiceImpl.java

@@ -1,12 +1,22 @@
 package com.ruoyi.business.xhnnotsingle.registeruser.service.impl;
 
 import java.util.List;
+
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.ruoyi.business.xhn.domain.RegisteruserUnpaid;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.business.xhnnotsingle.registeruser.mapper.XhnRegisterUserMapper;
 import com.ruoyi.business.xhnnotsingle.registeruser.domain.XhnRegisterUser;
+import com.ruoyi.business.xhnnotsingle.registeruser.mapper.XhnRegisterUserMapper;
 import com.ruoyi.business.xhnnotsingle.registeruser.service.IXhnRegisterUserService;
 import com.ruoyi.common.core.text.Convert;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
 
 /**
  * 小红娘会员注册信息Service业务层处理
@@ -84,4 +94,23 @@ public class XhnRegisterUserServiceImpl implements IXhnRegisterUserService {
     public int deleteXhnRegisterUserByOpenid(String openid) {
         return xhnRegisterUserMapper.deleteXhnRegisterUserByOpenid(openid);
     }
+
+    /**
+     * 修改脱单状态
+     *
+     * @param xhnRegisterUser 需要删除的数据ID
+     * @return 结果
+     */
+    @Override
+    public int updateisLoginById(XhnRegisterUser xhnRegisterUser)
+    {
+        return xhnRegisterUserMapper.updateisLoginById(xhnRegisterUser);
+    }
+
+    @Override
+    public PageInfo<RegisteruserUnpaid> findXhnRegisterUserByApp(Integer pageNum, Integer pageSize,RegisteruserUnpaid registeruserUnpaid) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<RegisteruserUnpaid> list = xhnRegisterUserMapper.findXhnRegisterUserByApp(registeruserUnpaid);
+        return PageInfo.of(list);
+    }
 }

BIN
mybusiness/src/main/resources/apiclient_cert.p12


+ 23 - 0
mybusiness/src/main/resources/apiclient_cert.pem

@@ -0,0 +1,23 @@
+-----BEGIN CERTIFICATE-----
+MIID6TCCAtGgAwIBAgIUL1ilzCX9F2CEDxqkztHsYbWS6Q4wDQYJKoZIhvcNAQEL
+BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT
+FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg
+Q0EwHhcNMjIxMTIzMDkyMjU3WhcNMjcxMTIyMDkyMjU3WjB7MRMwEQYDVQQDDAox
+NTQwODEzMDkxMRswGQYDVQQKDBLlvq7kv6HllYbmiLfns7vnu58xJzAlBgNVBAsM
+HumVv+aYpemmluS9s+enkeaKgOaciemZkOWFrOWPuDELMAkGA1UEBgwCQ04xETAP
+BgNVBAcMCFNoZW5aaGVuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
+m9FkUcstckSKHE7hH0OKsZsSukWol3diFm/fRZjEz7NGMNc/K5iFDu5lQ+NBHr0s
+T5v5BzdfILdzJNE2pAFFWs6D/aVJBuZPAtsChUIfFZJsHbsUnaFSP+5NJU4GTDwJ
+5BGwxD9chYmyF3LpQbCDRkxoUu97qfH3cvjyaZRqYgdwO25hIXoQEbEa0gq1iTDd
+opy3kDAjCZlgYun7Pl63sUvghtdcRc8Nr5Ix5C26F5ViAymSkuKPD0y9GyqX9FrP
+bOisTpDKb/wcAdJxuf+pxmwghcNWK6wEo8img4UEL1AV1RAGM1kydspYy8LppqlB
+83enn/hcTTjuT5uF6QwmeQIDAQABo4GBMH8wCQYDVR0TBAIwADALBgNVHQ8EBAMC
+A/gwZQYDVR0fBF4wXDBaoFigVoZUaHR0cDovL2V2Y2EuaXRydXMuY29tLmNuL3B1
+YmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUwREJDMDRCMDZBRDM5NzU0OTg0NkMw
+MUMzRThFQkQyMA0GCSqGSIb3DQEBCwUAA4IBAQAvBJvqvZIByBTp3p1RzUkLGz4/
+iErOYkb+6Fp6zfKNqj+C6e+O7Fv6bOLuhNyfphHObD2DB0Tl3wWDo0xzfnfp6X2G
+aSympDljEeRuAbOipsmabRIT4ivilLddASHr2Dl1Dxx7iOziOI22jN/Aqu5/xUVi
+qhAsbm2mi1v4IbJXHUy/uuIchgzwUjZt05VScMhm4eKCzH+52a2kwHerG/kS8HmN
+ZRKVB6vOLLrnM8JH+2Lq03S0HqCR9otrgFMOBXTnkyi1lGv+WUDspTfDcr/ZBeUj
+wCZmsGy4IXZQKmK8VSlbyIyc3NxvyelDOzcXtMH5Ix5s6WTEESaKQ9fRWOwe
+-----END CERTIFICATE-----

+ 28 - 0
mybusiness/src/main/resources/apiclient_key.pem

@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCb0WRRyy1yRIoc
+TuEfQ4qxmxK6RaiXd2IWb99FmMTPs0Yw1z8rmIUO7mVD40EevSxPm/kHN18gt3Mk
+0TakAUVazoP9pUkG5k8C2wKFQh8VkmwduxSdoVI/7k0lTgZMPAnkEbDEP1yFibIX
+culBsINGTGhS73up8fdy+PJplGpiB3A7bmEhehARsRrSCrWJMN2inLeQMCMJmWBi
+6fs+XrexS+CG11xFzw2vkjHkLboXlWIDKZKS4o8PTL0bKpf0Ws9s6KxOkMpv/BwB
+0nG5/6nGbCCFw1YrrASjyKaDhQQvUBXVEAYzWTJ2yljLwummqUHzd6ef+FxNOO5P
+m4XpDCZ5AgMBAAECggEAUnEYhhpdIk9XT6EAhZ0j3dKxtvKyP+m/cSWh2V36C/bL
+lX3dg4CALiU+WQv9YXkv37MjsIjAgTvu5TT4lw/BFUmdFnAEUm06ssUT8VPJxI0j
+PRvFzZ0UOpUoJivBM0a06QHfKAZqOpFfM/7toX72BhTZQcBKCuHmTeOfxvLq0pBP
+lnqN49yRWbEmBUTnBwYIFAxBJtIyIhLZMZqLwA5LpeDwSHf8AnEnbJ8l/diQNuzC
+KHwbO0XxdIoij+n8DbV7nfyItMKeNqXNhfFgpF4fkcqC/wFEqKJx6BPnhC9wzERR
+0ktApITeJshJD8xo+6FZFO3FFq9/qyfWFUeqBvMyrQKBgQDLBImZm0jvoW2hdREo
+z80BAEHEUMdmSy97dVHwP8MkQOVUvIU7G7/UPX7CEB6qq2cAkEpMEcKe/BEI3YTu
+DaDrYVL05vRI6/HEUZP1HQ/7l/q25U7n67CGr1RW5CIb3KzdkTGTdqYwTfbkKWPT
+M0Bv4U4DWApfYC/SDpoDsTo24wKBgQDEe3jJsRFsWNOl95vlbBOYSIS2pDJ1f1W1
+JJzeY+/WprJwwjwQ6zzYDYZYoaq2VIqg7pWgVCADfQor/XiwCebC5JC+HvY47uCb
+J5xPm+8VNafL0nbXByYFQ4TBb5FpgoldSvxGfG2H7KNKhZyeLx2g5E0yhdZ6eUL0
+Altild5P8wKBgQCrWjoVl1Z5Q4Q32YpRKws6BBB+dTvH4D/EcWJmaDr513h5C+Fb
+4XEI35qki1yG6sK2XBMJn5fn/pMWK3puPryKzwtov6KCBft6muxJ32zFCyLGykbO
+Q0UseMGz0Tvkzl5taIYyk9tzO+rd6v1hnomNpNnmwqGGnLXgEwj1gtnCxwKBgATC
+BKvFqOlZwU5Mj67fjh3q66PMmBg2TCoFx/Kustkc0kdevLugJqoIsc8low+lPnIl
+NORcBSZwebWU/r4sjzT6+fJQp5+7UR8Qt31KBmEaGoUaBJyyZJ5OA0H35KqMaa0j
+qrY+PxzCgzXDxIYkF/CUdrYZfZcbpp5oDDR38pk3AoGBAIU7SZLWL4xN2cBMDOSQ
+hdtu68yMBAEOa3CWoL6FUzXrl0cWLCyC1yMu8GPwK1aV9yB2lJkrCb3ebb9KSoqe
+hxJsUOL6FYFhcC93TGCPdPyXD/v4+SnGD2GVexP5pYquDlT+838QWzg5KdppOvLk
+fi544DxB4gSiMmDiPMPo4Dm5
+-----END PRIVATE KEY-----

+ 95 - 3
mybusiness/src/main/resources/mapper/xhnnotsingle/XhnActivityInfoMapper.xml

@@ -9,10 +9,20 @@
             <result property="zsPath" column="zs_path"/>
             <result property="nrPath" column="nr_path"/>
             <result property="type" column="type"/>
+            <result property="nanMoney" column="nan_money"/>
+            <result property="nvMoney" column="nv_money"/>
+            <result property="activityStartDate" column="activity_start_date"/>
+            <result property="activityEndDate" column="activity_end_date"/>
+            <result property="activityContent" column="activity_content"/>
+            <result property="activityAddress" column="activity_address"/>
+            <result property="name" column="name"/>
     </resultMap>
 
     <sql id="selectXhnActivityInfoVo">
-        select id, zs_path, nr_path, type
+        select id, zs_path, nr_path, type, nan_money, nv_money, activity_start_date, activity_end_date, activity_content, activity_address,
+            date_format(activity_start_date,'%Y-%m-%d %H:%i:%s') as activityStartDateYm,
+            date_format(activity_end_date,'%Y-%m-%d %H:%i:%s') as activityEndDateYm,
+            name
         from xhn_activity_info
     </sql>
 
@@ -28,10 +38,31 @@
                         <if test="type != null  and type != ''">
                             and type = #{type}
                         </if>
+                        <if test="nanMoney != null  and nanMoney != ''">
+                            and nan_money = #{nanMoney}
+                        </if>
+                        <if test="nvMoney != null  and nvMoney != ''">
+                            and nv_money = #{nvMoney}
+                        </if>
+                        <if test="activityStartDate != null ">
+                            and activity_start_date = #{activityStartDate}
+                        </if>
+                        <if test="activityEndDate != null ">
+                            and activity_end_date = #{activityEndDate}
+                        </if>
+                        <if test="activityContent != null  and activityContent != ''">
+                            and activity_content = #{activityContent}
+                        </if>
+                        <if test="activityAddress != null  and activityAddress != ''">
+                            and activity_address = #{activityAddress}
+                        </if>
+                        <if test="name != null  and name != ''">
+                            and name = #{name}
+                        </if>
         </where>
     </select>
 
-    <select id="selectXhnActivityInfoById" parameterType="Long"
+    <select id="selectXhnActivityInfoById" parameterType="String"
             resultMap="XhnActivityInfoResult">
             <include refid="selectXhnActivityInfoVo"/>
             where id = #{id}
@@ -48,6 +79,20 @@
                     </if>
                     <if test="type != null">type,
                     </if>
+                    <if test="nanMoney != null">nan_money,
+                    </if>
+                    <if test="nvMoney != null">nv_money,
+                    </if>
+                    <if test="activityStartDate != null">activity_start_date,
+                    </if>
+                    <if test="activityEndDate != null">activity_end_date,
+                    </if>
+                    <if test="activityContent != null">activity_content,
+                    </if>
+                    <if test="activityAddress != null">activity_address,
+                    </if>
+                    <if test="name != null">name,
+                    </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
                     <if test="id != null">#{id},
@@ -58,6 +103,20 @@
                     </if>
                     <if test="type != null">#{type},
                     </if>
+                    <if test="nanMoney != null">#{nanMoney},
+                    </if>
+                    <if test="nvMoney != null">#{nvMoney},
+                    </if>
+                    <if test="activityStartDate != null">#{activityStartDate},
+                    </if>
+                    <if test="activityEndDate != null">#{activityEndDate},
+                    </if>
+                    <if test="activityContent != null">#{activityContent},
+                    </if>
+                    <if test="activityAddress != null">#{activityAddress},
+                    </if>
+                    <if test="name != null">#{name},
+                    </if>
         </trim>
     </insert>
 
@@ -73,11 +132,32 @@
                     <if test="type != null">type =
                         #{type},
                     </if>
+                    <if test="nanMoney != null">nan_money =
+                        #{nanMoney},
+                    </if>
+                    <if test="nvMoney != null">nv_money =
+                        #{nvMoney},
+                    </if>
+                    <if test="activityStartDate != null">activity_start_date =
+                        #{activityStartDate},
+                    </if>
+                    <if test="activityEndDate != null">activity_end_date =
+                        #{activityEndDate},
+                    </if>
+                    <if test="activityContent != null">activity_content =
+                        #{activityContent},
+                    </if>
+                    <if test="activityAddress != null">activity_address =
+                        #{activityAddress},
+                    </if>
+                    <if test="name != null">name =
+                        #{name},
+                    </if>
         </trim>
         where id = #{id}
     </update>
 
-    <delete id="deleteXhnActivityInfoById" parameterType="Long">
+    <delete id="deleteXhnActivityInfoById" parameterType="String">
         delete from xhn_activity_info where id = #{id}
     </delete>
 
@@ -88,4 +168,16 @@
         </foreach>
     </delete>
 
+    <select id="findApplicantsNumById" parameterType="java.lang.String" resultType="java.lang.Long">
+        select
+          count(b.openid)
+        from xhn_activity_info a
+        left join xhn_activity_middle b
+        on a.id=b.hd_id
+        where a.id=#{id}
+    </select>
+
+    <select id="findApplicantsNumByIdAndOpenId" parameterType="java.lang.String" resultType="java.lang.Long">
+        select count(id) from xhn_activity_middle where hd_id=#{id} and openid=#{openid}
+    </select>
 </mapper>

+ 10 - 1
mybusiness/src/main/resources/mapper/xhnnotsingle/XhnGiftMapper.xml

@@ -9,10 +9,11 @@
             <result property="giftName" column="gift_name"/>
             <result property="giftNum" column="gift_num"/>
             <result property="state" column="state"/>
+            <result property="giftPath" column="gift_path"/>
     </resultMap>
 
     <sql id="selectXhnGiftVo">
-        select id, gift_name, gift_num, state
+        select id, gift_name, gift_num, state,gift_path
         from xhn_gift
     </sql>
 
@@ -29,6 +30,7 @@
                             and state = #{state}
                         </if>
         </where>
+        order by gift_num asc
     </select>
 
     <select id="selectXhnGiftById" parameterType="String"
@@ -48,6 +50,8 @@
                     </if>
                     <if test="state != null">state,
                     </if>
+                    <if test="giftPath != null">gift_path,
+                    </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
                     <if test="id != null">#{id},
@@ -58,6 +62,8 @@
                     </if>
                     <if test="state != null">#{state},
                     </if>
+                    <if test="giftPath != null">#{giftPath},
+                    </if>
         </trim>
     </insert>
 
@@ -73,6 +79,9 @@
                     <if test="state != null">state =
                         #{state},
                     </if>
+                    <if test="giftPath != null">gift_path =
+                        #{giftPath},
+                    </if>
         </trim>
         where id = #{id}
     </update>

+ 120 - 54
mybusiness/src/main/resources/mapper/xhnnotsingle/XhnMatchmakerMapper.xml

@@ -5,90 +5,156 @@
 <mapper namespace="com.ruoyi.business.xhnnotsingle.matchmaker.mapper.XhnMatchmakerMapper">
 
     <resultMap type="XhnMatchmaker" id="XhnMatchmakerResult">
-        <result property="id" column="id"/>
-        <result property="name" column="name"/>
-        <result property="phone" column="phone"/>
-        <result property="wechatUrl" column="wechat_url"/>
-        <result property="introduction" column="introduction"/>
+            <result property="id" column="id"/>
+            <result property="name" column="name"/>
+            <result property="phone" column="phone"/>
+            <result property="wechatUrl" column="wechat_url"/>
+            <result property="introduction" column="introduction"/>
+            <result property="talentIntroduction" column="talent_introduction"/>
+            <result property="workingTime" column="working_time"/>
+            <result property="beGood" column="be_good"/>
+            <result property="skill" column="skill"/>
+            <result property="honor" column="honor"/>
+            <result property="title" column="title"/>
     </resultMap>
 
     <sql id="selectXhnMatchmakerVo">
-        select id, name, phone, wechat_url, introduction
+        select id, name, phone, wechat_url, introduction, talent_introduction, working_time, be_good, skill, honor, title
         from xhn_matchmaker
     </sql>
 
     <select id="selectXhnMatchmakerList" parameterType="XhnMatchmaker" resultMap="XhnMatchmakerResult">
         <include refid="selectXhnMatchmakerVo"/>
         <where>
-            <if test="name != null  and name != ''">
-                and name like concat('%', #{name}, '%')
-            </if>
-            <if test="phone != null  and phone != ''">
-                and phone = #{phone}
-            </if>
-            <if test="wechatUrl != null  and wechatUrl != ''">
-                and wechat_url = #{wechatUrl}
-            </if>
-            <if test="introduction != null  and introduction != ''">
-                and introduction = #{introduction}
-            </if>
+                        <if test="name != null  and name != ''">
+                            and name like concat('%', #{name}, '%')
+                        </if>
+                        <if test="phone != null  and phone != ''">
+                            and phone = #{phone}
+                        </if>
+                        <if test="wechatUrl != null  and wechatUrl != ''">
+                            and wechat_url = #{wechatUrl}
+                        </if>
+                        <if test="introduction != null  and introduction != ''">
+                            and introduction = #{introduction}
+                        </if>
+                        <if test="talentIntroduction != null  and talentIntroduction != ''">
+                            and talent_introduction = #{talentIntroduction}
+                        </if>
+                        <if test="workingTime != null  and workingTime != ''">
+                            and working_time = #{workingTime}
+                        </if>
+                        <if test="beGood != null  and beGood != ''">
+                            and be_good = #{beGood}
+                        </if>
+                        <if test="skill != null  and skill != ''">
+                            and skill = #{skill}
+                        </if>
+                        <if test="honor != null  and honor != ''">
+                            and honor = #{honor}
+                        </if>
+                        <if test="title != null  and title != ''">
+                            and title = #{title}
+                        </if>
         </where>
     </select>
 
-    <select id="selectXhnMatchmakerById" parameterType="Long"
+    <select id="selectXhnMatchmakerById" parameterType="String"
             resultMap="XhnMatchmakerResult">
-        <include refid="selectXhnMatchmakerVo"/>
-        where id = #{id}
+            <include refid="selectXhnMatchmakerVo"/>
+            where id = #{id}
     </select>
 
     <insert id="insertXhnMatchmaker" parameterType="XhnMatchmaker">
         insert into xhn_matchmaker
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <!--                    <if test="id != null">id,-->
-            <!--                    </if>-->
-            <if test="name != null">name,
-            </if>
-            <if test="phone != null">phone,
-            </if>
-            <if test="wechatUrl != null">wechat_url,
-            </if>
-            <if test="introduction != null">introduction,
-            </if>
+                    <if test="id != null">id,
+                    </if>
+                    <if test="name != null">name,
+                    </if>
+                    <if test="phone != null">phone,
+                    </if>
+                    <if test="wechatUrl != null">wechat_url,
+                    </if>
+                    <if test="introduction != null">introduction,
+                    </if>
+                    <if test="talentIntroduction != null">talent_introduction,
+                    </if>
+                    <if test="workingTime != null">working_time,
+                    </if>
+                    <if test="beGood != null">be_good,
+                    </if>
+                    <if test="skill != null">skill,
+                    </if>
+                    <if test="honor != null">honor,
+                    </if>
+                    <if test="title != null">title,
+                    </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-<!--            <if test="id != null">#{id},-->
-<!--            </if>-->
-            <if test="name != null">#{name},
-            </if>
-            <if test="phone != null">#{phone},
-            </if>
-            <if test="wechatUrl != null">#{wechatUrl},
-            </if>
-            <if test="introduction != null">#{introduction},
-            </if>
+                    <if test="id != null">#{id},
+                    </if>
+                    <if test="name != null">#{name},
+                    </if>
+                    <if test="phone != null">#{phone},
+                    </if>
+                    <if test="wechatUrl != null">#{wechatUrl},
+                    </if>
+                    <if test="introduction != null">#{introduction},
+                    </if>
+                    <if test="talentIntroduction != null">#{talentIntroduction},
+                    </if>
+                    <if test="workingTime != null">#{workingTime},
+                    </if>
+                    <if test="beGood != null">#{beGood},
+                    </if>
+                    <if test="skill != null">#{skill},
+                    </if>
+                    <if test="honor != null">#{honor},
+                    </if>
+                    <if test="title != null">#{title},
+                    </if>
         </trim>
     </insert>
 
     <update id="updateXhnMatchmaker" parameterType="XhnMatchmaker">
         update xhn_matchmaker
         <trim prefix="SET" suffixOverrides=",">
-            <if test="name != null">name =
-                #{name},
-            </if>
-            <if test="phone != null">phone =
-                #{phone},
-            </if>
-            <if test="wechatUrl != null">wechat_url =
-                #{wechatUrl},
-            </if>
-            <if test="introduction != null">introduction =
-                #{introduction},
-            </if>
+                    <if test="name != null">name =
+                        #{name},
+                    </if>
+                    <if test="phone != null">phone =
+                        #{phone},
+                    </if>
+                    <if test="wechatUrl != null">wechat_url =
+                        #{wechatUrl},
+                    </if>
+                    <if test="introduction != null">introduction =
+                        #{introduction},
+                    </if>
+                    <if test="talentIntroduction != null">talent_introduction =
+                        #{talentIntroduction},
+                    </if>
+                    <if test="workingTime != null">working_time =
+                        #{workingTime},
+                    </if>
+                    <if test="beGood != null">be_good =
+                        #{beGood},
+                    </if>
+                    <if test="skill != null">skill =
+                        #{skill},
+                    </if>
+                    <if test="honor != null">honor =
+                        #{honor},
+                    </if>
+                    <if test="title != null">title =
+                        #{title},
+                    </if>
         </trim>
         where id = #{id}
     </update>
 
-    <delete id="deleteXhnMatchmakerById" parameterType="Long">
+    <delete id="deleteXhnMatchmakerById" parameterType="String">
         delete from xhn_matchmaker where id = #{id}
     </delete>
 

+ 2 - 2
mybusiness/src/main/resources/mapper/xhnnotsingle/XhnMoneybyintegralMapper.xml

@@ -27,7 +27,7 @@
         </where>
     </select>
 
-    <select id="selectXhnMoneybyintegralById" parameterType="Long"
+    <select id="selectXhnMoneybyintegralById" parameterType="String"
             resultMap="XhnMoneybyintegralResult">
             <include refid="selectXhnMoneybyintegralVo"/>
             where id = #{id}
@@ -66,7 +66,7 @@
         where id = #{id}
     </update>
 
-    <delete id="deleteXhnMoneybyintegralById" parameterType="Long">
+    <delete id="deleteXhnMoneybyintegralById" parameterType="String">
         delete from xhn_moneybyintegral where id = #{id}
     </delete>
 

+ 97 - 4
mybusiness/src/main/resources/mapper/xhnnotsingle/XhnRegisterUserMapper.xml

@@ -36,10 +36,16 @@
             <result property="memberMoney" column="member_money"/>
             <result property="memberIntegral" column="member_integral"/>
             <result property="promoter" column="promoter"/>
+            <result property="signIn" column="sign_in"/>
+            <result property="age" column="age"/>
+            <result property="promoterEwm" column="promoter_ewm"/>
+            <result property="createDate" column="create_date"/>
     </resultMap>
 
     <sql id="selectXhnRegisterUserVo">
-        select openid, code, wechat_name, name, id_card, phone, height, weight, sex, birth_date, constellation, is_married, occupation, work_nature, education, location, ta_location, long_distance_love, character, ideal_type, no_accepted, wechat_code, wechat_argot, approval, is_login, delisting, portrait_url, is_free, member_money, member_integral, promoter
+        select openid, code, wechat_name, name, id_card, phone, height, weight, sex, birth_date, constellation, is_married, occupation,
+        work_nature, education, location, ta_location, long_distance_love, `character`, ideal_type, no_accepted, wechat_code, wechat_argot,
+        approval, is_login, delisting, portrait_url, is_free, member_money, member_integral, promoter,sign_in,age,promoter_ewm,create_date
         from xhn_register_user
     </sql>
 
@@ -98,7 +104,7 @@
                             and long_distance_love = #{longDistanceLove}
                         </if>
                         <if test="character != null  and character != ''">
-                            and character = #{character}
+                            and `character` = #{character}
                         </if>
                         <if test="idealType != null  and idealType != ''">
                             and ideal_type = #{idealType}
@@ -136,6 +142,18 @@
                         <if test="promoter != null  and promoter != ''">
                             and promoter = #{promoter}
                         </if>
+                        <if test="signIn != null  and signIn != ''">
+                            and sign_in = #{signIn}
+                        </if>
+                        <if test="age != null  and age != ''">
+                            and age = #{age}
+                        </if>
+                        <if test="promoterEwm != null  and promoterEwm != ''">
+                            and promoter_ewm = #{promoterEwm}
+                        </if>
+                        <if test="createDate != null  and createDate != ''">
+                            and create_date = #{createDate}
+                        </if>
         </where>
     </select>
 
@@ -184,7 +202,7 @@
                     </if>
                     <if test="longDistanceLove != null">long_distance_love,
                     </if>
-                    <if test="character != null">character,
+                    <if test="character != null">`character`,
                     </if>
                     <if test="idealType != null">ideal_type,
                     </if>
@@ -210,6 +228,14 @@
                     </if>
                     <if test="promoter != null">promoter,
                     </if>
+                    <if test="signIn != null">sign_in,
+                    </if>
+                    <if test="age != null">age,
+                    </if>
+                    <if test="promoterEwm != null">promoter_ewm,
+                    </if>
+                    <if test="createDate != null">create_date,
+                    </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
                     <if test="openid != null">#{openid},
@@ -274,6 +300,14 @@
                     </if>
                     <if test="promoter != null">#{promoter},
                     </if>
+                    <if test="signIn != null">#{signIn},
+                    </if>
+                    <if test="age != null">#{age},
+                    </if>
+                    <if test="promoterEwm != null">#{promoterEwm},
+                    </if>
+                    <if test="createDate != null">#{createDate},
+                    </if>
         </trim>
     </insert>
 
@@ -331,7 +365,7 @@
                     <if test="longDistanceLove != null">long_distance_love =
                         #{longDistanceLove},
                     </if>
-                    <if test="character != null">character =
+                    <if test="character != null">`character` =
                         #{character},
                     </if>
                     <if test="idealType != null">ideal_type =
@@ -370,6 +404,18 @@
                     <if test="promoter != null">promoter =
                         #{promoter},
                     </if>
+                    <if test="signIn != null">sign_in =
+                        #{signIn},
+                    </if>
+                    <if test="age != null">age =
+                        #{age},
+                    </if>
+                    <if test="promoterEwm != null">promoter_ewm =
+                        #{promoterEwm},
+                    </if>
+                    <if test="createDate != null">create_date =
+                        #{createDate},
+                    </if>
         </trim>
         where openid = #{openid}
     </update>
@@ -385,4 +431,51 @@
         </foreach>
     </delete>
 
+    <update id="updateisLoginById" parameterType="XhnRegisterUser">
+        update xhn_register_user set delisting = 1  where openid = #{openid}
+    </update>
+
+    <select id="findXhnRegisterUserByApp" resultType="com.ruoyi.business.xhn.domain.RegisteruserUnpaid" parameterType="com.ruoyi.business.xhn.domain.RegisteruserUnpaid">
+        SELECT
+        openid,
+        `code`,
+        height,
+        weight,
+        sex,
+        birth_date as birthDate,
+        constellation,
+        is_married as isMarried,
+        occupation,
+        work_nature as workNature,
+        education,
+        location,
+        ta_location as taLocation,
+        long_distance_love as longDistanceLove,
+        `character`,
+        ideal_type as idealType,
+        no_accepted as noAccepted,
+        delisting,
+        portrait_url as portraitUrl,
+        is_free as isFree,
+        promoter_ewm as promoterEwm
+        FROM
+        xhn_register_user
+        <where>
+            is_login != '2' and delisting = '0' and approval = '1' and openid != #{openid}
+            <if test="code != null and code != ''">AND code = #{code} </if>
+            <if test="sex != null and sex != ''">AND sex = #{sex} </if>
+            <if test="taLocation != null and taLocation != ''">AND ta_location like concat('%', #{taLocation}, '%')</if>
+            <if test="workNatureArray != null and workNatureArray != ''"> AND work_nature in
+                <foreach item="item" collection="workNatureArray" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="startAge != null and startAge != '' and endAge != null and endAge != ''">
+                AND DATE_FORMAT(birth_date, '%Y') BETWEEN #{startAge} AND #{endAge}
+            </if>
+            <if test="startHeight != null and startHeight != '' and endHeight != null and endHeight != ''">
+                AND height BETWEEN #{startHeight} AND #{endHeight}
+            </if>
+        </where>
+    </select>
 </mapper>

+ 19 - 15
mybusiness/target/classes/templates/xhn/xhnIndex.html

@@ -23,8 +23,8 @@
     new Vue({
         el: '#app',
         data: {
-            APPID: "wx820da939d0dbe1ba",
-            APPSECRET: "9eb1105add72a37d39bc56ddd1d1b977",
+            APPID: "wx19ac981693d1a79a",
+            APPSECRET: "cc7d798b4ce862979bb8f1571ef8be2b",
             userInfo: {},
         },
         created() {
@@ -62,20 +62,24 @@
                     });
             },
             wxPay(){
-                wx.chooseWXPay({
-                    timestamp: 0, // 支付签名时间戳,注意微信 jssdk 中的所有使用 timestamp 字段均为小写。但最新版的支付后台生成签名使用的 timeStamp 字段名需大写其中的 S 字符
-                    nonceStr: '', // 支付签名随机串,不长于 32 位
-                    package: '', // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
-                    signType: '', // 微信支付V3的传入 RSA ,微信支付V2的传入格式与V2统一下单的签名格式保持一致
-                    paySign: '', // 支付签名
-                    success: function (res) {
-                        // 支付成功后的回调函数
-                        console.log("success",res);
-                    },
-                    error: function(res){
-                        console.log("error",res);
-                    }
+                axios.get(`/xhn/getPayPrepayId`).then((res) => {
+
+                    console.log(this.userInfo);
                 });
+                // wx.chooseWXPay({
+                //     timestamp: 0, // 支付签名时间戳,注意微信 jssdk 中的所有使用 timestamp 字段均为小写。但最新版的支付后台生成签名使用的 timeStamp 字段名需大写其中的 S 字符
+                //     nonceStr: '', // 支付签名随机串,不长于 32 位
+                //     package: '', // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
+                //     signType: '', // 微信支付V3的传入 RSA ,微信支付V2的传入格式与V2统一下单的签名格式保持一致
+                //     paySign: '', // 支付签名
+                //     success: function (res) {
+                //         // 支付成功后的回调函数
+                //         console.log("success",res);
+                //     },
+                //     error: function(res){
+                //         console.log("error",res);
+                //     }
+                // });
             }
         },
     })

+ 2 - 2
mybusiness/src/main/resources/templates/xhn/xhnlogin.html

@@ -20,7 +20,7 @@
     new Vue({
         el: '#app',
         data: {
-            homeUrl: "http://9e8p34.natappfree.cc/xhn/index",
+            homeUrl: "http://x4ms9m.natappfree.cc/xhn/index",
         },
         created() {
             this.getUserInfo();
@@ -31,7 +31,7 @@
                 // 获取当前页面地址作为回调地址,并且对地址进行urlEncode处理
                 let local = encodeURIComponent(this.homeUrl);
                 // 获取公众号appid
-                let appid = "wx820da939d0dbe1ba";
+                let appid = "wx19ac981693d1a79a";
                 // 跳转到授权页面
                 window.location.href =
                     "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" +

+ 0 - 84
mybusiness/src/main/resources/templates/xhn/xhnIndex.html

@@ -1,84 +0,0 @@
-<!DOCTYPE html>
-<head>
-    <meta charset="utf-8">
-    <title>智慧养殖</title>
-    <script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
-    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
-    <script src="http://res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
-</head>
-
-<body>
-<div id="app">
-    <div class="content">
-        <div class="userInfo">
-            <div>
-                <image :src="userInfo.headimgurl" @click="wxPay"></image>
-            </div>
-            <div>{{ userInfo.nickName }}</div>
-        </div>
-    </div>
-</div>
-
-<script>
-    new Vue({
-        el: '#app',
-        data: {
-            APPID: "wx820da939d0dbe1ba",
-            APPSECRET: "9eb1105add72a37d39bc56ddd1d1b977",
-            userInfo: {},
-        },
-        created() {
-            // 判断是否有code
-            let weixinCode = this.getUrlCode("code");
-            // 当获取到code后再调用获取token的方法
-            weixinCode && this.getTokenFormCode(weixinCode);//有code的话是新的授权登录
-            !weixinCode && this.getWxUser();//没有code的话是登录过的用户
-        },
-        methods: {
-            // 获取路径上的指定属性值
-            getUrlCode(name) {
-                return (
-                    decodeURIComponent(
-                        (new RegExp("[?|&]" + name + "=" + "([^&;]+?)(&|#|;|$)").exec(
-                            location.href
-                        ) || [, ""])[1].replace(/\+/g, "%20")
-                    ) || null
-                );
-            },
-            // 根据code获取网站授权并登录系统返回微信名称和头像
-            getTokenFormCode(code) {
-                axios.get(
-                        `/xhn/wxLogin?appid=${this.APPID}&secret=${this.APPSECRET}&code=${code}&grant_type=authorization_code`
-                    )
-                    .then((res) => {
-                        this.userInfo = res.data.data
-                        console.log(this.userInfo);
-                });
-            },
-            getWxUser(){
-                axios.get(`/xhn/getWxUser`).then((res) => {
-                        this.userInfo = res.data.data
-                        console.log(this.userInfo);
-                    });
-            },
-            wxPay(){
-                wx.chooseWXPay({
-                    timestamp: 0, // 支付签名时间戳,注意微信 jssdk 中的所有使用 timestamp 字段均为小写。但最新版的支付后台生成签名使用的 timeStamp 字段名需大写其中的 S 字符
-                    nonceStr: '', // 支付签名随机串,不长于 32 位
-                    package: '', // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
-                    signType: '', // 微信支付V3的传入 RSA ,微信支付V2的传入格式与V2统一下单的签名格式保持一致
-                    paySign: '', // 支付签名
-                    success: function (res) {
-                        // 支付成功后的回调函数
-                        console.log("success",res);
-                    },
-                    error: function(res){
-                        console.log("error",res);
-                    }
-                });
-            }
-        },
-    })
-</script>
-</body>
-</html>

+ 48 - 10
mybusiness/src/main/resources/templates/xhnnotsingle/activityInfo/activityInfo.html

@@ -11,12 +11,30 @@
                 <div class="select-list">
                     <ul>
                                     <li>
-                                        <label>展示图片路径:</label>
-                                        <input type="text" name="zsPath"/>
+                                        <label>活动名称:</label>
+                                        <input type="text" name="name"/>
                                     </li>
                                     <li>
-                                        <label>内容图片路径:</label>
-                                        <input type="text" name="nrPath"/>
+                                        <label>男士报名费:</label>
+                                        <input type="text" name="nanMoney"/>
+                                    </li>
+                                    <li>
+                                        <label>女士报名费:</label>
+                                        <input type="text" name="nvMoney"/>
+                                    </li>
+<!--                                    <li>-->
+<!--                                        <label>活动开始时间:</label>-->
+<!--                                        <input type="text" class="time-input" placeholder="请选择活动开始时间"-->
+<!--                                               name="activityStartDate"/>-->
+<!--                                    </li>-->
+<!--                                    <li>-->
+<!--                                        <label>活动结束时间:</label>-->
+<!--                                        <input type="text" class="time-input" placeholder="请选择活动结束时间"-->
+<!--                                               name="activityEndDate"/>-->
+<!--                                    </li>-->
+                                    <li>
+                                        <label>活动地点:</label>
+                                        <input type="text" name="activityAddress"/>
                                     </li>
                         <li>
                             <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
@@ -73,16 +91,36 @@
                             visible: false
                         },
                         {
-                            field: 'zsPath',
-                            title: '展示图片路径'
+                            field: 'name',
+                            title: '活动名称'
                         },
                         {
-                            field: 'nrPath',
-                            title: '内容图片路径'
+                            field: 'type',
+                            title: '类型   1导航还是2活动'
                         },
                         {
-                            field: 'type',
-                            title: '类型   导航还是活动'
+                            field: 'nanMoney',
+                            title: '男士报名费'
+                        },
+                        {
+                            field: 'nvMoney',
+                            title: '女士报名费'
+                        },
+                        {
+                            field: 'activityStartDate',
+                            title: '活动开始时间'
+                        },
+                        {
+                            field: 'activityEndDate',
+                            title: '活动结束时间'
+                        },
+                        {
+                            field: 'activityContent',
+                            title: '活动内容'
+                        },
+                        {
+                            field: 'activityAddress',
+                            title: '活动地点'
                         },
                 {
                     title: '操作',

+ 176 - 14
mybusiness/src/main/resources/templates/xhnnotsingle/activityInfo/add.html

@@ -2,27 +2,110 @@
 <html lang="zh" xmlns:th="http://www.thymeleaf.org">
 <head>
     <th:block th:include="include :: header('新增小红娘活动管理')"/>
+    <th:block th:include="include :: datetimepicker-css"/>
+    <th:block th:include="include :: summernote-css"/>
+    <th:block th:include="include :: datetimepicker-css" />
+    <th:block th:include="include :: bootstrap-fileinput-css"/>
 </head>
 <body class="white-bg">
 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
     <form class="form-horizontal m" id="form-activityInfo-add">
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">展示图片路径
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="zsPath" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">内容图片路径
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="nrPath" class="form-control" type="text">
-                            </div>
-                        </div>
+<!--        <div class="form-group">-->
+<!--            <label class="col-sm-3 control-label">展示图片路径-->
+<!--                :</label>-->
+<!--            <div class="col-sm-8">-->
+<!--                <input name="zsPath" class="form-control" type="text">-->
+<!--            </div>-->
+<!--        </div>-->
+        <div class="form-group">
+            <label class="col-sm-3 control-label">展示图片路径 :</label>
+            <div class="col-sm-8">
+                <input  type="hidden" name="zsPath" >
+                <div class="file-loading">
+                    <input class="form-control file-upload" id="zsPath" name="file" type="file">
+                </div>
+            </div>
+        </div>
+<!--        <div class="form-group">-->
+<!--            <label class="col-sm-3 control-label">内容图片路径-->
+<!--                :</label>-->
+<!--            <div class="col-sm-8">-->
+<!--                <input name="nrPath" class="form-control" type="text">-->
+<!--            </div>-->
+<!--        </div>-->
+        <div class="form-group">
+            <label class="col-sm-3 control-label">内容图片路径 :</label>
+            <div class="col-sm-8">
+                <input  type="hidden" name="nrPath" >
+                <div class="file-loading">
+                    <input class="form-control file-upload" id="nrPath" name="file" type="file">
+                </div>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">活动名称
+                :</label>
+            <div class="col-sm-8">
+                <input name="name" class="form-control" maxlength="20" type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">男士报名费
+                :</label>
+            <div class="col-sm-8">
+                <input name="nanMoney" class="form-control" maxlength="20"   type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">女士报名费
+                :</label>
+            <div class="col-sm-8">
+                <input name="nvMoney" class="form-control" maxlength="20"   type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">活动开始时间
+                :</label>
+            <div class="col-sm-8">
+                <div class="input-group date">
+                    <input name="activityStartDate" class="form-control" placeholder="yyyy-MM-dd"
+                           type="text">
+                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                </div>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">活动结束时间
+                :</label>
+            <div class="col-sm-8">
+                <div class="input-group date">
+                    <input name="activityEndDate" class="form-control" placeholder="yyyy-MM-dd"
+                           type="text">
+                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                </div>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">活动内容
+                :</label>
+            <div class="col-sm-8">
+                <input type="hidden" class="form-control" maxlength="20"   name="activityContent">
+                <div class="summernote" id="activityContent"></div>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">活动地点
+                :</label>
+            <div class="col-sm-8">
+                <input name="activityAddress" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
     </form>
 </div>
 <th:block th:include="include :: footer"/>
+<th:block th:include="include :: datetimepicker-js"/>
+<th:block th:include="include :: summernote-js"/>
+<th:block th:include="include :: bootstrap-fileinput-js"/>
 <script th:inline="javascript">
     var prefix = ctx + "xhnnotsingle/activityInfo"
     $("#form-activityInfo-add").validate({
@@ -34,6 +117,85 @@
             $.operate.save(prefix + "/add", $('#form-activityInfo-add').serialize());
         }
     }
+
+    $("input[name='activityStartDate']").datetimepicker({
+        format: "yyyy-mm-dd",
+        minView: "month",
+        autoclose: true
+    });
+
+    $("input[name='activityEndDate']").datetimepicker({
+        format: "yyyy-mm-dd",
+        minView: "month",
+        autoclose: true
+    });
+
+    $(function () {
+        $('.summernote').summernote({
+            lang: 'zh-CN',
+            dialogsInBody: true,
+            callbacks: {
+                onChange: function (contents, $edittable) {
+                    $("input[name='" + this.id + "']").val(contents);
+                },
+                onImageUpload: function (files) {
+                    var obj = this;
+                    var data = new FormData();
+                    data.append("file", files[0]);
+                    $.ajax({
+                        type: "post",
+                        url: ctx + "common/upload",
+                        data: data,
+                        cache: false,
+                        contentType: false,
+                        processData: false,
+                        dataType: 'json',
+                        success: function (result) {
+                            if (result.code == web_status.SUCCESS) {
+                                $('#' + obj.id).summernote('insertImage', result.url);
+                            } else {
+                                $.modal.alertError(result.msg);
+                            }
+                        },
+                        error: function (error) {
+                            $.modal.alertWarning("图片上传失败。");
+                        }
+                    });
+                }
+            }
+        });
+    });
+    function submitHandler() {
+        if ($.validate.form()) {
+            $("input[name='nrPath']").val(fileP);
+            let data = $("#form-activityInfo-add").serializeArray();
+            $.operate.save(prefix + "/add", data);
+        }
+    }
+    function submitHandler() {
+        if ($.validate.form()) {
+            $("input[name='zsPath']").val(fileP);
+            let data = $("#form-activityInfo-add").serializeArray();
+            $.operate.save(prefix + "/add", data);
+        }
+    }
+
+
+    let fileP = "";//附件用
+    let fileRealP = "";//真实的文件名uuid
+    $(".file-upload").fileinput({
+        uploadUrl: ctx + 'common/upload',
+        maxFileCount: 1,
+        uploadAsync: true,
+        allowedFileExtensions: ['jpg', 'png'],
+        autoReplace: true,
+        enctype: 'multipart/form-data'
+    }).on('fileuploaded', function (event, data, previewId, index) {
+        $("input[name='" + event.currentTarget.id + "']").val(data.response.url);
+        fileP += data.response.fileName;
+    }).on('fileremoved', function (event, id, index) {
+        $("input[name='" + event.currentTarget.id + "']").val('')
+    })
 </script>
 </body>
 </html>

+ 299 - 16
mybusiness/src/main/resources/templates/xhnnotsingle/activityInfo/edit.html

@@ -2,41 +2,324 @@
 <html lang="zh" xmlns:th="http://www.thymeleaf.org">
 <head>
     <th:block th:include="include :: header('修改小红娘活动管理')"/>
+    <th:block th:include="include :: datetimepicker-css"/>
+    <th:block th:include="include :: summernote-css"/>
+    <th:block th:include="include :: bootstrap-fileinput-css"/>
 </head>
 <body class="white-bg">
 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
     <form class="form-horizontal m" id="form-activityInfo-edit" th:object="${xhnActivityInfo}">
         <input name="id" th:field="*{id}" type="hidden">
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">展示图片路径
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="zsPath" th:field="*{zsPath}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">内容图片路径
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="nrPath" th:field="*{nrPath}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
+<!--        <div class="form-group">-->
+<!--            <label class="col-sm-3 control-label">展示图片路径-->
+<!--                :</label>-->
+<!--            <div class="col-sm-8">-->
+<!--                <input name="zsPath" th:field="*{zsPath}" class="form-control"-->
+<!--                       type="text">-->
+<!--            </div>-->
+<!--        </div>-->
+        <div class="form-group">
+            <label class="col-sm-3 control-label">展示图片路径:</label>
+            <div class="col-sm-8">
+                <input type="hidden" name="zsPath" th:field="*{zsPath}">
+                <div class="file-loading">
+                    <input class="form-control file-upload" id="zsPath" name="file" type="file" accept=".jpg,.png">
+                </div>
+            </div>
+        </div>
+        <!--                        <div class="form-group">-->
+        <!--                            <label class="col-sm-3 control-label">内容图片路径-->
+        <!--                                :</label>-->
+        <!--                            <div class="col-sm-8">-->
+        <!--                                <input name="nrPath" th:field="*{nrPath}" class="form-control"-->
+        <!--                                       type="text">-->
+        <!--                            </div>-->
+        <!--                        </div>-->
+        <div class="form-group">
+            <label class="col-sm-3 control-label">内容图片路径:</label>
+            <div class="col-sm-8">
+                <input type="hidden" name="nrPath" th:field="*{nrPath}">
+                <div class="file-loading">
+                    <input class="form-control file-upload" id="nrPath" name="file" type="file" accept=".jpg,.png">
+                </div>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">活动名称
+                :</label>
+            <div class="col-sm-8">
+                <input name="name" th:field="*{name}" class="form-control"  maxlength="20"
+                       type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">男士报名费
+                :</label>
+            <div class="col-sm-8">
+                <input name="nanMoney" th:field="*{nanMoney}" class="form-control" maxlength="20"
+                       type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">女士报名费
+                :</label>
+            <div class="col-sm-8">
+                <input name="nvMoney" th:field="*{nvMoney}" class="form-control" maxlength="20"
+                       type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">活动开始时间
+                :</label>
+            <div class="col-sm-8">
+                <div class="input-group date">
+                    <input name="activityStartDate"
+                           th:value="${#dates.format(xhnActivityInfo.activityStartDate, 'yyyy-MM-dd')}"
+                           class="form-control" placeholder="yyyy-MM-dd"
+                           type="text">
+                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                </div>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">活动结束时间
+                :</label>
+            <div class="col-sm-8">
+                <div class="input-group date">
+                    <input name="activityEndDate"
+                           th:value="${#dates.format(xhnActivityInfo.activityEndDate, 'yyyy-MM-dd')}"
+                           class="form-control" placeholder="yyyy-MM-dd"
+                           type="text">
+                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+                </div>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">活动内容
+                :</label>
+            <div class="col-sm-8">
+                <input type="hidden" class="form-control" maxlength="20"  th:field="*{activityContent}">
+                <div class="summernote" id="activityContent"></div>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">活动地点
+                :</label>
+            <div class="col-sm-8">
+                <input name="activityAddress" th:field="*{activityAddress}" class="form-control" maxlength="20"
+                       type="text">
+            </div>
+        </div>
     </form>
 </div>
 <th:block th:include="include :: footer"/>
+<th:block th:include="include :: datetimepicker-js"/>
+<th:block th:include="include :: summernote-js"/>
+<th:block th:include="include :: bootstrap-fileinput-js"/>
 <script th:inline="javascript">
+    var local = window.location.href.substring(0,window.location.href.indexOf(window.location.pathname));//附件用,获取网址
     var prefix = ctx + "xhnnotsingle/activityInfo";
+    var fileP=$("input[name='nrPath']").val();
+    var fileZ=$("input[name='zsPath']").val();
     $("#form-activityInfo-edit").validate({
         focusCleanup: true
     });
 
     function submitHandler() {
         if ($.validate.form()) {
+            $("input[name='nrPath']").val(getImgUrl());
+            $("input[name='zsPath']").val(getImgUrl());
             $.operate.save(prefix + "/edit", $('#form-activityInfo-edit').serialize());
+
+        }
+    }
+
+    $("input[name='activityStartDate']").datetimepicker({
+        format: "yyyy-mm-dd",
+        minView: "month",
+        autoclose: true
+    });
+
+    $("input[name='activityEndDate']").datetimepicker({
+        format: "yyyy-mm-dd",
+        minView: "month",
+        autoclose: true
+    });
+
+    $(function () {
+        $('.summernote').each(function (i) {
+            $('#' + this.id).summernote({
+                lang: 'zh-CN',
+                dialogsInBody: true,
+                callbacks: {
+                    onChange: function (contents, $edittable) {
+                        $("input[name='" + this.id + "']").val(contents);
+                    },
+                    onImageUpload: function (files) {
+                        var obj = this;
+                        var data = new FormData();
+                        data.append("file", files[0]);
+                        $.ajax({
+                            type: "post",
+                            url: ctx + "common/upload",
+                            data: data,
+                            cache: false,
+                            contentType: false,
+                            processData: false,
+                            dataType: 'json',
+                            success: function (result) {
+                                if (result.code == web_status.SUCCESS) {
+                                    $('#' + obj.id).summernote('insertImage', result.url);
+                                } else {
+                                    $.modal.alertError(result.msg);
+                                }
+                            },
+                            error: function (error) {
+                                $.modal.alertWarning("图片上传失败。");
+                            }
+                        });
+                    }
+                }
+            });
+            var content = $("input[name='" + this.id + "']").val();
+            $('#' + this.id).summernote('code', content);
+        })
+    });
+
+    //f附件用,通用,只需要更改文件参数===============Start
+    var newFilePs = []; //图片回显
+    var imgConfig = []; //预览参数
+    var uploadImageArray = [];//所有已上传的图片路径
+
+    // var urlsArr = ($("input[name='nrPash']").val()).split(",");
+    // for (var i in urlsArr) {
+    //     if (urlsArr[i] != "") {
+    //         uploadImageArray.push(urlsArr[i]);
+    //         newFilePs[i] = local + urlsArr[i];
+    //         var fileType = urlsArr[i].substr(urlsArr[i].lastIndexOf(".") + 1, urlsArr[i].length - 1);
+    //         var ftype = "image"; //文件类型
+    //         if (fileType == "pdf") {
+    //             ftype = "pdf";
+    //         }
+    //         imgConfig[i] = {
+    //             url: ctx + "common/removeFile",
+    //             downloadUrl: local + urlsArr[i], //下载路径,此项不设置的话下载按钮不显示
+    //             type: ftype,             //文件类型
+    //             key: urlsArr[i],        //参数,用于文件删除向后台传参
+    //             caption: urlsArr[i].substr(urlsArr[i].lastIndexOf("/") + 1, urlsArr[i].length - 1)    //文件名,用于预览文件显示的文件名
+    //         };
+    //     }
+    // }
+
+
+    $(".file-upload").each(function (i) {
+        $(this).fileinput({
+            language: 'zh', //设置语言
+            uploadUrl: ctx + 'common/upload',
+            deleteUrl: ctx + 'common/removeFile',
+            allowedFileExtensions: ['jpg', 'png', 'pdf', 'docx', 'xlsx', 'doc', 'xls'],//接收的文件后缀
+//                allowedFileExtensions: ['jpg', 'png','pdf','docx','xlsx','doc','xls'],//接收的文件后缀
+            showUpload: false, //是否显示上传按钮
+            showRemove: false, //显示移除按钮
+            showPreview: true, //是否显示预览
+            showCaption: false,//是否显示标题
+            browseClass: "btn btn-primary", //按钮样式
+            dropZoneEnabled: true,//是否显示拖拽区域
+            initialPreviewAsData: true,
+            enctype: 'multipart/form-data',
+            initialPreview: newFilePs,
+//                initialPreviewFileType: ['pdf','image'],
+            uploadAsync: true, //默认异步上传(true),回调fileuploaded,false为同步上传,回调filebatchuploadsuccess
+            maxFileCount: 1,
+            overwriteInitial: false,    //不覆盖已存在的图片
+            initialPreviewConfig: imgConfig, //配置预览的参数
+            autoReplace: true,
+            preferIconicPreview: true,// 强制缩略图显示以下文件扩展名的图标
+            previewFileIconSettings: {
+                'doc': '<i class="fa fa-file-word-o text-primary"></i>',
+                'xls': '<i class="fa fa-file-excel-o text-success"></i>',
+                'ppt': '<i class="fa fa-file-powerpoint-o text-danger"></i>',
+                'zip': '<i class="fa fa-file-archive-o text-muted"></i>',
+                'htm': '<i class="fa fa-file-code-o text-info"></i>',
+                'txt': '<i class="fa fa-file-text-o text-info"></i>',
+                'mov': '<i class="fa fa-file-movie-o text-warning"></i>',
+                'mp3': '<i class="fa fa-file-audio-o text-warning"></i>',
+            },
+            previewFileExtSettings: { // configure the logic for determining icon file extensions
+                'doc': function (ext) {
+                    return ext.match(/(doc|docx)$/i);
+                },
+                'xls': function (ext) {
+                    return ext.match(/(xls|xlsx)$/i);
+                },
+                'ppt': function (ext) {
+                    return ext.match(/(ppt|pptx)$/i);
+                },
+                'zip': function (ext) {
+                    return ext.match(/(zip|rar|tar|gzip|gz|7z)$/i);
+                },
+                'htm': function (ext) {
+                    return ext.match(/(htm|html)$/i);
+                },
+                'txt': function (ext) {
+                    return ext.match(/(txt|ini|csv|java|php|js|css)$/i);
+                },
+                'mov': function (ext) {
+                    return ext.match(/(avi|mpg|mkv|mov|mp4|3gp|webm|wmv)$/i);
+                },
+                'mp3': function (ext) {
+                    return ext.match(/(mp3|wav)$/i);
+                }
+            }
+        }).on('fileuploaded', function (event, data, previewId, index) {
+            fileP += data.response.fileName + ",";
+            fileZ += data.response.fileName + ",";
+            $('#zoom-' + previewId).find(".kv-preview-data").attr("src", data.response.fileName);//上传成功后替换文件路径(替换为实际数据库的存储路径)
+        }).on("filebatchselected", function (event, previewId, files) {//选中文件后执行
+            getMeg();
+            $(".file-upload").fileinput("upload");
+        }).on('fileremoved', function (event, id, index) {//预览时点击缩略图上的删除按钮才能触发的
+            console.log('fileremoved');
+            getMeg();
+        }).on("filepredelete", function (event, key, jqXHR, data) {   //预览图片删除
+            console.log('filepredelete')
+            getMeg();
+        }).on("filesuccessremove", function (event, id) {   //使用缩略图删除按钮删除成功上传的缩略图后
+            console.log('filesuccessremove')
+            getMeg();
+        })
+        $(this).fileinput('_initFileActions');
+    });
+
+    function nowImgTotal() {
+        return $(".file-preview-thumbnails").find('.file-preview-frame').length / 2;
+    }
+
+    function getMeg() {
+        if (nowImgTotal() > 1) {
+            $('#jlrdFileObject').attr('disabled', 'disabled');
+            $.modal.alert("图片允许上传的最大数值为1,请删除需要被替换的图片后再进行上传操作!")
+            return false;
+        } else {
+            $('#jlrdFileObject').removeAttr("disabled");
         }
     }
+
+    /*
+        获取当前页面图片附件的存储路径
+     */
+    function getImgUrl() {
+        var initFileDiv = $(".kv-zoom-cache");
+        var imgUrl = [];
+        initFileDiv.each(function (i, e) {
+            var fullPath = $(this).find(".kv-preview-data").attr("src");
+            if (fullPath.length >= 2)
+                imgUrl[i] = "/profile/upload/" + (fullPath.split("upload/", fullPath.length - 1))[1];
+        });
+        return imgUrl;
+    }
+
+    //f附件用,通用,只需要更改文件参数===============End
 </script>
 </body>
 </html>

+ 71 - 32
mybusiness/src/main/resources/templates/xhnnotsingle/gift/add.html

@@ -2,44 +2,63 @@
 <html lang="zh" xmlns:th="http://www.thymeleaf.org">
 <head>
     <th:block th:include="include :: header('新增礼物信息')"/>
+    <th:block th:include="include :: datetimepicker-css" />
+    <th:block th:include="include :: bootstrap-fileinput-css"/>
 </head>
 <body class="white-bg">
 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
     <form class="form-horizontal m" id="form-gift-add">
-<!--                        <div class="form-group">-->
-<!--                            <label class="col-sm-3 control-label">id-->
-<!--                                :</label>-->
-<!--&lt;!&ndash;                            <div class="col-sm-8">&ndash;&gt;-->
-<!--&lt;!&ndash;                                <input name="id" class="form-control" type="text">&ndash;&gt;-->
-<!--&lt;!&ndash;                            </div>&ndash;&gt;-->
-<!--                        </div>-->
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">礼物名称
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="giftName" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">礼物价值积分数
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="giftNum" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">该礼物是否显示
-                                :</label>
-                            <div class="col-sm-8">
-<!--                                <input name="state" class="form-control" type="text">-->
-                                <select name="state" class="form-control m-b" th:with="type=${@dict.getType('sys_yes_no')}">
-                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
-                                </select>
-                            </div>
-                        </div>
+        <!--                        <div class="form-group">-->
+        <!--                            <label class="col-sm-3 control-label">id-->
+        <!--                                :</label>-->
+        <!--&lt;!&ndash;                            <div class="col-sm-8">&ndash;&gt;-->
+        <!--&lt;!&ndash;                                <input name="id" class="form-control" type="text">&ndash;&gt;-->
+        <!--&lt;!&ndash;                            </div>&ndash;&gt;-->
+        <!--                        </div>-->
+        <div class="form-group">
+            <label class="col-sm-3 control-label">礼物名称
+                :</label>
+            <div class="col-sm-8">
+                <input name="giftName" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">礼物价值积分数
+                :</label>
+            <div class="col-sm-8">
+                <input name="giftNum" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">该礼物是否显示
+                :</label>
+            <div class="col-sm-8">
+                <!--                                <input name="state" class="form-control" type="text">-->
+                <select name="state" class="form-control m-b" th:with="type=${@dict.getType('sys_yes_no')}">
+                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
+                </select>
+            </div>
+        </div>
+<!--        <div class="form-group">-->
+<!--            <label class="col-sm-3 control-label">礼物图标-->
+<!--                :</label>-->
+<!--            <div class="col-sm-8">-->
+<!--                <input name="giftPath" class="form-control" type="text">-->
+<!--            </div>-->
+<!--        </div>-->
+        <div class="form-group">
+            <label class="col-sm-3 control-label">礼物图标 :</label>
+            <div class="col-sm-8">
+                <input type="hidden" name="giftPath">
+                <div class="file-loading">
+                    <input class="form-control file-upload" id="giftPath" name="file" type="file">
+                </div>
+            </div>
+        </div>
     </form>
 </div>
 <th:block th:include="include :: footer"/>
+<th:block th:include="include :: bootstrap-fileinput-js"/>
 <script th:inline="javascript">
     var prefix = ctx + "xhnnotsingle/gift"
     $("#form-gift-add").validate({
@@ -47,10 +66,30 @@
     });
 
     function submitHandler() {
+
         if ($.validate.form()) {
-            $.operate.save(prefix + "/add", $('#form-gift-add').serialize());
+            $("input[name='giftPath']").val(fileP);
+            let data = $("#form-gift-add").serializeArray();
+            $.operate.save(prefix + "/add", data);
         }
     }
+
+
+    let fileP = "";//附件用
+    let fileRealP = "";//真实的文件名uuid
+    $(".file-upload").fileinput({
+        uploadUrl: ctx + 'common/upload',
+        maxFileCount: 1,
+        uploadAsync: true,
+        allowedFileExtensions: ['jpg', 'png'],
+        autoReplace: true,
+        enctype: 'multipart/form-data'
+    }).on('fileuploaded', function (event, data, previewId, index) {
+        $("input[name='" + event.currentTarget.id + "']").val(data.response.url);
+        fileP += data.response.fileName;
+    }).on('fileremoved', function (event, id, index) {
+        $("input[name='" + event.currentTarget.id + "']").val('')
+    })
 </script>
 </body>
 </html>

+ 160 - 2
mybusiness/src/main/resources/templates/xhnnotsingle/gift/edit.html

@@ -2,6 +2,8 @@
 <html lang="zh" xmlns:th="http://www.thymeleaf.org">
 <head>
     <th:block th:include="include :: header('修改礼物信息')"/>
+    <th:block th:include="include :: datetimepicker-css" />
+    <th:block th:include="include :: bootstrap-fileinput-css"/>
 </head>
 <body class="white-bg">
 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
@@ -11,7 +13,7 @@
                             <label class="col-sm-3 control-label">礼物名称
                                 :</label>
                             <div class="col-sm-8">
-                                <input name="giftName" th:field="*{giftName}" class="form-control"
+                                <input name="giftName" th:field="*{giftName}" maxlength="20"  class="form-control"
                                        type="text">
                             </div>
                         </div>
@@ -19,7 +21,7 @@
                             <label class="col-sm-3 control-label">礼物价值积分数
                                 :</label>
                             <div class="col-sm-8">
-                                <input name="giftNum" th:field="*{giftNum}" class="form-control"
+                                <input name="giftNum" th:field="*{giftNum}" maxlength="20"  class="form-control"
                                        type="text">
                             </div>
                         </div>
@@ -34,20 +36,176 @@
                                 </select>
                             </div>
                         </div>
+<!--                        <div class="form-group">-->
+<!--                            <label class="col-sm-3 control-label">礼物图标-->
+<!--                                :</label>-->
+<!--                            <div class="col-sm-8">-->
+<!--                                <input name="giftPath" th:field="*{giftPath}" class="form-control"-->
+<!--                                       type="text">-->
+<!--                            </div>-->
+<!--                        </div>-->
+        <div class="form-group">
+            <label class="col-sm-3 control-label">礼物图标:</label>
+            <div class="col-sm-8">
+                <input type="hidden" name="giftPath" th:field="*{giftPath}">
+                <div class="file-loading">
+                    <input class="form-control file-upload" id="giftPath" name="file" type="file" accept=".jpg,.png">
+                </div>
+            </div>
+        </div>
     </form>
 </div>
 <th:block th:include="include :: footer"/>
+<th:block th:include="include :: datetimepicker-js" />
+<th:block th:include="include :: bootstrap-fileinput-js"/>
 <script th:inline="javascript">
+    var local = window.location.href.substring(0,window.location.href.indexOf(window.location.pathname));//附件用,获取网址
     var prefix = ctx + "xhnnotsingle/gift";
+    var fileP=$("input[name='giftPath']").val();
     $("#form-gift-edit").validate({
         focusCleanup: true
     });
 
+
     function submitHandler() {
         if ($.validate.form()) {
+            $("input[name='giftPath']").val(getImgUrl());
             $.operate.save(prefix + "/edit", $('#form-gift-edit').serialize());
         }
     }
+
+    //f附件用,通用,只需要更改文件参数===============Start
+    var newFilePs = []; //图片回显
+    var imgConfig = []; //预览参数
+    var uploadImageArray = [];//所有已上传的图片路径
+
+    var urlsArr = ($("input[name='giftPath']").val()).split(",");
+    for(var i in urlsArr) {
+        if (urlsArr[i] != "") {
+            uploadImageArray.push(urlsArr[i]);
+            newFilePs[i] = local + urlsArr[i];
+            var fileType = urlsArr[i].substr(urlsArr[i].lastIndexOf(".")+1,urlsArr[i].length-1);
+            var ftype ="image"; //文件类型
+            if(fileType=="pdf"){
+                ftype = "pdf";
+            }
+            imgConfig[i] = {
+                url: ctx+"common/removeFile",
+                downloadUrl:local+urlsArr[i], //下载路径,此项不设置的话下载按钮不显示
+                type:ftype,             //文件类型
+                key: urlsArr[i],        //参数,用于文件删除向后台传参
+                caption:urlsArr[i].substr(urlsArr[i].lastIndexOf("/")+1,urlsArr[i].length-1)    //文件名,用于预览文件显示的文件名
+            };
+        }
+    }
+
+
+    $(".file-upload").each(function (i) {
+        $(this).fileinput({
+            language: 'zh', //设置语言
+            uploadUrl: ctx+'common/upload',
+            deleteUrl:ctx+'common/removeFile',
+            allowedFileExtensions: ['jpg', 'png','pdf','docx','xlsx','doc','xls'],//接收的文件后缀
+//                allowedFileExtensions: ['jpg', 'png','pdf','docx','xlsx','doc','xls'],//接收的文件后缀
+            showUpload: false, //是否显示上传按钮
+            showRemove: false, //显示移除按钮
+            showPreview: true, //是否显示预览
+            showCaption: false,//是否显示标题
+            browseClass: "btn btn-primary", //按钮样式
+            dropZoneEnabled: true,//是否显示拖拽区域
+            initialPreviewAsData: true,
+            enctype: 'multipart/form-data',
+            initialPreview: newFilePs,
+//                initialPreviewFileType: ['pdf','image'],
+            uploadAsync: true, //默认异步上传(true),回调fileuploaded,false为同步上传,回调filebatchuploadsuccess
+            maxFileCount: 1,
+            overwriteInitial: false,    //不覆盖已存在的图片
+            initialPreviewConfig: imgConfig, //配置预览的参数
+            autoReplace: true,
+            preferIconicPreview: true,// 强制缩略图显示以下文件扩展名的图标
+            previewFileIconSettings: {
+                'doc': '<i class="fa fa-file-word-o text-primary"></i>',
+                'xls': '<i class="fa fa-file-excel-o text-success"></i>',
+                'ppt': '<i class="fa fa-file-powerpoint-o text-danger"></i>',
+                'zip': '<i class="fa fa-file-archive-o text-muted"></i>',
+                'htm': '<i class="fa fa-file-code-o text-info"></i>',
+                'txt': '<i class="fa fa-file-text-o text-info"></i>',
+                'mov': '<i class="fa fa-file-movie-o text-warning"></i>',
+                'mp3': '<i class="fa fa-file-audio-o text-warning"></i>',
+            },
+            previewFileExtSettings: { // configure the logic for determining icon file extensions
+                'doc': function(ext) {
+                    return ext.match(/(doc|docx)$/i);
+                },
+                'xls': function(ext) {
+                    return ext.match(/(xls|xlsx)$/i);
+                },
+                'ppt': function(ext) {
+                    return ext.match(/(ppt|pptx)$/i);
+                },
+                'zip': function(ext) {
+                    return ext.match(/(zip|rar|tar|gzip|gz|7z)$/i);
+                },
+                'htm': function(ext) {
+                    return ext.match(/(htm|html)$/i);
+                },
+                'txt': function(ext) {
+                    return ext.match(/(txt|ini|csv|java|php|js|css)$/i);
+                },
+                'mov': function(ext) {
+                    return ext.match(/(avi|mpg|mkv|mov|mp4|3gp|webm|wmv)$/i);
+                },
+                'mp3': function(ext) {
+                    return ext.match(/(mp3|wav)$/i);
+                }
+            }
+        }).on('fileuploaded', function (event, data, previewId, index) {
+            fileP += data.response.fileName+",";
+            $('#zoom-'+previewId).find(".kv-preview-data").attr("src",data.response.fileName);//上传成功后替换文件路径(替换为实际数据库的存储路径)
+        }).on("filebatchselected", function (event, previewId, files) {//选中文件后执行
+            getMeg();
+            $(".file-upload").fileinput("upload");
+        }).on('fileremoved', function (event, id, index) {//预览时点击缩略图上的删除按钮才能触发的
+            console.log('fileremoved');
+            getMeg();
+        }).on("filepredelete", function (event, key, jqXHR, data) {   //预览图片删除
+            console.log('filepredelete')
+            getMeg();
+        }).on("filesuccessremove", function (event, id) {   //使用缩略图删除按钮删除成功上传的缩略图后
+            console.log('filesuccessremove')
+            getMeg();
+        })
+        $(this).fileinput('_initFileActions');
+    });
+
+    function nowImgTotal() {
+        return $(".file-preview-thumbnails").find('.file-preview-frame').length / 2;
+    }
+
+    function getMeg() {
+        if (nowImgTotal() > 1) {
+            $('#jlrdFileObject').attr('disabled', 'disabled');
+            $.modal.alert("图片允许上传的最大数值为1,请删除需要被替换的图片后再进行上传操作!")
+            return false;
+        }else{
+            $('#jlrdFileObject').removeAttr("disabled");
+        }
+    }
+
+    /*
+        获取当前页面图片附件的存储路径
+     */
+    function getImgUrl(){
+        var initFileDiv = $(".kv-zoom-cache");
+        var imgUrl = [];
+        initFileDiv.each(function(i,e){
+            var fullPath = $(this).find(".kv-preview-data").attr("src");
+            if(fullPath.length>=2)
+                imgUrl[i]="/profile/upload/"+(fullPath.split("upload/",fullPath.length-1))[1];
+        });
+        return imgUrl;
+    }
+    //f附件用,通用,只需要更改文件参数===============End
 </script>
 </body>
 </html>

+ 13 - 4
mybusiness/src/main/resources/templates/xhnnotsingle/gift/gift.html

@@ -18,10 +18,10 @@
                                         <label>礼物价值积分数:</label>
                                         <input type="text" name="giftNum"/>
                                     </li>
-                                    <li>
-                                        <label>该礼物是否显示:</label>
-                                        <input type="text" name="state"/>
-                                    </li>
+<!--                                    <li>-->
+<!--                                        <label>该礼物是否显示:</label>-->
+<!--                                        <input type="text" name="state"/>-->
+<!--                                    </li>-->
                         <li>
                             <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                     class="fa fa-search"></i>&nbsp;搜索</a>
@@ -87,6 +87,14 @@
                                 return $.table.selectDictLabel(sys_yes_no, value);
                             }
                         },
+                        {
+                            field: 'giftNum',
+                            title: '礼物图标',
+                            formatter: function (value, row, index) {
+                                var html ='<img src=\"' + value + '\" width=\"30\" height=\"30\">';
+                                return html;
+                            }
+                        },
                 {
                     title: '操作',
                     align: 'center',
@@ -95,6 +103,7 @@
                         actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                         actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                         return actions.join('');
+
                     }
                 }]
         };

+ 53 - 15
mybusiness/src/main/resources/templates/xhnnotsingle/matchmaker/add.html

@@ -2,6 +2,7 @@
 <html lang="zh" xmlns:th="http://www.thymeleaf.org">
 <head>
     <th:block th:include="include :: header('新增小红娘店铺红娘信息')"/>
+    <th:block th:include="include :: datetimepicker-css" />
     <th:block th:include="include :: bootstrap-fileinput-css"/>
 </head>
 <body class="white-bg">
@@ -11,30 +12,72 @@
             <label class="col-sm-3 control-label">姓名
                 :</label>
             <div class="col-sm-8">
-                <input name="name" class="form-control" type="text">
+                <input name="name" class="form-control" maxlength="20"  type="text">
             </div>
         </div>
         <div class="form-group">
             <label class="col-sm-3 control-label">手机号
                 :</label>
             <div class="col-sm-8">
-                <input name="phone" class="form-control" type="text">
+                <input name="phone" class="form-control" maxlength="20"  type="text">
             </div>
         </div>
         <div class="form-group">
-            <label class="col-sm-3 control-label">微信号二维码 :</label>
+            <label class="col-sm-3 control-label">简介
+                :</label>
             <div class="col-sm-8">
-                <input  type="hidden" name="wechatUrl" >
-                <div class="file-loading">
-                    <input class="form-control file-upload" id="wechatUrl" name="file" type="file">
-                </div>
+                <input name="introduction" class="form-control" maxlength="20"  type="text">
             </div>
         </div>
         <div class="form-group">
-            <label class="col-sm-3 control-label">简介
+            <label class="col-sm-3 control-label">人物介绍
+                :</label>
+            <div class="col-sm-8">
+                <input name="talentIntroduction" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">从业时间
+                :</label>
+            <div class="col-sm-8">
+                <input name="workingTime" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">擅长
+                :</label>
+            <div class="col-sm-8">
+                <input name="beGood" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">技能
                 :</label>
             <div class="col-sm-8">
-                <input name="introduction" class="form-control" type="text">
+                <input name="skill" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">荣誉
+                :</label>
+            <div class="col-sm-8">
+                <input name="honor" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">职称
+                :</label>
+            <div class="col-sm-8">
+                <input name="title" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">头像 :</label>
+            <div class="col-sm-8">
+                <input  type="hidden" name="wechatUrl" >
+                <div class="file-loading">
+                    <input class="form-control file-upload" id="wechatUrl" name="file" type="file">
+                </div>
             </div>
         </div>
     </form>
@@ -67,16 +110,11 @@
         enctype: 'multipart/form-data'
     }).on('fileuploaded', function (event, data, previewId, index) {
         $("input[name='" + event.currentTarget.id + "']").val(data.response.url);
-        fileP += data.response.fileName + ",";
+        fileP += data.response.fileName;
     }).on('fileremoved', function (event, id, index) {
         $("input[name='" + event.currentTarget.id + "']").val('')
     })
 
-    function submitHandler() {
-        if ($.validate.form()) {
-            $.operate.save(prefix + "/add", $('#form-matchmaker-add').serialize());
-        }
-    }
 </script>
 </body>
 </html>

+ 97 - 64
mybusiness/src/main/resources/templates/xhnnotsingle/matchmaker/edit.html

@@ -2,6 +2,7 @@
 <html lang="zh" xmlns:th="http://www.thymeleaf.org">
 <head>
     <th:block th:include="include :: header('修改小红娘店铺红娘信息')"/>
+    <th:block th:include="include :: datetimepicker-css" />
     <th:block th:include="include :: bootstrap-fileinput-css"/>
 </head>
 <body class="white-bg">
@@ -12,7 +13,7 @@
             <label class="col-sm-3 control-label">姓名
                 :</label>
             <div class="col-sm-8">
-                <input name="name" th:field="*{name}" class="form-control"
+                <input name="name" th:field="*{name}" class="form-control" maxlength="20"
                        type="text">
             </div>
         </div>
@@ -20,43 +21,84 @@
             <label class="col-sm-3 control-label">手机号
                 :</label>
             <div class="col-sm-8">
-                <input name="phone" th:field="*{phone}" class="form-control"
+                <input name="phone" th:field="*{phone}" class="form-control" maxlength="20"
                        type="text">
             </div>
         </div>
-        <!--                        <div class="form-group">-->
-        <!--                            <label class="col-sm-3 control-label">微信号二维码-->
-        <!--                                :</label>-->
-        <!--                            <div class="col-sm-8">-->
-        <!--                                <input name="wechatUrl" th:field="*{wechatUrl}" class="form-control"-->
-        <!--                                       type="text">-->
-        <!--                            </div>-->
-        <!--                        </div>-->
         <div class="form-group">
-            <label class="col-sm-3 control-label">微信号二维码:</label>
+            <label class="col-sm-3 control-label">简介
+                :</label>
             <div class="col-sm-8">
-                <input type="hidden" name="wechatUrl" th:field="*{wechatUrl}">
-                <div class="file-loading">
-                    <input class="form-control file-upload" id="jlrdFileObject" name="file" type="file"
-                           onclick="getMeg()" accept=".jpg,.png">
-                </div>
+                <input name="introduction" th:field="*{introduction}" class="form-control" maxlength="20"
+                       type="text">
             </div>
         </div>
         <div class="form-group">
-            <label class="col-sm-3 control-label">简介
+            <label class="col-sm-3 control-label">人物介绍
+                :</label>
+            <div class="col-sm-8">
+                <input name="talentIntroduction" th:field="*{talentIntroduction}" class="form-control" maxlength="20"
+                       type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">从业时间
+                :</label>
+            <div class="col-sm-8">
+                <input name="workingTime" th:field="*{workingTime}" class="form-control" maxlength="20"
+                       type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">擅长
+                :</label>
+            <div class="col-sm-8">
+                <input name="beGood" th:field="*{beGood}" class="form-control" maxlength="20"
+                       type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">技能
+                :</label>
+            <div class="col-sm-8">
+                <input name="skill" th:field="*{skill}" class="form-control" maxlength="20"
+                       type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">荣誉
                 :</label>
             <div class="col-sm-8">
-                <input name="introduction" th:field="*{introduction}" class="form-control"
+                <input name="honor" th:field="*{honor}" class="form-control" maxlength="20"
                        type="text">
             </div>
         </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">职称
+                :</label>
+            <div class="col-sm-8">
+                <input name="title" th:field="*{title}" class="form-control" maxlength="20"
+                       type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">头像:</label>
+            <div class="col-sm-8">
+                <input type="hidden" name="wechatUrl" th:field="*{wechatUrl}">
+                <div class="file-loading">
+                    <input class="form-control file-upload" id="wechatUrl" name="file" type="file" accept=".jpg,.png">
+                </div>
+            </div>
+        </div>
     </form>
 </div>
 <th:block th:include="include :: footer" />
 <th:block th:include="include :: datetimepicker-js" />
 <th:block th:include="include :: bootstrap-fileinput-js"/>
 <script th:inline="javascript">
+    var local = window.location.href.substring(0,window.location.href.indexOf(window.location.pathname));//附件用,获取网址
     var prefix = ctx + "xhnnotsingle/matchmaker";
+    var fileP=$("input[name='wechatUrl']").val();
     $("#form-matchmaker-edit").validate({
         focusCleanup: true
     });
@@ -68,40 +110,38 @@
         }
     }
 
-    /**附件组件多图片回显JS**/
-    let newFilePs = []; //图片回显
-    let imgConfig = []; //预览参数
-    let uploadImageArray = [];//所有已上传的图片路径
-    let fileP = $("input[name='wechatUrl']").val();
+    //f附件用,通用,只需要更改文件参数===============Start
+    var newFilePs = []; //图片回显
+    var imgConfig = []; //预览参数
+    var uploadImageArray = [];//所有已上传的图片路径
 
-    let urlsArr = ($("input[name='wechatUrl']").val()).split(",");
-    for (let i in urlsArr) {
+    var urlsArr = ($("input[name='wechatUrl']").val()).split(",");
+    for(var i in urlsArr) {
         if (urlsArr[i] != "") {
             uploadImageArray.push(urlsArr[i]);
-            newFilePs[i] = ctx + urlsArr[i];
-            let fileType = urlsArr[i].substr(urlsArr[i].lastIndexOf(".") + 1, urlsArr[i].length - 1);
-            let ftype = "image"; //文件类型
-            if (fileType == "pdf") {
+            newFilePs[i] = local + urlsArr[i];
+            var fileType = urlsArr[i].substr(urlsArr[i].lastIndexOf(".")+1,urlsArr[i].length-1);
+            var ftype ="image"; //文件类型
+            if(fileType=="pdf"){
                 ftype = "pdf";
             }
             imgConfig[i] = {
-                url: ctx + "/common/removeFile",
-                downloadUrl: ctx + urlsArr[i], //下载路径,此项不设置的话下载按钮不显示
-                type: ftype,             //文件类型
+                url: ctx+"common/removeFile",
+                downloadUrl:local+urlsArr[i], //下载路径,此项不设置的话下载按钮不显示
+                type:ftype,             //文件类型
                 key: urlsArr[i],        //参数,用于文件删除向后台传参
-                caption: urlsArr[i].substr(urlsArr[i].lastIndexOf("/") + 1, urlsArr[i].length - 1)    //文件名,用于预览文件显示的文件名
+                caption:urlsArr[i].substr(urlsArr[i].lastIndexOf("/")+1,urlsArr[i].length-1)    //文件名,用于预览文件显示的文件名
             };
         }
     }
 
 
     $(".file-upload").each(function (i) {
-        let val = $("input[name='" + this.id + "']").val()
         $(this).fileinput({
             language: 'zh', //设置语言
-            uploadUrl: ctx + '/common/upload',
-            deleteUrl: ctx + '/common/removeFile',
-            allowedFileExtensions: ['jpg', 'png'],//接收的文件后缀
+            uploadUrl: ctx+'common/upload',
+            deleteUrl:ctx+'common/removeFile',
+            allowedFileExtensions: ['jpg', 'png','pdf','docx','xlsx','doc','xls'],//接收的文件后缀
 //                allowedFileExtensions: ['jpg', 'png','pdf','docx','xlsx','doc','xls'],//接收的文件后缀
             showUpload: false, //是否显示上传按钮
             showRemove: false, //显示移除按钮
@@ -115,7 +155,7 @@
 //                initialPreviewFileType: ['pdf','image'],
             uploadAsync: true, //默认异步上传(true),回调fileuploaded,false为同步上传,回调filebatchuploadsuccess
             maxFileCount: 1,
-            overwriteInitial: false,    //不覆盖已存在的图片
+            overwriteInitial: false,    //不覆盖已存在的图片
             initialPreviewConfig: imgConfig, //配置预览的参数
             autoReplace: true,
             preferIconicPreview: true,// 强制缩略图显示以下文件扩展名的图标
@@ -130,37 +170,36 @@
                 'mp3': '<i class="fa fa-file-audio-o text-warning"></i>',
             },
             previewFileExtSettings: { // configure the logic for determining icon file extensions
-                'doc': function (ext) {
+                'doc': function(ext) {
                     return ext.match(/(doc|docx)$/i);
                 },
-                'xls': function (ext) {
+                'xls': function(ext) {
                     return ext.match(/(xls|xlsx)$/i);
                 },
-                'ppt': function (ext) {
+                'ppt': function(ext) {
                     return ext.match(/(ppt|pptx)$/i);
                 },
-                'zip': function (ext) {
+                'zip': function(ext) {
                     return ext.match(/(zip|rar|tar|gzip|gz|7z)$/i);
                 },
-                'htm': function (ext) {
+                'htm': function(ext) {
                     return ext.match(/(htm|html)$/i);
                 },
-                'txt': function (ext) {
+                'txt': function(ext) {
                     return ext.match(/(txt|ini|csv|java|php|js|css)$/i);
                 },
-                'mov': function (ext) {
+                'mov': function(ext) {
                     return ext.match(/(avi|mpg|mkv|mov|mp4|3gp|webm|wmv)$/i);
                 },
-                'mp3': function (ext) {
+                'mp3': function(ext) {
                     return ext.match(/(mp3|wav)$/i);
                 }
             }
         }).on('fileuploaded', function (event, data, previewId, index) {
-            debugger
-            fileP += data.response.fileName + ",";
-            $('#zoom-' + previewId).find(".kv-preview-data").attr("src", data.response.fileName);//上传成功后替换文件路径(替换为实际数据库的存储路径)
-
+            fileP += data.response.fileName+",";
+            $('#zoom-'+previewId).find(".kv-preview-data").attr("src",data.response.fileName);//上传成功后替换文件路径(替换为实际数据库的存储路径)
         }).on("filebatchselected", function (event, previewId, files) {//选中文件后执行
+            getMeg();
             $(".file-upload").fileinput("upload");
         }).on('fileremoved', function (event, id, index) {//预览时点击缩略图上的删除按钮才能触发的
             console.log('fileremoved');
@@ -180,11 +219,11 @@
     }
 
     function getMeg() {
-        if (nowImgTotal() >= 6) {
+        if (nowImgTotal() > 1) {
             $('#jlrdFileObject').attr('disabled', 'disabled');
-            $.modal.alert("图片允许上传的最大数值为6,请删除需要被替换的图片后再进行上传操作!")
+            $.modal.alert("图片允许上传的最大数值为1,请删除需要被替换的图片后再进行上传操作!")
             return false;
-        } else {
+        }else{
             $('#jlrdFileObject').removeAttr("disabled");
         }
     }
@@ -192,23 +231,17 @@
     /*
         获取当前页面图片附件的存储路径
      */
-    function getImgUrl() {
+    function getImgUrl(){
         var initFileDiv = $(".kv-zoom-cache");
         var imgUrl = [];
-        initFileDiv.each(function (i, e) {
-            debugger
+        initFileDiv.each(function(i,e){
             var fullPath = $(this).find(".kv-preview-data").attr("src");
-            if (fullPath != null && fullPath != "" && fullPath.length >= 2)
-                imgUrl[i] = "/profile/upload/" + (fullPath.split("upload/", fullPath.length - 1))[1];
+            if(fullPath.length>=2)
+                imgUrl[i]="/profile/upload/"+(fullPath.split("upload/",fullPath.length-1))[1];
         });
         return imgUrl;
     }
-
-    function submitHandler() {
-        if ($.validate.form()) {
-            $.operate.save(prefix + "/edit", $('#form-matchmaker-edit').serialize());
-        }
-    }
+    //f附件用,通用,只需要更改文件参数===============End
 </script>
 </body>
 </html>

+ 63 - 10
mybusiness/src/main/resources/templates/xhnnotsingle/matchmaker/matchmaker.html

@@ -18,14 +18,38 @@
                                         <label>手机号:</label>
                                         <input type="text" name="phone"/>
                                     </li>
-                                    <li>
-                                        <label>微信号二维码:</label>
-                                        <input type="text" name="wechatUrl"/>
-                                    </li>
-                                    <li>
-                                        <label>简介:</label>
-                                        <input type="text" name="introduction"/>
-                                    </li>
+<!--                                    <li>-->
+<!--                                        <label>微信号二维码:</label>-->
+<!--                                        <input type="text" name="wechatUrl"/>-->
+<!--                                    </li>-->
+<!--                                    <li>-->
+<!--                                        <label>简介:</label>-->
+<!--                                        <input type="text" name="introduction"/>-->
+<!--                                    </li>-->
+<!--                                    <li>-->
+<!--                                        <label>人物介绍:</label>-->
+<!--                                        <input type="text" name="talentIntroduction"/>-->
+<!--                                    </li>-->
+<!--                                    <li>-->
+<!--                                        <label>从业时间:</label>-->
+<!--                                        <input type="text" name="workingTime"/>-->
+<!--                                    </li>-->
+<!--                                    <li>-->
+<!--                                        <label>擅长:</label>-->
+<!--                                        <input type="text" name="beGood"/>-->
+<!--                                    </li>-->
+<!--                                    <li>-->
+<!--                                        <label>技能:</label>-->
+<!--                                        <input type="text" name="skill"/>-->
+<!--                                    </li>-->
+<!--                                    <li>-->
+<!--                                        <label>荣誉:</label>-->
+<!--                                        <input type="text" name="honor"/>-->
+<!--                                    </li>-->
+<!--                                    <li>-->
+<!--                                        <label>职称:</label>-->
+<!--                                        <input type="text" name="title"/>-->
+<!--                                    </li>-->
                         <li>
                             <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                     class="fa fa-search"></i>&nbsp;搜索</a>
@@ -90,15 +114,44 @@
                         },
                         {
                             field: 'wechatUrl',
-                            title: '微信号二维码',
+                            title: '头像',
                             formatter: function (value, row, index) {
-                                return '<img src="' + value + '" width="60" height="60">';
+                                var imgval = value.split(",");
+                                var html = "";
+                                for (var i=0;i<imgval.length;i++){
+                                    html+='<img src=\"' + imgval[i] + '\" width=\"60\" height=\"60\">';
+                                }
+                                return html;
                             }
                         },
                         {
                             field: 'introduction',
                             title: '简介'
                         },
+                        {
+                            field: 'talentIntroduction',
+                            title: '人物介绍'
+                        },
+                        {
+                            field: 'workingTime',
+                            title: '从业时间'
+                        },
+                        {
+                            field: 'beGood',
+                            title: '擅长'
+                        },
+                        {
+                            field: 'skill',
+                            title: '技能'
+                        },
+                        {
+                            field: 'honor',
+                            title: '荣誉'
+                        },
+                        {
+                            field: 'title',
+                            title: '职称'
+                        },
                 {
                     title: '操作',
                     align: 'center',

+ 2 - 2
mybusiness/src/main/resources/templates/xhnnotsingle/moneybyintegral/add.html

@@ -10,14 +10,14 @@
                             <label class="col-sm-3 control-label">金额数
                                 :</label>
                             <div class="col-sm-8">
-                                <input name="money" class="form-control" type="text">
+                                <input name="money" class="form-control" maxlength="20"  type="text">
                             </div>
                         </div>
                         <div class="form-group">
                             <label class="col-sm-3 control-label">积分数
                                 :</label>
                             <div class="col-sm-8">
-                                <input name="integral" class="form-control" type="text">
+                                <input name="integral" class="form-control" maxlength="20"  type="text">
                             </div>
                         </div>
     </form>

+ 2 - 2
mybusiness/src/main/resources/templates/xhnnotsingle/moneybyintegral/edit.html

@@ -11,7 +11,7 @@
                             <label class="col-sm-3 control-label">金额数
                                 :</label>
                             <div class="col-sm-8">
-                                <input name="money" th:field="*{money}" class="form-control"
+                                <input name="money" th:field="*{money}" class="form-control" maxlength="20"
                                        type="text">
                             </div>
                         </div>
@@ -19,7 +19,7 @@
                             <label class="col-sm-3 control-label">积分数
                                 :</label>
                             <div class="col-sm-8">
-                                <input name="integral" th:field="*{integral}" class="form-control"
+                                <input name="integral" th:field="*{integral}" class="form-control" maxlength="20"
                                        type="text">
                             </div>
                         </div>

+ 207 - 196
mybusiness/src/main/resources/templates/xhnnotsingle/registeruser/add.html

@@ -6,202 +6,213 @@
 <body class="white-bg">
 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
     <form class="form-horizontal m" id="form-registeruser-add">
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">会员编号
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="code" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">微信名称
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="wechatName" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">真实姓名
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="name" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">身份证号
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="idCard" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">手机号
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="phone" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">身高
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="height" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">体重
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="weight" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">出生年月
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="birthDate" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">星座
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="constellation" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">是否已婚
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="isMarried" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">职业
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="occupation" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">工作性质
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="workNature" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">学历
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="education" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">地区
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="location" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">理想ta所在地
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="taLocation" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">是否接收异地
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="longDistanceLove" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">性格介绍
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="character" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">不能接受性
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="noAccepted" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">微信号
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="wechatCode" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">微信暗号
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="wechatArgot" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">个人信息放进盲盒审批是否通过
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="approval" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">是否允许登录
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="isLogin" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">是否脱单
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="delisting" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">人员头像url
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="portraitUrl" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">首充29.9免费开一次
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="isFree" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">剩余金额
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="memberMoney" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">剩余积分
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="memberIntegral" class="form-control" type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">推广人id
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="promoter" class="form-control" type="text">
-                            </div>
-                        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">会员编号
+                :</label>
+            <div class="col-sm-8">
+                <input name="code" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">微信名称
+                :</label>
+            <div class="col-sm-8">
+                <input name="wechatName" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">真实姓名
+                :</label>
+            <div class="col-sm-8">
+                <input name="name" class="form-control" maxlength="20" type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">身份证号
+                :</label>
+            <div class="col-sm-8">
+                <input name="idCard" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">手机号
+                :</label>
+            <div class="col-sm-8">
+                <input name="phone" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">身高
+                :</label>
+            <div class="col-sm-8">
+                <input name="height" class="form-control" type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">体重
+                :</label>
+            <div class="col-sm-8">
+                <input name="weight" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">出生年月
+                :</label>
+            <div class="col-sm-8">
+                <input name="birthDate" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">星座
+                :</label>
+            <div class="col-sm-8">
+                <input name="constellation" class="form-control" maxlength="20" type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">是否已婚
+                :</label>
+            <div class="col-sm-8">
+                <input name="isMarried" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">职业
+                :</label>
+            <div class="col-sm-8">
+                <input name="occupation" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">工作性质
+                :</label>
+            <div class="col-sm-8">
+                <input name="workNature" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">学历
+                :</label>
+            <div class="col-sm-8">
+                <input name="education" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">地区
+                :</label>
+            <div class="col-sm-8">
+                <input name="location" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">理想ta所在地
+                :</label>
+            <div class="col-sm-8">
+                <input name="taLocation" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">是否接收异地
+                :</label>
+            <div class="col-sm-8">
+                <input name="longDistanceLove" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">性格介绍
+                :</label>
+            <div class="col-sm-8">
+                <input name="character" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">不能接受性
+                :</label>
+            <div class="col-sm-8">
+                <input name="noAccepted" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">微信号
+                :</label>
+            <div class="col-sm-8">
+                <input name="wechatCode" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">微信暗号
+                :</label>
+            <div class="col-sm-8">
+                <input name="wechatArgot" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">个人信息放进盲盒审批是否通过
+                :</label>
+            <div class="col-sm-8">
+                <input name="approval" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">是否允许登录
+                :</label>
+            <div class="col-sm-8">
+                <input name="isLogin" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <!--                        <div class="form-group">-->
+        <!--                            <label class="col-sm-3 control-label">是否脱单-->
+        <!--                                :</label>-->
+        <!--                            <div class="col-sm-8">-->
+        <!--                                <input name="delisting" class="form-control" type="text">-->
+        <!--                            </div>-->
+        <!--                        </div>-->
+        <div class="form-group">
+            <label class="col-sm-3 control-label">人员头像url
+                :</label>
+            <div class="col-sm-8">
+                <input name="portraitUrl" class="form-control" type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">首充29.9免费开一次
+                :</label>
+            <div class="col-sm-8">
+                <input name="isFree" class="form-control" type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">剩余金额
+                :</label>
+            <div class="col-sm-8">
+                <input name="memberMoney" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">剩余积分
+                :</label>
+            <div class="col-sm-8">
+                <input name="memberIntegral" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">推广人id
+                :</label>
+            <div class="col-sm-8">
+                <input name="promoter" class="form-control" maxlength="20"  type="text">
+            </div>
+        </div>
+
+<!--        <div class="form-group">-->
+<!--            <label class="col-sm-3 control-label">审批状态:</label>-->
+<!--            <div class="col-sm-8">-->
+<!--                <div class="radio-box" th:each="dict : ${@dict.getType('is_login')}">-->
+<!--                    <input type="radio" th:id="${dict.dictCode}" name="isLogin" th:value="${dict.dictValue}"-->
+<!--                           th:checked="${dict.default}">-->
+<!--                    <label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>-->
+<!--                </div>-->
+<!--            </div>-->
+<!--        </div>-->
     </form>
 </div>
 <th:block th:include="include :: footer"/>

+ 236 - 224
mybusiness/src/main/resources/templates/xhnnotsingle/registeruser/edit.html

@@ -7,230 +7,242 @@
 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
     <form class="form-horizontal m" id="form-registeruser-edit" th:object="${xhnRegisterUser}">
         <input name="openid" th:field="*{openid}" type="hidden">
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">会员编号
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="code" th:field="*{code}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">微信名称
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="wechatName" th:field="*{wechatName}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">真实姓名
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="name" th:field="*{name}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">身份证号
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="idCard" th:field="*{idCard}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">手机号
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="phone" th:field="*{phone}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">身高
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="height" th:field="*{height}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">体重
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="weight" th:field="*{weight}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">出生年月
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="birthDate" th:field="*{birthDate}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">星座
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="constellation" th:field="*{constellation}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">是否已婚
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="isMarried" th:field="*{isMarried}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">职业
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="occupation" th:field="*{occupation}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">工作性质
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="workNature" th:field="*{workNature}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">学历
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="education" th:field="*{education}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">地区
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="location" th:field="*{location}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">理想ta所在地
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="taLocation" th:field="*{taLocation}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">是否接收异地
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="longDistanceLove" th:field="*{longDistanceLove}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">性格介绍
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="character" th:field="*{character}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">不能接受性
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="noAccepted" th:field="*{noAccepted}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">微信号
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="wechatCode" th:field="*{wechatCode}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">微信暗号
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="wechatArgot" th:field="*{wechatArgot}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">个人信息放进盲盒审批是否通过
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="approval" th:field="*{approval}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">是否允许登录
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="isLogin" th:field="*{isLogin}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">是否脱单
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="delisting" th:field="*{delisting}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">人员头像url
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="portraitUrl" th:field="*{portraitUrl}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">首充29.9免费开一次
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="isFree" th:field="*{isFree}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">剩余金额
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="memberMoney" th:field="*{memberMoney}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">剩余积分
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="memberIntegral" th:field="*{memberIntegral}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
-                        <div class="form-group">
-                            <label class="col-sm-3 control-label">推广人id
-                                :</label>
-                            <div class="col-sm-8">
-                                <input name="promoter" th:field="*{promoter}" class="form-control"
-                                       type="text">
-                            </div>
-                        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">会员编号
+                :</label>
+            <div class="col-sm-8">
+                <input name="code" th:field="*{code}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">微信名称
+                :</label>
+            <div class="col-sm-8">
+                <input name="wechatName" th:field="*{wechatName}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">真实姓名
+                :</label>
+            <div class="col-sm-8">
+                <input name="name" th:field="*{name}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">身份证号
+                :</label>
+            <div class="col-sm-8">
+                <input name="idCard" th:field="*{idCard}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">手机号
+                :</label>
+            <div class="col-sm-8">
+                <input name="phone" th:field="*{phone}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">身高
+                :</label>
+            <div class="col-sm-8">
+                <input name="height" th:field="*{height}" class="form-control" maxlength="20"
+                       type="text" disabled>
+
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">体重
+                :</label>
+            <div class="col-sm-8">
+                <input name="weight" th:field="*{weight}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">出生年月
+                :</label>
+            <div class="col-sm-8">
+                <input name="birthDate" th:field="*{birthDate}" class="form-control"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">星座
+                :</label>
+            <div class="col-sm-8">
+                <input name="constellation" th:field="*{constellation}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">是否已婚
+                :</label>
+            <div class="col-sm-8">
+                <input name="isMarried" th:field="*{isMarried}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">职业
+                :</label>
+            <div class="col-sm-8">
+                <input name="occupation" th:field="*{occupation}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">工作性质
+                :</label>
+            <div class="col-sm-8">
+                <input name="workNature" th:field="*{workNature}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">学历
+                :</label>
+            <div class="col-sm-8">
+                <input name="education" th:field="*{education}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">地区
+                :</label>
+            <div class="col-sm-8">
+                <input name="location" th:field="*{location}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">理想ta所在地
+                :</label>
+            <div class="col-sm-8">
+                <input name="taLocation" th:field="*{taLocation}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">是否接收异地
+                :</label>
+            <div class="col-sm-8">
+                <input name="longDistanceLove" th:field="*{longDistanceLove}" class="form-control"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">性格介绍
+                :</label>
+            <div class="col-sm-8">
+                <input name="character" th:field="*{character}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">不能接受性
+                :</label>
+            <div class="col-sm-8">
+                <input name="noAccepted" th:field="*{noAccepted}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">微信号
+                :</label>
+            <div class="col-sm-8">
+                <input name="wechatCode" th:field="*{wechatCode}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">微信暗号
+                :</label>
+            <div class="col-sm-8">
+                <input name="wechatArgot" th:field="*{wechatArgot}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">个人信息放进盲盒审批是否通过
+                :</label>
+            <div class="col-sm-8">
+                <input name="approval" th:field="*{approval}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">是否允许登录
+                :</label>
+            <div class="col-sm-8">
+                <input name="isLogin" th:field="*{isLogin}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">是否脱单
+                :</label>
+            <div class="col-sm-8">
+                <input name="delisting" th:field="*{delisting}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">人员头像url
+                :</label>
+            <div class="col-sm-8">
+                <input name="portraitUrl" th:field="*{portraitUrl}" class="form-control"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">首充29.9免费开一次
+                :</label>
+            <div class="col-sm-8">
+                <input name="isFree" th:field="*{isFree}" class="form-control"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">剩余金额
+                :</label>
+            <div class="col-sm-8">
+                <input name="memberMoney" th:field="*{memberMoney}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">剩余积分
+                :</label>
+            <div class="col-sm-8">
+                <input name="memberIntegral" th:field="*{memberIntegral}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">推广人id
+                :</label>
+            <div class="col-sm-8">
+                <input name="promoter" th:field="*{promoter}" class="form-control" maxlength="20"
+                       type="text" disabled>
+            </div>
+        </div>
+
+        <div class="form-group">
+            <label class="col-sm-3 control-label">审批状态:</label>
+            <div class="col-sm-8">
+                <div class="radio-box" th:each="dict : ${@dict.getType('is_login')}">
+                    <input type="radio" th:id="${dict.dictCode}" name="isLogin" th:value="${dict.dictValue}"
+                           th:field="*{isLogin}">
+                    <label th:for="${dict.dictCode}" th:text="${dict.dictLabel}"></label>
+                </div>
+            </div>
+        </div>
     </form>
 </div>
 <th:block th:include="include :: footer"/>

+ 0 - 0
mybusiness/src/main/resources/templates/xhnnotsingle/registeruser/registeruser.html


Деякі файли не було показано, через те що забагато файлів було змінено