Showing
1 changed file
with
1 additions
and
1 deletions
@@ -63,6 +63,7 @@ public class OpenIdController { | @@ -63,6 +63,7 @@ public class OpenIdController { | ||
63 | if (user == null) {//用户,密码错误 | 63 | if (user == null) {//用户,密码错误 |
64 | return new ResponseEntity<>(ResultModel.error(ResultStatus.USERNAME_OR_PASSWORD_ERROR), HttpStatus.OK); | 64 | return new ResponseEntity<>(ResultModel.error(ResultStatus.USERNAME_OR_PASSWORD_ERROR), HttpStatus.OK); |
65 | } else { | 65 | } else { |
66 | + xklMemberOpenidRespository.deleteByOpenid(openId); | ||
66 | XklMemberOpenidEntity xklMemberOpenid = xklMemberOpenidRespository.findByAccountIdAndType(user.getId(), openIdType); | 67 | XklMemberOpenidEntity xklMemberOpenid = xklMemberOpenidRespository.findByAccountIdAndType(user.getId(), openIdType); |
67 | if (xklMemberOpenid == null) { | 68 | if (xklMemberOpenid == null) { |
68 | xklMemberOpenid = new XklMemberOpenidEntity(); | 69 | xklMemberOpenid = new XklMemberOpenidEntity(); |
@@ -73,7 +74,6 @@ public class OpenIdController { | @@ -73,7 +74,6 @@ public class OpenIdController { | ||
73 | } else {//已经存在 | 74 | } else {//已经存在 |
74 | xklMemberOpenid.setOpenid(openId); | 75 | xklMemberOpenid.setOpenid(openId); |
75 | } | 76 | } |
76 | - xklMemberOpenidRespository.deleteByOpenid(openId); | ||
77 | xklMemberOpenidRespository.save(xklMemberOpenid); | 77 | xklMemberOpenidRespository.save(xklMemberOpenid); |
78 | } | 78 | } |
79 | return new ResponseEntity<>(ResultModel.ok(ResultStatus.OPENID_BIND_SUCCESS), HttpStatus.OK); | 79 | return new ResponseEntity<>(ResultModel.ok(ResultStatus.OPENID_BIND_SUCCESS), HttpStatus.OK); |
-
Please register or login to post a comment