2 Commits d7a9d44ce1 ... 483316b01a

Author SHA1 Message Date
  Lgx 483316b01a Merge branch 'master' of http://192.168.20.122:3000/root/MemberCenter_DW.git 4 years ago
  Lgx cb85c9c35a 详情定价 4 years ago

+ 8 - 2
member-weixin-service/src/main/java/com/liangjian/dataplatform/member/service/impl/UserIngOrdersService.java

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