From 425696383de98c0beb29e79220f6bd86386c7215 Mon Sep 17 00:00:00 2001 From: xhxu Date: Mon, 7 Nov 2022 18:54:11 +0800 Subject: [PATCH] =?UTF-8?q?//=E4=BC=9A=E5=91=98=E6=97=A5=E5=80=8D=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxCreditHistoryServiceImpl.java | 3 ++- .../main/java/com/iformall/utils/CreditUtil.java | 13 +++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java index 5e30dc9e6..970486154 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java @@ -601,7 +601,8 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService { int creditChangeNum = creditChangeNumOrigin ; //是否参与了生日积分倍率 boolean hasBirthDateCredit = false; - if (record.getCreditType().equals(EnumScoreType.CONSUMPTION.getCode()) || record.getCreditType().equals(EnumScoreType.SPEND_CREDIT.getCode())) { + if (record.getCreditType().equals(EnumScoreType.CONSUMPTION.getCode()) + || record.getCreditType().equals(EnumScoreType.SPEND_CREDIT.getCode())) { //等级积分配置 try { creditChangeNum = CreditUtil.calUserCredit(creditChangeNumOrigin, wxCUserBasicInfo, tenantId, wxScoreRulesService,wxLevelConfigMapper); diff --git a/mallinkService/src/main/java/com/iformall/utils/CreditUtil.java b/mallinkService/src/main/java/com/iformall/utils/CreditUtil.java index 5079a9f84..337fe3f8f 100644 --- a/mallinkService/src/main/java/com/iformall/utils/CreditUtil.java +++ b/mallinkService/src/main/java/com/iformall/utils/CreditUtil.java @@ -171,7 +171,7 @@ public class CreditUtil { String cycleEnd = rule.getString(WxScoreRules.CYCLE_END); Integer cycleScale = rule.getInteger(WxScoreRules.CYCLE_SCALE); if(cycle == null || StringUtils.isBlank(cycleStart) || StringUtils.isBlank(cycleEnd) || cycleScale == null){ - break; + continue; } if(cycleScale > memberDayScale){ if(cycle.equals(EnumScoreScaleRules.WEEK.getCode())){ @@ -182,7 +182,7 @@ public class CreditUtil { memberDayScale = cycleScale; } } catch (NumberFormatException e) { - break; + continue; } }else if(cycle.equals(EnumScoreScaleRules.MONTH.getCode())){ try { @@ -192,7 +192,7 @@ public class CreditUtil { memberDayScale = cycleScale; } } catch (NumberFormatException e) { - break; + continue; } }else if(cycle.equals(EnumScoreScaleRules.YEAR.getCode())){ try { @@ -205,16 +205,16 @@ public class CreditUtil { int dayStart = Integer.parseInt(cycleStarts[2]); int dayEnd = Integer.parseInt(cycleEnds[2]); if(month == monthStart && monthDay < dayStart){ - break; + continue; } if(month == monthEnd && monthDay > dayEnd){ - break; + continue; } memberDayScale = cycleScale; } } } catch (NumberFormatException e) { - break; + continue; } } } @@ -235,4 +235,5 @@ public class CreditUtil { public static void clear() { CreditUtil.isBirthDayScale.remove(); } + }