mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-03 21:48:13 +08:00
update
This commit is contained in:
@@ -26,7 +26,7 @@ public class CacheConstants {
|
|||||||
public static final String PUSH_STATION_CONNECTOR = "push_station_connector";
|
public static final String PUSH_STATION_CONNECTOR = "push_station_connector";
|
||||||
|
|
||||||
// 会员余额退款正在进行中
|
// 会员余额退款正在进行中
|
||||||
public static final String MEMBER_BALANCE_REFUNDS_ARE_IN_PROGRESS = "Member_Balance_Refunds_Are_In_Progress:";
|
public static final String MEMBER_BALANCE_REFUNDS_ARE_IN_PROGRESS = "member_balance_refunds_are_in_progress:";
|
||||||
|
|
||||||
public static final String PLATFORM_TESTER = "platform_tester:";
|
public static final String PLATFORM_TESTER = "platform_tester:";
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.jsowell.adapay.response.PaymentReverseResponse;
|
|||||||
import com.jsowell.adapay.vo.OrderSettleResult;
|
import com.jsowell.adapay.vo.OrderSettleResult;
|
||||||
import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
|
import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
|
||||||
import com.jsowell.common.core.domain.ykc.TransactionRecordsData;
|
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.AdapayMemberAccount;
|
||||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||||
import com.jsowell.pile.domain.OrderDetail;
|
import com.jsowell.pile.domain.OrderDetail;
|
||||||
|
|||||||
@@ -2371,8 +2371,8 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
|||||||
@Override
|
@Override
|
||||||
public void refundBalanceWithAdapay(ApplyRefundDTO dto){
|
public void refundBalanceWithAdapay(ApplyRefundDTO dto){
|
||||||
String redisKey = CacheConstants.MEMBER_BALANCE_REFUNDS_ARE_IN_PROGRESS + dto.getMemberId();
|
String redisKey = CacheConstants.MEMBER_BALANCE_REFUNDS_ARE_IN_PROGRESS + dto.getMemberId();
|
||||||
String redisResult = redisCache.getCacheObject(redisKey);
|
PaymentReverseResponse redisResult = redisCache.getCacheObject(redisKey);
|
||||||
if (StringUtils.isNotBlank(redisResult)) {
|
if (Objects.nonNull(redisResult)) {
|
||||||
throw new BusinessException(ReturnCodeEnum.CODE_BALANCE_REFUNDS_ARE_IN_PROGRESS_ERROR);
|
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);
|
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);
|
List<BalanceDeductionAmountVO> list = calculateTheBalanceDeductionAmount(dto.getMemberId(), refundAmount);
|
||||||
for (BalanceDeductionAmountVO vo : list) {
|
for (BalanceDeductionAmountVO vo : list) {
|
||||||
|
|||||||
Reference in New Issue
Block a user