|
|
|
@@ -95,7 +95,7 @@ public class CreditUtil { |
|
|
|
//没有发过生日券的用户或者没有享受过生日积分倍率的用户 |
|
|
|
if(Objects.isNull(wxCUserBasicInfo.getScoreDate())) { |
|
|
|
//设置过生日的用户 |
|
|
|
if (Objects.nonNull(wxCUserBasicInfo.getBirthdate()) && DateUtils.birthdaysBetween(wxCUserBasicInfo.getBirthdate()) == 0) { |
|
|
|
if (Objects.nonNull(wxCUserBasicInfo.getBirthdate()) && DateUtils.isBirthdays(wxCUserBasicInfo.getBirthdate())) { |
|
|
|
birthdayScale = getBirthdayScoreScale(tenantId,wxScoreRulesService); |
|
|
|
} else { |
|
|
|
log.info("积分倍率计算:未设置生日或生日条件未匹配={}", wxCUserBasicInfo.getScoreDate()); |
|
|
|
@@ -104,10 +104,10 @@ public class CreditUtil { |
|
|
|
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){ |
|
|
|
if(scoreYear == year && DateUtils.isBirthdays(wxCUserBasicInfo.getScoreDate())){ |
|
|
|
birthdayScale = getBirthdayScoreScale(tenantId, wxScoreRulesService); |
|
|
|
}else{ |
|
|
|
if (Objects.nonNull(wxCUserBasicInfo.getBirthdate()) && DateUtils.birthdaysBetween(wxCUserBasicInfo.getBirthdate()) == 0) { |
|
|
|
if (Objects.nonNull(wxCUserBasicInfo.getBirthdate()) && DateUtils.isBirthdays(wxCUserBasicInfo.getBirthdate())) { |
|
|
|
birthdayScale = getBirthdayScoreScale(tenantId,wxScoreRulesService); |
|
|
|
} else { |
|
|
|
log.info("积分倍率计算:未设置生日或生日条件未匹配={}", wxCUserBasicInfo.getScoreDate()); |
|
|
|
@@ -197,14 +197,18 @@ public class CreditUtil { |
|
|
|
if(cycleStart.contains("-") && cycleEnd.contains("-")){ |
|
|
|
String[] cycleStarts = cycleStart.split("-"); |
|
|
|
String[] cycleEnds = cycleEnd.split("-"); |
|
|
|
int monthStart = Integer.parseInt(cycleStarts[0]); |
|
|
|
int monthEnd = Integer.parseInt(cycleEnds[0]); |
|
|
|
int monthStart = Integer.parseInt(cycleStarts[1]); |
|
|
|
int monthEnd = Integer.parseInt(cycleEnds[1]); |
|
|
|
if(month >= monthStart && month <= monthEnd){ |
|
|
|
int dayStart = Integer.parseInt(cycleStarts[1]); |
|
|
|
int dayEnd = Integer.parseInt(cycleEnds[1]); |
|
|
|
if(monthDay >= dayStart && monthDay <= dayEnd){ |
|
|
|
memberDayScale = cycleScale; |
|
|
|
int dayStart = Integer.parseInt(cycleStarts[2]); |
|
|
|
int dayEnd = Integer.parseInt(cycleEnds[2]); |
|
|
|
if(month == monthStart && monthDay < dayStart){ |
|
|
|
break; |
|
|
|
} |
|
|
|
if(month == monthEnd && monthDay > dayEnd){ |
|
|
|
break; |
|
|
|
} |
|
|
|
memberDayScale = cycleScale; |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (NumberFormatException e) { |
|
|
|
|