Commit 3929dbc1 authored by liming's avatar liming

关于卡路里计算bug

parent 03b008c4
...@@ -147,6 +147,9 @@ public class SportUserTrainingLogService { ...@@ -147,6 +147,9 @@ public class SportUserTrainingLogService {
} }
Integer coefficient = baseRule.get(0).getCoefficient(); Integer coefficient = baseRule.get(0).getCoefficient();
Integer currency = calorie / coefficient; Integer currency = calorie / coefficient;
if(currency == 0) {
return;
}
SportUserGameCurrencyMatchRule matchRule = SportUserGameCurrencyMatchRule matchRule =
sportUserGameCurrencyMatchRuleMapper.selectOne(new QueryWrapper<SportUserGameCurrencyMatchRule>().lambda().eq(SportUserGameCurrencyMatchRule::getGameMode, gameMode).le(SportUserGameCurrencyMatchRule::getRankStart, rank).ge(SportUserGameCurrencyMatchRule::getRankEnd, rank)); sportUserGameCurrencyMatchRuleMapper.selectOne(new QueryWrapper<SportUserGameCurrencyMatchRule>().lambda().eq(SportUserGameCurrencyMatchRule::getGameMode, gameMode).le(SportUserGameCurrencyMatchRule::getRankStart, rank).ge(SportUserGameCurrencyMatchRule::getRankEnd, rank));
if (matchRule != null && matchRule.getRate() != null) { if (matchRule != null && matchRule.getRate() != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment