Commit b27c9f3e authored by 王亚雷's avatar 王亚雷

游客权限

parent a6d5c8d4
......@@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(value = "service-jifen", contextId = "jifen", fallbackFactory = FeignBackClientForActivity.class, url = "http://tp-jifen-svc", path = "/jifen")
@FeignClient(value = "service-jifen", contextId = "jifen", fallbackFactory = FeignBackClientForActivity.class, url = "${tanpu.jifen.svc:http://tp-jifen-svc}", path = "/jifen")
// @FeignClient(value = "service-jifen", contextId = "jifen", fallbackFactory = FeignBackClientForActivity.class, url = "http://127.0.0.1:8202/community")
public interface FeignClientForActivity {
......
......@@ -2,27 +2,24 @@ package com.tanpu.community.feign.fatools;
import com.tanpu.common.api.CommonResp;
import com.tanpu.community.api.beans.req.page.Page;
import com.tanpu.community.api.beans.req.page.Pageable;
import com.tanpu.community.api.beans.vo.feign.course.ShortVideoBaseInfoResp;
import com.tanpu.community.api.beans.vo.feign.fatools.UserInfoNewChief;
import com.tanpu.community.api.beans.vo.feign.fatools.UserInfoOrg;
import com.tanpu.community.api.beans.vo.feign.fatools.UserInfoResp;
import com.tanpu.community.api.beans.vo.feign.user.FileQueryResp;
import com.tanpu.community.api.beans.vo.feign.user.UserInfoVo;
import com.tanpu.community.config.FeignConfiguration;
import com.tanpu.community.feign.diagnose.FeignBackClientForDiagnose;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
import java.util.Map;
import java.util.Set;
@FeignClient(value = "fatools", contextId = "fatools", fallbackFactory = FeignbackForFatools.class, url = "http://tp-fatools-svc", path = "/fatools")
@FeignClient(value = "fatools", contextId = "fatools", fallbackFactory = FeignbackForFatools.class, url = "${tanpu.fatools.svc:http://tp-fatools-svc}", path = "/fatools")
//@FeignClient(value = "fatools", contextId = "fatoolsUser", fallbackFactory = FeignbackForFatools.class, path = "/fatools")
public interface FeignClientForFatools {
......@@ -44,7 +41,7 @@ public interface FeignClientForFatools {
// 用户信息查询 (供圈子服务调用)
@ApiOperation(value = "查询用户信息")
@GetMapping(value = "/queryUserInfoNew")
@GetMapping(value = "/queryUserInfoNew", produces = {MediaType.APPLICATION_JSON_VALUE})
CommonResp<UserInfoResp> queryUserInfoNew(@RequestParam("userId") String userId);
@ApiOperation(value = "批量查询查询基本信息")
......
......@@ -34,9 +34,9 @@ public class HttpServletHelper {
if (isAndroid(clientEnv) || isIOS(clientEnv) || isPc(clientEnv) || isMiniProgram(clientEnv)) {
// android,ios,pc,小程序用token
String token = request.getHeader(RedisKeyConstant.TAMP_TOKEN);
userId = redisHelper.get(RedisKeyConstant.REDIS_PREFIX_TOKEN + token);
// redis获取的value,都带有 "",这里去掉
userId = StringUtils.remove(redisHelper.get(RedisKeyConstant.REDIS_PREFIX_TOKEN + token), "\"");
} else {
// 用cookie
Cookie[] cookies = request.getCookies();
if (cookies != null) {
......@@ -48,6 +48,7 @@ public class HttpServletHelper {
}
}
}
log.debug("当前登录用户Id: {}", userId);
return userId;
}
......
......@@ -96,4 +96,14 @@ recommend:
python: 1
python:
enable: false
url: http://172.168.0.164:9000/api/get_recommend?user_id=2431614397151511
\ No newline at end of file
url: http://172.168.0.164:9000/api/get_recommend?user_id=2431614397151511
tmpfile:
dir: /data/tmp
tanpu:
fatools:
svc: https://testtamper.tanpuyun.com
jifen:
svc: https://testtamper.tanpuyun.com
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment