Commit 9f3e916f authored by zhangfeng's avatar zhangfeng

积分规则触发

parent cfbe3b54
...@@ -147,9 +147,9 @@ public class OrderVStrategy extends AbstractScoreRuleStrategy { ...@@ -147,9 +147,9 @@ public class OrderVStrategy extends AbstractScoreRuleStrategy {
} }
} }
// 校验累计最高分 // 校验累计最高分
// TODO:MaxScoreTotal为0时为不限制积分 // maxScoreTotal为0时为不限制积分
Integer userScoreTotalCount = getUserScoreTotalCount(scoreRuleDO.getId(), userId); Integer userScoreTotalCount = getUserScoreTotalCount(scoreRuleDO.getId(), userId);
if (userScoreTotalCount >= scoreRuleDO.getMaxScoreTotal()) { if (scoreRuleDO.getMaxScoreTotal() > 0 && userScoreTotalCount >= scoreRuleDO.getMaxScoreTotal()) {
log.info("Order in shipping listener: The user has reached the maximum score,userId:{},scoreRuleId:{}", userId, scoreRuleDO.getId()); log.info("Order in shipping listener: The user has reached the maximum score,userId:{},scoreRuleId:{}", userId, scoreRuleDO.getId());
return; return;
} }
......
...@@ -49,7 +49,7 @@ public class RecommendStrategy extends AbstractScoreRuleStrategy { ...@@ -49,7 +49,7 @@ public class RecommendStrategy extends AbstractScoreRuleStrategy {
} }
// 校验累计最高分 // 校验累计最高分
Integer userScoreTotalCount = getUserScoreTotalCount(scoreRuleDO.getId(), userId); Integer userScoreTotalCount = getUserScoreTotalCount(scoreRuleDO.getId(), userId);
if (userScoreTotalCount >= scoreRuleDO.getMaxScoreTotal()) { if (scoreRuleDO.getMaxScoreTotal() > 0 && userScoreTotalCount >= scoreRuleDO.getMaxScoreTotal()) {
log.info("Recommend listener: The user has reached the maximum score,userId:{},scoreRuleId:{}", userId, scoreRuleDO.getId()); log.info("Recommend listener: The user has reached the maximum score,userId:{},scoreRuleId:{}", userId, scoreRuleDO.getId());
return; return;
} }
......
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