fix:登录相关逻辑修复
This commit is contained in:
+2
-1
@@ -471,7 +471,8 @@ public class OrderController {
|
|||||||
@PostMapping("/update/order")
|
@PostMapping("/update/order")
|
||||||
public Result updateOrder(@RequestBody Order order) {
|
public Result updateOrder(@RequestBody Order order) {
|
||||||
LoginAppUser loginAppUser = LoginUserContextHolder.getUser();
|
LoginAppUser loginAppUser = LoginUserContextHolder.getUser();
|
||||||
if (loginAppUser.getId() == 1){
|
//
|
||||||
|
if (loginAppUser.getId() == 1 || loginAppUser.getId() == 1073) {
|
||||||
boolean res = orderService.updateOrder(order);
|
boolean res = orderService.updateOrder(order);
|
||||||
if (res){
|
if (res){
|
||||||
return Result.succeed("已更新");
|
return Result.succeed("已更新");
|
||||||
|
|||||||
-4
@@ -16,7 +16,6 @@ import com.central.order.model.OrderFile;
|
|||||||
import com.central.order.model.OrderRanking;
|
import com.central.order.model.OrderRanking;
|
||||||
import com.central.order.service.IOrderService;
|
import com.central.order.service.IOrderService;
|
||||||
import com.central.order.util.DateUtils;
|
import com.central.order.util.DateUtils;
|
||||||
import com.wechat.pay.java.service.payments.jsapi.JsapiServiceExtension;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.MapUtils;
|
import org.apache.commons.collections4.MapUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -51,9 +50,6 @@ public class OrderServiceImpl extends SuperServiceImpl<OrderMapper, Order> imple
|
|||||||
|
|
||||||
private final ExecutorService executorService = Executors.newFixedThreadPool(10); // 线程池,可根据实际并发量调整大小
|
private final ExecutorService executorService = Executors.newFixedThreadPool(10); // 线程池,可根据实际并发量调整大小
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private JsapiServiceExtension service;
|
|
||||||
|
|
||||||
private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
||||||
@Autowired
|
@Autowired
|
||||||
private OrderMapper orderMapper;
|
private OrderMapper orderMapper;
|
||||||
|
|||||||
@@ -117,12 +117,3 @@ wx:
|
|||||||
video-complete: TEMPLATE_ID_2 # 视频完成通知模板ID
|
video-complete: TEMPLATE_ID_2 # 视频完成通知模板ID
|
||||||
video-failure: TEMPLATE_ID_3 # 视频失败通知模板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
|
|
||||||
|
|||||||
+5
-5
@@ -6,7 +6,7 @@ import com.central.common.model.Result;
|
|||||||
import com.central.user.service.PrivateKeyService;
|
import com.central.user.service.PrivateKeyService;
|
||||||
import com.central.user.service.WechatConfigService;
|
import com.central.user.service.WechatConfigService;
|
||||||
import com.central.user.service.WechatPayService;
|
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.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.Parameters;
|
import io.swagger.v3.oas.annotations.Parameters;
|
||||||
@@ -48,14 +48,14 @@ public class SysWechatConfigController {
|
|||||||
|
|
||||||
@Operation(summary = "获取微信配置")
|
@Operation(summary = "获取微信配置")
|
||||||
@GetMapping("/{type}")
|
@GetMapping("/{type}")
|
||||||
public Result<WechatConfig> getConfig(@PathVariable String type) {
|
public WechatConfig getConfig(@PathVariable String type) {
|
||||||
return Result.succeed(wechatConfigService.getConfig(type, TenantContextHolder.getTenant()));
|
return wechatConfigService.getConfig(type, TenantContextHolder.getTenant());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "获取微信配置")
|
@Operation(summary = "获取微信配置")
|
||||||
@GetMapping("/app/{id}")
|
@GetMapping("/app/{id}")
|
||||||
public Result<WechatConfig> getConfigByAppId(@PathVariable String appId) {
|
public WechatConfig getConfigByAppId(@PathVariable("id") String appId) {
|
||||||
return Result.succeed(wechatConfigService.getConfig(appId));
|
return wechatConfigService.getConfig(appId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "保存微信配置")
|
@Operation(summary = "保存微信配置")
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ package com.central.user.mapper;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
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.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ package com.central.user.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.central.common.model.PageResult;
|
import com.central.common.model.PageResult;
|
||||||
import com.zlt.wechat.entity.WechatConfig;
|
import com.central.wechat.wechat.entity.WechatConfig;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.central.common.model.PageResult;
|
import com.central.common.model.PageResult;
|
||||||
import com.central.user.mapper.WechatConfigMapper;
|
import com.central.user.mapper.WechatConfigMapper;
|
||||||
import com.central.user.service.WechatConfigService;
|
import com.central.user.service.WechatConfigService;
|
||||||
import com.zlt.wechat.entity.WechatConfig;
|
import com.central.wechat.wechat.entity.WechatConfig;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.commons.collections4.MapUtils;
|
import org.apache.commons.collections4.MapUtils;
|
||||||
import org.springframework.cache.annotation.CacheEvict;
|
import org.springframework.cache.annotation.CacheEvict;
|
||||||
|
|||||||
+153
-129
@@ -1,130 +1,154 @@
|
|||||||
package com.central.user.service.impl;//package com.zlt.wechat.service.impl;
|
package com.central.user.service.impl;//package com.zlt.wechat.service.impl;
|
||||||
//
|
|
||||||
//import com.wechat.pay.java.core.Config;
|
import com.central.user.service.WechatPayService;
|
||||||
//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.jsapi.model.PrepayWithRequestPaymentResponse;
|
import com.wechat.pay.java.service.payments.model.Transaction;
|
||||||
//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.RefundService;
|
import com.wechat.pay.java.service.refund.model.RefundNotification;
|
||||||
//import com.wechat.pay.java.service.refund.model.Refund;
|
import org.springframework.stereotype.Service;
|
||||||
//import com.wechat.pay.java.service.refund.model.RefundNotification;
|
|
||||||
//import com.wechat.pay.java.service.refund.model.RefundRequest;
|
import java.util.Map;
|
||||||
//import com.wechat.pay.java.service.refund.model.RefundResponse;
|
|
||||||
//import com.zlt.wechat.entity.WechatConfig;
|
@Service
|
||||||
//import com.zlt.wechat.service.PrivateKeyService;
|
public class WechatPayServiceImpl implements WechatPayService {
|
||||||
//import com.zlt.wechat.service.WechatConfigService;
|
@Override
|
||||||
//import com.zlt.wechat.service.WechatPayService;
|
public PrepayWithRequestPaymentResponse createJsapiOrder(String tenantId, String openId, int amount, String description, String outTradeNo) {
|
||||||
//import org.springframework.beans.factory.annotation.Autowired;
|
return null;
|
||||||
//import org.springframework.stereotype.Service;
|
}
|
||||||
//
|
|
||||||
//import java.io.ByteArrayInputStream;
|
@Override
|
||||||
//import java.util.Map;
|
public Transaction queryOrder(String tenantId, String outTradeNo) {
|
||||||
//
|
return null;
|
||||||
//@Service
|
}
|
||||||
//public class WechatPayServiceImpl implements WechatPayService {
|
|
||||||
//
|
@Override
|
||||||
// @Autowired
|
public void closeOrder(String tenantId, String outTradeNo) {
|
||||||
// private WechatConfigService configService;
|
|
||||||
//
|
}
|
||||||
// @Autowired
|
|
||||||
// private PrivateKeyService privateKeyService;
|
@Override
|
||||||
//
|
public Refund queryRefund(String tenantId, String outRefundNo) {
|
||||||
// @Autowired
|
return null;
|
||||||
// private JsapiServiceExtension jsapiService;
|
}
|
||||||
//
|
|
||||||
// @Autowired
|
@Override
|
||||||
// private RefundService refundService;
|
public RefundNotification parseRefundNotify(String tenantId, String notifyData) {
|
||||||
//
|
return null;
|
||||||
// @Autowired
|
}
|
||||||
// private Config wxPayConfig;
|
|
||||||
//
|
@Override
|
||||||
// @Override
|
public boolean uploadPrivateKey(String tenantId, String privateKey) {
|
||||||
// public PrepayWithRequestPaymentResponse createJsapiOrder(String tenantId, String openId,
|
return false;
|
||||||
// int amount, String description, String outTradeNo) {
|
}
|
||||||
// // 切换租户配置
|
|
||||||
// configService.switchConfig("PAY", tenantId);
|
@Override
|
||||||
//
|
public boolean updatePayConfig(String tenantId, Map<String, String> config) {
|
||||||
// // 创建支付订单
|
return false;
|
||||||
// /*return jsapiService.prepayWithRequestPayment(
|
}
|
||||||
// openId,
|
|
||||||
// description,
|
/*@Autowired
|
||||||
// outTradeNo,
|
private WechatConfigService configService;
|
||||||
// amount,
|
|
||||||
// "CNY"
|
@Autowired
|
||||||
// );*/
|
private PrivateKeyService privateKeyService;
|
||||||
// return new PrepayWithRequestPaymentResponse();
|
|
||||||
// }
|
@Autowired
|
||||||
//
|
private JsapiServiceExtension jsapiService;
|
||||||
// @Override
|
|
||||||
// public Transaction queryOrder(String tenantId, String outTradeNo) {
|
@Autowired
|
||||||
// configService.switchConfig("PAY", tenantId);
|
private RefundService refundService;
|
||||||
// return jsapiService.queryOrderByOutTradeNo(outTradeNo);
|
|
||||||
// }
|
@Autowired
|
||||||
//
|
private Config wxPayConfig;
|
||||||
// @Override
|
|
||||||
// public void closeOrder(String tenantId, String outTradeNo) {
|
@Override
|
||||||
// configService.switchConfig("PAY", tenantId);
|
public PrepayWithRequestPaymentResponse createJsapiOrder(String tenantId, String openId,
|
||||||
// jsapiService.closeOrder(outTradeNo);
|
int amount, String description, String outTradeNo) {
|
||||||
// }
|
// 切换租户配置
|
||||||
//
|
configService.switchConfig("PAY", tenantId);
|
||||||
// @Override
|
|
||||||
// public RefundResponse refund(String tenantId, String outTradeNo, String outRefundNo,
|
// 创建支付订单
|
||||||
// int amount, String reason) {
|
*//*return jsapiService.prepayWithRequestPayment(
|
||||||
// configService.switchConfig("PAY", tenantId);
|
openId,
|
||||||
//
|
description,
|
||||||
// RefundRequest request = new RefundRequest();
|
outTradeNo,
|
||||||
// request.setOutTradeNo(outTradeNo);
|
amount,
|
||||||
// request.setOutRefundNo(outRefundNo);
|
"CNY"
|
||||||
// request.setAmount(new RefundRequest.Amount(amount, "CNY"));
|
);*//*
|
||||||
// request.setReason(reason);
|
return new PrepayWithRequestPaymentResponse();
|
||||||
//
|
}
|
||||||
// return refundService.refund(request);
|
|
||||||
// }
|
@Override
|
||||||
//
|
public Transaction queryOrder(String tenantId, String outTradeNo) {
|
||||||
// @Override
|
configService.switchConfig("PAY", tenantId);
|
||||||
// public Refund queryRefund(String tenantId, String outRefundNo) {
|
return jsapiService.queryOrderByOutTradeNo(outTradeNo);
|
||||||
// configService.switchConfig("PAY", tenantId);
|
}
|
||||||
// return refundService.queryByOutRefundNo(outRefundNo);
|
|
||||||
// }
|
@Override
|
||||||
//
|
public void closeOrder(String tenantId, String outTradeNo) {
|
||||||
// @Override
|
configService.switchConfig("PAY", tenantId);
|
||||||
// public RefundNotification parseRefundNotify(String tenantId, String notifyData) {
|
jsapiService.closeOrder(outTradeNo);
|
||||||
// configService.switchConfig("PAY", tenantId);
|
}
|
||||||
// return refundService.parseRefundNotification(notifyData);
|
|
||||||
// }
|
@Override
|
||||||
//
|
public RefundResponse refund(String tenantId, String outTradeNo, String outRefundNo,
|
||||||
// @Override
|
int amount, String reason) {
|
||||||
// public boolean uploadPrivateKey(String tenantId, String privateKey) {
|
configService.switchConfig("PAY", tenantId);
|
||||||
// try {
|
|
||||||
// privateKeyService.uploadPrivateKey(tenantId, "PAY",
|
RefundRequest request = new RefundRequest();
|
||||||
// new ByteArrayInputStream(privateKey.getBytes()));
|
request.setOutTradeNo(outTradeNo);
|
||||||
// return true;
|
request.setOutRefundNo(outRefundNo);
|
||||||
// } catch (Exception e) {
|
request.setAmount(new RefundRequest.Amount(amount, "CNY"));
|
||||||
// return false;
|
request.setReason(reason);
|
||||||
// }
|
|
||||||
// }
|
return refundService.refund(request);
|
||||||
//
|
}
|
||||||
// @Override
|
|
||||||
// public boolean updatePayConfig(String tenantId, Map<String, String> config) {
|
@Override
|
||||||
// try {
|
public Refund queryRefund(String tenantId, String outRefundNo) {
|
||||||
// WechatConfig wechatConfig = configService.getConfig("PAY", tenantId);
|
configService.switchConfig("PAY", tenantId);
|
||||||
// if (wechatConfig == null) {
|
return refundService.queryByOutRefundNo(outRefundNo);
|
||||||
// wechatConfig = new WechatConfig();
|
}
|
||||||
// wechatConfig.setType("PAY");
|
|
||||||
// wechatConfig.setTenantId(tenantId);
|
@Override
|
||||||
// }
|
public RefundNotification parseRefundNotify(String tenantId, String notifyData) {
|
||||||
//
|
configService.switchConfig("PAY", tenantId);
|
||||||
// // 更新配置信息
|
return refundService.parseRefundNotification(notifyData);
|
||||||
// wechatConfig.setMerchantId(config.get("merchantId"));
|
}
|
||||||
// wechatConfig.setAppId(config.get("appId"));
|
|
||||||
// wechatConfig.setMchKey(config.get("mchKey"));
|
@Override
|
||||||
// wechatConfig.setMchSerialNo(config.get("mchSerialNo"));
|
public boolean uploadPrivateKey(String tenantId, String privateKey) {
|
||||||
// wechatConfig.setApiV3Key(config.get("apiV3Key"));
|
try {
|
||||||
// wechatConfig.setNotifyUrl(config.get("notifyUrl"));
|
privateKeyService.uploadPrivateKey(tenantId, "PAY",
|
||||||
// wechatConfig.setStatus(1);
|
new ByteArrayInputStream(privateKey.getBytes()));
|
||||||
//
|
return true;
|
||||||
// return configService.saveOrUpdate(wechatConfig);
|
} catch (Exception e) {
|
||||||
// } catch (Exception e) {
|
return false;
|
||||||
// return false;
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
//}
|
@Override
|
||||||
|
public boolean updatePayConfig(String tenantId, Map<String, String> 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;
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.zlt.wechat.config;
|
package com.central.wechat.wechat.config;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
+1
-1
@@ -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.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
package com.zlt.wechat.feign;
|
package com.central.wechat.wechat.feign;
|
||||||
|
|
||||||
import com.central.common.constant.ServiceNameConstants;
|
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.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
+5
-5
@@ -1,8 +1,8 @@
|
|||||||
package com.zlt.wechat.feign;
|
package com.central.wechat.wechat.feign;
|
||||||
|
|
||||||
import com.central.common.constant.ServiceNameConstants;
|
import com.central.common.constant.ServiceNameConstants;
|
||||||
import com.zlt.wechat.entity.WechatConfig;
|
import com.central.wechat.wechat.entity.WechatConfig;
|
||||||
import com.zlt.wechat.feign.fallback.WechatConfigServiceFallbackFactory;
|
import com.central.wechat.wechat.feign.fallback.WechatConfigServiceFallbackFactory;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
@@ -22,8 +22,8 @@ public interface WechatConfigService {
|
|||||||
@GetMapping(value = "/wechat/config/{type}")
|
@GetMapping(value = "/wechat/config/{type}")
|
||||||
WechatConfig getConfig(@PathVariable("type") String type,String tenantId);
|
WechatConfig getConfig(@PathVariable("type") String type,String tenantId);
|
||||||
|
|
||||||
@GetMapping(value = "/app/{id}")
|
@GetMapping(value = "/wechat/config/app/{id}")
|
||||||
WechatConfig getConfig(String appId);
|
WechatConfig getConfigByAppId(@PathVariable("id") String appId);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
+2
-2
@@ -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 lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||||
|
|
||||||
+4
-4
@@ -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.central.wechat.wechat.entity.WechatConfig;
|
||||||
import com.zlt.wechat.feign.WechatConfigService;
|
import com.central.wechat.wechat.feign.WechatConfigService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ public class WechatConfigServiceFallbackFactory implements FallbackFactory<Wecha
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WechatConfig getConfig(String appId) {
|
public WechatConfig getConfigByAppId(String appId) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
com.zlt.wechat.feign.fallback.PrivateKeyServiceFallbackFactory
|
com.central.wechat.wechat.feign.fallback.PrivateKeyServiceFallbackFactory
|
||||||
com.zlt.wechat.feign.fallback.WechatConfigServiceFallbackFactory
|
com.central.wechat.wechat.feign.fallback.WechatConfigServiceFallbackFactory
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+4
-3
@@ -4,6 +4,10 @@ import cn.binarywang.wx.miniapp.api.WxMaService;
|
|||||||
import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
|
import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
|
||||||
import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl;
|
import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl;
|
||||||
import com.central.common.context.TenantContextHolder;
|
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.Config;
|
||||||
import com.wechat.pay.java.core.RSAAutoCertificateConfig;
|
import com.wechat.pay.java.core.RSAAutoCertificateConfig;
|
||||||
import com.wechat.pay.java.core.notification.NotificationConfig;
|
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.payments.jsapi.model.SettleInfo;
|
||||||
import com.wechat.pay.java.service.profitsharing.ProfitsharingService;
|
import com.wechat.pay.java.service.profitsharing.ProfitsharingService;
|
||||||
import com.wechat.pay.java.service.refund.RefundService;
|
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.WxMpService;
|
||||||
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
|
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
|
||||||
import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl;
|
import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
|
|||||||
/**
|
/**
|
||||||
* @author zlt
|
* @author zlt
|
||||||
*/
|
*/
|
||||||
@EnableFeignClients(basePackages = {"com.central", "com.zlt.wechat.feign"})
|
@EnableFeignClients(basePackages = {"com.central"})
|
||||||
@MapperScan(basePackages = "com.central.oauth.mapper")
|
@MapperScan(basePackages = "com.central.oauth.mapper")
|
||||||
@EnableFeignInterceptor
|
@EnableFeignInterceptor
|
||||||
@EnableDiscoveryClient
|
@EnableDiscoveryClient
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package com.central.oauth.service;
|
package com.central.oauth.service;
|
||||||
|
|
||||||
import com.zlt.wechat.entity.WechatConfig;
|
import com.central.wechat.wechat.entity.WechatConfig;
|
||||||
import org.springframework.security.core.userdetails.UserDetails;
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import com.central.common.feign.UserService;
|
|||||||
import com.central.common.model.SysUser;
|
import com.central.common.model.SysUser;
|
||||||
import com.central.common.utils.LoginUserUtils;
|
import com.central.common.utils.LoginUserUtils;
|
||||||
import com.central.oauth.service.ZltUserDetailsService;
|
import com.central.oauth.service.ZltUserDetailsService;
|
||||||
import com.zlt.wechat.entity.WechatConfig;
|
import com.central.wechat.wechat.entity.WechatConfig;
|
||||||
import com.zlt.wechat.feign.WechatConfigService;
|
import com.central.wechat.wechat.feign.WechatConfigService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.security.authentication.DisabledException;
|
import org.springframework.security.authentication.DisabledException;
|
||||||
import org.springframework.security.authentication.InternalAuthenticationServiceException;
|
import org.springframework.security.authentication.InternalAuthenticationServiceException;
|
||||||
@@ -64,8 +64,7 @@ public class UserDetailServiceImpl implements ZltUserDetailsService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WechatConfig loadMiniAppConfig(String appId) {
|
public WechatConfig loadMiniAppConfig(String appId) {
|
||||||
// return wechatConfigService.getConfig(appId);
|
return wechatConfigService.getConfigByAppId(appId);
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+1
-1
@@ -6,8 +6,8 @@ import com.central.oauth.service.impl.UserDetailServiceFactory;
|
|||||||
import com.central.oauth.support.base.BaseAuthenticationProvider;
|
import com.central.oauth.support.base.BaseAuthenticationProvider;
|
||||||
import com.central.oauth2.common.properties.SecurityProperties;
|
import com.central.oauth2.common.properties.SecurityProperties;
|
||||||
import com.central.oauth2.common.token.TencentAuthenticationToken;
|
import com.central.oauth2.common.token.TencentAuthenticationToken;
|
||||||
|
import com.central.wechat.wechat.entity.WechatConfig;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.zlt.wechat.entity.WechatConfig;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|||||||
Reference in New Issue
Block a user