|
|
|
@@ -101,10 +101,20 @@ public class CreditUtil { |
|
|
|
log.info("积分倍率计算:未设置生日或生日条件未匹配={}", wxCUserBasicInfo.getScoreDate()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
//发过生日券的用户或者享受过生日积分倍率的用户 |
|
|
|
if (Objects.nonNull(wxCUserBasicInfo.getScoreDate()) && DateUtils.birthdaysBetween(wxCUserBasicInfo.getScoreDate()) == 0) { |
|
|
|
birthdayScale = getBirthdayScoreScale(tenantId, wxScoreRulesService); |
|
|
|
if(Objects.nonNull(wxCUserBasicInfo.getScoreDate())){ |
|
|
|
int scoreYear = DateUtils.getYear(wxCUserBasicInfo.getScoreDate()); |
|
|
|
int year = DateUtils.getYear(new Date()); |
|
|
|
if(scoreYear == year && DateUtils.birthdaysBetween(wxCUserBasicInfo.getScoreDate()) == 0){ |
|
|
|
birthdayScale = getBirthdayScoreScale(tenantId, wxScoreRulesService); |
|
|
|
}else{ |
|
|
|
if (Objects.nonNull(wxCUserBasicInfo.getBirthdate()) && DateUtils.birthdaysBetween(wxCUserBasicInfo.getBirthdate()) == 0) { |
|
|
|
birthdayScale = getBirthdayScoreScale(tenantId,wxScoreRulesService); |
|
|
|
} else { |
|
|
|
log.info("积分倍率计算:未设置生日或生日条件未匹配={}", wxCUserBasicInfo.getScoreDate()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//配置了生日积分倍率,保存到上下文 |
|
|
|
|