zhuyifan

fix

......@@ -600,7 +600,7 @@ public class OrderServiceRpcClient {
.build());
if (orderResponse.getIsCreated()) {
// 用餐时间为当天,并且非在线支付餐单,发送消息给客户端
if (createOrderDto.getMealTime().toLocalDate().equals(LocalDate.now()) && menuById.getResponse().getOrderRuleJson().getModeOfPayment() == ModeOfPaymentEnum.ONLINE) {
if (createOrderDto.getMealTime().toLocalDate().equals(LocalDate.now()) && menuById.getResponse().getOrderRuleJson().getModeOfPayment() != ModeOfPaymentEnum.ONLINE) {
final var orderCreateSuccessData = OrderCreateSuccessData.builder()
.orderId(orderResponse.getId())
.build();
......
......@@ -120,7 +120,7 @@ public class PayServiceClient {
}
}
public boolean callback(PaymentCallbackDTO paymentCallbackDTO) {
public boolean callback(PaymentCallbackDTO paymentCallbackDTO) {
log.info("callback request received: {}", paymentCallbackDTO);
try {
final var paymentCallbackResult = xmlMapper.readValue(paymentCallbackDTO.getPayResult(), PaymentCallbackResult.class);
......@@ -157,6 +157,7 @@ public class PayServiceClient {
.setShouldUpdatePayTime(true).setPayTime(payTime)
.setShouldUpdatePayPrice(true).setPayPrice(realAmount.multiply(new BigDecimal("100")).intValue())
.setShouldUpdatePayStatus(true).setPayStatus(PayStatusEnum.SUCCEED)
.setShouldUpdateStatus(true).setStatus(OrderStatusEnum.PREPARING)
.setShouldUpdateTransactionId(true).setTransactionId(paymentCallbackResult.getTransSN())
.build();
final var updateResponse = orderServiceRpcClient.updateClientCustomerOrderPaymentResult(orderById, build);
......