forked from github/dataease
fix(数据集): 数据集sql变量
This commit is contained in:
parent
d934726036
commit
a9f6d0ac98
@ -1027,20 +1027,20 @@ public class DataSetTableService {
|
||||
}
|
||||
plainSelect.setWhere(CCJSqlParserUtil.parseCondExpression(stringBuilder.toString()));
|
||||
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
if (CollectionUtils.isNotEmpty(select.getWithItemsList())) {
|
||||
builder.append("WITH");
|
||||
builder.append(" ");
|
||||
}
|
||||
for (Iterator<WithItem> iter = select.getWithItemsList().iterator(); iter.hasNext();) {
|
||||
WithItem withItem = iter.next();
|
||||
builder.append(withItem.toString());
|
||||
if (iter.hasNext()) {
|
||||
builder.append(",");
|
||||
for (Iterator<WithItem> iter = select.getWithItemsList().iterator(); iter.hasNext();) {
|
||||
WithItem withItem = iter.next();
|
||||
builder.append(withItem.toString());
|
||||
if (iter.hasNext()) {
|
||||
builder.append(",");
|
||||
}
|
||||
}
|
||||
}
|
||||
builder.append(plainSelect);
|
||||
|
||||
builder.append( " " + plainSelect);
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ public class PermissionService {
|
||||
for (DataSetColumnPermissionsDTO columnPermissionsDTO : columnPermissionService.searchPermissions(dataSetColumnPermissionsDTO)) {
|
||||
columnPermissionsDTO.getWhiteListUser();
|
||||
List<Long> userIdList = new Gson().fromJson(columnPermissionsDTO.getWhiteListUser(), new TypeToken<List<Long>>() {}.getType());
|
||||
if(!userIdList.contains(userId)){
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && !userIdList.contains(userId)){
|
||||
roleColumnPermissionsDTOS.add(columnPermissionsDTO);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user