diff --git a/src/main/java/com/gxwebsoft/common/system/controller/WxLoginController.java b/src/main/java/com/gxwebsoft/common/system/controller/WxLoginController.java index 45e4ff5..6d2597c 100644 --- a/src/main/java/com/gxwebsoft/common/system/controller/WxLoginController.java +++ b/src/main/java/com/gxwebsoft/common/system/controller/WxLoginController.java @@ -119,7 +119,7 @@ public class WxLoginController extends BaseController { user.setRecommend(1); }else { // 存在则检查绑定上级 - if (userParam.getSceneType() != null && userParam.getSceneType().equals("save_referee") && userParam.getRefereeId() != null) { + if (userParam.getSceneType() != null && userParam.getSceneType().equals("save_referee") && userParam.getRefereeId() != null && userParam.getRefereeId() != 0) { UserReferee check = userRefereeService.check(user.getUserId(), userParam.getRefereeId()); if (check == null) { UserReferee userReferee = new UserReferee(); @@ -191,7 +191,7 @@ public class WxLoginController extends BaseController { userRoleService.save(userRole); } // 绑定关系 - if (userParam.getSceneType() != null && userParam.getSceneType().equals("save_referee") && userParam.getRefereeId() != null) { + if (userParam.getSceneType() != null && userParam.getSceneType().equals("save_referee") && userParam.getRefereeId() != null && userParam.getRefereeId() != 0) { UserReferee check = userRefereeService.check(addUser.getUserId(), userParam.getRefereeId()); if (check == null) { UserReferee userReferee = new UserReferee();