|
|
@ -79,10 +79,10 @@ public class BsUserServiceImpl implements BsUserService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public BsUser getUserByVFamilyOpenid(String vFamilyOpenid) { |
|
|
|
public BsUser getUserByOutsideOpenid(String outsideOpenid) { |
|
|
|
BsUserExample example = new BsUserExample(); |
|
|
|
BsUserExample example = new BsUserExample(); |
|
|
|
example.createCriteria() |
|
|
|
example.createCriteria() |
|
|
|
.andVFamilyOpenidEqualTo(vFamilyOpenid) |
|
|
|
.andOutsideOpenidEqualTo(outsideOpenid) |
|
|
|
.andStatusNotEqualTo(UserStatusEnum.status0.getCode()); |
|
|
|
.andStatusNotEqualTo(UserStatusEnum.status0.getCode()); |
|
|
|
List<BsUser> list = userMapper.selectByExample(example); |
|
|
|
List<BsUser> list = userMapper.selectByExample(example); |
|
|
|
if (!list.isEmpty()) { |
|
|
|
if (!list.isEmpty()) { |
|
|
@ -145,7 +145,7 @@ public class BsUserServiceImpl implements BsUserService { |
|
|
|
public BsUser register(String outsideOpenid, Map<String, Object> other) { |
|
|
|
public BsUser register(String outsideOpenid, Map<String, Object> other) { |
|
|
|
// 查询手机号
|
|
|
|
// 查询手机号
|
|
|
|
BsUser user = new BsUser(); |
|
|
|
BsUser user = new BsUser(); |
|
|
|
user.setvFamilyOpenid(outsideOpenid); |
|
|
|
user.setOutsideOpenid(outsideOpenid); |
|
|
|
user.setIntegral(0L); |
|
|
|
user.setIntegral(0L); |
|
|
|
user.setWxMaOpenid(MapUtils.getString(other, "maOpenId")); |
|
|
|
user.setWxMaOpenid(MapUtils.getString(other, "maOpenId")); |
|
|
|
user.setWxMpOpenid(MapUtils.getString(other, "mpOpenId")); |
|
|
|
user.setWxMpOpenid(MapUtils.getString(other, "mpOpenId")); |
|
|
@ -186,7 +186,7 @@ public class BsUserServiceImpl implements BsUserService { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public SessionObject login(UserLoginPlatform platform, UserLoginType loginType, String outsideOpenid, Map<String, Object> other) throws Exception { |
|
|
|
public SessionObject login(UserLoginPlatform platform, UserLoginType loginType, String outsideOpenid, Map<String, Object> other) throws Exception { |
|
|
|
BsUser user = getUserByVFamilyOpenid(outsideOpenid); |
|
|
|
BsUser user = getUserByOutsideOpenid(outsideOpenid); |
|
|
|
if (user == null ) { |
|
|
|
if (user == null ) { |
|
|
|
user = register(outsideOpenid, other); |
|
|
|
user = register(outsideOpenid, other); |
|
|
|
} |
|
|
|
} |
|
|
|