|
|
|
@@ -36,7 +36,20 @@ public class CreditUtil { |
|
|
|
.divide(new BigDecimal(WxScoreRules.DEFAULT_SCALE)) |
|
|
|
.divide(new BigDecimal(WxLevelConfig.DEFAULT_SCALE) |
|
|
|
, BigDecimal.ROUND_HALF_UP).intValue(); |
|
|
|
log.info("积分倍率计算, 用户:{},成长值:{},等级积分倍率:{},生日积分倍率:{},原积分:{},新积分:{}", wxCUser.getId(), wxCUser.getScore(), levelScale, birthdayScale, creditOrigin, creditNew); |
|
|
|
Long userId = null; |
|
|
|
Integer score = null; |
|
|
|
if (Objects.nonNull(wxCUser)) { |
|
|
|
userId = wxCUser.getId(); |
|
|
|
score = wxCUser.getScore(); |
|
|
|
} |
|
|
|
if (Objects.isNull(userId)) { |
|
|
|
userId = wxCUserBasicInfo.getId(); |
|
|
|
} |
|
|
|
|
|
|
|
if (Objects.isNull(score)) { |
|
|
|
score = wxCUserBasicInfo.getPoins(); |
|
|
|
} |
|
|
|
log.info("积分倍率计算, 用户:{},成长值:{},等级积分倍率:{},生日积分倍率:{},原积分:{},新积分:{}", userId, score, levelScale, birthdayScale, creditOrigin, creditNew); |
|
|
|
return creditNew; |
|
|
|
} |
|
|
|
|
|
|
|
|