Просмотр исходного кода

//会员日倍率

release_toaliyun_real
xhxu 3 лет назад
Родитель
Сommit
425696383d
2 измененных файлов: 9 добавлений и 7 удалений
  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 Просмотреть файл

@@ -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);


+ 7
- 6
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();
}

}

Загрузка…
Отмена
Сохранить