Merge remote-tracking branch 'origin/bugfix/pay_status_bug'

This commit is contained in:
wangjinlei
2023-10-10 17:33:50 +08:00
2 changed files with 5 additions and 3 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,7 @@ 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));
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);
if(Constants.ORDER_STATUS_TO_BE_PAID.equals(buyOrder.getOrderStatus())){
buyOrder.setOrderStatus(Constants.ORDER_STATUS_OUT_OF_TIME);
}
buyOrderService.updateById(buyOrder);
}
}