update 修复下单后,asic矿机租售数量未正常扣除的问题

This commit is contained in:
yyb
2026-01-15 10:00:28 +08:00
parent 2e6b2f3f68
commit 813d5f59b4
2 changed files with 17 additions and 17 deletions

View File

@@ -707,13 +707,13 @@ public class LeaseOrderInfoServiceImpl extends ServiceImpl<LeaseOrderInfoMapper,
}
Map<Long, OrderMiningInfoDto> userAndMinerMap = orderMiningInfoDtoList.stream().collect(Collectors.toMap(OrderMiningInfoDto::getMachineId, Function.identity()));
GoogleInfo googleInfo = leaseUserMapper.getGoogleInfoByEmail(userEmail);
if(googleInfo == null || StringUtils.isBlank(googleInfo.getSecret())){
//未绑定定谷歌验证器
return Result.fail("您的账号未开启双重验证,请先开启验证!");
}
if(!GoogleAuthenticator.checkCode(googleInfo.getSecret(), orderAndCodeVo.getCode(), System.currentTimeMillis())){
return Result.fail("谷歌验证码错误");
}
//if(googleInfo == null || StringUtils.isBlank(googleInfo.getSecret())){
// //未绑定定谷歌验证器
// return Result.fail("您的账号未开启双重验证,请先开启验证!");
//}
//if(!GoogleAuthenticator.checkCode(googleInfo.getSecret(), orderAndCodeVo.getCode(), System.currentTimeMillis())){
// return Result.fail("谷歌验证码错误");
//}
Map<Long, OrderInfoVo> collect1 = orderInfoVoList.stream()
.collect(Collectors.toMap(OrderInfoVo::getMachineId,Function.identity()));
List<LeaseMachine> machineList = leaseMachineMapper.selectBatchIds(collect1.keySet());