fix:登录相关逻辑修复

This commit is contained in:
2025-06-02 00:31:47 +08:00
parent 9b7fa58fcf
commit 44f4745b70
20 changed files with 206 additions and 194 deletions
@@ -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;
}
}
}
@@ -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;
@@ -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;
@@ -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);
}
@@ -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;
@@ -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<Wecha
}
@Override
public WechatConfig getConfig(String appId) {
public WechatConfig getConfigByAppId(String appId) {
return null;
}
@@ -1,4 +1,4 @@
com.zlt.wechat.feign.fallback.PrivateKeyServiceFallbackFactory
com.zlt.wechat.feign.fallback.WechatConfigServiceFallbackFactory
com.central.wechat.wechat.feign.fallback.PrivateKeyServiceFallbackFactory
com.central.wechat.wechat.feign.fallback.WechatConfigServiceFallbackFactory
@@ -4,6 +4,10 @@ import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl;
import com.central.common.context.TenantContextHolder;
import com.central.wechat.wechat.config.WechatProperties;
import com.central.wechat.wechat.entity.WechatConfig;
import com.central.wechat.wechat.feign.PrivateKeyService;
import com.central.wechat.wechat.feign.WechatConfigService;
import com.wechat.pay.java.core.Config;
import com.wechat.pay.java.core.RSAAutoCertificateConfig;
import com.wechat.pay.java.core.notification.NotificationConfig;
@@ -12,9 +16,6 @@ import com.wechat.pay.java.service.payments.jsapi.JsapiServiceExtension;
import com.wechat.pay.java.service.payments.jsapi.model.SettleInfo;
import com.wechat.pay.java.service.profitsharing.ProfitsharingService;
import com.wechat.pay.java.service.refund.RefundService;
import com.zlt.wechat.entity.WechatConfig;
import com.zlt.wechat.feign.PrivateKeyService;
import com.zlt.wechat.feign.WechatConfigService;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl;