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