|
@ -221,6 +221,8 @@ public class PublicUserLoginServiceImpl implements PublicUserLoginService { |
|
|
//2.用户不存在时不允许登陆
|
|
|
//2.用户不存在时不允许登陆
|
|
|
Map<String,Object> map1 = (Map)jsonObject.get("paUserResult"); |
|
|
Map<String,Object> map1 = (Map)jsonObject.get("paUserResult"); |
|
|
PaUserDTO userDTO = ConvertUtils.mapToEntity(map1, PaUserDTO.class); |
|
|
PaUserDTO userDTO = ConvertUtils.mapToEntity(map1, PaUserDTO.class); |
|
|
|
|
|
logger.info("map1的值:"+map1); |
|
|
|
|
|
logger.info("userDTO的值:"+userDTO); |
|
|
if (null == userDTO || StringUtils.isBlank(userDTO.getId())) { |
|
|
if (null == userDTO || StringUtils.isBlank(userDTO.getId())) { |
|
|
throw new RenException(EpmetErrorCode.PUBLIC_NOT_EXISTS.getCode()); |
|
|
throw new RenException(EpmetErrorCode.PUBLIC_NOT_EXISTS.getCode()); |
|
|
} |
|
|
} |
|
@ -238,13 +240,15 @@ public class PublicUserLoginServiceImpl implements PublicUserLoginService { |
|
|
String token = this.generateGovWxmpToken(userDTO.getId()); |
|
|
String token = this.generateGovWxmpToken(userDTO.getId()); |
|
|
//4-2.判断是否存在信息,给customerId赋值
|
|
|
//4-2.判断是否存在信息,给customerId赋值
|
|
|
Map<String,Object> map2 = (Map)jsonObject.get("paCustomerResult"); |
|
|
Map<String,Object> map2 = (Map)jsonObject.get("paCustomerResult"); |
|
|
|
|
|
logger.info("map2的值:"+map2); |
|
|
PaCustomerDTO customerDTO = ConvertUtils.mapToEntity(map2, PaCustomerDTO.class); |
|
|
PaCustomerDTO customerDTO = ConvertUtils.mapToEntity(map2, PaCustomerDTO.class); |
|
|
String customerId = ""; |
|
|
String customerId = ""; |
|
|
if (null != customerDTO && !StringUtils.isBlank(customerDTO.getId())) { |
|
|
if (null != customerDTO && !StringUtils.isBlank(customerDTO.getId())) { |
|
|
customerId = customerDTO.getId(); |
|
|
customerId = customerDTO.getId(); |
|
|
} |
|
|
} |
|
|
//4-3.token存入redis
|
|
|
//4-3.token存入redis
|
|
|
Map<String,Object> map3 = (Map)jsonObject.get("PaUserWechatDTO"); |
|
|
Map<String,Object> map3 = (Map)jsonObject.get("paUserWechatResult"); |
|
|
|
|
|
logger.info("map3的值:"+map3); |
|
|
PaUserWechatDTO wechatDTO = ConvertUtils.mapToEntity(map3, PaUserWechatDTO.class); |
|
|
PaUserWechatDTO wechatDTO = ConvertUtils.mapToEntity(map3, PaUserWechatDTO.class); |
|
|
String openid = wechatDTO.getWxOpenId(); |
|
|
String openid = wechatDTO.getWxOpenId(); |
|
|
String unionId = (null == wechatDTO.getUnionId() ? "" : wechatDTO.getUnionId()); |
|
|
String unionId = (null == wechatDTO.getUnionId() ? "" : wechatDTO.getUnionId()); |
|
|