| | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.ycl.feign.UYClient; |
| | | import com.ycl.platform.domain.param.UY.UYTokenParam; |
| | | import com.ycl.platform.domain.result.UY.UYLoginResult; |
| | | import com.ycl.utils.redis.RedisCache; |
| | | import feign.RequestInterceptor; |
| | | import feign.RequestTemplate; |
| | |
| | | param.setPasswd(passwd); |
| | | param.setEmail(email); |
| | | JSONObject jsonObject = uyClient.getToken(param); |
| | | log.info("请求token数据格式" + jsonObject); |
| | | redisCache.setCacheObject("Uy_Token",jsonObject.toJSONString(),3600, TimeUnit.SECONDS); |
| | | return "1"; |
| | | UYLoginResult loginResult = jsonObject.getObject("data", UYLoginResult.class); |
| | | String token = loginResult.getToken(); |
| | | redisCache.setCacheObject("Uy_Token", token, 3600, TimeUnit.SECONDS); |
| | | return token; |
| | | } |
| | | } |