libo 4 vuotta sitten
vanhempi
commit
2dbcfcf0c2

+ 8 - 8
src/main/java/com/tdba/cxb/ares/api/service/UserService.java

@@ -279,11 +279,11 @@ public class UserService {
279
 
279
 
280
         List<Integer> resultList = new ArrayList<>();
280
         List<Integer> resultList = new ArrayList<>();
281
         for(UserDto row : list){
281
         for(UserDto row : list){
282
-            if(userDto.getUid() == row.getUid()){
282
+            if(userDto.getUid().equals(row.getUid())){
283
                 continue;
283
                 continue;
284
             }
284
             }
285
-            if(row.getSpread_uid() == userDto.getUid()){
286
-                if(row.getUid() == userDto.getSpread_uid()){
285
+            if(row.getSpread_uid().equals(userDto.getUid())){
286
+                if(row.getUid().equals(userDto.getSpread_uid())){
287
                     logger.error("循环嵌套 row.getSpread_uid() = {}, userDto.getUid() = {}", row.getSpread_uid(), userDto.getSpread_uid());
287
                     logger.error("循环嵌套 row.getSpread_uid() = {}, userDto.getUid() = {}", row.getSpread_uid(), userDto.getSpread_uid());
288
                     throw new TDBAException("循环嵌套");
288
                     throw new TDBAException("循环嵌套");
289
                 }
289
                 }
@@ -302,11 +302,11 @@ public class UserService {
302
 
302
 
303
         Integer result = 0;
303
         Integer result = 0;
304
         for(UserDto row : list){
304
         for(UserDto row : list){
305
-            if(userDto.getUid() == row.getUid()){
305
+            if(userDto.getUid().equals(row.getUid())){
306
                 continue;
306
                 continue;
307
             }
307
             }
308
-            if(row.getSpread_uid() == userDto.getUid()){
309
-                if(row.getUid() == userDto.getSpread_uid()){
308
+            if(row.getSpread_uid().equals(userDto.getUid())){
309
+                if(row.getUid().equals(userDto.getSpread_uid())){
310
                     logger.error("循环嵌套 row.getSpread_uid() = {}, userDto.getUid() = {}", row.getSpread_uid(), userDto.getSpread_uid());
310
                     logger.error("循环嵌套 row.getSpread_uid() = {}, userDto.getUid() = {}", row.getSpread_uid(), userDto.getSpread_uid());
311
                     throw new TDBAException("循环嵌套");
311
                     throw new TDBAException("循环嵌套");
312
                 }
312
                 }
@@ -387,13 +387,13 @@ public class UserService {
387
         UserVo userVo = userMapper.selectByAccountForSimple(param.getMobile());
387
         UserVo userVo = userMapper.selectByAccountForSimple(param.getMobile());
388
         Objects.requireNonNull(userVo, "该手机号未在【储蓄宝App】内注册,请先注册后再绑定");
388
         Objects.requireNonNull(userVo, "该手机号未在【储蓄宝App】内注册,请先注册后再绑定");
389
 
389
 
390
-        if(userVo.getId() == baseUser.getId()){
390
+        if(userVo.getId().equals(baseUser.getId())){
391
             throw new TDBAException("运营商不可添加自身为团队成员");
391
             throw new TDBAException("运营商不可添加自身为团队成员");
392
         }
392
         }
393
 
393
 
394
         UserBind oldUserBind = userBindMapper.selectByUid(userVo.getId());
394
         UserBind oldUserBind = userBindMapper.selectByUid(userVo.getId());
395
         if(oldUserBind != null){
395
         if(oldUserBind != null){
396
-            throw new TDBAException((oldUserBind.getBindUid() == baseUser.getId())? "手机号已添加,请勿重复操作": "该手机号已被其他运营商绑定");
396
+            throw new TDBAException((oldUserBind.getBindUid().equals(baseUser.getId()))? "手机号已添加,请勿重复操作": "该手机号已被其他运营商绑定");
397
         }
397
         }
398
 
398
 
399
         List<Integer> oldUidList = userBindMapper.selectUid(baseUser.getId());
399
         List<Integer> oldUidList = userBindMapper.selectUid(baseUser.getId());