This commit is contained in:
Cauchy
2023-10-10 17:27:57 +08:00
parent f3df8b326b
commit 6e18e90467
3 changed files with 7 additions and 4 deletions

View File

@@ -269,6 +269,7 @@ public class BuyOrderController {
@RequestMapping("/appGetOrderInfo/{type}")
public R appGetOrderInfo(@PathVariable String type, @RequestParam("orderId") Integer orderId) {
BuyOrderEntity buyOrder = buyOrderService.getById(orderId);
buyOrder.setTimestamp(buyOrder.getCreateTime().getTime()/1000);
List<BuyOrderDetailEntity> orderDetail = null;
if ("1".equals(type)) {
orderDetail = buyOrderDetailService.getBaseMapper().selectList(new QueryWrapper<BuyOrderDetailEntity>()
@@ -547,8 +548,8 @@ public class BuyOrderController {
private MessagePostProcessor messagePostProcessor() {
return message -> {
//设置有效期30分钟
//message.getMessageProperties().setExpiration("1800000");
message.getMessageProperties().setExpiration("30000");
//message.getMessageProperties().setExpiration(String.valueOf(30*60*1000));
message.getMessageProperties().setExpiration(String.valueOf(30*1000));
return message;
};
}

View File

@@ -21,7 +21,9 @@ public class OrderCancelConsumer {
@RabbitListener(queues = DelayQueueConfig.ORDER_CANCEL_DEAD_LETTER_QUEUE)
public void orderConsumer(String orderId) {
BuyOrderEntity buyOrder = buyOrderService.getById(orderId);
buyOrder.setOrderStatus(Constants.ORDER_STATUS_OUT_OF_TIME);
if(Constants.ORDER_STATUS_TO_BE_PAID.equals(buyOrder.getOrderStatus())){
buyOrder.setOrderStatus(Constants.ORDER_STATUS_OUT_OF_TIME);
}
buyOrderService.updateById(buyOrder);
}
}

View File

@@ -5,7 +5,7 @@ wxpay.mchId:1612860909
# ?? URL
wxpay.payUrl:https://api.mch.weixin.qq.com/v3/pay/transactions/app
# ????
wxpay.notifyUrl:https://api.nuttyreading.com/pay/payNotify
wxpay.notifyUrl:https://testapi.nuttyreading.com/pay/payNotify
# ?? url
wxpay.refundNotifyUrl:http://pjm6m9.natappfree.cc/pay/refundNotify
# key pem