|
|
|
@ -167,11 +167,14 @@ public class TemporaryFixController {
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping("/getURL")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public R getURL(Map paramMap) {
|
|
|
|
|
// paramMap.put("materialCode","A10000");
|
|
|
|
|
public R getURL(@RequestBody Map paramMap) {
|
|
|
|
|
String respBody = null;
|
|
|
|
|
try {
|
|
|
|
|
if (paramMap.containsKey("url")){
|
|
|
|
|
String params = JSONUtil.toJsonStr(paramMap);
|
|
|
|
|
respBody = HttpUtil.post(String.valueOf(paramMap.get("url")), params, 1000 * 10);
|
|
|
|
|
respBody = respBody.concat("[测试]");
|
|
|
|
|
}else {
|
|
|
|
|
String requestUrl = yunBpmConfig.getApiBaseUrl() + "/api/login/Authentication/get_code";
|
|
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
|
|
params.put("username", yunBpmConfig.userName);
|
|
|
|
@ -181,6 +184,7 @@ public class TemporaryFixController {
|
|
|
|
|
"/api/oauth/authorize?client_id=api&response_type=code&scope=read&redirect_uri="
|
|
|
|
|
+ yunBpmConfig.getApiBaseUrl() + "/oauth");
|
|
|
|
|
respBody = HttpUtil.post(requestUrl, JSONUtil.toJsonStr(params),1000 * 10);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
return R.failed(e.toString());
|
|
|
|
|
}
|
|
|
|
|