等级晋升条件可配置

master
胡锐 3 weeks ago
parent 758705b08d
commit 1c4a9c573d
  1. 12
      service/src/main/java/com/hfkj/service/user/impl/BsUserGradeServiceImpl.java

@ -112,7 +112,7 @@ public class BsUserGradeServiceImpl implements BsUserGradeService {
@Override @Override
public Map<String, Object> promoteGrade2Progress(Long userId) { public Map<String, Object> promoteGrade2Progress(Long userId) {
// 获取配置 // 获取配置
BsUserGradeConfig config = userGradeConfigService.getConfig(UserGradeEnum.grade2); BsUserGradeConfig config = userGradeConfigService.getConfig(UserGradeEnum.grade1);
Map<String,Object> map = new LinkedHashMap<>(); Map<String,Object> map = new LinkedHashMap<>();
map.put("conditionTarget1", config.getPromotionConditions1()); map.put("conditionTarget1", config.getPromotionConditions1());
map.put("conditionTarget2", config.getPromotionConditions2()); map.put("conditionTarget2", config.getPromotionConditions2());
@ -136,7 +136,7 @@ public class BsUserGradeServiceImpl implements BsUserGradeService {
@Override @Override
public Map<String, Object> promoteGrade3Progress(Long userId) { public Map<String, Object> promoteGrade3Progress(Long userId) {
// 获取配置 // 获取配置
BsUserGradeConfig config = userGradeConfigService.getConfig(UserGradeEnum.grade3); BsUserGradeConfig config = userGradeConfigService.getConfig(UserGradeEnum.grade2);
Map<String,Object> map = new LinkedHashMap<>(); Map<String,Object> map = new LinkedHashMap<>();
map.put("conditionTarget1", config.getPromotionConditions1()); map.put("conditionTarget1", config.getPromotionConditions1());
map.put("conditionTarget2", config.getPromotionConditions2()); map.put("conditionTarget2", config.getPromotionConditions2());
@ -162,7 +162,7 @@ public class BsUserGradeServiceImpl implements BsUserGradeService {
@Override @Override
public Map<String, Object> promoteGrade4Progress(Long userId) { public Map<String, Object> promoteGrade4Progress(Long userId) {
// 获取配置 // 获取配置
BsUserGradeConfig config = userGradeConfigService.getConfig(UserGradeEnum.grade4); BsUserGradeConfig config = userGradeConfigService.getConfig(UserGradeEnum.grade3);
Map<String,Object> map = new LinkedHashMap<>(); Map<String,Object> map = new LinkedHashMap<>();
map.put("conditionTarget1", config.getPromotionConditions1()); map.put("conditionTarget1", config.getPromotionConditions1());
map.put("conditionTarget2", config.getPromotionConditions2()); map.put("conditionTarget2", config.getPromotionConditions2());
@ -197,7 +197,7 @@ public class BsUserGradeServiceImpl implements BsUserGradeService {
boolean profitCondition = false; boolean profitCondition = false;
// 获取等级晋升配置 // 获取等级晋升配置
BsUserGradeConfig config = userGradeConfigService.getConfig(UserGradeEnum.grade2); BsUserGradeConfig config = userGradeConfigService.getConfig(UserGradeEnum.grade1);
// 完成进度 // 完成进度
Map<String, Object> map = promoteGrade2Progress(user.getId()); Map<String, Object> map = promoteGrade2Progress(user.getId());
@ -227,7 +227,7 @@ public class BsUserGradeServiceImpl implements BsUserGradeService {
boolean profitCondition = false; // 元宝收益 boolean profitCondition = false; // 元宝收益
// 获取等级晋升配置 // 获取等级晋升配置
BsUserGradeConfig config = userGradeConfigService.getConfig(UserGradeEnum.grade3); BsUserGradeConfig config = userGradeConfigService.getConfig(UserGradeEnum.grade2);
// 完成进度 // 完成进度
Map<String, Object> map = promoteGrade3Progress(user.getId()); Map<String, Object> map = promoteGrade3Progress(user.getId());
@ -260,7 +260,7 @@ public class BsUserGradeServiceImpl implements BsUserGradeService {
boolean profitCondition = false; // 元宝收益 boolean profitCondition = false; // 元宝收益
// 获取等级晋升配置 // 获取等级晋升配置
BsUserGradeConfig config = userGradeConfigService.getConfig(UserGradeEnum.grade4); BsUserGradeConfig config = userGradeConfigService.getConfig(UserGradeEnum.grade3);
// 完成进度 // 完成进度
Map<String, Object> map = promoteGrade3Progress(user.getId()); Map<String, Object> map = promoteGrade3Progress(user.getId());

Loading…
Cancel
Save