Authored by zhaoyue

Fix openid problem

... ... @@ -63,7 +63,7 @@ public class OpenIdController {
if (user == null) {//用户,密码错误
return new ResponseEntity<>(ResultModel.error(ResultStatus.USERNAME_OR_PASSWORD_ERROR), HttpStatus.OK);
} else {
xklMemberOpenidRespository.deleteByOpenid(openId);
xklMemberOpenidRespository.deleteByOpenidAndType(openId,type);
XklMemberOpenidEntity xklMemberOpenid = xklMemberOpenidRespository.findByAccountIdAndType(user.getId(), openIdType);
if (xklMemberOpenid == null) {
xklMemberOpenid = new XklMemberOpenidEntity();
... ...
... ... @@ -13,6 +13,6 @@ public interface XklMemberOpenidRespository extends CrudRepository<XklMemberOpen
public XklMemberOpenidEntity findOneByOpenidAndType(String openid,int type);
public void deleteByOpenid(String openid);
public void deleteByOpenidAndType(String openid,int type);
}
... ...