Procházet zdrojové kódy

//会员日倍率

release_toaliyun_real
xhxu před 3 roky
rodič
revize
425696383d
2 změnil soubory, kde provedl 9 přidání a 7 odebrání
  1. +2
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java
  2. +7
    -6
      mallinkService/src/main/java/com/iformall/utils/CreditUtil.java

+ 2
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxCreditHistoryServiceImpl.java Zobrazit soubor

@@ -601,7 +601,8 @@ public class WxCreditHistoryServiceImpl implements WxCreditHistoryService {
int creditChangeNum = creditChangeNumOrigin ; int creditChangeNum = creditChangeNumOrigin ;
//是否参与了生日积分倍率 //是否参与了生日积分倍率
boolean hasBirthDateCredit = false; 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 { try {
creditChangeNum = CreditUtil.calUserCredit(creditChangeNumOrigin, wxCUserBasicInfo, tenantId, wxScoreRulesService,wxLevelConfigMapper); creditChangeNum = CreditUtil.calUserCredit(creditChangeNumOrigin, wxCUserBasicInfo, tenantId, wxScoreRulesService,wxLevelConfigMapper);


+ 7
- 6
mallinkService/src/main/java/com/iformall/utils/CreditUtil.java Zobrazit soubor

@@ -171,7 +171,7 @@ public class CreditUtil {
String cycleEnd = rule.getString(WxScoreRules.CYCLE_END); String cycleEnd = rule.getString(WxScoreRules.CYCLE_END);
Integer cycleScale = rule.getInteger(WxScoreRules.CYCLE_SCALE); Integer cycleScale = rule.getInteger(WxScoreRules.CYCLE_SCALE);
if(cycle == null || StringUtils.isBlank(cycleStart) || StringUtils.isBlank(cycleEnd) || cycleScale == null){ if(cycle == null || StringUtils.isBlank(cycleStart) || StringUtils.isBlank(cycleEnd) || cycleScale == null){
break;
continue;
} }
if(cycleScale > memberDayScale){ if(cycleScale > memberDayScale){
if(cycle.equals(EnumScoreScaleRules.WEEK.getCode())){ if(cycle.equals(EnumScoreScaleRules.WEEK.getCode())){
@@ -182,7 +182,7 @@ public class CreditUtil {
memberDayScale = cycleScale; memberDayScale = cycleScale;
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
break;
continue;
} }
}else if(cycle.equals(EnumScoreScaleRules.MONTH.getCode())){ }else if(cycle.equals(EnumScoreScaleRules.MONTH.getCode())){
try { try {
@@ -192,7 +192,7 @@ public class CreditUtil {
memberDayScale = cycleScale; memberDayScale = cycleScale;
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
break;
continue;
} }
}else if(cycle.equals(EnumScoreScaleRules.YEAR.getCode())){ }else if(cycle.equals(EnumScoreScaleRules.YEAR.getCode())){
try { try {
@@ -205,16 +205,16 @@ public class CreditUtil {
int dayStart = Integer.parseInt(cycleStarts[2]); int dayStart = Integer.parseInt(cycleStarts[2]);
int dayEnd = Integer.parseInt(cycleEnds[2]); int dayEnd = Integer.parseInt(cycleEnds[2]);
if(month == monthStart && monthDay < dayStart){ if(month == monthStart && monthDay < dayStart){
break;
continue;
} }
if(month == monthEnd && monthDay > dayEnd){ if(month == monthEnd && monthDay > dayEnd){
break;
continue;
} }
memberDayScale = cycleScale; memberDayScale = cycleScale;
} }
} }
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
break;
continue;
} }
} }
} }
@@ -235,4 +235,5 @@ public class CreditUtil {
public static void clear() { public static void clear() {
CreditUtil.isBirthDayScale.remove(); CreditUtil.isBirthDayScale.remove();
} }

} }

Načítá se…
Zrušit
Uložit