提交 01abc82d 编写于 作者: sq3536's avatar sq3536

app admin

上级 35ec6cdd
......@@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.context.annotation.Lazy;
import org.springframework.http.HttpRequest;
......@@ -89,18 +90,24 @@ public class UAACoreResource {
@Autowired
private SysAppService sysAppService;
@Value("${ibiz.admin.userid:0100}")
private String adminuserid;
@GetMapping(value = "uaa/access-center/app-switcher/{id}")
public ResponseEntity<JSONObject> appswitcher(@PathVariable("id") String id, HttpServletRequest request)
public ResponseEntity<JSONObject> appswitcher(@PathVariable("id") String id)
{
String proto=request.getHeader("x-forwarded-proto");
String hosts=request.getHeader("x-forwarded-for");
String domains="";
if(StringUtils.isEmpty(proto))
proto="http";
if(!StringUtils.isEmpty(hosts))
domains=proto+"://"+hosts;
return ResponseEntity.ok(sysAppService.getAppSwitcher(id, AuthenticationUser.getAuthenticationUser().getUserid()));
// String proto=request.getHeader("x-forwarded-proto");
// String hosts=request.getHeader("x-forwarded-for");
// String domains="";
// if(StringUtils.isEmpty(proto))
// proto="http";
// if(!StringUtils.isEmpty(hosts))
// domains=proto+"://"+hosts;
String userId = AuthenticationUser.getAuthenticationUser().getUserid();
if(StringUtils.isEmpty(userId))
userId = adminuserid;
return ResponseEntity.ok(sysAppService.getAppSwitcher(id,userId));
}
@PutMapping(value = "uaa/access-center/app-switcher/{id}")
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册