|
|
|
@@ -147,6 +147,10 @@ public class CreditUtil { |
|
|
|
|
|
|
|
WxScoreRules rules = wxScoreRulesService.getCreditDoubleRules(tenantId); |
|
|
|
if (Objects.nonNull(rules) && Objects.nonNull(rules.getRules())) { |
|
|
|
Date date = new Date(); |
|
|
|
int weekDay = DateUtils.getWeekOfDate(date); |
|
|
|
int monthDay = DateUtils.getMonthOfDate(date); |
|
|
|
int month = DateUtils.getMonth(date); |
|
|
|
//会员日积分规则 |
|
|
|
List<JSONObject> ruleList = JSONObject.parseArray(rules.getRules(), JSONObject.class); |
|
|
|
for (JSONObject rule:ruleList) { |
|
|
|
@@ -162,7 +166,6 @@ public class CreditUtil { |
|
|
|
try { |
|
|
|
int start = Integer.parseInt(cycleStart); |
|
|
|
int end = Integer.parseInt(cycleEnd); |
|
|
|
int weekDay = DateUtils.getWeekOfDate(new Date()); |
|
|
|
if(weekDay >= start && weekDay <=end){ |
|
|
|
memberDayScale = cycleScale; |
|
|
|
} |
|
|
|
@@ -173,7 +176,6 @@ public class CreditUtil { |
|
|
|
try { |
|
|
|
int start = Integer.parseInt(cycleStart); |
|
|
|
int end = Integer.parseInt(cycleEnd); |
|
|
|
int monthDay = DateUtils.getMonthOfDate(new Date()); |
|
|
|
if(monthDay >= start && monthDay <=end){ |
|
|
|
memberDayScale = cycleScale; |
|
|
|
} |
|
|
|
@@ -185,11 +187,9 @@ public class CreditUtil { |
|
|
|
if(cycleStart.contains("-") && cycleEnd.contains("-")){ |
|
|
|
String[] cycleStarts = cycleStart.split("-"); |
|
|
|
String[] cycleEnds = cycleEnd.split("-"); |
|
|
|
int month = DateUtils.getMonth(new Date()); |
|
|
|
int monthStart = Integer.parseInt(cycleStarts[0]); |
|
|
|
int monthEnd = Integer.parseInt(cycleEnds[0]); |
|
|
|
if(month >= monthStart && month <= monthEnd){ |
|
|
|
int monthDay = DateUtils.getMonthOfDate(new Date()); |
|
|
|
int dayStart = Integer.parseInt(cycleStarts[1]); |
|
|
|
int dayEnd = Integer.parseInt(cycleEnds[1]); |
|
|
|
if(monthDay >= dayStart && monthDay <= dayEnd){ |
|
|
|
|