update 修复订单定时任务问题

This commit is contained in:
yyb
2026-01-27 15:54:17 +08:00
parent 1c52a34519
commit 93ebbe4074
8 changed files with 334 additions and 34 deletions

View File

@@ -759,9 +759,10 @@ public class LeaseOrderInfoServiceImpl extends ServiceImpl<LeaseOrderInfoMapper,
return Result.fail("购买的ASIC商品中,存在可售数量不足的商品!");
}
boolean isGpuPass = checkGpuMachine(gpuMachines);
if (!isGpuPass){
return Result.fail("购买的GPU商品中,存在客户端不在线的矿机!");
}
//开发环境
//if (!isGpuPass){
// return Result.fail("购买的GPU商品中,存在客户端不在线的矿机!");
//}
//存储相同链和币种的map集合
Map<String, Map<String, List<OrderInfoVo>>> chainAndCoinMap = new HashMap<>();
Map<Long, LeaseMachinePrice> orderTotalPriceGroupByChainAndCoin = leaseMachinePriceMapper.getOrderTotalPriceGroupByChainAndCoin(orderInfoVoList);
@@ -949,9 +950,10 @@ public class LeaseOrderInfoServiceImpl extends ServiceImpl<LeaseOrderInfoMapper,
if (i != machineIds.size()){
throw new OrderException("订单中已有商品售出,请刷新购物车删除已售出商品,重新结算生成订单");
}
if(!checkGpuMachine(gpuMachines)){
throw new OrderException("购买的GPU商品中,存在客户端不在线的矿机!");
}
//开发环境
//if(!checkGpuMachine(gpuMachines)){
// throw new OrderException("购买的GPU商品中,存在客户端不在线的矿机!");
//}
//gpu矿机处理 发送消息
sendMessageToClientAndInsertPurchasedMachine(SecurityUtils.getUserId(),userEmail,gpuMachines,orderMiningInfoDtoList,endMiningMap,machineOrderIdMap,machineOrderItemIdMap);