mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
update
This commit is contained in:
@@ -5,6 +5,7 @@ import com.jsowell.adapay.response.PaymentReverseResponse;
|
||||
import com.jsowell.adapay.vo.OrderSettleResult;
|
||||
import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
|
||||
import com.jsowell.common.core.domain.ykc.TransactionRecordsData;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.pile.domain.AdapayMemberAccount;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.domain.OrderDetail;
|
||||
|
||||
@@ -2369,10 +2369,10 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void refundBalanceWithAdapay(ApplyRefundDTO dto) {
|
||||
public void refundBalanceWithAdapay(ApplyRefundDTO dto){
|
||||
String redisKey = CacheConstants.MEMBER_BALANCE_REFUNDS_ARE_IN_PROGRESS + dto.getMemberId();
|
||||
String redisResult = redisCache.getCacheObject(redisKey);
|
||||
if (StringUtils.isNotBlank(redisResult)) {
|
||||
PaymentReverseResponse redisResult = redisCache.getCacheObject(redisKey);
|
||||
if (Objects.nonNull(redisResult)) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_BALANCE_REFUNDS_ARE_IN_PROGRESS_ERROR);
|
||||
}
|
||||
|
||||
@@ -2389,6 +2389,9 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_REFUND_MEMBER_BALANCE_ERROR);
|
||||
}
|
||||
|
||||
// 模拟放缓存
|
||||
redisCache.setCacheObject(redisKey, new PaymentConfirmResponse(), CacheConstants.cache_expire_time_30m);
|
||||
|
||||
// 查询用户充值余额订单 过滤掉已经退款的充值订单
|
||||
List<BalanceDeductionAmountVO> list = calculateTheBalanceDeductionAmount(dto.getMemberId(), refundAmount);
|
||||
for (BalanceDeductionAmountVO vo : list) {
|
||||
|
||||
Reference in New Issue
Block a user