|
|
@ -18,7 +18,7 @@ public class MemberUtil { |
|
|
|
CerePlatformMemberLevelService service = SpringUtil.getBean(CerePlatformMemberLevelService.class); |
|
|
|
if (cereBuyerUser.getMemberLevelId() != null) { |
|
|
|
CerePlatformMemberLevel level = service.selectByMemberLevelId(cereBuyerUser.getMemberLevelId()); |
|
|
|
CerePlatformMemberLevel nextLevel = service.selectNextLevel(cereBuyerUser.getMemberLevelId()); |
|
|
|
CerePlatformMemberLevel nextLevel = service.selectNextLevel(Long.valueOf(cereBuyerUser.getProject()), cereBuyerUser.getMemberLevelId()); |
|
|
|
if (level != null) { |
|
|
|
cereBuyerUser.setMemberLevelName(level.getMemberLevelName()); |
|
|
|
} |
|
|
@ -27,13 +27,13 @@ public class MemberUtil { |
|
|
|
cereBuyerUser.setNextLevelName(nextLevel.getMemberLevelName()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
CerePlatformMemberLevel level = service.selectFirstLevel(); |
|
|
|
CerePlatformMemberLevel level = service.selectFirstLevel(Long.valueOf(cereBuyerUser.getProject())); |
|
|
|
if (level != null) { |
|
|
|
cereBuyerUser.setMemberLevelId(level.getMemberLevelId()); |
|
|
|
cereBuyerUser.setMemberLevelName(level.getMemberLevelName()); |
|
|
|
cereBuyerUser.setGrowth(0); |
|
|
|
|
|
|
|
CerePlatformMemberLevel nextLevel = service.selectNextLevel(cereBuyerUser.getMemberLevelId()); |
|
|
|
CerePlatformMemberLevel nextLevel = service.selectNextLevel(Long.valueOf(cereBuyerUser.getProject()), cereBuyerUser.getMemberLevelId()); |
|
|
|
if (nextLevel != null) { |
|
|
|
cereBuyerUser.setNextLevelGrowth(nextLevel.getGrowth()); |
|
|
|
cereBuyerUser.setNextLevelName(nextLevel.getMemberLevelName()); |
|
|
@ -48,7 +48,7 @@ public class MemberUtil { |
|
|
|
CerePlatformMemberLevelService service = SpringUtil.getBean(CerePlatformMemberLevelService.class); |
|
|
|
if (buyerUser.getMemberLevelId() != null) { |
|
|
|
CerePlatformMemberLevel level = service.selectByMemberLevelId(buyerUser.getMemberLevelId()); |
|
|
|
CerePlatformMemberLevel nextLevel = service.selectNextLevel(buyerUser.getMemberLevelId()); |
|
|
|
CerePlatformMemberLevel nextLevel = service.selectNextLevel(Long.valueOf(ContextUtil.getProject()), buyerUser.getMemberLevelId()); |
|
|
|
if (level != null) { |
|
|
|
buyerUser.setMemberLevelName(level.getMemberLevelName()); |
|
|
|
} |
|
|
@ -57,13 +57,13 @@ public class MemberUtil { |
|
|
|
buyerUser.setNextLevelName(nextLevel.getMemberLevelName()); |
|
|
|
} |
|
|
|
} else { |
|
|
|
CerePlatformMemberLevel level = service.selectFirstLevel(); |
|
|
|
CerePlatformMemberLevel level = service.selectFirstLevel(Long.valueOf(ContextUtil.getProject())); |
|
|
|
if (level != null) { |
|
|
|
buyerUser.setMemberLevelId(level.getMemberLevelId()); |
|
|
|
buyerUser.setMemberLevelName(level.getMemberLevelName()); |
|
|
|
buyerUser.setGrowth(0); |
|
|
|
|
|
|
|
CerePlatformMemberLevel nextLevel = service.selectNextLevel(buyerUser.getMemberLevelId()); |
|
|
|
CerePlatformMemberLevel nextLevel = service.selectNextLevel(Long.valueOf(ContextUtil.getProject()), buyerUser.getMemberLevelId()); |
|
|
|
if (nextLevel != null) { |
|
|
|
buyerUser.setNextLevelGrowth(nextLevel.getGrowth()); |
|
|
|
buyerUser.setNextLevelName(nextLevel.getMemberLevelName()); |
|
|
@ -84,7 +84,7 @@ public class MemberUtil { |
|
|
|
} |
|
|
|
CerePlatformMemberLevelService service = SpringUtil.getBean(CerePlatformMemberLevelService.class); |
|
|
|
if (cereBuyerUser.getMemberLevelId() == null) { |
|
|
|
CerePlatformMemberLevel firstLevel = service.selectFirstLevel(); |
|
|
|
CerePlatformMemberLevel firstLevel = service.selectFirstLevel(Long.valueOf(cereBuyerUser.getProject())); |
|
|
|
if (firstLevel == null) { |
|
|
|
cereBuyerUser.setMemberLevelId(0L); |
|
|
|
cereBuyerUser.setGrowth(growth); |
|
|
@ -94,7 +94,7 @@ public class MemberUtil { |
|
|
|
} |
|
|
|
} |
|
|
|
if (cereBuyerUser.getMemberLevelId() != null) { |
|
|
|
CerePlatformMemberLevel nextLevel = service.selectNextLevel(cereBuyerUser.getMemberLevelId()); |
|
|
|
CerePlatformMemberLevel nextLevel = service.selectNextLevel(Long.valueOf(cereBuyerUser.getProject()), cereBuyerUser.getMemberLevelId()); |
|
|
|
cereBuyerUser.setGrowth(cereBuyerUser.getGrowth() + growth); |
|
|
|
//当前用户的成长值,达到了下一个级别的成长值 |
|
|
|
if (nextLevel != null && cereBuyerUser.getGrowth() >= nextLevel.getGrowth()) { |
|
|
|