服务指令bug

This commit is contained in:
1378012178@qq.com 2025-08-08 09:32:50 +08:00
parent e53fea5385
commit 188431723a
1 changed files with 28 additions and 0 deletions

View File

@ -1129,4 +1129,32 @@ public class SystemApiController {
} }
} }
} }
/**
* 获取机构对应媒体资源访问地址
*/
@GetMapping("/getMediaUrlByOrgCode")
public Result<Map> getMediaUrlByOrgCode(@RequestParam("orgCode") String orgCode) {
Map<String, String> result = Maps.newHashMap();
//查询源数据平台的接口api地址
{
//各平台api地址都存在管理系统中 管理系统api地址在系统参数配置中 ope_open_url
JSONObject opeOpenUrl = sysConfigApi.getByKeyByDS("master", "ope_open_url");
String opeApiAddress = opeOpenUrl.getString("configValue");
if (opeApiAddress.endsWith("/")) {
opeApiAddress = opeApiAddress.substring(0, opeApiAddress.length() - 1);
}
String bizApiAddress = opeApiAddress + "/api/baseInfo/getMediaUrlByOrgCode?orgCode=" + orgCode;
try {
String res = HttpRequestUtil.doGet(bizApiAddress, HttpRequestUtil.createDefaultHeaders());
JSONObject jsonResponse = JSON.parseObject(res);
JSONObject result_ = jsonResponse.getJSONObject("result");
result.put("mediaUrl", result_.getString("mediaUrl"));
return Result.ok(result);
} catch (Exception e) {
return Result.ok(result);
}
}
}
} }