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