Showing
2 changed files
with
3 additions
and
2 deletions
| ... | @@ -600,7 +600,7 @@ public class OrderServiceRpcClient { | ... | @@ -600,7 +600,7 @@ public class OrderServiceRpcClient { |
| 600 | .build()); | 600 | .build()); |
| 601 | if (orderResponse.getIsCreated()) { | 601 | if (orderResponse.getIsCreated()) { |
| 602 | // 用餐时间为当天,并且非在线支付餐单,发送消息给客户端 | 602 | // 用餐时间为当天,并且非在线支付餐单,发送消息给客户端 |
| 603 | - if (createOrderDto.getMealTime().toLocalDate().equals(LocalDate.now()) && menuById.getResponse().getOrderRuleJson().getModeOfPayment() == ModeOfPaymentEnum.ONLINE) { | 603 | + if (createOrderDto.getMealTime().toLocalDate().equals(LocalDate.now()) && menuById.getResponse().getOrderRuleJson().getModeOfPayment() != ModeOfPaymentEnum.ONLINE) { |
| 604 | final var orderCreateSuccessData = OrderCreateSuccessData.builder() | 604 | final var orderCreateSuccessData = OrderCreateSuccessData.builder() |
| 605 | .orderId(orderResponse.getId()) | 605 | .orderId(orderResponse.getId()) |
| 606 | .build(); | 606 | .build(); | ... | ... |
| ... | @@ -120,7 +120,7 @@ public class PayServiceClient { | ... | @@ -120,7 +120,7 @@ public class PayServiceClient { |
| 120 | } | 120 | } |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | - public boolean callback(PaymentCallbackDTO paymentCallbackDTO) { | 123 | + public boolean callback(PaymentCallbackDTO paymentCallbackDTO) { |
| 124 | log.info("callback request received: {}", paymentCallbackDTO); | 124 | log.info("callback request received: {}", paymentCallbackDTO); |
| 125 | try { | 125 | try { |
| 126 | final var paymentCallbackResult = xmlMapper.readValue(paymentCallbackDTO.getPayResult(), PaymentCallbackResult.class); | 126 | final var paymentCallbackResult = xmlMapper.readValue(paymentCallbackDTO.getPayResult(), PaymentCallbackResult.class); |
| ... | @@ -157,6 +157,7 @@ public class PayServiceClient { | ... | @@ -157,6 +157,7 @@ public class PayServiceClient { |
| 157 | .setShouldUpdatePayTime(true).setPayTime(payTime) | 157 | .setShouldUpdatePayTime(true).setPayTime(payTime) |
| 158 | .setShouldUpdatePayPrice(true).setPayPrice(realAmount.multiply(new BigDecimal("100")).intValue()) | 158 | .setShouldUpdatePayPrice(true).setPayPrice(realAmount.multiply(new BigDecimal("100")).intValue()) |
| 159 | .setShouldUpdatePayStatus(true).setPayStatus(PayStatusEnum.SUCCEED) | 159 | .setShouldUpdatePayStatus(true).setPayStatus(PayStatusEnum.SUCCEED) |
| 160 | + .setShouldUpdateStatus(true).setStatus(OrderStatusEnum.PREPARING) | ||
| 160 | .setShouldUpdateTransactionId(true).setTransactionId(paymentCallbackResult.getTransSN()) | 161 | .setShouldUpdateTransactionId(true).setTransactionId(paymentCallbackResult.getTransSN()) |
| 161 | .build(); | 162 | .build(); |
| 162 | final var updateResponse = orderServiceRpcClient.updateClientCustomerOrderPaymentResult(orderById, build); | 163 | final var updateResponse = orderServiceRpcClient.updateClientCustomerOrderPaymentResult(orderById, build); | ... | ... |
-
Please register or login to post a comment