mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-10-14 05:40:25 +00:00
style 代码格式微调
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
package org.dromara.daxpay.channel.alipay.service.allocation.receiver;
|
package org.dromara.daxpay.channel.alipay.service.allocation;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alipay.api.AlipayResponse;
|
import com.alipay.api.AlipayResponse;
|
||||||
@@ -88,7 +88,6 @@ public class AliPayAllocReceiverService {
|
|||||||
AlipayTradeRoyaltyRelationUnbindRequest request = new AlipayTradeRoyaltyRelationUnbindRequest();
|
AlipayTradeRoyaltyRelationUnbindRequest request = new AlipayTradeRoyaltyRelationUnbindRequest();
|
||||||
request.setBizModel(model);
|
request.setBizModel(model);
|
||||||
AlipayTradeRoyaltyRelationUnbindResponse response = aliPayConfigService.execute(request);
|
AlipayTradeRoyaltyRelationUnbindResponse response = aliPayConfigService.execute(request);
|
||||||
System.out.println(response);
|
|
||||||
// 如果出现分账方不存在也视为成功
|
// 如果出现分账方不存在也视为成功
|
||||||
if (Objects.equals(response.getSubCode(), AliPayCode.USER_NOT_EXIST)) {
|
if (Objects.equals(response.getSubCode(), AliPayCode.USER_NOT_EXIST)) {
|
||||||
return;
|
return;
|
@@ -45,7 +45,6 @@ public class AliPayTransferService {
|
|||||||
AlipayFundAccountQueryRequest request = new AlipayFundAccountQueryRequest();
|
AlipayFundAccountQueryRequest request = new AlipayFundAccountQueryRequest();
|
||||||
request.setBizModel(model);
|
request.setBizModel(model);
|
||||||
AlipayFundAccountQueryResponse response = aliPayConfigService.execute(request);
|
AlipayFundAccountQueryResponse response = aliPayConfigService.execute(request);
|
||||||
System.out.println(response);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -3,7 +3,7 @@ package org.dromara.daxpay.channel.alipay.strategy;
|
|||||||
import cn.bootx.platform.core.exception.ValidationFailedException;
|
import cn.bootx.platform.core.exception.ValidationFailedException;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.dromara.daxpay.channel.alipay.service.allocation.receiver.AliPayAllocReceiverService;
|
import org.dromara.daxpay.channel.alipay.service.allocation.AliPayAllocReceiverService;
|
||||||
import org.dromara.daxpay.core.enums.AllocReceiverTypeEnum;
|
import org.dromara.daxpay.core.enums.AllocReceiverTypeEnum;
|
||||||
import org.dromara.daxpay.core.enums.ChannelEnum;
|
import org.dromara.daxpay.core.enums.ChannelEnum;
|
||||||
import org.dromara.daxpay.service.strategy.AbsAllocReceiverStrategy;
|
import org.dromara.daxpay.service.strategy.AbsAllocReceiverStrategy;
|
||||||
|
@@ -85,7 +85,7 @@ public class PayOrderService {
|
|||||||
/**
|
/**
|
||||||
* 自动分账
|
* 自动分账
|
||||||
*/
|
*/
|
||||||
public void autoAllocation(Long id){
|
public void autoAllocation(@NotNull(message = "支付订单id不能为空") Long id){
|
||||||
try {
|
try {
|
||||||
PayOrder payOrder = payOrderManager.findById(id).orElseThrow(() -> new TradeNotExistException("支付订单不存在"));
|
PayOrder payOrder = payOrderManager.findById(id).orElseThrow(() -> new TradeNotExistException("支付订单不存在"));
|
||||||
// 是否开启自动完结
|
// 是否开启自动完结
|
||||||
|
@@ -72,7 +72,6 @@ public class PaySyncService {
|
|||||||
if (Objects.equals(payOrder.getStatus(), WAIT.getCode())){
|
if (Objects.equals(payOrder.getStatus(), WAIT.getCode())){
|
||||||
throw new TradeStatusErrorException("订单未开始支付, 请重新确认支付状态");
|
throw new TradeStatusErrorException("订单未开始支付, 请重新确认支付状态");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 加锁
|
// 加锁
|
||||||
LockInfo lock = lockTemplate.lock("sync:pay" + payOrder.getId(),10000,200);
|
LockInfo lock = lockTemplate.lock("sync:pay" + payOrder.getId(),10000,200);
|
||||||
if (Objects.isNull(lock)){
|
if (Objects.isNull(lock)){
|
||||||
|
@@ -14,8 +14,4 @@ import org.springframework.stereotype.Service;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class AllocationSyncTaskService {
|
public class AllocationSyncTaskService {
|
||||||
|
|
||||||
/**
|
|
||||||
* 分账同步
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user