修正获取权限组织id集合读取时未去掉引号的问题

This commit is contained in:
daihh
2023-09-01 15:24:51 +08:00
parent 170a42e72c
commit 17b8498642
2 changed files with 21 additions and 3 deletions

View File

@@ -269,7 +269,7 @@ public class OutSideDataServiceImpl implements IOutSideDataService {
if(mainList!=null && !mainList.isEmpty()) {
Iterator<JsonNode> elements = mainList.elements();
while (elements.hasNext()){
String oid=elements.next().toString();
String oid=elements.next().asText();
orgIds.add(oid);
orgSetIds.add(oid);
}
@@ -278,7 +278,7 @@ public class OutSideDataServiceImpl implements IOutSideDataService {
if(readOnlyList!=null && !readOnlyList.isEmpty()) {
Iterator<JsonNode> elements = readOnlyList.elements();
while (elements.hasNext()){
String oid=elements.next().toString();
String oid=elements.next().asText();
if(!orgSetIds.contains(oid)) {
orgIds.add(oid);
}
@@ -293,6 +293,24 @@ public class OutSideDataServiceImpl implements IOutSideDataService {
}
// public static void main(String[] args) {
// String json="{\"mainList\": [\"6998568222014574593\",\"6998568178507059201\",\"6998568191714922497\",\"6998568195720482817\",\"6998568197947658241\",\"6998568188397228033\",\"6998568201529593857\",\"6998568211277156353\",\"6998568231271403521\",\"6998568237076320257\",\"6998568255854219265\",\"6998568239068614657\",\"6998568283775700993\",\"6998568294148214785\",\"6998568454492262401\",\"6998568457495384065\",\"6998568488780697601\",\"6998568492371021825\",\"6998568492924669953\",\"6998568219623821313\",\"6998568507143360513\",\"6998568507181109249\",\"6998568507248218113\",\"6998568181724090369\",\"6998568481679740929\",\"6998568513686474753\",\"6998568547987492865\",\"6998568579704819713\",\"6998568598142980097\",\"6998568598520467457\",\"6998568600449847297\",\"6998568651326754817\",\"6998568652689903617\",\"6998568658578706433\",\"6998568496787623937\"]}";
// ObjectMapper mapper=new ObjectMapper();
//
// try {
// JsonNode rootNode= mapper.readTree(json);
// JsonNode mainList = rootNode.get("mainList");
// Iterator<JsonNode> elements = mainList.elements();
// while (elements.hasNext()){
// String oid=elements.next().asText();
// System.out.println(oid);
// }
//
// }catch(Exception e) {
// e.printStackTrace();
// }
// }
private String getBaseUrl(String url) {
String baseUrl=SysConstant.getConfigValue("xboe.server.userbasic.url");
if(StringUtils.isBlank(baseUrl)) {

View File

@@ -143,7 +143,7 @@ public class CourseManageApi extends ApiBaseController{
//log.info("获取到的用户的组织机构权限ids",ids);
String aid=getCurrent().getAccountId();
//如果前端查询当前人的,这里去掉
if(StringUtils.isNotBlank( dto.getAid())) {
if(StringUtils.isNotBlank(dto.getAid())) {
dto.setAid(null);
}
dto.setOrgAid(aid);