Browse Source

移除钉钉

master
luyan 2 years ago
parent
commit
9ec541a4f7
  1. 41
      epmet-auth/src/main/java/com/epmet/controller/ThirdLoginController.java
  2. 9
      epmet-auth/src/main/java/com/epmet/service/ThirdLoginService.java
  3. 471
      epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java

41
epmet-auth/src/main/java/com/epmet/controller/ThirdLoginController.java

@ -3,7 +3,6 @@ package com.epmet.controller;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.result.ResiDingAppLoginResDTO;
import com.epmet.dto.result.StaffOrgsResultDTO; import com.epmet.dto.result.StaffOrgsResultDTO;
import com.epmet.dto.result.UserTokenResultDTO; import com.epmet.dto.result.UserTokenResultDTO;
import com.epmet.service.ThirdLoginService; import com.epmet.service.ThirdLoginService;
@ -159,11 +158,11 @@ public class ThirdLoginController {
* @param formDTO * @param formDTO
* @return * @return
*/ */
@PostMapping("resilogin-ding") // @PostMapping("resilogin-ding")
public Result<ResiDingAppLoginResDTO> resiLoginDing(@RequestBody ResiDingAppLoginFormDTO formDTO) { // public Result<ResiDingAppLoginResDTO> resiLoginDing(@RequestBody ResiDingAppLoginFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO,ResiDingAppLoginFormDTO.InnerMiniApp.class); // ValidatorUtils.validateEntity(formDTO,ResiDingAppLoginFormDTO.InnerMiniApp.class);
return new Result<ResiDingAppLoginResDTO>().ok(thirdLoginService.resiLoginDing(formDTO)); // return new Result<ResiDingAppLoginResDTO>().ok(thirdLoginService.resiLoginDing(formDTO));
} // }
/** /**
* 烟台建立应用授权给我们走企业免登 * 烟台建立应用授权给我们走企业免登
@ -173,11 +172,11 @@ public class ThirdLoginController {
* @param formDTO * @param formDTO
* @return * @return
*/ */
@PostMapping("resilogin-ding-md") // @PostMapping("resilogin-ding-md")
public Result<ResiDingAppLoginResDTO> resiLoginDingMd(@RequestBody DingAppLoginMdFormDTO formDTO) { // public Result<ResiDingAppLoginResDTO> resiLoginDingMd(@RequestBody DingAppLoginMdFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO); // ValidatorUtils.validateEntity(formDTO);
return new Result<ResiDingAppLoginResDTO>().ok(thirdLoginService.resiLoginDingMd(formDTO)); // return new Result<ResiDingAppLoginResDTO>().ok(thirdLoginService.resiLoginDingMd(formDTO));
} // }
/** /**
* 企业内部应用开发不授权了 文档地址https://open.dingtalk.com/document/orgapp-server/enterprise-internal-application-logon-free * 企业内部应用开发不授权了 文档地址https://open.dingtalk.com/document/orgapp-server/enterprise-internal-application-logon-free
@ -200,11 +199,11 @@ public class ThirdLoginController {
* @return * @return
* 目前烟台用的这个 * 目前烟台用的这个
*/ */
@PostMapping("resilogin-internalding") // @PostMapping("resilogin-internalding")
public Result<ResiDingAppLoginResDTO> resiLoginInternalDing(@RequestBody DingAppLoginMdFormDTO formDTO) { // public Result<ResiDingAppLoginResDTO> resiLoginInternalDing(@RequestBody DingAppLoginMdFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO); // ValidatorUtils.validateEntity(formDTO);
return new Result<ResiDingAppLoginResDTO>().ok(thirdLoginService.resiLoginInternalDing(formDTO)); // return new Result<ResiDingAppLoginResDTO>().ok(thirdLoginService.resiLoginInternalDing(formDTO));
} // }
/** /**
* 根据免登授权码, 获取登录用户身份 * 根据免登授权码, 获取登录用户身份
@ -212,11 +211,11 @@ public class ThirdLoginController {
* @param formDTO 免登授权码 * @param formDTO 免登授权码
* @return * @return
*/ */
@PostMapping("govlogin-internalding") // @PostMapping("govlogin-internalding")
public Result<UserTokenResultDTO> login(@RequestBody DingAppLoginMdFormDTO formDTO) { // public Result<UserTokenResultDTO> login(@RequestBody DingAppLoginMdFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO); // ValidatorUtils.validateEntity(formDTO);
return new Result<UserTokenResultDTO>().ok(thirdLoginService.govLoginInternalDing(formDTO)); // return new Result<UserTokenResultDTO>().ok(thirdLoginService.govLoginInternalDing(formDTO));
} // }
/** /**
* 根据免登授权码, 获取登录用户身份 * 根据免登授权码, 获取登录用户身份

9
epmet-auth/src/main/java/com/epmet/service/ThirdLoginService.java

@ -1,7 +1,6 @@
package com.epmet.service; package com.epmet.service;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.result.ResiDingAppLoginResDTO;
import com.epmet.dto.result.StaffOrgsResultDTO; import com.epmet.dto.result.StaffOrgsResultDTO;
import com.epmet.dto.result.UserTokenResultDTO; import com.epmet.dto.result.UserTokenResultDTO;
@ -93,7 +92,7 @@ public interface ThirdLoginService {
* @param formDTO * @param formDTO
* @return * @return
*/ */
ResiDingAppLoginResDTO resiLoginDing(ResiDingAppLoginFormDTO formDTO); // ResiDingAppLoginResDTO resiLoginDing(ResiDingAppLoginFormDTO formDTO);
/** /**
* 企业简历内部应用授权给第三方 * 企业简历内部应用授权给第三方
@ -102,21 +101,21 @@ public interface ThirdLoginService {
* @param formDTO * @param formDTO
* @return * @return
*/ */
ResiDingAppLoginResDTO resiLoginDingMd(DingAppLoginMdFormDTO formDTO); // ResiDingAppLoginResDTO resiLoginDingMd(DingAppLoginMdFormDTO formDTO);
/** /**
* 企业内部应用免登 文档地址https://open.dingtalk.com/document/orgapp-server/enterprise-internal-application-logon-free * 企业内部应用免登 文档地址https://open.dingtalk.com/document/orgapp-server/enterprise-internal-application-logon-free
* @param formDTO * @param formDTO
* @return * @return
*/ */
ResiDingAppLoginResDTO resiLoginInternalDing(DingAppLoginMdFormDTO formDTO); // ResiDingAppLoginResDTO resiLoginInternalDing(DingAppLoginMdFormDTO formDTO);
/** /**
* desc:企业内部应用 工作端登录 * desc:企业内部应用 工作端登录
* @param formDTO * @param formDTO
* @return * @return
*/ */
UserTokenResultDTO govLoginInternalDing(DingAppLoginMdFormDTO formDTO); // UserTokenResultDTO govLoginInternalDing(DingAppLoginMdFormDTO formDTO);
/** /**
* desc:烟台sso根据authCode 获取本系统token * desc:烟台sso根据authCode 获取本系统token

471
epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java

@ -5,22 +5,18 @@ import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo;
import cn.binarywang.wx.miniapp.util.crypt.WxMaCryptUtils; import cn.binarywang.wx.miniapp.util.crypt.WxMaCryptUtils;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.aliyun.dingtalk.module.DingTalkResult;
import com.epmet.auth.constants.AuthOperationConstants; import com.epmet.auth.constants.AuthOperationConstants;
import com.epmet.common.token.constant.LoginConstant; import com.epmet.common.token.constant.LoginConstant;
import com.epmet.commons.rocketmq.messages.LoginMQMsg; import com.epmet.commons.rocketmq.messages.LoginMQMsg;
import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.enums.EnvEnum; import com.epmet.commons.tools.enums.EnvEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.redis.common.CustomerDingDingRedis;
import com.epmet.commons.tools.redis.common.bean.DingMiniInfoCache;
import com.epmet.commons.tools.security.dto.GovTokenDto; import com.epmet.commons.tools.security.dto.GovTokenDto;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.security.password.PasswordUtils; import com.epmet.commons.tools.security.password.PasswordUtils;
@ -31,8 +27,6 @@ import com.epmet.commons.tools.validator.PhoneValidatorUtils;
import com.epmet.constant.AuthHttpUrlConstant; import com.epmet.constant.AuthHttpUrlConstant;
import com.epmet.constant.SmsTemplateConstant; import com.epmet.constant.SmsTemplateConstant;
import com.epmet.dto.*; import com.epmet.dto.*;
import com.epmet.dto.dingres.DingUserDetailDTO;
import com.epmet.dto.dingres.V2UserGetuserinfoResDTO;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;
import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.EpmetMessageOpenFeignClient;
@ -43,11 +37,6 @@ import com.epmet.jwt.JwtTokenUtils;
import com.epmet.redis.CaptchaRedis; import com.epmet.redis.CaptchaRedis;
import com.epmet.service.GovWebService; import com.epmet.service.GovWebService;
import com.epmet.service.ThirdLoginService; import com.epmet.service.ThirdLoginService;
import com.taobao.api.ApiException;
import com.taobao.dingtalk.client.DingTalkClientToken;
import com.taobao.dingtalk.client.DingTalkClientUser;
import com.taobao.dingtalk.vo.result.AccessTokenResult;
import com.taobao.dingtalk.vo.result.UserBaseInfo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -87,10 +76,10 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient;
@Autowired @Autowired
private EpmetMessageOpenFeignClient messageOpenFeignClient; private EpmetMessageOpenFeignClient messageOpenFeignClient;
@Autowired // @Autowired
private DingTalkClientToken dingTalkClientToken; // private DingTalkClientToken dingTalkClientToken;
@Autowired // @Autowired
private DingTalkClientUser dingTalkClientUser; // private DingTalkClientUser dingTalkClientUser;
@Autowired @Autowired
private GovWebService govWebService; private GovWebService govWebService;
@ -870,54 +859,54 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol
* @param formDTO * @param formDTO
* @return * @return
*/ */
@Override // @Override
public ResiDingAppLoginResDTO resiLoginDing(ResiDingAppLoginFormDTO formDTO) { // public ResiDingAppLoginResDTO resiLoginDing(ResiDingAppLoginFormDTO formDTO) {
//获取用户手机号 // //获取用户手机号
log.info("1、钉钉居民端应用登录入参:"+ JSON.toJSONString(formDTO)); // log.info("1、钉钉居民端应用登录入参:"+ JSON.toJSONString(formDTO));
ResiDingAppLoginResDTO resDTO= null; // ResiDingAppLoginResDTO resDTO= null;
try { // try {
resDTO = new ResiDingAppLoginResDTO(); // resDTO = new ResiDingAppLoginResDTO();
resDTO.setCustomerId(getCurrentCustomerId()); // resDTO.setCustomerId(getCurrentCustomerId());
//1、获取用户手机号 // //1、获取用户手机号
String miniAppId = formDTO.getMiniAppId(); // String miniAppId = formDTO.getMiniAppId();
DingMiniInfoCache dingMiniInfo = CustomerDingDingRedis.getDingMiniInfo(miniAppId); // DingMiniInfoCache dingMiniInfo = CustomerDingDingRedis.getDingMiniInfo(miniAppId);
DingTalkResult<AccessTokenResult> userAccessToken = dingTalkClientToken.getUserAccessToken(formDTO.getAuthCode(), dingMiniInfo.getSuiteKey(), dingMiniInfo.getSuiteSecret()); // DingTalkResult<AccessTokenResult> userAccessToken = dingTalkClientToken.getUserAccessToken(formDTO.getAuthCode(), dingMiniInfo.getSuiteKey(), dingMiniInfo.getSuiteSecret());
log.info("2、resiLoginDing userAccessToken:{}",JSON.toJSONString(userAccessToken)); // log.info("2、resiLoginDing userAccessToken:{}",JSON.toJSONString(userAccessToken));
if (!userAccessToken.success() || null == userAccessToken.getData()) { // if (!userAccessToken.success() || null == userAccessToken.getData()) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "调用微信api异常:" + JSON.toJSONString(userAccessToken), EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getMsg()); // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "调用微信api异常:" + JSON.toJSONString(userAccessToken), EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getMsg());
} // }
DingTalkResult<UserBaseInfo> me = dingTalkClientUser.getUserInfo("me", userAccessToken.getData().getAccessToken()); // DingTalkResult<UserBaseInfo> me = dingTalkClientUser.getUserInfo("me", userAccessToken.getData().getAccessToken());
log.info("3、resiLoginDing me:{}",JSON.toJSONString(me)); // log.info("3、resiLoginDing me:{}",JSON.toJSONString(me));
resDTO.setExtInfo(JSON.toJSONString(me.getData())); // resDTO.setExtInfo(JSON.toJSONString(me.getData()));
if (!me.success() || StringUtils.isBlank(me.getData().getMobile())) { // if (!me.success() || StringUtils.isBlank(me.getData().getMobile())) {
log.error("resilogin-ding登录接口报错,入参:" + JSON.toJSONString(formDTO) + ";获取手机号为空, userAccessToken.getData().getAccessToken()=" + userAccessToken.getData().getAccessToken()); // log.error("resilogin-ding登录接口报错,入参:" + JSON.toJSONString(formDTO) + ";获取手机号为空, userAccessToken.getData().getAccessToken()=" + userAccessToken.getData().getAccessToken());
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取手机号为空", "获取手机号为空"); // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取手机号为空", "获取手机号为空");
} // }
// 2、调用userfeign接口获取userId、注册网格相关信息 todo // // 2、调用userfeign接口获取userId、注册网格相关信息 todo
DingLoginResiFormDTO dingLoginResiFormDTO=ConvertUtils.sourceToTarget(me.getData(),DingLoginResiFormDTO.class); // DingLoginResiFormDTO dingLoginResiFormDTO=ConvertUtils.sourceToTarget(me.getData(),DingLoginResiFormDTO.class);
dingLoginResiFormDTO.setCustomerId(resDTO.getCustomerId()); // dingLoginResiFormDTO.setCustomerId(resDTO.getCustomerId());
Result<DingLoginResiResDTO> loginResiResDTOResult = epmetUserOpenFeignClient.dingResiLogin(dingLoginResiFormDTO); // Result<DingLoginResiResDTO> loginResiResDTOResult = epmetUserOpenFeignClient.dingResiLogin(dingLoginResiFormDTO);
if (!loginResiResDTOResult.success() || null == loginResiResDTOResult.getData()) { // if (!loginResiResDTOResult.success() || null == loginResiResDTOResult.getData()) {
//临时打个日志 // //临时打个日志
log.error(String.format("resilogin-ding获取epmetUserId异常,入参:%s,user服务返参:%s", JSON.toJSONString(formDTO), JSON.toJSONString(loginResiResDTOResult))); // log.error(String.format("resilogin-ding获取epmetUserId异常,入参:%s,user服务返参:%s", JSON.toJSONString(formDTO), JSON.toJSONString(loginResiResDTOResult)));
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取epmetUserId异常:" + JSON.toJSONString(loginResiResDTOResult), EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getMsg()); // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取epmetUserId异常:" + JSON.toJSONString(loginResiResDTOResult), EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getMsg());
} // }
DingLoginResiResDTO resiResDTO=loginResiResDTOResult.getData(); // DingLoginResiResDTO resiResDTO=loginResiResDTOResult.getData();
resDTO.setGridId(resiResDTO.getGridId()); // resDTO.setGridId(resiResDTO.getGridId());
resDTO.setGridName(resiResDTO.getGridName()); // resDTO.setGridName(resiResDTO.getGridName());
resDTO.setAgencyId(resiResDTO.getAgencyId()); // resDTO.setAgencyId(resiResDTO.getAgencyId());
resDTO.setEpmetUserId(resiResDTO.getEpmetUserId()); // resDTO.setEpmetUserId(resiResDTO.getEpmetUserId());
resDTO.setRegFlag(resiResDTO.getRegFlag()); // resDTO.setRegFlag(resiResDTO.getRegFlag());
//
//3.生成token,并且存放Redis // //3.生成token,并且存放Redis
String token=this.saveTokenDtoDing(formDTO.getMiniAppId(),AppClientConstant.APP_RESI,AppClientConstant.MINI_DING, resDTO.getEpmetUserId(), resDTO.getCustomerId()); // String token=this.saveTokenDtoDing(formDTO.getMiniAppId(),AppClientConstant.APP_RESI,AppClientConstant.MINI_DING, resDTO.getEpmetUserId(), resDTO.getCustomerId());
resDTO.setAuthorization(token); // resDTO.setAuthorization(token);
//
} catch (ApiException e) { // } catch (ApiException e) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), e.getErrMsg(), EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getMsg()); // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), e.getErrMsg(), EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getMsg());
} // }
return resDTO; // return resDTO;
} // }
private String saveTokenDtoDing(String miniAppId,String app,String client, String userId,String customerId) { private String saveTokenDtoDing(String miniAppId,String app,String client, String userId,String customerId) {
//生成token串 //生成token串
@ -943,84 +932,84 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol
return token; return token;
} }
@Override // @Override
public ResiDingAppLoginResDTO resiLoginDingMd(DingAppLoginMdFormDTO formDTO) { // public ResiDingAppLoginResDTO resiLoginDingMd(DingAppLoginMdFormDTO formDTO) {
// 获取用户手机号 // // 获取用户手机号
log.info("1、钉钉居民端应用登录入参:" + JSON.toJSONString(formDTO)); // log.info("1、钉钉居民端应用登录入参:" + JSON.toJSONString(formDTO));
ResiDingAppLoginResDTO resDTO = null; // ResiDingAppLoginResDTO resDTO = null;
resDTO = new ResiDingAppLoginResDTO(); // resDTO = new ResiDingAppLoginResDTO();
resDTO.setCustomerId(getCurrentCustomerId()); // resDTO.setCustomerId(getCurrentCustomerId());
// 1、获取用户手机号 // // 1、获取用户手机号
DingLoginResiFormDTO dingLoginResiFormDTO = getDingLoginResiFormDTOMd(formDTO.getMiniAppId(), formDTO.getAuthCode()); // DingLoginResiFormDTO dingLoginResiFormDTO = getDingLoginResiFormDTOMd(formDTO.getMiniAppId(), formDTO.getAuthCode());
dingLoginResiFormDTO.setCustomerId(resDTO.getCustomerId()); // dingLoginResiFormDTO.setCustomerId(resDTO.getCustomerId());
// 2、调用userfeign接口获取userId、注册网格相关信息 // // 2、调用userfeign接口获取userId、注册网格相关信息
Result<DingLoginResiResDTO> loginResiResDTOResult = epmetUserOpenFeignClient.dingResiLogin(dingLoginResiFormDTO); // Result<DingLoginResiResDTO> loginResiResDTOResult = epmetUserOpenFeignClient.dingResiLogin(dingLoginResiFormDTO);
if (!loginResiResDTOResult.success() || null == loginResiResDTOResult.getData()) { // if (!loginResiResDTOResult.success() || null == loginResiResDTOResult.getData()) {
// 临时打个日志 // // 临时打个日志
log.error(String.format("resiLoginDingMd获取epmetUserId异常,入参:%s,user服务返参:%s", JSON.toJSONString(formDTO), JSON.toJSONString(loginResiResDTOResult))); // log.error(String.format("resiLoginDingMd获取epmetUserId异常,入参:%s,user服务返参:%s", JSON.toJSONString(formDTO), JSON.toJSONString(loginResiResDTOResult)));
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取epmetUserId异常:" + JSON.toJSONString(loginResiResDTOResult), EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getMsg()); // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取epmetUserId异常:" + JSON.toJSONString(loginResiResDTOResult), EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getMsg());
} // }
DingLoginResiResDTO resiResDTO = loginResiResDTOResult.getData(); // DingLoginResiResDTO resiResDTO = loginResiResDTOResult.getData();
resDTO.setGridId(resiResDTO.getGridId()); // resDTO.setGridId(resiResDTO.getGridId());
resDTO.setGridName(resiResDTO.getGridName()); // resDTO.setGridName(resiResDTO.getGridName());
resDTO.setAgencyId(resiResDTO.getAgencyId()); // resDTO.setAgencyId(resiResDTO.getAgencyId());
resDTO.setEpmetUserId(resiResDTO.getEpmetUserId()); // resDTO.setEpmetUserId(resiResDTO.getEpmetUserId());
resDTO.setRegFlag(resiResDTO.getRegFlag()); // resDTO.setRegFlag(resiResDTO.getRegFlag());
//
// 3.生成token,并且存放Redis // // 3.生成token,并且存放Redis
String token = this.saveTokenDtoDing(formDTO.getMiniAppId(), AppClientConstant.APP_RESI, AppClientConstant.MINI_DING, resDTO.getEpmetUserId(), resDTO.getCustomerId()); // String token = this.saveTokenDtoDing(formDTO.getMiniAppId(), AppClientConstant.APP_RESI, AppClientConstant.MINI_DING, resDTO.getEpmetUserId(), resDTO.getCustomerId());
resDTO.setAuthorization(token); // resDTO.setAuthorization(token);
//
return resDTO; // return resDTO;
} // }
private DingLoginResiFormDTO getDingLoginResiFormDTOMd(String miniAppId, String authCode) { // private DingLoginResiFormDTO getDingLoginResiFormDTOMd(String miniAppId, String authCode) {
DingMiniInfoCache dingMiniInfo = CustomerDingDingRedis.getDingMiniInfo(miniAppId); // DingMiniInfoCache dingMiniInfo = CustomerDingDingRedis.getDingMiniInfo(miniAppId);
//
// 1、服务商获取第三方应用授权企业的access_token,文档地址:https://open.dingtalk.com/document/orgapp-server/obtains-the-enterprise-authorized-credential // // 1、服务商获取第三方应用授权企业的access_token,文档地址:https://open.dingtalk.com/document/orgapp-server/obtains-the-enterprise-authorized-credential
// 烟台的CorpId: dingaae55cbc47a96845f5bf40eda33b7ba0 // // 烟台的CorpId: dingaae55cbc47a96845f5bf40eda33b7ba0
String yantaiCorpId = "dingaae55cbc47a96845f5bf40eda33b7ba0"; // String yantaiCorpId = "dingaae55cbc47a96845f5bf40eda33b7ba0";
DingTalkResult<String> res = dingTalkClientToken.getThirdAuthCorpAccessToken(dingMiniInfo.getSuiteKey(), dingMiniInfo.getSuiteSecret(), "abc", yantaiCorpId); // DingTalkResult<String> res = dingTalkClientToken.getThirdAuthCorpAccessToken(dingMiniInfo.getSuiteKey(), dingMiniInfo.getSuiteSecret(), "abc", yantaiCorpId);
if (!res.success() || StringUtils.isBlank(res.getData())) { // if (!res.success() || StringUtils.isBlank(res.getData())) {
log.error(String.format("企业内部应用免登服务商获取第三方应用授权企业的access_token失败,customKey:%s,customSecret:%s,corpId:%s", dingMiniInfo.getSuiteSecret(), dingMiniInfo.getSuiteSecret(), yantaiCorpId)); // log.error(String.format("企业内部应用免登服务商获取第三方应用授权企业的access_token失败,customKey:%s,customSecret:%s,corpId:%s", dingMiniInfo.getSuiteSecret(), dingMiniInfo.getSuiteSecret(), yantaiCorpId));
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "服务商获取第三方应用授权企业的access_token", "服务商获取第三方应用授权企业的access_token"); // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "服务商获取第三方应用授权企业的access_token", "服务商获取第三方应用授权企业的access_token");
} // }
String accessToken = res.getData(); // String accessToken = res.getData();
log.info(String.format("1、服务商获取第三方应用授权企业的access_token返参:%s", accessToken)); // log.info(String.format("1、服务商获取第三方应用授权企业的access_token返参:%s", accessToken));
//
// 2、通过免登码获取用户信息,文档地址:https://open.dingtalk.com/document/orgapp-server/obtain-the-userid-of-a-user-by-using-the-log-free // // 2、通过免登码获取用户信息,文档地址:https://open.dingtalk.com/document/orgapp-server/obtain-the-userid-of-a-user-by-using-the-log-free
DingTalkResult<String> v2UserGetuserinfoRes = dingTalkClientToken.getUserInfo(accessToken, authCode); // DingTalkResult<String> v2UserGetuserinfoRes = dingTalkClientToken.getUserInfo(accessToken, authCode);
if (!v2UserGetuserinfoRes.success() || StringUtils.isBlank(v2UserGetuserinfoRes.getData())) { // if (!v2UserGetuserinfoRes.success() || StringUtils.isBlank(v2UserGetuserinfoRes.getData())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "通过免登码获取用户信息异常", "通过免登码获取用户信息异常"); // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "通过免登码获取用户信息异常", "通过免登码获取用户信息异常");
} // }
log.info(String.format("2、通过免登码获取用户信息返参:%s", v2UserGetuserinfoRes.getData())); // log.info(String.format("2、通过免登码获取用户信息返参:%s", v2UserGetuserinfoRes.getData()));
V2UserGetuserinfoResDTO v2UserGetuserinfoResDTO = JSON.parseObject(v2UserGetuserinfoRes.getData(), V2UserGetuserinfoResDTO.class); // V2UserGetuserinfoResDTO v2UserGetuserinfoResDTO = JSON.parseObject(v2UserGetuserinfoRes.getData(), V2UserGetuserinfoResDTO.class);
if (null == v2UserGetuserinfoResDTO || StringUtils.isBlank(v2UserGetuserinfoResDTO.getUserid())) { // if (null == v2UserGetuserinfoResDTO || StringUtils.isBlank(v2UserGetuserinfoResDTO.getUserid())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取钉钉用户userid为空", "获取钉钉用户userid为空"); // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取钉钉用户userid为空", "获取钉钉用户userid为空");
} // }
//
//
// 3、查询用户详情,文档地址:https://open.dingtalk.com/document/isvapp-server/query-user-details // // 3、查询用户详情,文档地址:https://open.dingtalk.com/document/isvapp-server/query-user-details
DingTalkResult<String> v2UserGetRes = dingTalkClientToken.getUserDetail(v2UserGetuserinfoResDTO.getUserid(), accessToken); // DingTalkResult<String> v2UserGetRes = dingTalkClientToken.getUserDetail(v2UserGetuserinfoResDTO.getUserid(), accessToken);
if (!v2UserGetRes.success() || StringUtils.isBlank(v2UserGetRes.getData())) { // if (!v2UserGetRes.success() || StringUtils.isBlank(v2UserGetRes.getData())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "根据userId查询用户详情失败", "根据userId查询用户详情失败"); // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "根据userId查询用户详情失败", "根据userId查询用户详情失败");
} // }
log.info(String.format("3、查询用户详情:%s", v2UserGetRes.getData())); // log.info(String.format("3、查询用户详情:%s", v2UserGetRes.getData()));
DingUserDetailDTO dingUserDetailDTO = JSON.parseObject(v2UserGetRes.getData(), DingUserDetailDTO.class); // DingUserDetailDTO dingUserDetailDTO = JSON.parseObject(v2UserGetRes.getData(), DingUserDetailDTO.class);
if (null == dingUserDetailDTO || StringUtils.isBlank(dingUserDetailDTO.getMobile())) { // if (null == dingUserDetailDTO || StringUtils.isBlank(dingUserDetailDTO.getMobile())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取手机号为空", "获取手机号为空"); // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取手机号为空", "获取手机号为空");
} // }
//
DingLoginResiFormDTO dingLoginResiFormDTO = new DingLoginResiFormDTO(); // DingLoginResiFormDTO dingLoginResiFormDTO = new DingLoginResiFormDTO();
dingLoginResiFormDTO.setAvatarUrl(dingUserDetailDTO.getAvatar()); // dingLoginResiFormDTO.setAvatarUrl(dingUserDetailDTO.getAvatar());
dingLoginResiFormDTO.setEmail(dingUserDetailDTO.getOrg_email()); // dingLoginResiFormDTO.setEmail(dingUserDetailDTO.getOrg_email());
dingLoginResiFormDTO.setMobile(dingUserDetailDTO.getMobile()); // dingLoginResiFormDTO.setMobile(dingUserDetailDTO.getMobile());
dingLoginResiFormDTO.setNick(dingUserDetailDTO.getName()); // dingLoginResiFormDTO.setNick(dingUserDetailDTO.getName());
dingLoginResiFormDTO.setOpenId(StrConstant.EPMETY_STR); // dingLoginResiFormDTO.setOpenId(StrConstant.EPMETY_STR);
dingLoginResiFormDTO.setStateCode(dingUserDetailDTO.getState_code()); // dingLoginResiFormDTO.setStateCode(dingUserDetailDTO.getState_code());
dingLoginResiFormDTO.setUnionId(dingUserDetailDTO.getUnionid()); // dingLoginResiFormDTO.setUnionId(dingUserDetailDTO.getUnionid());
return dingLoginResiFormDTO; // return dingLoginResiFormDTO;
} // }
/** /**
@ -1043,57 +1032,57 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol
* @param formDTO * @param formDTO
* @return * @return
*/ */
@Override // @Override
public ResiDingAppLoginResDTO resiLoginInternalDing(DingAppLoginMdFormDTO formDTO) { // public ResiDingAppLoginResDTO resiLoginInternalDing(DingAppLoginMdFormDTO formDTO) {
// 获取用户手机号 // // 获取用户手机号
log.info("1、钉钉居民端应用登录入参:" + JSON.toJSONString(formDTO)); // log.info("1、钉钉居民端应用登录入参:" + JSON.toJSONString(formDTO));
ResiDingAppLoginResDTO resDTO = new ResiDingAppLoginResDTO(); // ResiDingAppLoginResDTO resDTO = new ResiDingAppLoginResDTO();
resDTO.setCustomerId(getCurrentCustomerId()); // resDTO.setCustomerId(getCurrentCustomerId());
//
// 1、获取用户手机号 // // 1、获取用户手机号
DingLoginResiFormDTO dingLoginResiFormDTO = getDingLoginResiFormDTOInternal(formDTO.getMiniAppId(), formDTO.getAuthCode()); // DingLoginResiFormDTO dingLoginResiFormDTO = getDingLoginResiFormDTOInternal(formDTO.getMiniAppId(), formDTO.getAuthCode());
dingLoginResiFormDTO.setCustomerId(resDTO.getCustomerId()); // dingLoginResiFormDTO.setCustomerId(resDTO.getCustomerId());
resDTO.setRealName(dingLoginResiFormDTO.getNick()); // resDTO.setRealName(dingLoginResiFormDTO.getNick());
// 2、调用userfeign接口获取userId、注册网格相关信息 // // 2、调用userfeign接口获取userId、注册网格相关信息
Result<DingLoginResiResDTO> loginResiResDTOResult = epmetUserOpenFeignClient.dingResiLogin(dingLoginResiFormDTO); // Result<DingLoginResiResDTO> loginResiResDTOResult = epmetUserOpenFeignClient.dingResiLogin(dingLoginResiFormDTO);
if (!loginResiResDTOResult.success() || null == loginResiResDTOResult.getData()) { // if (!loginResiResDTOResult.success() || null == loginResiResDTOResult.getData()) {
// 临时打个日志 // // 临时打个日志
log.error(String.format("resiLoginInternalDing获取epmetUserId异常,入参:%s", JSON.toJSONString(dingLoginResiFormDTO))); // log.error(String.format("resiLoginInternalDing获取epmetUserId异常,入参:%s", JSON.toJSONString(dingLoginResiFormDTO)));
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取epmetUserId异常:"+ JSON.toJSONString(loginResiResDTOResult), "获取epmetUserId异常"); // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取epmetUserId异常:"+ JSON.toJSONString(loginResiResDTOResult), "获取epmetUserId异常");
} // }
DingLoginResiResDTO resiResDTO = loginResiResDTOResult.getData(); // DingLoginResiResDTO resiResDTO = loginResiResDTOResult.getData();
resDTO.setGridId(resiResDTO.getGridId()); // resDTO.setGridId(resiResDTO.getGridId());
resDTO.setGridName(resiResDTO.getGridName()); // resDTO.setGridName(resiResDTO.getGridName());
resDTO.setAgencyId(resiResDTO.getAgencyId()); // resDTO.setAgencyId(resiResDTO.getAgencyId());
resDTO.setEpmetUserId(resiResDTO.getEpmetUserId()); // resDTO.setEpmetUserId(resiResDTO.getEpmetUserId());
resDTO.setRegFlag(resiResDTO.getRegFlag()); // resDTO.setRegFlag(resiResDTO.getRegFlag());
//
// 3.生成token,并且存放Redis // // 3.生成token,并且存放Redis
String token = this.saveTokenDtoDing(formDTO.getMiniAppId(), AppClientConstant.APP_RESI, AppClientConstant.MINI_DING, resDTO.getEpmetUserId(), resDTO.getCustomerId()); // String token = this.saveTokenDtoDing(formDTO.getMiniAppId(), AppClientConstant.APP_RESI, AppClientConstant.MINI_DING, resDTO.getEpmetUserId(), resDTO.getCustomerId());
resDTO.setAuthorization(token); // resDTO.setAuthorization(token);
//
return resDTO; // return resDTO;
} // }
@Override // @Override
public UserTokenResultDTO govLoginInternalDing(DingAppLoginMdFormDTO formDTO) { // public UserTokenResultDTO govLoginInternalDing(DingAppLoginMdFormDTO formDTO) {
// 获取用户手机号 // // 获取用户手机号
log.info("1、钉钉居民端应用登录入参:" + JSON.toJSONString(formDTO)); // log.info("1、钉钉居民端应用登录入参:" + JSON.toJSONString(formDTO));
ResiDingAppLoginResDTO resDTO = null; // ResiDingAppLoginResDTO resDTO = null;
resDTO = new ResiDingAppLoginResDTO(); // resDTO = new ResiDingAppLoginResDTO();
resDTO.setCustomerId(getCurrentCustomerId()); // resDTO.setCustomerId(getCurrentCustomerId());
//
// 1、获取用户手机号 // // 1、获取用户手机号
DingLoginResiFormDTO dingLoginResiFormDTO = getDingLoginResiFormDTOInternal(formDTO.getMiniAppId(), formDTO.getAuthCode()); // DingLoginResiFormDTO dingLoginResiFormDTO = getDingLoginResiFormDTOInternal(formDTO.getMiniAppId(), formDTO.getAuthCode());
dingLoginResiFormDTO.setCustomerId(resDTO.getCustomerId()); // dingLoginResiFormDTO.setCustomerId(resDTO.getCustomerId());
//
//
GovWebLoginFormDTO loginGovParam = new GovWebLoginFormDTO(); // GovWebLoginFormDTO loginGovParam = new GovWebLoginFormDTO();
loginGovParam.setCustomerId(dingLoginResiFormDTO.getCustomerId()); // loginGovParam.setCustomerId(dingLoginResiFormDTO.getCustomerId());
loginGovParam.setPhone(dingLoginResiFormDTO.getMobile()); // loginGovParam.setPhone(dingLoginResiFormDTO.getMobile());
//
return govWebService.loginByThirdPlatform(loginGovParam); // return govWebService.loginByThirdPlatform(loginGovParam);
} // }
@Override @Override
public UserTokenResultDTO yanTaiSSOLogin(String authCode) { public UserTokenResultDTO yanTaiSSOLogin(String authCode) {
@ -1115,55 +1104,55 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol
* @param authCode * @param authCode
* @return * @return
*/ */
private DingLoginResiFormDTO getDingLoginResiFormDTOInternal(String miniAppId, String authCode) { // private DingLoginResiFormDTO getDingLoginResiFormDTOInternal(String miniAppId, String authCode) {
DingMiniInfoCache dingMiniInfo = CustomerDingDingRedis.getDingMiniInfo(miniAppId); // DingMiniInfoCache dingMiniInfo = CustomerDingDingRedis.getDingMiniInfo(miniAppId);
if (dingMiniInfo == null){ // if (dingMiniInfo == null){
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取钉钉应用配置异常", "获取钉钉应用配置异常"); // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取钉钉应用配置异常", "获取钉钉应用配置异常");
} // }
// 1、获取企业内部应用的accessToken文档地址:https://open.dingtalk.com/document/orgapp-server/obtain-the-access_token-of-an-internal-app // // 1、获取企业内部应用的accessToken文档地址:https://open.dingtalk.com/document/orgapp-server/obtain-the-access_token-of-an-internal-app
String accessToken = ""; // String accessToken = "";
DingTalkResult<String> dingTalkResult = dingTalkClientToken.getAppAccessTokenToken(dingMiniInfo.getSuiteKey(), dingMiniInfo.getSuiteSecret()); // DingTalkResult<String> dingTalkResult = dingTalkClientToken.getAppAccessTokenToken(dingMiniInfo.getSuiteKey(), dingMiniInfo.getSuiteSecret());
if (!dingTalkResult.success() || StringUtils.isBlank(dingTalkResult.getData())) { // if (!dingTalkResult.success() || StringUtils.isBlank(dingTalkResult.getData())) {
log.error(String.format("获取企业内部应用的accessToken失败,customKey:%s,customSecret:%s", dingMiniInfo.getSuiteKey(), dingMiniInfo.getSuiteSecret())); // log.error(String.format("获取企业内部应用的accessToken失败,customKey:%s,customSecret:%s", dingMiniInfo.getSuiteKey(), dingMiniInfo.getSuiteSecret()));
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取企业内部应用的accessToken异常", "获取企业内部应用的accessToken"); // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取企业内部应用的accessToken异常", "获取企业内部应用的accessToken");
} // }
accessToken = dingTalkResult.getData(); // accessToken = dingTalkResult.getData();
log.info(String.format("1、获取企业内部应用的accessToken返参:%s", accessToken)); // log.info(String.format("1、获取企业内部应用的accessToken返参:%s", accessToken));
//
//
// 2、通过免登码获取用户信息,文档地址:https://open.dingtalk.com/document/orgapp-server/obtain-the-userid-of-a-user-by-using-the-log-free // // 2、通过免登码获取用户信息,文档地址:https://open.dingtalk.com/document/orgapp-server/obtain-the-userid-of-a-user-by-using-the-log-free
DingTalkResult<String> v2UserGetuserinfoRes = dingTalkClientToken.getUserInfo(accessToken, authCode); // DingTalkResult<String> v2UserGetuserinfoRes = dingTalkClientToken.getUserInfo(accessToken, authCode);
if (!v2UserGetuserinfoRes.success() || StringUtils.isBlank(v2UserGetuserinfoRes.getData())) { // if (!v2UserGetuserinfoRes.success() || StringUtils.isBlank(v2UserGetuserinfoRes.getData())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "通过免登码获取用户信息异常", "通过免登码获取用户信息异常"); // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "通过免登码获取用户信息异常", "通过免登码获取用户信息异常");
} // }
log.info(String.format("2、通过免登码获取用户信息返参:%s", v2UserGetuserinfoRes.getData())); // log.info(String.format("2、通过免登码获取用户信息返参:%s", v2UserGetuserinfoRes.getData()));
V2UserGetuserinfoResDTO v2UserGetuserinfoResDTO = JSON.parseObject(v2UserGetuserinfoRes.getData(), V2UserGetuserinfoResDTO.class); // V2UserGetuserinfoResDTO v2UserGetuserinfoResDTO = JSON.parseObject(v2UserGetuserinfoRes.getData(), V2UserGetuserinfoResDTO.class);
if (null == v2UserGetuserinfoResDTO || StringUtils.isBlank(v2UserGetuserinfoResDTO.getUserid())) { // if (null == v2UserGetuserinfoResDTO || StringUtils.isBlank(v2UserGetuserinfoResDTO.getUserid())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取钉钉用户userid为空", "获取钉钉用户userid为空"); // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取钉钉用户userid为空", "获取钉钉用户userid为空");
} // }
//
//
// 3、查询用户详情,文档地址:https://open.dingtalk.com/document/isvapp-server/query-user-details // // 3、查询用户详情,文档地址:https://open.dingtalk.com/document/isvapp-server/query-user-details
DingTalkResult<String> v2UserGetRes = dingTalkClientToken.getUserDetail(v2UserGetuserinfoResDTO.getUserid(), accessToken); // DingTalkResult<String> v2UserGetRes = dingTalkClientToken.getUserDetail(v2UserGetuserinfoResDTO.getUserid(), accessToken);
if (!v2UserGetRes.success() || StringUtils.isBlank(v2UserGetRes.getData())) { // if (!v2UserGetRes.success() || StringUtils.isBlank(v2UserGetRes.getData())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "根据userId查询用户详情失败", "根据userId查询用户详情失败"); // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "根据userId查询用户详情失败", "根据userId查询用户详情失败");
} // }
log.info(String.format("3、查询用户详情:%s", v2UserGetRes.getData())); // log.info(String.format("3、查询用户详情:%s", v2UserGetRes.getData()));
DingUserDetailDTO dingUserDetailDTO = JSON.parseObject(v2UserGetRes.getData(), DingUserDetailDTO.class); // DingUserDetailDTO dingUserDetailDTO = JSON.parseObject(v2UserGetRes.getData(), DingUserDetailDTO.class);
if (null == dingUserDetailDTO || StringUtils.isBlank(dingUserDetailDTO.getMobile())) { // if (null == dingUserDetailDTO || StringUtils.isBlank(dingUserDetailDTO.getMobile())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取手机号为空", "获取手机号为空"); // throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取手机号为空", "获取手机号为空");
} // }
//
DingLoginResiFormDTO dingLoginResiFormDTO = new DingLoginResiFormDTO(); // DingLoginResiFormDTO dingLoginResiFormDTO = new DingLoginResiFormDTO();
dingLoginResiFormDTO.setAvatarUrl(dingUserDetailDTO.getAvatar()); // dingLoginResiFormDTO.setAvatarUrl(dingUserDetailDTO.getAvatar());
dingLoginResiFormDTO.setEmail(dingUserDetailDTO.getOrg_email()); // dingLoginResiFormDTO.setEmail(dingUserDetailDTO.getOrg_email());
dingLoginResiFormDTO.setMobile(dingUserDetailDTO.getMobile()); // dingLoginResiFormDTO.setMobile(dingUserDetailDTO.getMobile());
dingLoginResiFormDTO.setNick(dingUserDetailDTO.getName()); // dingLoginResiFormDTO.setNick(dingUserDetailDTO.getName());
dingLoginResiFormDTO.setOpenId(StrConstant.EPMETY_STR); // dingLoginResiFormDTO.setOpenId(StrConstant.EPMETY_STR);
dingLoginResiFormDTO.setStateCode(dingUserDetailDTO.getState_code()); // dingLoginResiFormDTO.setStateCode(dingUserDetailDTO.getState_code());
dingLoginResiFormDTO.setUnionId(dingUserDetailDTO.getUnionid()); // dingLoginResiFormDTO.setUnionId(dingUserDetailDTO.getUnionid());
return dingLoginResiFormDTO; // return dingLoginResiFormDTO;
} // }
/** /**
* 客户写死吧 * 客户写死吧

Loading…
Cancel
Save