Merge remote-tracking branch 'origin/deploy' into dev

This commit is contained in:
磷叶 2025-02-21 10:21:06 +08:00
commit 3ad99b1140
2 changed files with 3 additions and 1 deletions

View File

@ -1066,6 +1066,7 @@ public class DeviceServiceImpl implements DeviceService
data.setOnlineStatus1(device.getOnlineStatus1());
data.setOnlineStatus2(device.getOnlineStatus2());
data.setLastOnlineTime(device.getLastOnlineTime());
data.setVersion(device.getVersion());
return deviceMapper.updateSmDevice(data);
}

View File

@ -261,7 +261,8 @@ public class UserServiceImpl implements UserService
// 查询用户余额
BigDecimal balance = smUserMapper.selectBalanceForUpdate(userId);
ServiceUtil.assertion(balance == null || balance.compareTo(amount) < 0, "减少ID为%s的用户余额%s元失败请重试", userId, amount);
ServiceUtil.assertion(balance == null, "减少ID为%s的用户余额%s元失败请重试", userId, amount);
ServiceUtil.assertion( check && balance.compareTo(amount) < 0 , "减少ID为%s的用户余额%s元失败请重试", userId, amount);
// 更新用户余额
int update = smUserMapper.subtractBalance(userId, amount, check);