Authored by zhaoyue

Fix openid problem

@@ -63,7 +63,7 @@ public class OpenIdController { @@ -63,7 +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 + xklMemberOpenidRespository.deleteByOpenidAndType(openId,type);
67 XklMemberOpenidEntity xklMemberOpenid = xklMemberOpenidRespository.findByAccountIdAndType(user.getId(), openIdType); 67 XklMemberOpenidEntity xklMemberOpenid = xklMemberOpenidRespository.findByAccountIdAndType(user.getId(), openIdType);
68 if (xklMemberOpenid == null) { 68 if (xklMemberOpenid == null) {
69 xklMemberOpenid = new XklMemberOpenidEntity(); 69 xklMemberOpenid = new XklMemberOpenidEntity();
@@ -13,6 +13,6 @@ public interface XklMemberOpenidRespository extends CrudRepository<XklMemberOpen @@ -13,6 +13,6 @@ public interface XklMemberOpenidRespository extends CrudRepository<XklMemberOpen
13 13
14 public XklMemberOpenidEntity findOneByOpenidAndType(String openid,int type); 14 public XklMemberOpenidEntity findOneByOpenidAndType(String openid,int type);
15 15
16 - public void deleteByOpenid(String openid); 16 + public void deleteByOpenidAndType(String openid,int type);
17 17
18 } 18 }