提交 9f618457 authored 作者: 胡宁宁's avatar 胡宁宁

Merge branch 'v17.5_order_child_sync_broker_20240617' into dev

......@@ -36,6 +36,17 @@ public class OrderPaymentDaoImpl extends BaseDaoImpl<OrderPaymentMapper, OrderPa
.map(super::getOne);
}
@Override
public Optional<OrderPayment> selectByOrderNoAndItemIdAndOperation(String orderNo, String paymentItem,
Integer operation) {
return Optional.of(orderNo)
.map(item -> lQrWrapper()
.eq(OrderPayment::getOrderNo, item)
.eq(OrderPayment::getPaymentItem, paymentItem)
.eq(OrderPayment::getOperation, operation)
)
.map(super::getOne);
}
}
......@@ -20,4 +20,8 @@ public interface OrderPaymentDao extends BaseDao<OrderPaymentMapper, OrderPaymen
@Param("operation")Integer operation,
@Param("paymentItem")String paymentItem);
Optional<OrderPayment> selectByOrderNoAndItemIdAndOperation(@Param("orderNo")String orderNo,
@Param("paymentItem")String paymentItem,
@Param("operation")Integer operation);
}
......@@ -220,8 +220,9 @@ public class PaymentServiceImpl implements PaymentService {
public Result paymentChangePlatformFee(PayPlatformFeeParam param) {
//查询冻结记录
OrderPayment orderPaymentOptional =
orderPaymentDao.selectByOrderNoAndItemId(param.getTradeNo(),
PayUnitTypeEnum.FREEZE_PLATFORM_FEE.getCode() + "").orNull();
orderPaymentDao.selectByOrderNoAndItemIdAndOperation(param.getTradeNo(),
PayUnitTypeEnum.FREEZE_PLATFORM_FEE.getCode() + "",
PayOperationStatusEnum.FREEZE.getValue()).orNull();
if (null == orderPaymentOptional){
throw new ServiceSystemException(PerformanceResultEnum.DATA_NOT_FIND,"数据不存在") ;
}
......@@ -230,6 +231,7 @@ public class PaymentServiceImpl implements PaymentService {
.setAmount(param.getFigure())
.setOrderNo(param.getTradeNo())
.setRelationNo(payOrderNoGenerate())
.setSerialNo(orderPaymentOptional.getSerialNo())
.setPaymentItem(PayUnitTypeEnum.FREEZE_PLATFORM_FEE.getCode() + "")
.setStatus(PaymentStatusEnum.CREATE.getValue())
.setOperation(PayOperationStatusEnum.ADJUSTMENT.getValue());
......@@ -255,8 +257,9 @@ public class PaymentServiceImpl implements PaymentService {
public Result paymentCompletePlatformFee(PayPlatformFeeParam param) {
//查询冻结记录
OrderPayment orderPaymentOptional =
orderPaymentDao.selectByOrderNoAndItemId(param.getTradeNo(),
PayUnitTypeEnum.FREEZE_PLATFORM_FEE.getCode() + "").orNull();
orderPaymentDao.selectByOrderNoAndItemIdAndOperation(param.getTradeNo(),
PayUnitTypeEnum.FREEZE_PLATFORM_FEE.getCode() + "",
PayOperationStatusEnum.FREEZE.getValue()).orNull();
if (null == orderPaymentOptional){
throw new ServiceSystemException(PerformanceResultEnum.DATA_NOT_FIND,"数据不存在") ;
}
......@@ -291,8 +294,9 @@ public class PaymentServiceImpl implements PaymentService {
public Result paymentCancelPlatformFee(PayPlatformFeeParam param) {
//查询冻结记录
OrderPayment orderPaymentOptional =
orderPaymentDao.selectByOrderNoAndItemId(param.getTradeNo(),
PayUnitTypeEnum.FREEZE_PLATFORM_FEE.getCode() + "").orNull();
orderPaymentDao.selectByOrderNoAndItemIdAndOperation(param.getTradeNo(),
PayUnitTypeEnum.FREEZE_PLATFORM_FEE.getCode() + "",
PayOperationStatusEnum.FREEZE.getValue()).orNull();
if (null == orderPaymentOptional){
throw new ServiceSystemException(PerformanceResultEnum.DATA_NOT_FIND,"数据不存在") ;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论