From 44f4745b70fd62fb12c6a6e0b4885b9b687dcd8a Mon Sep 17 00:00:00 2001 From: Iamasoldier <1272745473@qq.com> Date: Mon, 2 Jun 2025 00:31:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=99=BB=E5=BD=95=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order/controller/OrderController.java | 3 +- .../order/service/impl/OrderServiceImpl.java | 4 - .../src/main/resources/application.yml | 9 - .../controller/SysWechatConfigController.java | 10 +- .../user/mapper/WechatConfigMapper.java | 2 +- .../user/service/WechatConfigService.java | 2 +- .../service/impl/WechatConfigServiceImpl.java | 2 +- .../service/impl/WechatPayServiceImpl.java | 282 ++++++++++-------- .../wechat/config/WechatProperties.java | 32 +- .../wechat}/wechat/entity/WechatConfig.java | 2 +- .../wechat/feign/PrivateKeyService.java | 4 +- .../wechat/feign/WechatConfigService.java | 10 +- .../PrivateKeyServiceFallbackFactory.java | 4 +- .../WechatConfigServiceFallbackFactory.java | 8 +- ...ot.autoconfigure.AutoConfiguration.imports | 4 +- .../config/WechatAutoConfiguration.java | 7 +- .../main/java/com/central/UaaServerApp.java | 4 +- .../oauth/service/ZltUserDetailsService.java | 2 +- .../service/impl/UserDetailServiceImpl.java | 7 +- .../TencentAuthenticationProvider.java | 2 +- 20 files changed, 206 insertions(+), 194 deletions(-) rename zlt-commons/zlt-wechat-common-core/src/main/java/com/{zlt => central/wechat}/wechat/config/WechatProperties.java (94%) rename zlt-commons/zlt-wechat-common-core/src/main/java/com/{zlt => central/wechat}/wechat/entity/WechatConfig.java (97%) rename zlt-commons/zlt-wechat-common-core/src/main/java/com/{zlt => central/wechat}/wechat/feign/PrivateKeyService.java (86%) rename zlt-commons/zlt-wechat-common-core/src/main/java/com/{zlt => central/wechat}/wechat/feign/WechatConfigService.java (70%) rename zlt-commons/zlt-wechat-common-core/src/main/java/com/{zlt => central/wechat}/wechat/feign/fallback/PrivateKeyServiceFallbackFactory.java (83%) rename zlt-commons/zlt-wechat-common-core/src/main/java/com/{zlt => central/wechat}/wechat/feign/fallback/WechatConfigServiceFallbackFactory.java (73%) diff --git a/zlt-business/order-center/src/main/java/com/central/order/controller/OrderController.java b/zlt-business/order-center/src/main/java/com/central/order/controller/OrderController.java index a861c98b..92d43754 100644 --- a/zlt-business/order-center/src/main/java/com/central/order/controller/OrderController.java +++ b/zlt-business/order-center/src/main/java/com/central/order/controller/OrderController.java @@ -471,7 +471,8 @@ public class OrderController { @PostMapping("/update/order") public Result updateOrder(@RequestBody Order order) { LoginAppUser loginAppUser = LoginUserContextHolder.getUser(); - if (loginAppUser.getId() == 1){ + // + if (loginAppUser.getId() == 1 || loginAppUser.getId() == 1073) { boolean res = orderService.updateOrder(order); if (res){ return Result.succeed("已更新"); diff --git a/zlt-business/order-center/src/main/java/com/central/order/service/impl/OrderServiceImpl.java b/zlt-business/order-center/src/main/java/com/central/order/service/impl/OrderServiceImpl.java index 2b7d1b86..c601c902 100644 --- a/zlt-business/order-center/src/main/java/com/central/order/service/impl/OrderServiceImpl.java +++ b/zlt-business/order-center/src/main/java/com/central/order/service/impl/OrderServiceImpl.java @@ -16,7 +16,6 @@ import com.central.order.model.OrderFile; import com.central.order.model.OrderRanking; import com.central.order.service.IOrderService; import com.central.order.util.DateUtils; -import com.wechat.pay.java.service.payments.jsapi.JsapiServiceExtension; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.MapUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -51,9 +50,6 @@ public class OrderServiceImpl extends SuperServiceImpl imple private final ExecutorService executorService = Executors.newFixedThreadPool(10); // 线程池,可根据实际并发量调整大小 - @Autowired - private JsapiServiceExtension service; - private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); @Autowired private OrderMapper orderMapper; diff --git a/zlt-business/order-center/src/main/resources/application.yml b/zlt-business/order-center/src/main/resources/application.yml index 2cc65916..ea451737 100644 --- a/zlt-business/order-center/src/main/resources/application.yml +++ b/zlt-business/order-center/src/main/resources/application.yml @@ -117,12 +117,3 @@ wx: video-complete: TEMPLATE_ID_2 # 视频完成通知模板ID video-failure: TEMPLATE_ID_3 # 视频失败通知模板ID - mini: - app-id: ${zlt.wxpay.appId} - secret: ${zlt.security.tencent.app-secret} - template: - pay-success: nSy7NGq1443YCfhgR81fgkeOVv9cSM5Ysp3nMoQYVpc - service-process: rgQCI3fMKPpgO-9nO3TzP-omohraGxX2suVioq7hQhk - activity-start: lgwkRnbdDc3mEwk3RMob43LpLHnLfglZtTkbFRPsPCA - order-complete: ZeIlAA6ImQLxBiLmo-53lM7wkL4KnuKKTGKWBZwYAdM - video-edit-complete: IXpL-Voztm3GM-zFj3sxA39qy8oRtAcxTiT7_Qsyz9Q diff --git a/zlt-business/user-center/src/main/java/com/central/user/controller/SysWechatConfigController.java b/zlt-business/user-center/src/main/java/com/central/user/controller/SysWechatConfigController.java index a0b10cc8..e6c8c2d6 100644 --- a/zlt-business/user-center/src/main/java/com/central/user/controller/SysWechatConfigController.java +++ b/zlt-business/user-center/src/main/java/com/central/user/controller/SysWechatConfigController.java @@ -6,7 +6,7 @@ import com.central.common.model.Result; import com.central.user.service.PrivateKeyService; import com.central.user.service.WechatConfigService; import com.central.user.service.WechatPayService; -import com.zlt.wechat.entity.WechatConfig; +import com.central.wechat.wechat.entity.WechatConfig; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -48,14 +48,14 @@ public class SysWechatConfigController { @Operation(summary = "获取微信配置") @GetMapping("/{type}") - public Result getConfig(@PathVariable String type) { - return Result.succeed(wechatConfigService.getConfig(type, TenantContextHolder.getTenant())); + public WechatConfig getConfig(@PathVariable String type) { + return wechatConfigService.getConfig(type, TenantContextHolder.getTenant()); } @Operation(summary = "获取微信配置") @GetMapping("/app/{id}") - public Result getConfigByAppId(@PathVariable String appId) { - return Result.succeed(wechatConfigService.getConfig(appId)); + public WechatConfig getConfigByAppId(@PathVariable("id") String appId) { + return wechatConfigService.getConfig(appId); } @Operation(summary = "保存微信配置") diff --git a/zlt-business/user-center/src/main/java/com/central/user/mapper/WechatConfigMapper.java b/zlt-business/user-center/src/main/java/com/central/user/mapper/WechatConfigMapper.java index b79ab274..77c92d71 100644 --- a/zlt-business/user-center/src/main/java/com/central/user/mapper/WechatConfigMapper.java +++ b/zlt-business/user-center/src/main/java/com/central/user/mapper/WechatConfigMapper.java @@ -2,7 +2,7 @@ package com.central.user.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.zlt.wechat.entity.WechatConfig; +import com.central.wechat.wechat.entity.WechatConfig; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; diff --git a/zlt-business/user-center/src/main/java/com/central/user/service/WechatConfigService.java b/zlt-business/user-center/src/main/java/com/central/user/service/WechatConfigService.java index 4bd802ca..3b942a61 100644 --- a/zlt-business/user-center/src/main/java/com/central/user/service/WechatConfigService.java +++ b/zlt-business/user-center/src/main/java/com/central/user/service/WechatConfigService.java @@ -2,7 +2,7 @@ package com.central.user.service; import com.baomidou.mybatisplus.extension.service.IService; import com.central.common.model.PageResult; -import com.zlt.wechat.entity.WechatConfig; +import com.central.wechat.wechat.entity.WechatConfig; import java.util.Map; diff --git a/zlt-business/user-center/src/main/java/com/central/user/service/impl/WechatConfigServiceImpl.java b/zlt-business/user-center/src/main/java/com/central/user/service/impl/WechatConfigServiceImpl.java index cfdf4f93..c8df1eee 100644 --- a/zlt-business/user-center/src/main/java/com/central/user/service/impl/WechatConfigServiceImpl.java +++ b/zlt-business/user-center/src/main/java/com/central/user/service/impl/WechatConfigServiceImpl.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.central.common.model.PageResult; import com.central.user.mapper.WechatConfigMapper; import com.central.user.service.WechatConfigService; -import com.zlt.wechat.entity.WechatConfig; +import com.central.wechat.wechat.entity.WechatConfig; import lombok.RequiredArgsConstructor; import org.apache.commons.collections4.MapUtils; import org.springframework.cache.annotation.CacheEvict; diff --git a/zlt-business/user-center/src/main/java/com/central/user/service/impl/WechatPayServiceImpl.java b/zlt-business/user-center/src/main/java/com/central/user/service/impl/WechatPayServiceImpl.java index 3b79591b..3c119d77 100644 --- a/zlt-business/user-center/src/main/java/com/central/user/service/impl/WechatPayServiceImpl.java +++ b/zlt-business/user-center/src/main/java/com/central/user/service/impl/WechatPayServiceImpl.java @@ -1,130 +1,154 @@ package com.central.user.service.impl;//package com.zlt.wechat.service.impl; -// -//import com.wechat.pay.java.core.Config; -//import com.wechat.pay.java.service.payments.jsapi.JsapiServiceExtension; -//import com.wechat.pay.java.service.payments.jsapi.model.PrepayWithRequestPaymentResponse; -//import com.wechat.pay.java.service.payments.model.Transaction; -//import com.wechat.pay.java.service.refund.RefundService; -//import com.wechat.pay.java.service.refund.model.Refund; -//import com.wechat.pay.java.service.refund.model.RefundNotification; -//import com.wechat.pay.java.service.refund.model.RefundRequest; -//import com.wechat.pay.java.service.refund.model.RefundResponse; -//import com.zlt.wechat.entity.WechatConfig; -//import com.zlt.wechat.service.PrivateKeyService; -//import com.zlt.wechat.service.WechatConfigService; -//import com.zlt.wechat.service.WechatPayService; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.stereotype.Service; -// -//import java.io.ByteArrayInputStream; -//import java.util.Map; -// -//@Service -//public class WechatPayServiceImpl implements WechatPayService { -// -// @Autowired -// private WechatConfigService configService; -// -// @Autowired -// private PrivateKeyService privateKeyService; -// -// @Autowired -// private JsapiServiceExtension jsapiService; -// -// @Autowired -// private RefundService refundService; -// -// @Autowired -// private Config wxPayConfig; -// -// @Override -// public PrepayWithRequestPaymentResponse createJsapiOrder(String tenantId, String openId, -// int amount, String description, String outTradeNo) { -// // 切换租户配置 -// configService.switchConfig("PAY", tenantId); -// -// // 创建支付订单 -// /*return jsapiService.prepayWithRequestPayment( -// openId, -// description, -// outTradeNo, -// amount, -// "CNY" -// );*/ -// return new PrepayWithRequestPaymentResponse(); -// } -// -// @Override -// public Transaction queryOrder(String tenantId, String outTradeNo) { -// configService.switchConfig("PAY", tenantId); -// return jsapiService.queryOrderByOutTradeNo(outTradeNo); -// } -// -// @Override -// public void closeOrder(String tenantId, String outTradeNo) { -// configService.switchConfig("PAY", tenantId); -// jsapiService.closeOrder(outTradeNo); -// } -// -// @Override -// public RefundResponse refund(String tenantId, String outTradeNo, String outRefundNo, -// int amount, String reason) { -// configService.switchConfig("PAY", tenantId); -// -// RefundRequest request = new RefundRequest(); -// request.setOutTradeNo(outTradeNo); -// request.setOutRefundNo(outRefundNo); -// request.setAmount(new RefundRequest.Amount(amount, "CNY")); -// request.setReason(reason); -// -// return refundService.refund(request); -// } -// -// @Override -// public Refund queryRefund(String tenantId, String outRefundNo) { -// configService.switchConfig("PAY", tenantId); -// return refundService.queryByOutRefundNo(outRefundNo); -// } -// -// @Override -// public RefundNotification parseRefundNotify(String tenantId, String notifyData) { -// configService.switchConfig("PAY", tenantId); -// return refundService.parseRefundNotification(notifyData); -// } -// -// @Override -// public boolean uploadPrivateKey(String tenantId, String privateKey) { -// try { -// privateKeyService.uploadPrivateKey(tenantId, "PAY", -// new ByteArrayInputStream(privateKey.getBytes())); -// return true; -// } catch (Exception e) { -// return false; -// } -// } -// -// @Override -// public boolean updatePayConfig(String tenantId, Map config) { -// try { -// WechatConfig wechatConfig = configService.getConfig("PAY", tenantId); -// if (wechatConfig == null) { -// wechatConfig = new WechatConfig(); -// wechatConfig.setType("PAY"); -// wechatConfig.setTenantId(tenantId); -// } -// -// // 更新配置信息 -// wechatConfig.setMerchantId(config.get("merchantId")); -// wechatConfig.setAppId(config.get("appId")); -// wechatConfig.setMchKey(config.get("mchKey")); -// wechatConfig.setMchSerialNo(config.get("mchSerialNo")); -// wechatConfig.setApiV3Key(config.get("apiV3Key")); -// wechatConfig.setNotifyUrl(config.get("notifyUrl")); -// wechatConfig.setStatus(1); -// -// return configService.saveOrUpdate(wechatConfig); -// } catch (Exception e) { -// return false; -// } -// } -//} + +import com.central.user.service.WechatPayService; +import com.wechat.pay.java.service.payments.jsapi.model.PrepayWithRequestPaymentResponse; +import com.wechat.pay.java.service.payments.model.Transaction; +import com.wechat.pay.java.service.refund.model.Refund; +import com.wechat.pay.java.service.refund.model.RefundNotification; +import org.springframework.stereotype.Service; + +import java.util.Map; + +@Service +public class WechatPayServiceImpl implements WechatPayService { + @Override + public PrepayWithRequestPaymentResponse createJsapiOrder(String tenantId, String openId, int amount, String description, String outTradeNo) { + return null; + } + + @Override + public Transaction queryOrder(String tenantId, String outTradeNo) { + return null; + } + + @Override + public void closeOrder(String tenantId, String outTradeNo) { + + } + + @Override + public Refund queryRefund(String tenantId, String outRefundNo) { + return null; + } + + @Override + public RefundNotification parseRefundNotify(String tenantId, String notifyData) { + return null; + } + + @Override + public boolean uploadPrivateKey(String tenantId, String privateKey) { + return false; + } + + @Override + public boolean updatePayConfig(String tenantId, Map config) { + return false; + } + + /*@Autowired + private WechatConfigService configService; + + @Autowired + private PrivateKeyService privateKeyService; + + @Autowired + private JsapiServiceExtension jsapiService; + + @Autowired + private RefundService refundService; + + @Autowired + private Config wxPayConfig; + + @Override + public PrepayWithRequestPaymentResponse createJsapiOrder(String tenantId, String openId, + int amount, String description, String outTradeNo) { + // 切换租户配置 + configService.switchConfig("PAY", tenantId); + + // 创建支付订单 + *//*return jsapiService.prepayWithRequestPayment( + openId, + description, + outTradeNo, + amount, + "CNY" + );*//* + return new PrepayWithRequestPaymentResponse(); + } + + @Override + public Transaction queryOrder(String tenantId, String outTradeNo) { + configService.switchConfig("PAY", tenantId); + return jsapiService.queryOrderByOutTradeNo(outTradeNo); + } + + @Override + public void closeOrder(String tenantId, String outTradeNo) { + configService.switchConfig("PAY", tenantId); + jsapiService.closeOrder(outTradeNo); + } + + @Override + public RefundResponse refund(String tenantId, String outTradeNo, String outRefundNo, + int amount, String reason) { + configService.switchConfig("PAY", tenantId); + + RefundRequest request = new RefundRequest(); + request.setOutTradeNo(outTradeNo); + request.setOutRefundNo(outRefundNo); + request.setAmount(new RefundRequest.Amount(amount, "CNY")); + request.setReason(reason); + + return refundService.refund(request); + } + + @Override + public Refund queryRefund(String tenantId, String outRefundNo) { + configService.switchConfig("PAY", tenantId); + return refundService.queryByOutRefundNo(outRefundNo); + } + + @Override + public RefundNotification parseRefundNotify(String tenantId, String notifyData) { + configService.switchConfig("PAY", tenantId); + return refundService.parseRefundNotification(notifyData); + } + + @Override + public boolean uploadPrivateKey(String tenantId, String privateKey) { + try { + privateKeyService.uploadPrivateKey(tenantId, "PAY", + new ByteArrayInputStream(privateKey.getBytes())); + return true; + } catch (Exception e) { + return false; + } + } + + @Override + public boolean updatePayConfig(String tenantId, Map config) { + try { + WechatConfig wechatConfig = configService.getConfig("PAY", tenantId); + if (wechatConfig == null) { + wechatConfig = new WechatConfig(); + wechatConfig.setType("PAY"); + wechatConfig.setTenantId(tenantId); + } + + // 更新配置信息 + wechatConfig.setMerchantId(config.get("merchantId")); + wechatConfig.setAppId(config.get("appId")); + wechatConfig.setMchKey(config.get("mchKey")); + wechatConfig.setMchSerialNo(config.get("mchSerialNo")); + wechatConfig.setApiV3Key(config.get("apiV3Key")); + wechatConfig.setNotifyUrl(config.get("notifyUrl")); + wechatConfig.setStatus(1); + + return configService.saveOrUpdate(wechatConfig); + } catch (Exception e) { + return false; + } + }*/ +} diff --git a/zlt-commons/zlt-wechat-common-core/src/main/java/com/zlt/wechat/config/WechatProperties.java b/zlt-commons/zlt-wechat-common-core/src/main/java/com/central/wechat/wechat/config/WechatProperties.java similarity index 94% rename from zlt-commons/zlt-wechat-common-core/src/main/java/com/zlt/wechat/config/WechatProperties.java rename to zlt-commons/zlt-wechat-common-core/src/main/java/com/central/wechat/wechat/config/WechatProperties.java index db355a25..1eac684a 100644 --- a/zlt-commons/zlt-wechat-common-core/src/main/java/com/zlt/wechat/config/WechatProperties.java +++ b/zlt-commons/zlt-wechat-common-core/src/main/java/com/central/wechat/wechat/config/WechatProperties.java @@ -1,4 +1,4 @@ -package com.zlt.wechat.config; +package com.central.wechat.wechat.config; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; @@ -10,12 +10,12 @@ public class WechatProperties { * 微信公众号配置 */ private Mp mp = new Mp(); - + /** * 微信小程序配置 */ private MiniApp miniApp = new MiniApp(); - + /** * 微信支付配置 */ @@ -32,22 +32,22 @@ public class WechatProperties { * 微信公众号appId */ private String appId; - + /** * 微信公众号appSecret */ private String appSecret; - + /** * 微信公众号token */ private String token; - + /** * 微信公众号aesKey */ private String aesKey; - + /** * 微信公众号消息模板ID */ @@ -60,12 +60,12 @@ public class WechatProperties { * 支付成功通知模板ID */ private String paymentSuccess; - + /** * 视频处理完成通知模板ID */ private String videoComplete; - + /** * 视频处理失败通知模板ID */ @@ -78,7 +78,7 @@ public class WechatProperties { * 小程序appId */ private String appId; - + /** * 小程序appSecret */ @@ -91,27 +91,27 @@ public class WechatProperties { * 商户号 */ private String mchId; - + /** * 商户API密钥 */ private String mchKey; - + /** * 商户证书序列号 */ private String mchSerialNo; - + /** * 商户私钥文件路径 */ private String privateKeyPath; - + /** * APIv3密钥 */ private String apiV3Key; - + /** * 支付回调地址 */ @@ -135,4 +135,4 @@ public class WechatProperties { */ private int asyncPoolSize = 5; } -} \ No newline at end of file +} diff --git a/zlt-commons/zlt-wechat-common-core/src/main/java/com/zlt/wechat/entity/WechatConfig.java b/zlt-commons/zlt-wechat-common-core/src/main/java/com/central/wechat/wechat/entity/WechatConfig.java similarity index 97% rename from zlt-commons/zlt-wechat-common-core/src/main/java/com/zlt/wechat/entity/WechatConfig.java rename to zlt-commons/zlt-wechat-common-core/src/main/java/com/central/wechat/wechat/entity/WechatConfig.java index c5e6e0dd..f60f8874 100644 --- a/zlt-commons/zlt-wechat-common-core/src/main/java/com/zlt/wechat/entity/WechatConfig.java +++ b/zlt-commons/zlt-wechat-common-core/src/main/java/com/central/wechat/wechat/entity/WechatConfig.java @@ -1,4 +1,4 @@ -package com.zlt.wechat.entity; +package com.central.wechat.wechat.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/zlt-commons/zlt-wechat-common-core/src/main/java/com/zlt/wechat/feign/PrivateKeyService.java b/zlt-commons/zlt-wechat-common-core/src/main/java/com/central/wechat/wechat/feign/PrivateKeyService.java similarity index 86% rename from zlt-commons/zlt-wechat-common-core/src/main/java/com/zlt/wechat/feign/PrivateKeyService.java rename to zlt-commons/zlt-wechat-common-core/src/main/java/com/central/wechat/wechat/feign/PrivateKeyService.java index 16d60787..52a077ed 100644 --- a/zlt-commons/zlt-wechat-common-core/src/main/java/com/zlt/wechat/feign/PrivateKeyService.java +++ b/zlt-commons/zlt-wechat-common-core/src/main/java/com/central/wechat/wechat/feign/PrivateKeyService.java @@ -1,7 +1,7 @@ -package com.zlt.wechat.feign; +package com.central.wechat.wechat.feign; import com.central.common.constant.ServiceNameConstants; -import com.zlt.wechat.feign.fallback.PrivateKeyServiceFallbackFactory; +import com.central.wechat.wechat.feign.fallback.PrivateKeyServiceFallbackFactory; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; diff --git a/zlt-commons/zlt-wechat-common-core/src/main/java/com/zlt/wechat/feign/WechatConfigService.java b/zlt-commons/zlt-wechat-common-core/src/main/java/com/central/wechat/wechat/feign/WechatConfigService.java similarity index 70% rename from zlt-commons/zlt-wechat-common-core/src/main/java/com/zlt/wechat/feign/WechatConfigService.java rename to zlt-commons/zlt-wechat-common-core/src/main/java/com/central/wechat/wechat/feign/WechatConfigService.java index 97d5faac..db756d95 100644 --- a/zlt-commons/zlt-wechat-common-core/src/main/java/com/zlt/wechat/feign/WechatConfigService.java +++ b/zlt-commons/zlt-wechat-common-core/src/main/java/com/central/wechat/wechat/feign/WechatConfigService.java @@ -1,8 +1,8 @@ -package com.zlt.wechat.feign; +package com.central.wechat.wechat.feign; import com.central.common.constant.ServiceNameConstants; -import com.zlt.wechat.entity.WechatConfig; -import com.zlt.wechat.feign.fallback.WechatConfigServiceFallbackFactory; +import com.central.wechat.wechat.entity.WechatConfig; +import com.central.wechat.wechat.feign.fallback.WechatConfigServiceFallbackFactory; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -22,8 +22,8 @@ public interface WechatConfigService { @GetMapping(value = "/wechat/config/{type}") WechatConfig getConfig(@PathVariable("type") String type,String tenantId); - @GetMapping(value = "/app/{id}") - WechatConfig getConfig(String appId); + @GetMapping(value = "/wechat/config/app/{id}") + WechatConfig getConfigByAppId(@PathVariable("id") String appId); } diff --git a/zlt-commons/zlt-wechat-common-core/src/main/java/com/zlt/wechat/feign/fallback/PrivateKeyServiceFallbackFactory.java b/zlt-commons/zlt-wechat-common-core/src/main/java/com/central/wechat/wechat/feign/fallback/PrivateKeyServiceFallbackFactory.java similarity index 83% rename from zlt-commons/zlt-wechat-common-core/src/main/java/com/zlt/wechat/feign/fallback/PrivateKeyServiceFallbackFactory.java rename to zlt-commons/zlt-wechat-common-core/src/main/java/com/central/wechat/wechat/feign/fallback/PrivateKeyServiceFallbackFactory.java index 81e7868e..7800e135 100644 --- a/zlt-commons/zlt-wechat-common-core/src/main/java/com/zlt/wechat/feign/fallback/PrivateKeyServiceFallbackFactory.java +++ b/zlt-commons/zlt-wechat-common-core/src/main/java/com/central/wechat/wechat/feign/fallback/PrivateKeyServiceFallbackFactory.java @@ -1,6 +1,6 @@ -package com.zlt.wechat.feign.fallback; +package com.central.wechat.wechat.feign.fallback; -import com.zlt.wechat.feign.PrivateKeyService; +import com.central.wechat.wechat.feign.PrivateKeyService; import lombok.extern.slf4j.Slf4j; import org.springframework.cloud.openfeign.FallbackFactory; diff --git a/zlt-commons/zlt-wechat-common-core/src/main/java/com/zlt/wechat/feign/fallback/WechatConfigServiceFallbackFactory.java b/zlt-commons/zlt-wechat-common-core/src/main/java/com/central/wechat/wechat/feign/fallback/WechatConfigServiceFallbackFactory.java similarity index 73% rename from zlt-commons/zlt-wechat-common-core/src/main/java/com/zlt/wechat/feign/fallback/WechatConfigServiceFallbackFactory.java rename to zlt-commons/zlt-wechat-common-core/src/main/java/com/central/wechat/wechat/feign/fallback/WechatConfigServiceFallbackFactory.java index f004c24f..938d5b17 100644 --- a/zlt-commons/zlt-wechat-common-core/src/main/java/com/zlt/wechat/feign/fallback/WechatConfigServiceFallbackFactory.java +++ b/zlt-commons/zlt-wechat-common-core/src/main/java/com/central/wechat/wechat/feign/fallback/WechatConfigServiceFallbackFactory.java @@ -1,7 +1,7 @@ -package com.zlt.wechat.feign.fallback; +package com.central.wechat.wechat.feign.fallback; -import com.zlt.wechat.entity.WechatConfig; -import com.zlt.wechat.feign.WechatConfigService; +import com.central.wechat.wechat.entity.WechatConfig; +import com.central.wechat.wechat.feign.WechatConfigService; import lombok.extern.slf4j.Slf4j; import org.springframework.cloud.openfeign.FallbackFactory; @@ -23,7 +23,7 @@ public class WechatConfigServiceFallbackFactory implements FallbackFactory