培训班报名湖粉身份添加1-5星湖粉

This commit is contained in:
wuchunlei
2025-10-23 14:32:24 +08:00
parent 1da3707e64
commit b2d94d500a
2 changed files with 49 additions and 9 deletions

View File

@@ -60,10 +60,19 @@ public class TrainingClass {
//svip费用
private BigDecimal svipFee;
//星湖粉费用(90湖分以上
//星湖粉费用(30湖分
private BigDecimal oneHuFee;
//二星湖粉费用60
private BigDecimal twoHuFee;
//三星湖粉费用90
private BigDecimal threeHuFee;
//星湖粉费用150湖分以上
//星湖粉费用120
private BigDecimal fourHuFee;
//五星湖粉及以上150
private BigDecimal fiveHuFee;
//学生费用

View File

@@ -76,11 +76,36 @@ public class TrainingClassServiceImpl extends ServiceImpl<TrainingClassDao, Trai
}
}
}
if (trainingClass.getThreeHuFee().compareTo(BigDecimal.ZERO)>0){
Map<String,Object> map = null;
if (trainingClass.getOneHuFee().compareTo(BigDecimal.ZERO)>0||trainingClass.getTwoHuFee().compareTo(BigDecimal.ZERO)>0||
trainingClass.getThreeHuFee().compareTo(BigDecimal.ZERO)>0||trainingClass.getFourHuFee().compareTo(BigDecimal.ZERO)>0||
trainingClass.getFiveHuFee().compareTo(BigDecimal.ZERO)>0) {
MPJLambdaWrapper<UserContribution> wrapper = new MPJLambdaWrapper();
wrapper.eq(UserContribution::getUserId,userId);
wrapper.selectSum(UserContribution::getScore);
Map<String,Object> map = userContributionService.getMap(wrapper);
map = userContributionService.getMap(wrapper);
}
if (trainingClass.getOneHuFee().compareTo(BigDecimal.ZERO)>0){
if (map != null&&map.containsKey("score")){
if (new BigDecimal(map.get("score").toString()).compareTo(new BigDecimal(30))>=0){
if (fee.compareTo(trainingClass.getOneHuFee())>=0){
fee = trainingClass.getOneHuFee();
identity = "一星湖粉";
}
}
}
}
if (trainingClass.getTwoHuFee().compareTo(BigDecimal.ZERO)>0){
if (map != null&&map.containsKey("score")){
if (new BigDecimal(map.get("score").toString()).compareTo(new BigDecimal(60))>=0){
if (fee.compareTo(trainingClass.getTwoHuFee())>=0){
fee = trainingClass.getTwoHuFee();
identity = "二星湖粉";
}
}
}
}
if (trainingClass.getThreeHuFee().compareTo(BigDecimal.ZERO)>0){
if (map != null&&map.containsKey("score")){
if (new BigDecimal(map.get("score").toString()).compareTo(new BigDecimal(90))>=0){
if (fee.compareTo(trainingClass.getThreeHuFee())>=0){
@@ -90,16 +115,22 @@ public class TrainingClassServiceImpl extends ServiceImpl<TrainingClassDao, Trai
}
}
}
if (trainingClass.getFourHuFee().compareTo(BigDecimal.ZERO)>0){
if (map != null&&map.containsKey("score")){
if (new BigDecimal(map.get("score").toString()).compareTo(new BigDecimal(120))>=0){
if (fee.compareTo(trainingClass.getFourHuFee())>=0){
fee = trainingClass.getFourHuFee();
identity = "四星湖粉";
}
}
}
}
if (trainingClass.getFiveHuFee().compareTo(BigDecimal.ZERO)>0){
MPJLambdaWrapper<UserContribution> wrapper = new MPJLambdaWrapper();
wrapper.eq(UserContribution::getUserId,userId);
wrapper.selectSum(UserContribution::getScore);
Map<String,Object> map = userContributionService.getMap(wrapper);
if (map != null&&map.containsKey("score")){
if (new BigDecimal(map.get("score").toString()).compareTo(new BigDecimal(150))>=0){
if (fee.compareTo(trainingClass.getFiveHuFee())>=0){
fee = trainingClass.getFiveHuFee();
identity = "五星湖粉";
identity = "五星湖粉及以上";
}
}
}