Browse Source

去除bug日志

master
zxc 5 years ago
parent
commit
97b957f976
  1. 7
      epmet-auth/src/main/java/com/epmet/service/impl/PublicUserLoginServiceImpl.java
  2. 7
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java

7
epmet-auth/src/main/java/com/epmet/service/impl/PublicUserLoginServiceImpl.java

@ -221,8 +221,6 @@ public class PublicUserLoginServiceImpl implements PublicUserLoginService {
//2.用户不存在时不允许登陆
Map<String,Object> map1 = (Map)jsonObject.get("paUserResult");
PaUserDTO userDTO = ConvertUtils.mapToEntity(map1, PaUserDTO.class);
logger.info("map1的值:"+map1);
logger.info("userDTO的值:"+userDTO);
if (null == userDTO || StringUtils.isBlank(userDTO.getId())) {
throw new RenException(EpmetErrorCode.PUBLIC_NOT_EXISTS.getCode());
}
@ -240,7 +238,6 @@ public class PublicUserLoginServiceImpl implements PublicUserLoginService {
String token = this.generateGovWxmpToken(userDTO.getId());
//4-2.判断是否存在信息,给customerId赋值
Map<String,Object> map2 = (Map)jsonObject.get("paCustomerResult");
logger.info("map2的值:"+map2);
PaCustomerDTO customerDTO = ConvertUtils.mapToEntity(map2, PaCustomerDTO.class);
String customerId = "";
if (null != customerDTO && !StringUtils.isBlank(customerDTO.getId())) {
@ -248,7 +245,6 @@ public class PublicUserLoginServiceImpl implements PublicUserLoginService {
}
//4-3.token存入redis
Map<String,Object> map3 = (Map)jsonObject.get("paUserWechatResult");
logger.info("map3的值:"+map3);
PaUserWechatDTO wechatDTO = ConvertUtils.mapToEntity(map3, PaUserWechatDTO.class);
String openid = wechatDTO.getWxOpenId();
String unionId = (null == wechatDTO.getUnionId() ? "" : wechatDTO.getUnionId());
@ -283,16 +279,13 @@ public class PublicUserLoginServiceImpl implements PublicUserLoginService {
public UserTokenResultDTO register(RegisterFormDTO formDTO) {
//1.调用epmet-third服务,完成信息注册
String data = HttpClientManager.getInstance().sendPostByJSON(AuthHttpUrlConstant.REGISTER_URL, JSON.toJSONString(formDTO)).getData();
logger.info("data数据为:"+data);
JSONObject toResult = JSON.parseObject(data);
Result result = ConvertUtils.mapToEntity(toResult, Result.class);
logger.info("转换的result结果为:"+result);
if (!result.success()) {
logger.error(String.format("调用epmet_third服务初始化用户信息失败,数据来源[%s],手机号[%s],userId:[%S]", formDTO.getSource(), formDTO.getPhone(), formDTO.getUserId()));
throw new RenException(result.getCode());
}
Object RegisterResult = result.getData();
logger.info("getData()数据为:"+RegisterResult);
JSONObject jsonObject = JSON.parseObject(RegisterResult.toString());
RegisterResultDTO resultDTO = ConvertUtils.mapToEntity(jsonObject, RegisterResultDTO.class);

7
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java

@ -417,23 +417,17 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
String authAppId = authorizationInfoResultDTO.getAuthorizer_appid();
List<FixationAppIdResultDTO> fixationAppIdResultDTOS = fixationAppIdDao.selectFixationInfos();
String finalCustomerId = customerId;//
log.info("新customerId为:"+customerId);
log.info("新finalCustomerId为:"+finalCustomerId);
fixationAppIdResultDTOS.forEach(fixationAppId -> {
if (fixationAppId.getAppId().equals(authAppId)){
// TODO 是城阳项目或者党群e事通
// crm表中的customerId【原customerId】
String masterCustomerId = fixationAppId.getMasterCustomerId();
log.info("老customerId为:"+masterCustomerId);
formDTO.setCustomerId(masterCustomerId);
authCodeDao.deleteCustomerAuthCode(finalCustomerId,clientType);
authCodeDao.insertRedirectAuthCode(formDTO);
//authCode存缓存
redisThird.setAuthCode(formDTO);
this.authInfoByAuthCode(authCode, masterCustomerId, clientType);
log.info("=======================公众号的客户id为:"+finalCustomerId);
ModifyCustomerFormDTO modifyCustomer = new ModifyCustomerFormDTO();
modifyCustomer.setOldCustomerId(finalCustomerId);
modifyCustomer.setNewCustomerId(masterCustomerId);
@ -441,7 +435,6 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
// 管理员授权
CustomerManagerFormDTO customerManager = paUserDao.selectManagerInfo(userId);
log.info("=======================公众号的客户id为:"+finalCustomerId);
customerManager.setCustomerId(finalCustomerId);
operCrmOpenFeignClient.addManager(customerManager);
}

Loading…
Cancel
Save