PtyPortletController中的:
@ApiOperation("获取门户信息")
@GetMapping("/portal/{portletId}")
public Response getPortlet(@RequestParam(value = "agyCode") String agyCode,
@RequestParam(value="fiscal") Integer fiscal,
@RequestParam(value="acbCode")String acbCode,
@RequestParam(value="perd")String perd,
@PathVariable String portletId) {
Map params = new HashMap();
params.put("agyCode", agyCode);
params.put("fiscal", fiscal);
params.put("acbCode", acbCode);
params.put("perd", perd);
String userCode = PtyContext.getUsername();
params.put("creator", userCode);
params.put("portletId", portletId);
PtyPortlet portlet = new PtyPortlet();
PtyPortlet portemp = portletUserService.getPortlet(userCode,portletId);
if(portemp!=null){
portlet.setArea(portemp.getArea());
portlet.setTitle(portemp.getTitle());
//portlet 内部配置
String config = confService.selUserConf(params);
portlet.setConfig(config);
//整合查询条件
params = portletUserService.confParams(params);
}
portemp = portletManage.getPortlet(portletId, params);
portlet.setData(portemp.getData());
portlet.setId(portemp.getId());
List<String> portletRoles = portletUserService.queryPortletRoles(userCode,portletId);
String roleCodes = String.join(",", portletRoles);
portlet.setRoleCodes(roleCodes);
return Response.success().setData(portlet);
}