101captain
2022-03-09 b2a5e4be739b232876b87e65ed70fa5186943d1e
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/service/impl/LoginServiceImpl.java
@@ -5,6 +5,7 @@
import javax.annotation.Resource;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComActVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
@@ -108,10 +109,13 @@
        LoginUserInfoVO loginUser = (LoginUserInfoVO)authentication.getPrincipal();
        String token = JWTTokenUtil.generateToken(loginUser);
        String refeshToken = JWTTokenUtil.generateRefeshToken(loginUser);
        ComActVO comActVO = loginUser.getComActVO();
        LoginReturnVO loginReturnVO = new LoginReturnVO();
        loginReturnVO.setToken(token);
        loginReturnVO.setRefreshToken(refeshToken);
        loginReturnVO.setCommunityId(loginUser.getCommunityId());
        loginReturnVO.setLat(comActVO.getLat());
        loginReturnVO.setLng(comActVO.getLng());
        return loginReturnVO;
    }