|
@@ -98,12 +98,18 @@ public class UserIngOrdersService implements IUserIngOrdersService {
|
|
|
}
|
|
|
//全部等级
|
|
|
List<UserLevelUnit> userLevelUnits=userLevelUnitRepository.findAll();
|
|
|
- for(UserLevelUnit userLevel : userLevelUnits){
|
|
|
+ for(int i=0;i<userLevelUnits.size();i++){
|
|
|
+ UserLevelUnit userLevel = userLevelUnits.get(i);
|
|
|
if(ingValue>=userLevel.getGrowthFrom() && ingValue<=userLevel.getGrowthTo()){
|
|
|
level=userLevel.getId();
|
|
|
break;
|
|
|
}else if(ingValue>0){
|
|
|
- level=userLevel.getId();
|
|
|
+ if(ingValue>0&&ingValue<userLevelUnits.get(i).getGrowthFrom()){
|
|
|
+ level=userLevelUnits.get(i-1).getId();
|
|
|
+ break;
|
|
|
+ }else {
|
|
|
+ level = userLevel.getId();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|