From ca7f62f9242baf492f8ccf02b656dacc44c0bcbe Mon Sep 17 00:00:00 2001
From: perry <292303709@qq.com>
Date: Mon, 15 May 2023 23:40:57 +0800
Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E4=BB=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
yudao-dependencies/pom.xml | 7 +-
.../pay/config/WxPayOneAutoConfiguration.java | 64 +++
.../pay/config/WxPayTwoAutoConfiguration.java | 65 +++
.../pay/properties/WxPayProperties.java | 86 ++++
.../pay/properties/WxPayTwoProperties.java | 86 ++++
...ot.autoconfigure.AutoConfiguration.imports | 4 +-
.../yudao-module-shop-biz/pom.xml | 8 +
.../shop/controller/TestPayController.java | 126 +++++
.../admin/notify/WxPayNotifyController.java | 127 +++++
.../admin/user/AdminUserController.java | 1 +
.../app/auth/AppAuthController.java | 4 +
.../admin/tenant/TenantController.java | 7 +
.../admin/tenant/vo/tenant/TenantBaseVO.java | 53 ++-
.../dal/dataobject/tenant/TenantDO.java | 32 ++
yudao-server/pom.xml | 40 +-
.../src/main/resources/1/apiclient_cert.p12 | Bin 0 -> 2798 bytes
.../src/main/resources/1/apiclient_cert.pem | 25 +
.../src/main/resources/1/apiclient_key.pem | 28 ++
.../src/main/resources/2/apiclient_cert.p12 | Bin 0 -> 2798 bytes
.../src/main/resources/2/apiclient_cert.pem | 25 +
.../src/main/resources/2/apiclient_key.pem | 28 ++
.../src/main/resources/application-local.yaml | 30 +-
.../src/main/resources/application.yaml | 2 +
yudao-ui-admin/.env.dev | 2 +-
yudao-ui-admin/src/api/shop/phoneRecord.js | 54 +++
yudao-ui-admin/src/api/shop/rechargeOrder.js | 54 +++
.../src/views/shop/phoneRecord/index.vue | 272 +++++++++++
.../src/views/shop/rechargeOrder/index.vue | 441 ++++++++++++++++++
.../src/views/system/dept/index.vue | 32 +-
29 files changed, 1658 insertions(+), 45 deletions(-)
create mode 100644 yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/config/WxPayOneAutoConfiguration.java
create mode 100644 yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/config/WxPayTwoAutoConfiguration.java
create mode 100644 yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/properties/WxPayProperties.java
create mode 100644 yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/properties/WxPayTwoProperties.java
create mode 100644 yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/TestPayController.java
create mode 100644 yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/notify/WxPayNotifyController.java
create mode 100644 yudao-server/src/main/resources/1/apiclient_cert.p12
create mode 100644 yudao-server/src/main/resources/1/apiclient_cert.pem
create mode 100644 yudao-server/src/main/resources/1/apiclient_key.pem
create mode 100644 yudao-server/src/main/resources/2/apiclient_cert.p12
create mode 100644 yudao-server/src/main/resources/2/apiclient_cert.pem
create mode 100644 yudao-server/src/main/resources/2/apiclient_key.pem
create mode 100644 yudao-ui-admin/src/api/shop/phoneRecord.js
create mode 100644 yudao-ui-admin/src/api/shop/rechargeOrder.js
create mode 100644 yudao-ui-admin/src/views/shop/phoneRecord/index.vue
create mode 100644 yudao-ui-admin/src/views/shop/rechargeOrder/index.vue
diff --git a/yudao-dependencies/pom.xml b/yudao-dependencies/pom.xml
index c7b0e9dc7..15bf2a83a 100644
--- a/yudao-dependencies/pom.xml
+++ b/yudao-dependencies/pom.xml
@@ -70,7 +70,7 @@
+ * 微信支付自动配置 + * Created by BinaryWang on 2019/4/17. + *+ * + * @author Binary Wang + */ +@Configuration +@EnableConfigurationProperties(WxPayProperties.class) +@ConditionalOnClass(WxPayService.class) +@ConditionalOnProperty(prefix = "wx.pay.one", value = "enabled", matchIfMissing = true) +public class WxPayOneAutoConfiguration { + private WxPayProperties properties; + + @Autowired + public WxPayOneAutoConfiguration(WxPayProperties properties) { + this.properties = properties; + } + + /** + * 构造微信支付服务对象. + * + * @return 微信支付service + */ + @Bean + @ConditionalOnMissingBean(WxPayService.class) + public WxPayService wxPayOneService() { + final WxPayServiceImpl wxPayService = new WxPayServiceImpl(); + WxPayConfig payConfig = new WxPayConfig(); + payConfig.setAppId(StringUtils.trimToNull(this.properties.getAppId())); + payConfig.setMchId(StringUtils.trimToNull(this.properties.getMchId())); + payConfig.setMchKey(StringUtils.trimToNull(this.properties.getMchKey())); + payConfig.setSubAppId(StringUtils.trimToNull(this.properties.getSubAppId())); + payConfig.setSubMchId(StringUtils.trimToNull(this.properties.getSubMchId())); + payConfig.setKeyPath(StringUtils.trimToNull(this.properties.getKeyPath())); + payConfig.setNotifyUrl(StringUtils.trimToNull(this.properties.getNotifyUrl())); + //以下是apiv3以及支付分相关 + payConfig.setServiceId(StringUtils.trimToNull(this.properties.getServiceId())); + payConfig.setPayScoreNotifyUrl(StringUtils.trimToNull(this.properties.getPayScoreNotifyUrl())); + payConfig.setPrivateKeyPath(StringUtils.trimToNull(this.properties.getPrivateKeyPath())); + payConfig.setPrivateCertPath(StringUtils.trimToNull(this.properties.getPrivateCertPath())); + payConfig.setCertSerialNo(StringUtils.trimToNull(this.properties.getCertSerialNo())); + payConfig.setApiV3Key(StringUtils.trimToNull(this.properties.getApiv3Key())); + wxPayService.setConfig(payConfig); + return wxPayService; + } + +} diff --git a/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/config/WxPayTwoAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/config/WxPayTwoAutoConfiguration.java new file mode 100644 index 000000000..b1437bec8 --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/config/WxPayTwoAutoConfiguration.java @@ -0,0 +1,65 @@ +package cn.iocoder.yudao.framework.pay.config; + +import cn.iocoder.yudao.framework.pay.properties.WxPayTwoProperties; +import com.github.binarywang.wxpay.config.WxPayConfig; +import com.github.binarywang.wxpay.service.WxPayService; +import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + *
+ * 微信支付自动配置 + * Created by BinaryWang on 2019/4/17. + *+ * + * @author Binary Wang + */ +@Configuration +@EnableConfigurationProperties(WxPayTwoProperties.class) +@ConditionalOnClass(WxPayService.class) +@ConditionalOnProperty(prefix = "wx.pay.two", value = "enabled", matchIfMissing = true) +public class WxPayTwoAutoConfiguration { + + private WxPayTwoProperties wxPayTwoProperties; + + @Autowired + public WxPayTwoAutoConfiguration(WxPayTwoProperties wxPayTwoProperties) { + this.wxPayTwoProperties = wxPayTwoProperties; + } + + /** + * 构造微信支付服务对象. + * + * @return 微信支付service + */ + @Bean + @ConditionalOnMissingBean(WxPayService.class) + public WxPayService wxPayTwoService() { + final WxPayServiceImpl wxPayService = new WxPayServiceImpl(); + WxPayConfig payConfig = new WxPayConfig(); + payConfig.setAppId(StringUtils.trimToNull(this.wxPayTwoProperties.getAppId())); + payConfig.setMchId(StringUtils.trimToNull(this.wxPayTwoProperties.getMchId())); + payConfig.setMchKey(StringUtils.trimToNull(this.wxPayTwoProperties.getMchKey())); + payConfig.setSubAppId(StringUtils.trimToNull(this.wxPayTwoProperties.getSubAppId())); + payConfig.setSubMchId(StringUtils.trimToNull(this.wxPayTwoProperties.getSubMchId())); + payConfig.setKeyPath(StringUtils.trimToNull(this.wxPayTwoProperties.getKeyPath())); + payConfig.setNotifyUrl(StringUtils.trimToNull(this.wxPayTwoProperties.getNotifyUrl())); + //以下是apiv3以及支付分相关 + payConfig.setServiceId(StringUtils.trimToNull(this.wxPayTwoProperties.getServiceId())); + payConfig.setPayScoreNotifyUrl(StringUtils.trimToNull(this.wxPayTwoProperties.getPayScoreNotifyUrl())); + payConfig.setPrivateKeyPath(StringUtils.trimToNull(this.wxPayTwoProperties.getPrivateKeyPath())); + payConfig.setPrivateCertPath(StringUtils.trimToNull(this.wxPayTwoProperties.getPrivateCertPath())); + payConfig.setCertSerialNo(StringUtils.trimToNull(this.wxPayTwoProperties.getCertSerialNo())); + payConfig.setApiV3Key(StringUtils.trimToNull(this.wxPayTwoProperties.getApiv3Key())); + wxPayService.setConfig(payConfig); + return wxPayService; + } + +} diff --git a/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/properties/WxPayProperties.java b/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/properties/WxPayProperties.java new file mode 100644 index 000000000..6559665fe --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/properties/WxPayProperties.java @@ -0,0 +1,86 @@ +package cn.iocoder.yudao.framework.pay.properties; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + *
+ * 微信支付属性配置类 + * Created by Binary Wang on 2019/4/17. + *+ * + * @author Binary Wang + */ +@Data +@ConfigurationProperties(prefix = "wx.pay.one") +public class WxPayProperties { + /** + * 设置微信公众号或者小程序等的appid. + */ + private String appId; + + /** + * 微信支付商户号. + */ + private String mchId; + + /** + * 微信支付商户密钥. + */ + private String mchKey; + + /** + * 服务商模式下的子商户公众账号ID,普通模式请不要配置,请在配置文件中将对应项删除. + */ + private String subAppId; + + /** + * 服务商模式下的子商户号,普通模式请不要配置,最好是请在配置文件中将对应项删除. + */ + private String subMchId; + + /** + * apiclient_cert.p12文件的绝对路径,或者如果放在项目中,请以classpath:开头指定. + */ + private String keyPath; + + /** + * 微信支付分serviceId + */ + private String serviceId; + /** + * 微信支付异步回掉地址,通知url必须为直接可访问的url,不能携带参数. + */ + private String notifyUrl; + + /** + * 微信退款异步回掉地址,通知url必须为直接可访问的url,不能携带参数. + */ + private String refundNotifyUrl; + + /** + * 证书序列号 + */ + private String certSerialNo; + + /** + * apiV3秘钥 + */ + private String apiv3Key; + + /** + * 微信支付分回调地址 + */ + private String payScoreNotifyUrl; + + /** + * apiv3 商户apiclient_key.pem + */ + private String privateKeyPath; + + /** + * apiv3 商户apiclient_cert.pem + */ + private String privateCertPath; + +} diff --git a/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/properties/WxPayTwoProperties.java b/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/properties/WxPayTwoProperties.java new file mode 100644 index 000000000..f8c198c7c --- /dev/null +++ b/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/java/cn/iocoder/yudao/framework/pay/properties/WxPayTwoProperties.java @@ -0,0 +1,86 @@ +package cn.iocoder.yudao.framework.pay.properties; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + *
+ * 微信支付属性配置类 + * Created by Binary Wang on 2019/4/17. + *+ * + * @author Binary Wang + */ +@Data +@ConfigurationProperties(prefix = "wx.pay.two") +public class WxPayTwoProperties { + /** + * 设置微信公众号或者小程序等的appid. + */ + private String appId; + + /** + * 微信支付商户号. + */ + private String mchId; + + /** + * 微信支付商户密钥. + */ + private String mchKey; + + /** + * 服务商模式下的子商户公众账号ID,普通模式请不要配置,请在配置文件中将对应项删除. + */ + private String subAppId; + + /** + * 服务商模式下的子商户号,普通模式请不要配置,最好是请在配置文件中将对应项删除. + */ + private String subMchId; + + /** + * apiclient_cert.p12文件的绝对路径,或者如果放在项目中,请以classpath:开头指定. + */ + private String keyPath; + + /** + * 微信支付分serviceId + */ + private String serviceId; + /** + * 微信支付异步回掉地址,通知url必须为直接可访问的url,不能携带参数. + */ + private String notifyUrl; + + /** + * 微信退款异步回掉地址,通知url必须为直接可访问的url,不能携带参数. + */ + private String refundNotifyUrl; + + /** + * 证书序列号 + */ + private String certSerialNo; + + /** + * apiV3秘钥 + */ + private String apiv3Key; + + /** + * 微信支付分回调地址 + */ + private String payScoreNotifyUrl; + + /** + * apiv3 商户apiclient_key.pem + */ + private String privateKeyPath; + + /** + * apiv3 商户apiclient_cert.pem + */ + private String privateCertPath; + +} diff --git a/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index f2a8bf146..3a42b1c47 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/yudao-framework/yudao-spring-boot-starter-biz-pay/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1,3 @@ -cn.iocoder.yudao.framework.pay.config.YudaoPayAutoConfiguration \ No newline at end of file +cn.iocoder.yudao.framework.pay.config.YudaoPayAutoConfiguration +cn.iocoder.yudao.framework.pay.config.WxPayOneAutoConfiguration +cn.iocoder.yudao.framework.pay.config.WxPayTwoAutoConfiguration \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-shop-biz/pom.xml b/yudao-module-mall/yudao-module-shop-biz/pom.xml index 932b69f99..f96408a10 100644 --- a/yudao-module-mall/yudao-module-shop-biz/pom.xml +++ b/yudao-module-mall/yudao-module-shop-biz/pom.xml @@ -79,5 +79,13 @@
8ctTwM1reoAJ^%m!
literal 0
HcmV?d00001
diff --git a/yudao-server/src/main/resources/2/apiclient_cert.pem b/yudao-server/src/main/resources/2/apiclient_cert.pem
new file mode 100644
index 000000000..d6da31a37
--- /dev/null
+++ b/yudao-server/src/main/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DRCMDZBRDM5NzU0OTg0NkMwMUMzRThFQkQy
+JnNnPUhBQ0M0NzFCNjU0MjJFMTJCMjdBOUQzM0E4N0FEMUNERjU5MjZFMTQwMzcx
+MA0GCSqGSIb3DQEBCwUAA4IBAQB2ClqsShiW9SeWqJA4UGrc9quQUXfldQ827F7G
+v64L9umRWSkttCFHxYaN8zfyGnxs3NgpKFKma1zyo3NIhrqMlOtiaYkeLihS3xl6
+wGOgOYs6TO/YkWqoO+6jszhAo+jZLRyMwm8GYP4wILGgBXKAyai9gkWbSq36kIHK
+xRcGodCsWZzF7jR30Hry3knRuHkSFGEY5sTlAWrh/CoVuQTEuE5PUiu0flsoJUvy
+A3bq6jkzpq+Pwcg2WOQMNNa2rJP0ABcfluUZn+WqvgMc771qVNSk0eQTeU4jWmrW
+v5GGs8kv/SS50CBQ0RXZvyG9tM1fLiR1wLMTBuGWpeIjsL6S
+-----END CERTIFICATE-----
diff --git a/yudao-server/src/main/resources/2/apiclient_key.pem b/yudao-server/src/main/resources/2/apiclient_key.pem
new file mode 100644
index 000000000..c39e40921
--- /dev/null
+++ b/yudao-server/src/main/resources/2/apiclient_key.pem
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDTNpRUdPVQe0W6
+KWubkVHCx2LoAUUwboeUfnLX97ltH2TdojGXWqo/MHic4PCDgvqw5J67iqt8uqHy
+1gy/6rSbUZvLx2MeS9LUktSvDg1lTWeQOmDpCNGXm58Or1r2toFZck4u3CpP1CFh
+JJV5EjRXPRaKLWl3UCusbatLdXPgrquCyg5awjE10XoOGP3LlgOf+UbmyF3vulFJ
+WOCJdXvyzRldM3k7ZE/7MNPaXfv31jqA1w6m1F98jVVK39K1wJdkmZQrkX6Mc4eN
+i18hHS5W7M9AimSK57UPOc5qdD9gBaJUfXAZrXIbACFbY2FxWyrQSuqJVvScSjan
+VssoYgB1AgMBAAECggEBAL9TQ4413D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SvzCeRzWe27pVAv
+iqQrCfDTVQHpleCeHOUUQ9oD4H5+ez+ucFHtrf4Ed3PA48v8iQgEf67jdGFsl1F7
+W+o3fXruRlSjyUdoMDt3GiDxRhloxMs+1cS7seKV13HS5GJZ301vCgX7XuSLEjNu
+mwEvp8boEFCZZphDYoaE2kG8
+-----END PRIVATE KEY-----
diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml
index 0b65e44d7..5e2e4f573 100644
--- a/yudao-server/src/main/resources/application-local.yaml
+++ b/yudao-server/src/main/resources/application-local.yaml
@@ -162,8 +162,8 @@ debug: false
--- #################### 微信公众号、小程序相关配置 ####################
wx:
mp: # 公众号配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档
- app-id: wx041349c6f39b268b
- secret: 5abee519483bc9f8cb37ce280e814bd0
+ app-id: wxb1826c88da21d81e
+ secret: 1960c9cc785b094040a4fd4b2955c0cb
# 存储配置,解决 AccessToken 的跨节点的共享
config-storage:
type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
@@ -176,7 +176,31 @@ wx:
type: RedisTemplate # 采用 RedisTemplate 操作 Redis,会自动从 Spring 中获取
key-prefix: wa # Redis Key 的前缀 TODO 芋艿:解决下 Redis key 管理的配置
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
-
+ pay:
+ one:
+ enabled: true
+ app-id: wxb1826c88da21d81e
+ mch-id: 1641993417
+ mch-key: qdn2I7Cmx4JeiKOt2CDjiu6UHgLTsOsM
+ apiv3-key: cyywl666666cyywl888888cyywl66666
+ private-cert-path: classpath:/1/apiclient_cert.pem
+ private-key-path: classpath:/1/apiclient_key.pem
+ key-path: classpath:/1/apiclient_cert.p12
+ cert-serial-no: 58FDB503F92B6C0E258C9940BB726C2BF6022E56
+ notify-url: http://yuxy.perrymake.com/app-api/pay/wxpay/pay_notify
+ refund-notify-url: http://yuxy.perrymake.com/app-api/pay/wxpay/refund_notify
+ two:
+ enabled: true
+ app-id: wxb1826c88da21d81e
+ mch-id: 1642042589
+ mch-key: qdn2I7Cmx4JeiKOt2CDjiu6UHgLTsOsM
+ apiv3-key: cyywl666666cyywl888888cyywl66666
+ private-cert-path: classpath:/2/apiclient_cert.pem
+ private-key-path: classpath:/2/apiclient_key.pem
+ key-path: classpath:/2/apiclient_cert.p12
+ cert-serial-no: 47F04D51F958FFEF56A6DFC25BDE83CF89353E19
+ notify-url: http://yuxy.perrymake.com/app-api/pay/wxpay/pay_notify
+ refund-notify-url: http://yuxy.perrymake.com/app-api/pay/wxpay/refund_notify
--- #################### 芋道相关配置 ####################
# 芋道配置项,设置当前项目所有自定义的配置
diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml
index 5567d8ce1..de757f06e 100644
--- a/yudao-server/src/main/resources/application.yaml
+++ b/yudao-server/src/main/resources/application.yaml
@@ -107,6 +107,7 @@ yudao:
security:
permit-all_urls:
- /admin-api/mp/open/** # 微信公众号开放平台,微信回调接口,不需要登录
+ - /admin-api/notice/wxpay/**
websocket:
enable: true # websocket的开关
path: /websocket/message # 路径
@@ -145,6 +146,7 @@ yudao:
- /admin-api/pay/notify/callback/* # 支付回调通知,不携带租户编号
- /jmreport/* # 积木报表,无法携带租户编号
- /admin-api/mp/open/** # 微信公众号开放平台,微信回调接口,无法携带租户编号
+ - /admin-api/notify/wxpay/**
ignore-tables:
- system_tenant
- system_tenant_package
diff --git a/yudao-ui-admin/.env.dev b/yudao-ui-admin/.env.dev
index c8620abb5..26b38c703 100644
--- a/yudao-ui-admin/.env.dev
+++ b/yudao-ui-admin/.env.dev
@@ -20,4 +20,4 @@ VUE_APP_CAPTCHA_ENABLE = true
VUE_APP_DOC_ENABLE = true
# 百度统计
-VUE_APP_BAIDU_CODE = fadc1bd5db1a1d6f581df60a1807f8ab
+VUE_APP_BAIDU_CODE =
diff --git a/yudao-ui-admin/src/api/shop/phoneRecord.js b/yudao-ui-admin/src/api/shop/phoneRecord.js
new file mode 100644
index 000000000..028958b07
--- /dev/null
+++ b/yudao-ui-admin/src/api/shop/phoneRecord.js
@@ -0,0 +1,54 @@
+import request from '@/utils/request'
+
+// 创建充值档位记录
+export function createPhoneRecord(data) {
+ return request({
+ url: '/shop/phone-record/create',
+ method: 'post',
+ data: data
+ })
+}
+
+// 更新充值档位记录
+export function updatePhoneRecord(data) {
+ return request({
+ url: '/shop/phone-record/update',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除充值档位记录
+export function deletePhoneRecord(id) {
+ return request({
+ url: '/shop/phone-record/delete?id=' + id,
+ method: 'delete'
+ })
+}
+
+// 获得充值档位记录
+export function getPhoneRecord(id) {
+ return request({
+ url: '/shop/phone-record/get?id=' + id,
+ method: 'get'
+ })
+}
+
+// 获得充值档位记录分页
+export function getPhoneRecordPage(query) {
+ return request({
+ url: '/shop/phone-record/page',
+ method: 'get',
+ params: query
+ })
+}
+
+// 导出充值档位记录 Excel
+export function exportPhoneRecordExcel(query) {
+ return request({
+ url: '/shop/phone-record/export-excel',
+ method: 'get',
+ params: query,
+ responseType: 'blob'
+ })
+}
diff --git a/yudao-ui-admin/src/api/shop/rechargeOrder.js b/yudao-ui-admin/src/api/shop/rechargeOrder.js
new file mode 100644
index 000000000..6f9dbf5a1
--- /dev/null
+++ b/yudao-ui-admin/src/api/shop/rechargeOrder.js
@@ -0,0 +1,54 @@
+import request from '@/utils/request'
+
+// 创建订单
+export function createRechargeOrder(data) {
+ return request({
+ url: '/shop/recharge-order/create',
+ method: 'post',
+ data: data
+ })
+}
+
+// 更新订单
+export function updateRechargeOrder(data) {
+ return request({
+ url: '/shop/recharge-order/update',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除订单
+export function deleteRechargeOrder(id) {
+ return request({
+ url: '/shop/recharge-order/delete?id=' + id,
+ method: 'delete'
+ })
+}
+
+// 获得订单
+export function getRechargeOrder(id) {
+ return request({
+ url: '/shop/recharge-order/get?id=' + id,
+ method: 'get'
+ })
+}
+
+// 获得订单分页
+export function getRechargeOrderPage(query) {
+ return request({
+ url: '/shop/recharge-order/page',
+ method: 'get',
+ params: query
+ })
+}
+
+// 导出订单 Excel
+export function exportRechargeOrderExcel(query) {
+ return request({
+ url: '/shop/recharge-order/export-excel',
+ method: 'get',
+ params: query,
+ responseType: 'blob'
+ })
+}
diff --git a/yudao-ui-admin/src/views/shop/phoneRecord/index.vue b/yudao-ui-admin/src/views/shop/phoneRecord/index.vue
new file mode 100644
index 000000000..37d5d04d2
--- /dev/null
+++ b/yudao-ui-admin/src/views/shop/phoneRecord/index.vue
@@ -0,0 +1,272 @@
+
+