🐛 修改 `pay` 模块>支付订单的同步 Job,查询指定创建时间前的待支付订单

This commit is contained in:
YunaiV 2023-12-29 21:52:49 +08:00
parent 475e932aec
commit 0f6f204320
2 changed files with 4 additions and 4 deletions

View File

@ -24,10 +24,10 @@ public interface PayOrderExtensionMapper extends BaseMapperX<PayOrderExtensionDO
return selectList(PayOrderExtensionDO::getOrderId, orderId);
}
default List<PayOrderExtensionDO> selectListByStatusAndCreateTimeGe(Integer status, LocalDateTime minCreateTime) {
default List<PayOrderExtensionDO> selectListByStatusAndCreateTimeLe(Integer status, LocalDateTime minCreateTime) {
return selectList(new LambdaQueryWrapper<PayOrderExtensionDO>()
.eq(PayOrderExtensionDO::getStatus, status)
.ge(PayOrderExtensionDO::getCreateTime, minCreateTime));
.le(PayOrderExtensionDO::getCreateTime, minCreateTime));
}
}

View File

@ -438,8 +438,8 @@ public class PayOrderServiceImpl implements PayOrderService {
@Override
public int syncOrder(LocalDateTime minCreateTime) {
// 1. 查询指定创建时间的待支付订单
List<PayOrderExtensionDO> orderExtensions = orderExtensionMapper.selectListByStatusAndCreateTimeGe(
// 1. 查询指定创建时间的待支付订单
List<PayOrderExtensionDO> orderExtensions = orderExtensionMapper.selectListByStatusAndCreateTimeLe(
PayOrderStatusEnum.WAITING.getStatus(), minCreateTime);
if (CollUtil.isEmpty(orderExtensions)) {
return 0;