Merge branch 'master' into docker_package

This commit is contained in:
wangliwen 2022-11-11 13:47:43 +08:00
commit df8e6c836c
2 changed files with 9 additions and 3 deletions

View File

@ -606,11 +606,13 @@ public class ResourceController {
" <soap:Body>\n" + " <soap:Body>\n" +
" <ZyShowrecord xmlns=\"http://tempuri.org/\">\n" + " <ZyShowrecord xmlns=\"http://tempuri.org/\">\n" +
String.format(" <guid>%s</guid>\n", applyGuid) + String.format(" <guid>%s</guid>\n", applyGuid) +
String.format(" <userguid>%s</userguid>", sysUser.getGuid()) + String.format(" <userguid>%s</userguid>\n", sysUser.getGuid()) +
// String.format(" <bmguid>%s</bmguid>\n", deptGuid) + // String.format(" <bmguid>%s</bmguid>\n", deptGuid) +
// " <userguid>e8d2fb43-f512-4918-ab47-1141b925af10</userguid>\n" +
" </ZyShowrecord>\n" + " </ZyShowrecord>\n" +
" </soap:Body>\n" + " </soap:Body>\n" +
"</soap:Envelope>"; "</soap:Envelope>";
logger.info(parame);
HttpHeaders requestHeaders = new HttpHeaders(); HttpHeaders requestHeaders = new HttpHeaders();
requestHeaders.set("SOAPAction", "http://tempuri.org/ZyShowrecord"); requestHeaders.set("SOAPAction", "http://tempuri.org/ZyShowrecord");
requestHeaders.setContentType(new MediaType("text", "xml", Charset.forName("utf-8"))); requestHeaders.setContentType(new MediaType("text", "xml", Charset.forName("utf-8")));
@ -619,9 +621,10 @@ public class ResourceController {
String body = restTemplate.postForEntity(url, requestEntity, String.class).getBody(); String body = restTemplate.postForEntity(url, requestEntity, String.class).getBody();
String startTag = "<ZyShowrecordResult>"; String startTag = "<ZyShowrecordResult>";
String endTag = "</ZyShowrecordResult>"; String endTag = "</ZyShowrecordResult>";
logger.info(body);
String json = body.substring(body.indexOf(startTag) + startTag.length(), body.indexOf(endTag)); String json = body.substring(body.indexOf(startTag) + startTag.length(), body.indexOf(endTag));
HashMap result = JSON.parseObject(json, HashMap.class); logger.info(json);
List result = JSON.parseObject(json, ArrayList.class);
return new Result().ok(result); return new Result().ok(result);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();

View File

@ -99,6 +99,9 @@ public class ShiroConfig {
filterMap.put("/metrics/**", "anon"); filterMap.put("/metrics/**", "anon");
filterMap.put("/gateway-monitor/**", "anon"); filterMap.put("/gateway-monitor/**", "anon");
filterMap.put("/enke/**", "anon"); filterMap.put("/enke/**", "anon");
// filterMap.put("/resource/ZywMessage/yaweiApproveDetails", "anon");
filterMap.put("/**", "oauth2"); filterMap.put("/**", "oauth2");
shiroFilter.setFilterChainDefinitionMap(filterMap); shiroFilter.setFilterChainDefinitionMap(filterMap);