Browse Source

公众号授权换取token

master
sunyuchao 5 years ago
parent
commit
995766f64a
  1. 4
      epmet-auth/src/main/java/com/epmet/service/impl/PublicUserLoginServiceImpl.java

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

@ -121,8 +121,10 @@ public class PublicUserLoginServiceImpl implements PublicUserLoginService {
private void saveLatestGovTokenDto(SaveUserResultDTO resultDTO, WxMpUser wxMpUser, String token) {
TokenDto tokenDTO = new TokenDto();
int expire = jwtTokenProperties.getExpire();
tokenDTO.setApp(LoginConstant.APP_PUBLIC);
tokenDTO.setClient(LoginConstant.CLIENT_MP);
tokenDTO.setOpenId(wxMpUser.getOpenId());
tokenDTO.setUnionId(wxMpUser.getUnionId());
tokenDTO.setUnionId(null == wxMpUser.getUnionId() ? "" : wxMpUser.getUnionId());
tokenDTO.setToken(token);
//首次初始化时还没有客户
tokenDTO.setCustomerId("");

Loading…
Cancel
Save