debug:电量变化记录错误
This commit is contained in:
parent
f7fa804b07
commit
2f03f23288
|
@ -1222,31 +1222,31 @@ public class TransactionBillServiceImpl implements TransactionBillService, After
|
|||
ServiceUtil.assertion(refund != 1, "申请退款失败");
|
||||
}, 0, TimeUnit.SECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
// 清零设备
|
||||
try {
|
||||
transactionTemplate.execute(status -> {
|
||||
// 记录设备关闭状态:成功
|
||||
int update = this.updateCloseStatus(order.getBillId(), RechargeCloseStatus.SUCCESS, "成功");
|
||||
ServiceUtil.assertion(update != 1, "更新设备关闭状态失败");
|
||||
// 清零设备
|
||||
try {
|
||||
transactionTemplate.execute(status -> {
|
||||
// 记录设备关闭状态:成功
|
||||
int update = this.updateCloseStatus(order.getBillId(), RechargeCloseStatus.SUCCESS, "成功");
|
||||
ServiceUtil.assertion(update != 1, "更新设备关闭状态失败");
|
||||
|
||||
// 尝试设备清零时长、电量
|
||||
if (withDevice) {
|
||||
if (SuitFeeType.TIME.getType().equals(order.getSuitFeeType())) {
|
||||
deviceService.resetTime(device, true);
|
||||
} else if (SuitFeeType.COUNT.getType().equals(order.getSuitFeeType())) {
|
||||
deviceService.resetEle(device, true);
|
||||
// 尝试设备清零时长、电量
|
||||
if (withDevice) {
|
||||
if (SuitFeeType.TIME.getType().equals(order.getSuitFeeType())) {
|
||||
deviceService.resetTime(device, true);
|
||||
} else if (SuitFeeType.COUNT.getType().equals(order.getSuitFeeType())) {
|
||||
deviceService.resetEle(device, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return update;
|
||||
});
|
||||
} catch (Exception e) {
|
||||
log.warn("设备归零失败: {}", e.getMessage());
|
||||
// 记录设备关闭状态
|
||||
this.updateCloseStatus(order.getBillId(), RechargeCloseStatus.FAIL, e.getMessage());
|
||||
return EndUseVO.toResult(result, false, e.getMessage());
|
||||
return update;
|
||||
});
|
||||
} catch (Exception e) {
|
||||
log.warn("设备归零失败: {}", e.getMessage());
|
||||
// 记录设备关闭状态
|
||||
this.updateCloseStatus(order.getBillId(), RechargeCloseStatus.FAIL, e.getMessage());
|
||||
return EndUseVO.toResult(result, false, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
return EndUseVO.toResult(result, true, null);
|
||||
|
|
Loading…
Reference in New Issue
Block a user