Feature dzc #1
+4
-4
@@ -169,9 +169,9 @@ public class AliPayController {
|
||||
// ISV(服务商)模式下应优先使用 auth_app_id 定位商家应用
|
||||
String authAppId = params.get("auth_app_id");
|
||||
String lookupAppId = (authAppId != null && !authAppId.isEmpty()) ? authAppId : appId;
|
||||
AlipayConfig config = alipayConfigService.getConfigByAppId(lookupAppId);
|
||||
AlipayConfig config = alipayConfigService.getConfigByAppIdAndType(lookupAppId, "PAY");
|
||||
if (config == null) {
|
||||
log.error("支付宝配置不存在,appId: {}, authAppId: {}", appId, authAppId);
|
||||
log.error("支付宝支付配置不存在,appId: {}, authAppId: {}", appId, authAppId);
|
||||
return "failure";
|
||||
}
|
||||
TenantContextHolder.setTenant(config.getTenantId());
|
||||
@@ -300,9 +300,9 @@ public class AliPayController {
|
||||
// ISV 模式下应使用 auth_app_id 定位商家应用
|
||||
String authAppId = params.get("auth_app_id");
|
||||
String lookupAppId = (authAppId != null && !authAppId.isEmpty()) ? authAppId : appId;
|
||||
AlipayConfig config = alipayConfigService.getConfigByAppId(lookupAppId);
|
||||
AlipayConfig config = alipayConfigService.getConfigByAppIdAndType(lookupAppId, "PAY");
|
||||
if (config == null) {
|
||||
log.error("支付宝配置不存在,appId: {}, authAppId: {}", appId, authAppId);
|
||||
log.error("支付宝支付配置不存在,appId: {}, authAppId: {}", appId, authAppId);
|
||||
return "failure";
|
||||
}
|
||||
TenantContextHolder.setTenant(config.getTenantId());
|
||||
|
||||
+2
-1
@@ -59,7 +59,8 @@ public class AlipayConfigServiceImpl
|
||||
public AlipayConfig getConfigByAppId(String appId) {
|
||||
LambdaQueryWrapper<AlipayConfig> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(AlipayConfig::getAppId, appId)
|
||||
.eq(AlipayConfig::getStatus, 1);
|
||||
.eq(AlipayConfig::getStatus, 1)
|
||||
.last("LIMIT 1");
|
||||
return baseMapper.selectOne(wrapper);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user