commit
5b2a822083
@ -5,7 +5,7 @@ PR are always welcome, even if they only contain small fixes like typos or a few
|
||||
|
||||
Please submit a PR broken down into small changes' bit by bit. A PR consisting of a lot of features and code changes may be hard to review. It is recommended to submit PRs in an incremental fashion.
|
||||
|
||||
This [development guideline](https://dataease.io/docs/dev_manual/dev_manual/) contains information about repository structure, how to set up development environment, how to run it, and more.
|
||||
This [development guideline](https://dataease.io/docs/v1/dev_manual/dev_manual/) contains information about repository structure, how to set up development environment, how to run it, and more.
|
||||
|
||||
Note: If you split your pull request to small changes, please make sure any of the changes goes to master will not break anything. Otherwise, it can not be merged until this feature complete.
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ curl -sSL https://dataease.oss-cn-hangzhou.aliyuncs.com/quick_start.sh | bash
|
||||
|
||||
**学习资料**
|
||||
|
||||
- [在线文档](https://dataease.io/docs/)
|
||||
- [在线文档](https://dataease.io/docs/v1)
|
||||
- [社区论坛](https://bbs.fit2cloud.com/c/de/6)
|
||||
|
||||
## DataEase v1 的技术栈
|
||||
|
||||
@ -63,16 +63,6 @@ public class DriverMgmController {
|
||||
@GetMapping("/list/{type}")
|
||||
public List<DriverDTO> listDeDriver(@PathVariable String type) throws Exception {
|
||||
List<DriverDTO> driverDTOS = listDeDriver().stream().filter(driverDTO -> driverDTO.getType().equalsIgnoreCase(type)).collect(Collectors.toList());
|
||||
DriverDTO driverDTO = new DriverDTO();
|
||||
driverDTO.setId("default");
|
||||
driverDTO.setName("default");
|
||||
driverDTO.setDriverClass("default");
|
||||
datasourceService.types().forEach(dataSourceType -> {
|
||||
if (dataSourceType.getType().equalsIgnoreCase(type)) {
|
||||
driverDTO.setSurpportVersions(dataSourceType.getSurpportVersions());
|
||||
}
|
||||
});
|
||||
driverDTOS.add(driverDTO);
|
||||
driverDTOS.forEach(driverDTO1 -> {
|
||||
if (StringUtils.isEmpty(driverDTO1.getSurpportVersions())) {
|
||||
driverDTO1.setNameAlias(driverDTO1.getName());
|
||||
|
||||
@ -581,10 +581,16 @@ public class JdbcProvider extends DefaultJdbcProvider {
|
||||
if (isDefaultClassLoader(customDriver)) {
|
||||
driverClassName = defaultDriver;
|
||||
jdbcClassLoader = extendedJdbcClassLoader;
|
||||
for (DataSourceType value : SpringContextUtil.getApplicationContext().getBeansOfType(DataSourceType.class).values()) {
|
||||
if (value.getType().equalsIgnoreCase(datasourceRequest.getDatasource().getType())) {
|
||||
surpportVersions = value.getSurpportVersions();
|
||||
|
||||
DeDriver driver = deDriverMapper.selectByPrimaryKey("default-" + datasourceRequest.getDatasource().getType());
|
||||
if(driver == null){
|
||||
for (DataSourceType value : SpringContextUtil.getApplicationContext().getBeansOfType(DataSourceType.class).values()) {
|
||||
if (value.getType().equalsIgnoreCase(datasourceRequest.getDatasource().getType())) {
|
||||
surpportVersions = value.getSurpportVersions();
|
||||
}
|
||||
}
|
||||
}else {
|
||||
surpportVersions = driver.getSurpportVersions();
|
||||
}
|
||||
} else {
|
||||
if (deDriver == null) {
|
||||
|
||||
@ -1429,7 +1429,12 @@ public class DorisQueryProvider extends QueryProvider {
|
||||
String whereValue = "";
|
||||
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
// 过滤空数据
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
@ -1448,13 +1453,12 @@ public class DorisQueryProvider extends QueryProvider {
|
||||
whereValue = String.format(DorisConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||
}
|
||||
} else {
|
||||
// doris field type test
|
||||
/*if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereValue = String.format(DorisConstants.WHERE_NUMBER_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(DorisConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(DorisConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}*/
|
||||
whereValue = String.format(DorisConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
@ -1462,7 +1466,7 @@ public class DorisQueryProvider extends QueryProvider {
|
||||
.build());
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
@ -1371,7 +1371,12 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
String whereValue = "";
|
||||
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
// 过滤空数据
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
@ -1392,7 +1397,12 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
whereValue = String.format(MysqlConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||
}
|
||||
} else {
|
||||
whereValue = String.format(MysqlConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(MySQLConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(MySQLConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
@ -1400,7 +1410,7 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
.build());
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
@ -1096,7 +1096,7 @@ public class CKQueryProvider extends QueryProvider {
|
||||
whereValue = "'" + value + "%'";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "end_with")) {
|
||||
whereValue = "'%" + value + "'";
|
||||
}else {
|
||||
} else {
|
||||
if (field.getDeType() == DeTypeConstants.DE_TIME) {
|
||||
whereValue = String.format(CKConstants.toDateTime, "'" + value + "'");
|
||||
} else {
|
||||
@ -1188,7 +1188,7 @@ public class CKQueryProvider extends QueryProvider {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.equalsIgnoreCase(item.getTerm(), "like")) {
|
||||
whereValue = "'%" + value + "%'";
|
||||
}else if (StringUtils.equalsIgnoreCase(item.getTerm(), "begin_with")) {
|
||||
} else if (StringUtils.equalsIgnoreCase(item.getTerm(), "begin_with")) {
|
||||
whereValue = "'" + value + "%'";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "end_with")) {
|
||||
whereValue = "'%" + value + "'";
|
||||
@ -1462,7 +1462,12 @@ public class CKQueryProvider extends QueryProvider {
|
||||
String whereValue = "";
|
||||
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
// 过滤空数据
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
@ -1477,7 +1482,12 @@ public class CKQueryProvider extends QueryProvider {
|
||||
whereValue = String.format(CKConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||
}
|
||||
} else {
|
||||
whereValue = isCompleteField(value.get(0)) ? value.get(0) : String.format(CKConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = isCompleteField(value.get(0)) ? "" : String.format(CKConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = isCompleteField(value.get(0)) ? value.get(0) : String.format(CKConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
|
||||
if (!request.getIsTree() && fieldList.get(0).getDeType() == DeTypeConstants.DE_TIME && StringUtils.equalsIgnoreCase(request.getOperator(), "null")) {
|
||||
@ -1498,7 +1508,7 @@ public class CKQueryProvider extends QueryProvider {
|
||||
}
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
@ -1468,7 +1468,11 @@ public class Db2QueryProvider extends QueryProvider {
|
||||
if (isFloat) {
|
||||
whereValue = "(" + StringUtils.join(value, ",") + ")";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
@ -1487,7 +1491,12 @@ public class Db2QueryProvider extends QueryProvider {
|
||||
if (isFloat) {
|
||||
whereValue = value.get(0);
|
||||
} else {
|
||||
whereValue = String.format(Db2Constants.WHERE_VALUE_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(Db2Constants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(Db2Constants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1497,7 +1506,7 @@ public class Db2QueryProvider extends QueryProvider {
|
||||
.build());
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
@ -1395,7 +1395,12 @@ public class EsQueryProvider extends QueryProvider {
|
||||
String whereValue = "";
|
||||
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
// 过滤空数据
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
@ -1410,7 +1415,12 @@ public class EsQueryProvider extends QueryProvider {
|
||||
whereValue = String.format(EsSqlLConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||
}
|
||||
} else {
|
||||
whereValue = String.format(EsSqlLConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(EsSqlLConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(EsSqlLConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
@ -1418,7 +1428,7 @@ public class EsQueryProvider extends QueryProvider {
|
||||
.build());
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
@ -1041,11 +1041,11 @@ public class HiveQueryProvider extends QueryProvider {
|
||||
whereValue = "('" + String.join("','", value.split(",")) + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "like")) {
|
||||
whereValue = "'%" + value + "%'";
|
||||
}else if (StringUtils.equalsIgnoreCase(item.getTerm(), "begin_with")) {
|
||||
} else if (StringUtils.equalsIgnoreCase(item.getTerm(), "begin_with")) {
|
||||
whereValue = "'" + value + "%'";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "end_with")) {
|
||||
whereValue = "'%" + value + "'";
|
||||
} else {
|
||||
} else {
|
||||
whereValue = String.format(HiveConstants.WHERE_VALUE_VALUE, value);
|
||||
}
|
||||
SQLObj build = SQLObj.builder()
|
||||
@ -1352,7 +1352,12 @@ public class HiveQueryProvider extends QueryProvider {
|
||||
String whereValue = "";
|
||||
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
// 过滤空数据
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
@ -1367,7 +1372,12 @@ public class HiveQueryProvider extends QueryProvider {
|
||||
whereValue = String.format(HiveConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||
}
|
||||
} else {
|
||||
whereValue = String.format(HiveConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(HiveConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(HiveConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
@ -1375,7 +1385,7 @@ public class HiveQueryProvider extends QueryProvider {
|
||||
.build());
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
@ -1046,11 +1046,11 @@ public class ImpalaQueryProvider extends QueryProvider {
|
||||
whereValue = "('" + String.join("','", value.split(",")) + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "like")) {
|
||||
whereValue = "'%" + value + "%'";
|
||||
}else if (StringUtils.equalsIgnoreCase(item.getTerm(), "begin_with")) {
|
||||
} else if (StringUtils.equalsIgnoreCase(item.getTerm(), "begin_with")) {
|
||||
whereValue = "'" + value + "%'";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "end_with")) {
|
||||
whereValue = "'%" + value + "'";
|
||||
} else {
|
||||
} else {
|
||||
if (field.getDeExtractType() == DeTypeConstants.DE_INT || field.getDeExtractType() == DeTypeConstants.DE_FLOAT || field.getDeExtractType() == DeTypeConstants.DE_BOOL) {
|
||||
whereValue = String.format(ImpalaConstants.WHERE_NUMBER_VALUE_VALUE, value);
|
||||
} else {
|
||||
@ -1371,7 +1371,12 @@ public class ImpalaQueryProvider extends QueryProvider {
|
||||
if (!request.getIsTree() && (field.getDeExtractType() == DeTypeConstants.DE_INT || field.getDeExtractType() == DeTypeConstants.DE_FLOAT || field.getDeExtractType() == DeTypeConstants.DE_BOOL)) {
|
||||
whereValue = "(" + StringUtils.join(value, ",") + ")";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
// 过滤空数据
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
@ -1394,7 +1399,12 @@ public class ImpalaQueryProvider extends QueryProvider {
|
||||
if (!request.getIsTree() && (field.getDeExtractType() == DeTypeConstants.DE_INT || field.getDeExtractType() == DeTypeConstants.DE_FLOAT || field.getDeExtractType() == DeTypeConstants.DE_BOOL)) {
|
||||
whereValue = String.format(ImpalaConstants.WHERE_NUMBER_VALUE_VALUE, value.get(0));
|
||||
} else {
|
||||
whereValue = String.format(ImpalaConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(ImpalaConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(ImpalaConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
@ -1403,7 +1413,7 @@ public class ImpalaQueryProvider extends QueryProvider {
|
||||
.build());
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
@ -1227,7 +1227,12 @@ public class MongoQueryProvider extends QueryProvider {
|
||||
String whereValue = "";
|
||||
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
// 过滤空数据
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
@ -1243,7 +1248,12 @@ public class MongoQueryProvider extends QueryProvider {
|
||||
}
|
||||
} else {
|
||||
if (!request.getIsTree() && fieldList.get(0).getDeType() == DeTypeConstants.DE_STRING) {
|
||||
whereValue = String.format(MongoConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(MongoConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(MongoConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
} else {
|
||||
whereValue = value.get(0);
|
||||
}
|
||||
@ -1254,7 +1264,7 @@ public class MongoQueryProvider extends QueryProvider {
|
||||
.build());
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
@ -1436,7 +1436,12 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
String whereValue = "";
|
||||
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
// 过滤空数据
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
@ -1455,7 +1460,12 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
whereValue = String.format(MySQLConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||
}
|
||||
} else {
|
||||
whereValue = String.format(MySQLConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(MySQLConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(MySQLConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
@ -1463,7 +1473,7 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
.build());
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
@ -1542,7 +1542,12 @@ public class OracleQueryProvider extends QueryProvider {
|
||||
String whereValue = "";
|
||||
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
// 过滤空数据
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
@ -1559,7 +1564,12 @@ public class OracleQueryProvider extends QueryProvider {
|
||||
whereValue = String.format(OracleConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||
}
|
||||
} else {
|
||||
whereValue = String.format(OracleConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(OracleConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(OracleConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
@ -1567,7 +1577,7 @@ public class OracleQueryProvider extends QueryProvider {
|
||||
.build());
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
@ -1392,7 +1392,12 @@ public class PgQueryProvider extends QueryProvider {
|
||||
String whereValue = "";
|
||||
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
// 过滤空数据
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
@ -1407,7 +1412,12 @@ public class PgQueryProvider extends QueryProvider {
|
||||
whereValue = String.format(PgConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||
}
|
||||
} else {
|
||||
whereValue = String.format(PgConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(PgConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(PgConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
@ -1415,7 +1425,7 @@ public class PgQueryProvider extends QueryProvider {
|
||||
.build());
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
@ -1378,7 +1378,12 @@ public class RedshiftQueryProvider extends QueryProvider {
|
||||
String whereValue = "";
|
||||
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
// 过滤空数据
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
@ -1393,7 +1398,12 @@ public class RedshiftQueryProvider extends QueryProvider {
|
||||
whereValue = String.format(PgConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||
}
|
||||
} else {
|
||||
whereValue = String.format(PgConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(PgConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(PgConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
@ -1401,7 +1411,7 @@ public class RedshiftQueryProvider extends QueryProvider {
|
||||
.build());
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
@ -1181,7 +1181,7 @@ public class SqlserverQueryProvider extends QueryProvider {
|
||||
whereValue = "'" + value + "%'";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "end_with")) {
|
||||
whereValue = "'%" + value + "'";
|
||||
}else {
|
||||
} else {
|
||||
if (field.getType().equalsIgnoreCase("NVARCHAR")) {
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE_CH, value);
|
||||
} else {
|
||||
@ -1270,7 +1270,7 @@ public class SqlserverQueryProvider extends QueryProvider {
|
||||
whereValue = "'" + value + "%'";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "end_with")) {
|
||||
whereValue = "'%" + value + "'";
|
||||
}else {
|
||||
} else {
|
||||
if (field.getType().equalsIgnoreCase("NVARCHAR")) {
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE_CH, value);
|
||||
} else {
|
||||
@ -1523,7 +1523,12 @@ public class SqlserverQueryProvider extends QueryProvider {
|
||||
return "N" + "'" + str + "'";
|
||||
}).collect(Collectors.joining(",")) + ")";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
// 过滤空数据
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
@ -1543,7 +1548,12 @@ public class SqlserverQueryProvider extends QueryProvider {
|
||||
if ((request.getDatasetTableField() != null && request.getDatasetTableField().getType().equalsIgnoreCase("NVARCHAR")) || (request.getDatasetTableFieldList() != null && request.getDatasetTableFieldList().stream().map(DatasetTableField::getType).collect(Collectors.toList()).contains("nvarchar"))) {
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE_CH, value.get(0));
|
||||
} else {
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -1553,7 +1563,7 @@ public class SqlserverQueryProvider extends QueryProvider {
|
||||
.build());
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
@ -1329,10 +1329,10 @@ public class ChartViewService {
|
||||
}
|
||||
// 如果是表格导出查询 则在此处直接就可以返回
|
||||
if(chartExtRequest.getExcelExportFlag()){
|
||||
Map<String,Object> sourceInfo = new HashMap<>();
|
||||
Map<String, Object> sourceInfo = ChartDataBuild.transTableNormal(xAxis, yAxis, view, data, extStack, desensitizationList);
|
||||
sourceInfo.put("sourceData",data);
|
||||
chartViewDTO.setData(sourceInfo);
|
||||
return chartViewDTO;
|
||||
view.setData(sourceInfo);
|
||||
return view;
|
||||
}
|
||||
// 同比/环比计算,通过对比类型和数据设置,计算出对应指标的结果,然后替换结果data数组中的对应元素
|
||||
// 如果因维度变化(如时间字段缺失,时间字段的展示格式变化)导致无法计算结果的,则结果data数组中的对应元素全置为null
|
||||
|
||||
@ -89,7 +89,7 @@ public class ViewExportExcel {
|
||||
private List<String> findTableInfoViewIds(List<Map<String, Object>> components) {
|
||||
List<String> tableInfoViewIds = new ArrayList<>();
|
||||
components.forEach(element -> {
|
||||
if (StringUtils.equals(element.get("type").toString(), "view") && StringUtils.equals(((Map<String, Object>) element.get("propValue")).get("innerType").toString(), "table-info")) {
|
||||
if (StringUtils.equals(String.valueOf(element.get("type")), "view") && StringUtils.equals(String.valueOf(((Map<String, Object>) element.get("propValue")).get("innerType")), "table-info")) {
|
||||
tableInfoViewIds.add(((Map<String, Object>) element.get("propValue")).get("viewId").toString());
|
||||
}
|
||||
});
|
||||
|
||||
@ -62,10 +62,7 @@ import io.dataease.service.datasource.DatasourceService;
|
||||
import io.dataease.service.engine.EngineService;
|
||||
import io.dataease.service.sys.SysAuthService;
|
||||
import lombok.Data;
|
||||
import net.sf.jsqlparser.expression.Alias;
|
||||
import net.sf.jsqlparser.expression.BinaryExpression;
|
||||
import net.sf.jsqlparser.expression.Expression;
|
||||
import net.sf.jsqlparser.expression.Parenthesis;
|
||||
import net.sf.jsqlparser.expression.*;
|
||||
import net.sf.jsqlparser.expression.operators.conditional.AndExpression;
|
||||
import net.sf.jsqlparser.expression.operators.conditional.OrExpression;
|
||||
import net.sf.jsqlparser.expression.operators.relational.*;
|
||||
@ -1185,11 +1182,9 @@ public class DataSetTableService {
|
||||
binaryExpression = (BinaryExpression) expr;
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
if (binaryExpression != null) {
|
||||
boolean hasSubBinaryExpression = binaryExpression instanceof AndExpression || binaryExpression instanceof OrExpression;
|
||||
|
||||
if (!hasSubBinaryExpression && !(binaryExpression.getLeftExpression() instanceof BinaryExpression) && !(binaryExpression.getLeftExpression() instanceof InExpression) && hasVariable(binaryExpression.getRightExpression().toString())) {
|
||||
if (!hasSubBinaryExpression && !(binaryExpression.getLeftExpression() instanceof BinaryExpression) && !(binaryExpression.getLeftExpression() instanceof InExpression) && (hasVariable(binaryExpression.getLeftExpression().toString()) || hasVariable(binaryExpression.getRightExpression().toString()))) {
|
||||
stringBuilder.append(SubstitutedSql);
|
||||
} else {
|
||||
expr.accept(getExpressionDeParser(stringBuilder));
|
||||
@ -2380,8 +2375,6 @@ public class DataSetTableService {
|
||||
public List<ExcelSheetData> parseExcel(String filename, InputStream inputStream, boolean isPreview) throws Exception {
|
||||
List<ExcelSheetData> excelSheetDataList = new ArrayList<>();
|
||||
String suffix = filename.substring(filename.lastIndexOf(".") + 1);
|
||||
excelSheetDataList = excelSheetDataList(inputStream, isPreview);
|
||||
|
||||
if (StringUtils.equalsIgnoreCase(suffix, "csv")) {
|
||||
List<TableField> fields = new ArrayList<>();
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));
|
||||
@ -2423,6 +2416,8 @@ public class DataSetTableService {
|
||||
excelSheetData.setExcelLabel(filename);
|
||||
excelSheetData.setFieldsMd5(Md5Utils.md5(StringUtils.join(fieldArray, ",")));
|
||||
excelSheetDataList.add(excelSheetData);
|
||||
}else {
|
||||
excelSheetDataList = excelSheetDataList(inputStream, isPreview);
|
||||
}
|
||||
|
||||
inputStream.close();
|
||||
@ -2833,28 +2828,43 @@ public class DataSetTableService {
|
||||
|
||||
private void visitBinaryExpr(BinaryExpression expr, String operator) {
|
||||
boolean hasSubBinaryExpression = false;
|
||||
try {
|
||||
BinaryExpression leftBinaryExpression = (BinaryExpression) expr.getLeftExpression();
|
||||
if(expr.getLeftExpression() instanceof Parenthesis){
|
||||
Parenthesis parenthesis = (Parenthesis)expr.getLeftExpression();
|
||||
BinaryExpression leftBinaryExpression = (BinaryExpression)parenthesis.getExpression();
|
||||
hasSubBinaryExpression = leftBinaryExpression instanceof AndExpression || leftBinaryExpression instanceof OrExpression;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if(expr.getLeftExpression() instanceof BinaryExpression){
|
||||
try {
|
||||
BinaryExpression leftBinaryExpression = (BinaryExpression) expr.getLeftExpression();
|
||||
hasSubBinaryExpression = leftBinaryExpression instanceof AndExpression || leftBinaryExpression instanceof OrExpression;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (expr.getLeftExpression() instanceof BinaryExpression && !hasSubBinaryExpression && hasVariable(expr.getLeftExpression().toString())) {
|
||||
if ((expr.getLeftExpression() instanceof BinaryExpression || expr.getLeftExpression() instanceof Parenthesis) && !hasSubBinaryExpression && hasVariable(expr.getLeftExpression().toString())) {
|
||||
getBuffer().append(SubstitutedSql);
|
||||
} else {
|
||||
expr.getLeftExpression().accept(this);
|
||||
}
|
||||
|
||||
getBuffer().append(" " + operator + " ");
|
||||
|
||||
hasSubBinaryExpression = false;
|
||||
try {
|
||||
BinaryExpression rightBinaryExpression = (BinaryExpression) expr.getRightExpression();
|
||||
if(expr.getRightExpression() instanceof Parenthesis){
|
||||
Parenthesis parenthesis = (Parenthesis)expr.getRightExpression();
|
||||
BinaryExpression rightBinaryExpression = (BinaryExpression)parenthesis.getExpression();
|
||||
hasSubBinaryExpression = rightBinaryExpression instanceof AndExpression || rightBinaryExpression instanceof OrExpression;
|
||||
;
|
||||
} catch (Exception e) {
|
||||
}
|
||||
if (expr.getRightExpression() instanceof BinaryExpression && !hasSubBinaryExpression && hasVariable(expr.getRightExpression().toString())) {
|
||||
if(expr.getRightExpression() instanceof BinaryExpression){
|
||||
try {
|
||||
BinaryExpression rightBinaryExpression = (BinaryExpression) expr.getRightExpression();
|
||||
hasSubBinaryExpression = rightBinaryExpression instanceof AndExpression || rightBinaryExpression instanceof OrExpression;
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((expr.getRightExpression() instanceof Parenthesis || expr.getRightExpression() instanceof BinaryExpression || expr.getRightExpression() instanceof Function) && !hasSubBinaryExpression && hasVariable(expr.getRightExpression().toString())) {
|
||||
getBuffer().append(SubstitutedSql);
|
||||
} else {
|
||||
expr.getRightExpression().accept(this);
|
||||
|
||||
@ -757,8 +757,6 @@ public class ExtractDataService {
|
||||
for (ExcelSheetData excelSheetData : excelSheetDataList) {
|
||||
String suffix = excelSheetData.getPath().substring(excelSheetData.getPath().lastIndexOf(".") + 1);
|
||||
List<ExcelSheetData> totalSheets = new ArrayList<>();
|
||||
totalSheets = dataSetTableService.excelSheetDataList(new FileInputStream(excelSheetData.getPath()), false);
|
||||
|
||||
if (StringUtils.equalsIgnoreCase(suffix, "csv")) {
|
||||
List<TableField> fields = new ArrayList<>();
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(excelSheetData.getPath()), StandardCharsets.UTF_8));
|
||||
@ -796,6 +794,8 @@ public class ExtractDataService {
|
||||
csvSheetData.setExcelLabel(excelSheetData.getExcelLabel());
|
||||
csvSheetData.setFieldsMd5(Md5Utils.md5(StringUtils.join(fieldArray, ",")));
|
||||
totalSheets = Arrays.asList(csvSheetData);
|
||||
}else {
|
||||
totalSheets = dataSetTableService.excelSheetDataList(new FileInputStream(excelSheetData.getPath()), false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@ import io.dataease.i18n.Translator;
|
||||
import io.dataease.plugins.common.base.domain.*;
|
||||
import io.dataease.plugins.common.base.mapper.DeDriverDetailsMapper;
|
||||
import io.dataease.plugins.common.base.mapper.DeDriverMapper;
|
||||
import io.dataease.plugins.common.dto.datasource.DataSourceType;
|
||||
import io.dataease.plugins.datasource.entity.JdbcConfiguration;
|
||||
import io.dataease.plugins.datasource.provider.DefaultJdbcProvider;
|
||||
import io.dataease.plugins.datasource.provider.ExtendedJdbcClassLoader;
|
||||
@ -30,6 +31,7 @@ import java.lang.reflect.Modifier;
|
||||
import java.util.*;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Service
|
||||
@ -46,20 +48,54 @@ public class DriverService {
|
||||
|
||||
public List<DriverDTO> list() throws Exception {
|
||||
List<DriverDTO> driverDTOS = new ArrayList<>();
|
||||
deDriverMapper.selectByExampleWithBLOBs(null).forEach(deDriver -> {
|
||||
Collection<DataSourceType> dataSourceTypes = datasourceService.types();
|
||||
List<String> dsTypes = datasourceService.types().stream().map(DataSourceType::getType).collect(Collectors.toList());
|
||||
List<DeDriver> deDrivers = deDriverMapper.selectByExampleWithBLOBs(null);
|
||||
List<String> driverTypes = deDrivers.stream().filter(deDriver -> deDriver.getId().contains("default")).map(DeDriver::getType).collect(Collectors.toList());
|
||||
deDrivers.forEach(deDriver -> {
|
||||
DriverDTO driverDTO = new DriverDTO();
|
||||
BeanUtils.copyBean(driverDTO, deDriver);
|
||||
datasourceService.types().forEach(dataSourceType -> {
|
||||
dataSourceTypes.forEach(dataSourceType -> {
|
||||
if (dataSourceType.getType().equalsIgnoreCase(deDriver.getType())) {
|
||||
driverDTO.setTypeDesc(dataSourceType.getName());
|
||||
}
|
||||
|
||||
});
|
||||
driverDTOS.add(driverDTO);
|
||||
});
|
||||
for (String dsType : dsTypes) {
|
||||
if(!driverTypes.contains(dsType)){
|
||||
DriverDTO driverDTO = new DriverDTO();
|
||||
driverDTO.setId("default-" + dsType);
|
||||
driverDTO.setName("default");
|
||||
driverDTO.setType(dsType);
|
||||
dataSourceTypes.forEach(dataSourceType -> {
|
||||
if (dataSourceType.getType().equalsIgnoreCase(dsType)) {
|
||||
driverDTO.setTypeDesc(dataSourceType.getName());
|
||||
driverDTO.setSurpportVersions(dataSourceType.getSurpportVersions());
|
||||
}
|
||||
});
|
||||
driverDTOS.add(driverDTO);
|
||||
}
|
||||
}
|
||||
return driverDTOS;
|
||||
}
|
||||
|
||||
public DeDriver getDefaultDeDriver(String type){
|
||||
DeDriver deDriver = deDriverMapper.selectByPrimaryKey("default-" + type);
|
||||
if(deDriver == null){
|
||||
deDriver = new DeDriver();
|
||||
deDriver.setId("default-" + type);
|
||||
deDriver.setName("default");
|
||||
deDriver.setType(type);
|
||||
for (DataSourceType dataSourceType : datasourceService.types()) {
|
||||
if (dataSourceType.getType().equalsIgnoreCase(type)) {
|
||||
deDriver.setSurpportVersions(dataSourceType.getSurpportVersions());
|
||||
}
|
||||
}
|
||||
}
|
||||
return deDriver;
|
||||
}
|
||||
|
||||
public void delete(DeDriver deDriver) {
|
||||
for (Datasource datasource : datasourceService.listByType(deDriver.getType())) {
|
||||
JdbcConfiguration configuration = new Gson().fromJson(datasource.getConfiguration(), JdbcConfiguration.class);
|
||||
@ -90,12 +126,34 @@ public class DriverService {
|
||||
}
|
||||
|
||||
public DeDriver update(DeDriver deDriver) {
|
||||
deDriverMapper.updateByPrimaryKeyWithBLOBs(deDriver);
|
||||
if(StringUtils.isNotEmpty(deDriver.getId()) && deDriver.getId().contains("default")){
|
||||
if(deDriverMapper.selectByPrimaryKey(deDriver.getId()) != null){
|
||||
deDriverMapper.updateByPrimaryKeyWithBLOBs(deDriver);
|
||||
}else {
|
||||
deDriver.setCreateTime(System.currentTimeMillis());
|
||||
deDriverMapper.insert(deDriver);
|
||||
}
|
||||
}else {
|
||||
deDriverMapper.updateByPrimaryKeyWithBLOBs(deDriver);
|
||||
}
|
||||
|
||||
return deDriver;
|
||||
}
|
||||
|
||||
public DeDriver get(String id) {
|
||||
return deDriverMapper.selectByPrimaryKey(id);
|
||||
DeDriver result = deDriverMapper.selectByPrimaryKey(id);
|
||||
if(result == null && id.startsWith("default-")){
|
||||
result = new DeDriver();
|
||||
result.setId(id);
|
||||
result.setName("default");
|
||||
result.setType(id.split("default-")[1]);
|
||||
for (DataSourceType type : datasourceService.types()) {
|
||||
if (type.getType().equalsIgnoreCase(id.split("default-")[1])) {
|
||||
result.setSurpportVersions(type.getSurpportVersions());
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<DeDriverDetails> listDriverDetails(String driverId) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dataease",
|
||||
"version": "1.18.16",
|
||||
"version": "1.18.17",
|
||||
"description": "dataease front",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
@ -35,7 +35,7 @@
|
||||
"@antv/l7-scene": "2.15.0",
|
||||
"@antv/l7-source": "2.15.0",
|
||||
"@antv/l7-utils": "2.15.0",
|
||||
"@antv/s2": "1.49.1",
|
||||
"@antv/s2": "^1.54.6",
|
||||
"@antv/util": "^2.0.17",
|
||||
"@riophae/vue-treeselect": "0.4.0",
|
||||
"@tinymce/tinymce-vue": "^3.2.8",
|
||||
|
||||
@ -842,11 +842,7 @@ export default {
|
||||
if ((key === 'fontSize' || key === 'activeFontSize') && (this.terminal === 'mobile' || ['custom'].includes(component.type))) {
|
||||
// do nothing 移动端字符大小无需按照比例缩放,当前保持不变(包括 v-text 和 过滤组件)
|
||||
} else {
|
||||
if (key === 'fontSize' && component.component !== 'de-tabs') {
|
||||
component.style[key] = this.formatPoint(component.style[key], this.previewCanvasScale.scalePointWidth * 1.4)
|
||||
} else {
|
||||
component.style[key] = this.formatPoint(component.style[key], this.previewCanvasScale.scalePointWidth)
|
||||
}
|
||||
component.style[key] = this.formatPoint(component.style[key], this.previewCanvasScale.scalePointWidth)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@ -172,6 +172,7 @@ export default {
|
||||
watch: {
|
||||
'element.style': {
|
||||
handler(val) {
|
||||
this.setPlaceholderColor()
|
||||
this.handlerPositionChange(val)
|
||||
},
|
||||
deep: true,
|
||||
@ -186,6 +187,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.setPlaceholderColor()
|
||||
},
|
||||
created() {
|
||||
const { horizontal, vertical, brColor, wordColor, innerBgColor } = this.element.style
|
||||
@ -196,6 +198,15 @@ export default {
|
||||
this.$set(this.element.style, 'innerBgColor', innerBgColor || '')
|
||||
},
|
||||
methods: {
|
||||
setPlaceholderColor() {
|
||||
let styleEle = document.querySelector(`#style${this.element.id}`)
|
||||
if (!styleEle) {
|
||||
styleEle = document.createElement('style')
|
||||
styleEle.id = `style${this.element.id}`
|
||||
document.querySelector('head').appendChild(styleEle)
|
||||
}
|
||||
styleEle.innerHTML = `#component${this.element.id} .el-input__inner::placeholder {\n color: ${this.element.style.wordColor} \n }`
|
||||
},
|
||||
filterLoaded(p) {
|
||||
this.$emit('filter-loaded', p)
|
||||
},
|
||||
|
||||
@ -594,7 +594,11 @@ export default {
|
||||
}
|
||||
.tree-select-all {
|
||||
padding: 10px 20px 0 24px;
|
||||
|
||||
}
|
||||
.tree-select-all .el-checkbox__label {
|
||||
color: var(--SelectTreeColor, #606266);
|
||||
}
|
||||
[aria-disabled='true'] > .el-tree-node__content {
|
||||
color: inherit !important;
|
||||
background: transparent !important;
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
|
||||
<el-button
|
||||
slot="append"
|
||||
v-if="!isRelation"
|
||||
icon="el-icon-search"
|
||||
@click="search"
|
||||
/>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
v-model="value"
|
||||
:class-id="'visual-' + element.id + '-' + inDraw + '-' + inScreen"
|
||||
:collapse-tags="showNumber"
|
||||
:clearable="!element.options.attrs.multiple && (inDraw || !selectFirst)"
|
||||
:clearable="(inDraw || !selectFirst)"
|
||||
:multiple="element.options.attrs.multiple"
|
||||
:placeholder="showRequiredTips ? $t('panel.required_tips') : ($t(element.options.attrs.placeholder) + placeholderSuffix)"
|
||||
:popper-append-to-body="inScreen"
|
||||
@ -17,7 +17,7 @@
|
||||
:key-word="keyWord"
|
||||
popper-class="coustom-de-select"
|
||||
:class="{'disabled-close': !inDraw && selectFirst && element.options.attrs.multiple, 'show-required-tips': showRequiredTips}"
|
||||
:list="data"
|
||||
:list="(element.options.attrs.showEmpty ? [{ text: '空数据', id: '_empty_$'}, ...data] : data)"
|
||||
:flag="flag"
|
||||
:is-config="isConfig"
|
||||
:custom-style="customStyle"
|
||||
@ -555,7 +555,7 @@ export default {
|
||||
if (this.isCustomSortWidget && this.element.options.attrs?.sort?.sort === 'custom') {
|
||||
tempData = mergeCustomSortOption(this.element.options.attrs.sort.list, tempData)
|
||||
}
|
||||
this.filterInvalidValue(tempData)
|
||||
this.filterInvalidValue(this.element.options.attrs.showEmpty ? [...tempData, '_empty_$'] : tempData)
|
||||
return tempData.map(item => {
|
||||
return {
|
||||
id: item,
|
||||
|
||||
@ -29,18 +29,18 @@
|
||||
v-model="checkAll"
|
||||
:indeterminate="isIndeterminate"
|
||||
@change="handleCheckAllChange"
|
||||
/>
|
||||
>
|
||||
{{ $t('commons.all') }}
|
||||
|
||||
</el-checkbox>
|
||||
<el-checkbox-group
|
||||
v-model="value"
|
||||
@change="handleCheckedChange"
|
||||
>
|
||||
<template v-for="item in data">
|
||||
<template v-for="item in dataWithEmpty">
|
||||
<el-checkbox
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
>{{ item.id }}
|
||||
>{{ item.label || item.id }}
|
||||
</el-checkbox>
|
||||
<br :key="item.id">
|
||||
</template>
|
||||
@ -56,12 +56,12 @@
|
||||
@change="changeRadioBox"
|
||||
>
|
||||
<el-radio
|
||||
v-for="(item, index) in data"
|
||||
:key="index"
|
||||
v-for="item in dataWithEmpty"
|
||||
:key="item.id"
|
||||
:label="item.id"
|
||||
@click.native.prevent="testChange(item)"
|
||||
>
|
||||
<span>{{ item.id }}</span>
|
||||
<span>{{item.label || item.id }}</span>
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
@ -129,6 +129,9 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dataWithEmpty() {
|
||||
return this.element.options.attrs.showEmpty ? [{ label: '空数据', id: '_empty_$'}, ...this.data] : this.data
|
||||
},
|
||||
operator() {
|
||||
return this.element.options.attrs.multiple ? 'in' : 'eq'
|
||||
},
|
||||
@ -173,8 +176,8 @@ export default {
|
||||
this.changeValue(value)
|
||||
|
||||
if (this.element.options.attrs.multiple) {
|
||||
this.checkAll = this.value.length === this.data.length
|
||||
this.isIndeterminate = this.value.length > 0 && this.value.length < this.data.length
|
||||
this.checkAll = this.value.length === this.dataWithEmpty.length
|
||||
this.isIndeterminate = this.value.length > 0 && this.value.length < this.dataWithEmpty.length
|
||||
}
|
||||
},
|
||||
'element.options.attrs.fieldId': function(value, old) {
|
||||
@ -197,8 +200,8 @@ export default {
|
||||
this.clearDefault(this.data)
|
||||
this.changeInputStyle()
|
||||
if (this.element.options.attrs.multiple) {
|
||||
this.checkAll = this.value.length === this.data.length
|
||||
this.isIndeterminate = this.value.length > 0 && this.value.length < this.data.length
|
||||
this.checkAll = this.value.length === this.dataWithEmpty.length
|
||||
this.isIndeterminate = this.value.length > 0 && this.value.length < this.dataWithEmpty.length
|
||||
}
|
||||
}) || (this.element.options.value = '')
|
||||
},
|
||||
@ -215,8 +218,8 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.show = true
|
||||
if (value) {
|
||||
this.checkAll = this.value.length === this.data.length
|
||||
this.isIndeterminate = this.value.length > 0 && this.value.length < this.data.length
|
||||
this.checkAll = this.value.length === this.dataWithEmpty.length
|
||||
this.isIndeterminate = this.value.length > 0 && this.value.length < this.dataWithEmpty.length
|
||||
}
|
||||
this.changeInputStyle()
|
||||
})
|
||||
@ -240,8 +243,8 @@ export default {
|
||||
this.data = this.optionData(res.data)
|
||||
this.changeInputStyle()
|
||||
if (this.element.options.attrs.multiple) {
|
||||
this.checkAll = this.value.length === this.data.length
|
||||
this.isIndeterminate = this.value.length > 0 && this.value.length < this.data.length
|
||||
this.checkAll = this.value.length === this.dataWithEmpty.length
|
||||
this.isIndeterminate = this.value.length > 0 && this.value.length < this.dataWithEmpty.length
|
||||
}
|
||||
}) || (this.element.options.value = '')
|
||||
},
|
||||
@ -316,8 +319,8 @@ export default {
|
||||
this.changeValue(this.value)
|
||||
|
||||
if (this.element.options.attrs.multiple) {
|
||||
this.checkAll = this.value.length === this.data.length
|
||||
this.isIndeterminate = this.value.length > 0 && this.value.length < this.data.length
|
||||
this.checkAll = this.value.length === this.dataWithEmpty.length
|
||||
this.isIndeterminate = this.value.length > 0 && this.value.length < this.dataWithEmpty.length
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -366,8 +369,8 @@ export default {
|
||||
this.data = this.optionData(res.data)
|
||||
this.changeInputStyle()
|
||||
if (this.element.options.attrs.multiple) {
|
||||
this.checkAll = this.value.length === this.data.length
|
||||
this.isIndeterminate = this.value.length > 0 && this.value.length < this.data.length
|
||||
this.checkAll = this.value.length === this.dataWithEmpty.length
|
||||
this.isIndeterminate = this.value.length > 0 && this.value.length < this.dataWithEmpty.length
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -452,14 +455,14 @@ export default {
|
||||
this.changeValue(value)
|
||||
},
|
||||
handleCheckAllChange(val) {
|
||||
this.value = val ? this.data.map(item => item.id) : []
|
||||
this.value = val ? this.dataWithEmpty.map(item => item.id) : []
|
||||
this.isIndeterminate = false
|
||||
this.changeValue(this.value)
|
||||
},
|
||||
handleCheckedChange(values) {
|
||||
const checkedCount = values.length
|
||||
this.checkAll = checkedCount === this.data.length
|
||||
this.isIndeterminate = checkedCount > 0 && checkedCount < this.data.length
|
||||
this.checkAll = checkedCount === this.dataWithEmpty.length
|
||||
this.isIndeterminate = checkedCount > 0 && checkedCount < this.dataWithEmpty.length
|
||||
this.changeValue(values)
|
||||
},
|
||||
testChange(item) {
|
||||
|
||||
@ -34,7 +34,7 @@ export default {
|
||||
},
|
||||
multiple: {
|
||||
handler() {
|
||||
if (!['de-select-tree', 'de-select'].includes(this.element.component)) return
|
||||
if (!['de-select-tree', 'de-select', 'de-select-grid'].includes(this.element.component)) return
|
||||
const time = setTimeout(() => {
|
||||
clearTimeout(time)
|
||||
this.typeTransform().forEach(ele => {
|
||||
|
||||
@ -1750,7 +1750,7 @@ export default {
|
||||
edit_field: 'Edit Field',
|
||||
preview_100_data: 'Show 100 lines data',
|
||||
invalid_table_check: 'Please sync data first.',
|
||||
parse_error: 'Parse failed,please check.Reference:https://dataease.io/docs/user_manual/dataset_configuration/dataset_Excel',
|
||||
parse_error: 'Parse failed,please check.Reference:https://dataease.io/docs/v1/user_manual/dataset_configuration/dataset_Excel',
|
||||
origin_field_type: 'Field Origin Type',
|
||||
edit_excel_table: 'Edit Excel Dataset',
|
||||
edit_excel: 'Edit Excel',
|
||||
@ -2282,6 +2282,7 @@ export default {
|
||||
data_list: 'Data list',
|
||||
component_list: 'Component list',
|
||||
custom_scope: 'Target',
|
||||
show_empty: 'Option contains empty data',
|
||||
multiple_choice: 'Multiple choice',
|
||||
show_time: 'Show time',
|
||||
single_choice: 'Single choice',
|
||||
|
||||
@ -1742,7 +1742,7 @@ export default {
|
||||
edit_field: '編輯字段',
|
||||
preview_100_data: '顯示前100行數據',
|
||||
invalid_table_check: '非直連數據集請先完成數據同步',
|
||||
parse_error: 'Excel解析失敗,請檢查格式、字段等信息。具體參考:https://dataease.io/docs/user_manual/dataset_configuration/dataset_Excel',
|
||||
parse_error: 'Excel解析失敗,請檢查格式、字段等信息。具體參考:https://dataease.io/docs/v1/user_manual/dataset_configuration/dataset_Excel',
|
||||
origin_field_type: '字段原始類型',
|
||||
edit_excel_table: '編輯Excel數據集',
|
||||
edit_excel: '編輯Excel',
|
||||
@ -2273,6 +2273,7 @@ export default {
|
||||
data_list: '數據列表',
|
||||
component_list: '組件列表',
|
||||
custom_scope: '控製範圍',
|
||||
show_empty: '選項包含空數據',
|
||||
binding_parameters: '參數',
|
||||
multiple_choice: '多選',
|
||||
show_time: '顯示時間',
|
||||
|
||||
@ -1742,7 +1742,7 @@ export default {
|
||||
edit_field: '编辑字段',
|
||||
preview_100_data: '显示前100行数据',
|
||||
invalid_table_check: '非直连数据集请先完成数据同步',
|
||||
parse_error: 'Excel解析失败,请检查格式、字段等信息。具体参考:https://dataease.io/docs/user_manual/dataset_configuration/dataset_Excel',
|
||||
parse_error: 'Excel解析失败,请检查格式、字段等信息。具体参考:https://dataease.io/docs/v1/user_manual/dataset_configuration/dataset_Excel',
|
||||
origin_field_type: '字段原始类型',
|
||||
edit_excel_table: '编辑Excel数据集',
|
||||
edit_excel: '编辑Excel',
|
||||
@ -2276,6 +2276,7 @@ export default {
|
||||
data_list: '数据列表',
|
||||
component_list: '组件列表',
|
||||
custom_scope: '控制范围',
|
||||
show_empty: '选项包含空数据',
|
||||
binding_parameters: '参数',
|
||||
multiple_choice: '多选',
|
||||
show_time: '显示时间',
|
||||
|
||||
@ -327,6 +327,7 @@ export default {
|
||||
this.fileList.push({ url: imgUrlTrans(this.curComponent.commonBackground.outerImage) })
|
||||
}
|
||||
this.backgroundOrigin = deepCopy(this.curComponent.commonBackground ? this.curComponent.commonBackground : COMMON_BACKGROUND_NONE)
|
||||
this.backgroundOrigin.style = deepCopy(this.curComponent.style || { brColor: '', innerBgColor: '', wordColor: ''})
|
||||
this.queryBackground()
|
||||
},
|
||||
queryBackground() {
|
||||
@ -343,6 +344,10 @@ export default {
|
||||
this.curComponent.commonBackground.alpha = this.backgroundOrigin.alpha
|
||||
this.curComponent.commonBackground.borderRadius = this.backgroundOrigin.borderRadius
|
||||
this.curComponent.commonBackground.innerPadding = this.backgroundOrigin.innerPadding
|
||||
this.curComponent.style.brColor = this.backgroundOrigin.style.brColor
|
||||
this.curComponent.style.innerBgColor = this.backgroundOrigin.style.innerBgColor
|
||||
this.curComponent.style.wordColor = this.backgroundOrigin.style.wordColor
|
||||
console.log('backgroundSetClose');
|
||||
this.$emit('backgroundSetClose')
|
||||
},
|
||||
save() {
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import { hexColorToRGBA } from '@/views/chart/chart/util'
|
||||
import { DEFAULT_XAXIS_STYLE, DEFAULT_YAXIS_EXT_STYLE, DEFAULT_YAXIS_STYLE } from '@/views/chart/chart/chart'
|
||||
import { formatterItem, valueFormatter } from '@/views/chart/chart/formatter'
|
||||
import { $success } from '@/utils/message'
|
||||
import i18n from '@/lang'
|
||||
|
||||
export function componentStyle(chart_option, chart) {
|
||||
let xAxisLabelFormatter = null
|
||||
@ -398,3 +400,26 @@ export const reverseColor = colorValue => {
|
||||
const str = '000000' + (0xFFFFFF - colorValue).toString(16)
|
||||
return '#' + str.substring(str.length - 6, str.length)
|
||||
}
|
||||
|
||||
export const copyString = (content, notify) => {
|
||||
const clipboard = navigator.clipboard || {
|
||||
writeText: data => {
|
||||
return new Promise(resolve => {
|
||||
const inputDom = document.createElement('input')
|
||||
inputDom.setAttribute('style', 'z-index: -1;position: fixed;opacity: 0;')
|
||||
inputDom.setAttribute('type', 'text')
|
||||
inputDom.setAttribute('value', data)
|
||||
document.body.appendChild(inputDom)
|
||||
inputDom.select()
|
||||
document.execCommand('copy')
|
||||
inputDom.remove()
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
}
|
||||
clipboard.writeText(content).then(() => {
|
||||
if (notify) {
|
||||
$success(i18n.t('commons.copy_success'))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -97,14 +97,7 @@ export function baseMapOption(chart_option, geoJson, chart, themeStyle, curAreaC
|
||||
chart_option.series[0].select = BASE_ECHARTS_SELECT
|
||||
// label
|
||||
if (customAttr.label) {
|
||||
const text = customAttr.label.formatter
|
||||
chart_option.geo.label = customAttr.label
|
||||
chart_option.geo.label.formatter = params => {
|
||||
const a = params.seriesName
|
||||
const b = params.name
|
||||
const c = params.value ? params.value : ''
|
||||
return text.replace(new RegExp('{a}', 'g'), a).replace(new RegExp('{b}', 'g'), b).replace(new RegExp('{c}', 'g'), c)
|
||||
}
|
||||
chart_option.series[0].labelLine = customAttr.label.labelLine
|
||||
if (customAttr.label.bgColor) {
|
||||
chart_option.geo.label.backgroundColor = customAttr.label.bgColor
|
||||
@ -114,7 +107,6 @@ export function baseMapOption(chart_option, geoJson, chart, themeStyle, curAreaC
|
||||
chart_option.geo.label.showdowColor = customAttr.label.shadowColor
|
||||
}
|
||||
chart_option.geo.itemStyle.emphasis.label.show = customAttr.label.show
|
||||
delete chart_option.geo.label.formatter
|
||||
}
|
||||
const valueArr = chart.data.series[seriesIndex].data
|
||||
// visualMap
|
||||
@ -160,6 +152,7 @@ export function baseMapOption(chart_option, geoJson, chart, themeStyle, curAreaC
|
||||
if (!emptyDataStrategy) {
|
||||
emptyDataStrategy = 'breakLine'
|
||||
}
|
||||
const dataMap = {}
|
||||
const subArea = new Set(geoJson.features.map(item => item.properties.name))
|
||||
for (let i = 0; i < valueArr.length; i++) {
|
||||
const y = valueArr[i]
|
||||
@ -172,6 +165,7 @@ export function baseMapOption(chart_option, geoJson, chart, themeStyle, curAreaC
|
||||
continue
|
||||
}
|
||||
chart_option.series[0].data.push(y)
|
||||
dataMap[y.name] = y.value
|
||||
}
|
||||
if (emptyDataStrategy === 'setZero' && subArea.size > 0) {
|
||||
subArea.forEach(item => {
|
||||
@ -190,7 +184,6 @@ export function baseMapOption(chart_option, geoJson, chart, themeStyle, curAreaC
|
||||
if (senior) {
|
||||
senior.mapMapping && senior.mapMapping[curAreaCode] && (chart_option.geo.nameMap = senior.mapMapping[curAreaCode])
|
||||
}
|
||||
|
||||
if (chart.data?.detailFields?.length > 1) {
|
||||
const deNameArray = ['x', 'y']
|
||||
let hasx = false
|
||||
@ -268,6 +261,13 @@ export function baseMapOption(chart_option, geoJson, chart, themeStyle, curAreaC
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
chart_option.geo.label.formatter = params => {
|
||||
if (Object.keys(dataMap).includes(params.name)) {
|
||||
return params.name
|
||||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
componentStyle(chart_option, chart)
|
||||
|
||||
@ -17,6 +17,7 @@ import { formatterItem, valueFormatter } from '@/views/chart/chart/formatter'
|
||||
import { handleTableEmptyStrategy, hexColorToRGBA } from '@/views/chart/chart/util'
|
||||
import { maxBy, minBy, find } from 'lodash-es'
|
||||
import TableTooltip from '@/views/chart/components/table/TableTooltip.vue'
|
||||
import { copyString } from '@/views/chart/chart/common/common'
|
||||
|
||||
class SortTooltip extends BaseTooltip {
|
||||
vueCom
|
||||
@ -76,15 +77,12 @@ class SortTooltip extends BaseTooltip {
|
||||
})
|
||||
}
|
||||
}
|
||||
export function baseTableInfo(s2, container, chart, action, tableData, pageInfo, vueCom, resizeFunc) {
|
||||
export function baseTableInfo(container, chart, action, tableData, pageInfo, vueCom, resizeFunc) {
|
||||
const containerDom = document.getElementById(container)
|
||||
|
||||
// fields
|
||||
let fields = chart.data.fields
|
||||
if (!fields || fields.length === 0) {
|
||||
if (s2) {
|
||||
s2.destroy()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -242,10 +240,7 @@ export function baseTableInfo(s2, container, chart, action, tableData, pageInfo,
|
||||
}
|
||||
|
||||
// 开始渲染
|
||||
if (s2) {
|
||||
s2.destroy()
|
||||
}
|
||||
s2 = new TableSheet(containerDom, s2DataConfig, s2Options)
|
||||
const s2 = new TableSheet(containerDom, s2DataConfig, s2Options)
|
||||
|
||||
// click
|
||||
s2.on(S2Event.DATA_CELL_CLICK, action)
|
||||
@ -270,16 +265,13 @@ export function baseTableInfo(s2, container, chart, action, tableData, pageInfo,
|
||||
return s2
|
||||
}
|
||||
|
||||
export function baseTableNormal(s2, container, chart, action, tableData, vueCom, resizeFunc) {
|
||||
export function baseTableNormal(container, chart, action, tableData, vueCom, resizeFunc) {
|
||||
const containerDom = document.getElementById(container)
|
||||
if (!containerDom) return
|
||||
|
||||
// fields
|
||||
const fields = chart.data.fields
|
||||
if (!fields || fields.length === 0) {
|
||||
if (s2) {
|
||||
s2.destroy()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -482,10 +474,7 @@ export function baseTableNormal(s2, container, chart, action, tableData, vueCom,
|
||||
}
|
||||
|
||||
// 开始渲染
|
||||
if (s2) {
|
||||
s2.destroy()
|
||||
}
|
||||
s2 = new TableSheet(containerDom, s2DataConfig, s2Options)
|
||||
const s2 = new TableSheet(containerDom, s2DataConfig, s2Options)
|
||||
|
||||
// click
|
||||
s2.on(S2Event.DATA_CELL_CLICK, action)
|
||||
@ -510,7 +499,7 @@ export function baseTableNormal(s2, container, chart, action, tableData, vueCom,
|
||||
return s2
|
||||
}
|
||||
|
||||
export function baseTablePivot(s2, container, chart, action, headerAction, tableData) {
|
||||
export function baseTablePivot(container, chart, action, headerAction, tableData) {
|
||||
const containerDom = document.getElementById(container)
|
||||
|
||||
// row and column
|
||||
@ -531,9 +520,6 @@ export function baseTablePivot(s2, container, chart, action, headerAction, table
|
||||
// fields
|
||||
const fields = chart.data.fields
|
||||
if (!fields || fields.length === 0) {
|
||||
if (s2) {
|
||||
s2.destroy()
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@ -712,10 +698,7 @@ export function baseTablePivot(s2, container, chart, action, headerAction, table
|
||||
}
|
||||
|
||||
// 开始渲染
|
||||
if (s2) {
|
||||
s2.destroy()
|
||||
}
|
||||
s2 = new PivotSheet(containerDom, s2DataConfig, s2Options)
|
||||
const s2 = new PivotSheet(containerDom, s2DataConfig, s2Options)
|
||||
|
||||
// click
|
||||
s2.on(S2Event.DATA_CELL_CLICK, action)
|
||||
@ -1111,7 +1094,7 @@ function getTooltipPosition(event) {
|
||||
return result
|
||||
}
|
||||
|
||||
function copyContent(s2Instance, event, fieldMap) {
|
||||
function copyContent(s2Instance, event, fieldMeta) {
|
||||
event.preventDefault()
|
||||
const cell = s2Instance.getCell(event.target)
|
||||
const valueField = cell.getMeta().valueField
|
||||
@ -1120,7 +1103,7 @@ function copyContent(s2Instance, event, fieldMap) {
|
||||
// 单元格
|
||||
if (cellMeta?.data) {
|
||||
const value = cellMeta.data[valueField]
|
||||
const metaObj = find(fieldMap, m =>
|
||||
const metaObj = find(fieldMeta, m =>
|
||||
m.field === valueField
|
||||
)
|
||||
content = value?.toString()
|
||||
@ -1130,11 +1113,15 @@ function copyContent(s2Instance, event, fieldMap) {
|
||||
} else {
|
||||
// 列头&行头
|
||||
content = cellMeta.value
|
||||
const fieldMap = fieldMeta?.reduce((p, n) => {
|
||||
p[n.field] = n.name
|
||||
return p
|
||||
},{})
|
||||
if (fieldMap?.[content]) {
|
||||
content = fieldMap[content]
|
||||
}
|
||||
}
|
||||
if (content) {
|
||||
navigator.clipboard.writeText(content)
|
||||
copyString(content, true)
|
||||
}
|
||||
}
|
||||
|
||||
@ -142,7 +142,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
myChart: null,
|
||||
chartId: uuid.v1(),
|
||||
showTrackBar: true,
|
||||
trackBarStyle: {
|
||||
@ -242,6 +241,7 @@ export default {
|
||||
beforeDestroy() {
|
||||
clearInterval(this.scrollTimer)
|
||||
window.removeEventListener('resize', this.chartResize)
|
||||
this.myChart?.facet.timer?.stop()
|
||||
this.myChart?.destroy?.()
|
||||
this.myChart = null
|
||||
},
|
||||
@ -287,8 +287,6 @@ export default {
|
||||
},
|
||||
drawView() {
|
||||
const chart = this.chart
|
||||
// type
|
||||
// if (chart.data) {
|
||||
this.antVRenderStatus = true
|
||||
if (!chart.data || (!chart.data.data && !chart.data.series)) {
|
||||
chart.data = {
|
||||
@ -300,17 +298,16 @@ export default {
|
||||
]
|
||||
}
|
||||
}
|
||||
if (this.myChart) {
|
||||
this.myChart?.facet.timer?.stop()
|
||||
this.myChart.destroy()
|
||||
}
|
||||
if (chart.type === 'table-info') {
|
||||
this.myChart = baseTableInfo(this.myChart, this.chartId, chart, this.antVAction, this.tableData, this.currentPage, this, this.columnResize)
|
||||
this.myChart = baseTableInfo(this.chartId, chart, this.antVAction, this.tableData, this.currentPage, this, this.columnResize)
|
||||
} else if (chart.type === 'table-normal') {
|
||||
this.myChart = baseTableNormal(this.myChart, this.chartId, chart, this.antVAction, this.tableData, this, this.columnResize)
|
||||
this.myChart = baseTableNormal(this.chartId, chart, this.antVAction, this.tableData, this, this.columnResize)
|
||||
} else if (chart.type === 'table-pivot') {
|
||||
this.myChart = baseTablePivot(this.myChart, this.chartId, chart, this.antVAction, this.tableHeaderClick, this.tableData)
|
||||
} else {
|
||||
if (this.myChart) {
|
||||
this.antVRenderStatus = false
|
||||
this.myChart.destroy()
|
||||
}
|
||||
this.myChart = baseTablePivot(this.chartId, chart, this.antVAction, this.tableHeaderClick, this.tableData)
|
||||
}
|
||||
|
||||
if (this.myChart && this.searchCount > 0) {
|
||||
@ -406,6 +403,7 @@ export default {
|
||||
this.myChart?.changeSheetSize(width, height)
|
||||
// 大小变化或者tab变化重新渲染
|
||||
if (chartWidth || chartHeight || !(chartHeight || chartWidth)) {
|
||||
this.myChart.facet.timer?.stop()
|
||||
this.myChart.render()
|
||||
}
|
||||
this.initScroll()
|
||||
@ -526,35 +524,40 @@ export default {
|
||||
},
|
||||
|
||||
initScroll() {
|
||||
clearInterval(this.scrollTimer)
|
||||
// 首先回到最顶部,然后计算行高*行数作为top,最后判断:如果top<数据量*行高,继续滚动,否则回到顶部
|
||||
clearTimeout(this.scrollTimer)
|
||||
const customAttr = JSON.parse(this.chart.customAttr)
|
||||
const senior = JSON.parse(this.chart.senior)
|
||||
|
||||
this.scrollTop = 0
|
||||
|
||||
if (senior && senior.scrollCfg && senior.scrollCfg.open && (this.chart.type === 'table-normal' || (this.chart.type === 'table-info' && !this.showPage))) {
|
||||
if (senior?.scrollCfg?.open && (this.chart.type === 'table-normal' || (this.chart.type === 'table-info' && !this.showPage))) {
|
||||
// 防止多次渲染
|
||||
this.myChart.facet.timer?.stop()
|
||||
if (this.myChart.store.get('scrollY') !== 0) {
|
||||
this.myChart.store.set('scrollY', 0)
|
||||
this.myChart.render()
|
||||
}
|
||||
// 平滑滚动,兼容原有的滚动速率设置
|
||||
// 假设原设定为 2 行间隔 2 秒,换算公式为: 滚动到底部的时间 = 未展示部分行数 / 2行 * 2秒
|
||||
const offsetHeight = document.getElementById(this.chartId).offsetHeight
|
||||
// 没显示就不滚了
|
||||
if (!offsetHeight) {
|
||||
return
|
||||
}
|
||||
const rowHeight = customAttr.size.tableItemHeight
|
||||
const headerHeight = customAttr.size.tableTitleHeight
|
||||
|
||||
this.scrollTimer = setInterval(() => {
|
||||
const offsetHeight = document.getElementById(this.chartId).offsetHeight
|
||||
const top = rowHeight * senior.scrollCfg.row
|
||||
if ((offsetHeight - headerHeight + this.scrollTop) < rowHeight * this.chart.data.tableRow.length) {
|
||||
this.scrollTop += top
|
||||
} else {
|
||||
this.scrollTop = 0
|
||||
const scrollBarSize = this.myChart.theme.scrollBar.size
|
||||
const scrollHeight = rowHeight * this.chart.data.tableRow.length + headerHeight - offsetHeight + scrollBarSize
|
||||
// 显示内容没撑满
|
||||
if (scrollHeight < scrollBarSize) {
|
||||
return
|
||||
}
|
||||
const viewHeight = offsetHeight - headerHeight - scrollBarSize
|
||||
const scrollViewCount = this.chart.data.tableRow.length - viewHeight / rowHeight
|
||||
const duration = scrollViewCount / senior.scrollCfg.row * senior.scrollCfg.interval
|
||||
this.myChart.facet.scrollWithAnimation({
|
||||
offsetY: {
|
||||
value: scrollHeight,
|
||||
animate: false
|
||||
}
|
||||
if (!offsetHeight) {
|
||||
return
|
||||
}
|
||||
this.myChart.facet.scrollWithAnimation({
|
||||
offsetY: {
|
||||
value: this.scrollTop,
|
||||
animate: false
|
||||
}
|
||||
})
|
||||
}, senior.scrollCfg.interval)
|
||||
}, duration, this.initScroll)
|
||||
}
|
||||
},
|
||||
initRemark() {
|
||||
|
||||
@ -61,7 +61,6 @@
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item
|
||||
v-show="item.deType === 1"
|
||||
divided
|
||||
>
|
||||
<el-dropdown
|
||||
placement="right-start"
|
||||
|
||||
@ -114,6 +114,7 @@ import { DEFAULT_COLOR_CASE, DEFAULT_SCROLL, DEFAULT_SIZE, NOT_SUPPORT_PAGE_DATA
|
||||
import { mapState } from 'vuex'
|
||||
import DePagination from '@/components/deCustomCm/pagination.js'
|
||||
import ViewTrackBar from '@/components/canvas/components/editor/ViewTrackBar.vue'
|
||||
import { copyString } from '@/views/chart/chart/common/common'
|
||||
export default {
|
||||
name: 'TableNormal',
|
||||
components: { ViewTrackBar, DePagination },
|
||||
@ -502,6 +503,13 @@ export default {
|
||||
this.bg_class.background = hexColorToRGBA(customStyle.background.color, customStyle.background.alpha)
|
||||
}
|
||||
}
|
||||
if (this.showSummary) {
|
||||
const footerArr = this.$refs.tableContainer.getElementsByClassName('elx-footer--row')
|
||||
if (footerArr.length) {
|
||||
const footer = footerArr.item(0)
|
||||
footer.addEventListener('contextmenu', this.summaryRightClick)
|
||||
}
|
||||
}
|
||||
},
|
||||
getRowStyle({ row, rowIndex }) {
|
||||
if (rowIndex % 2 !== 0) {
|
||||
@ -658,10 +666,29 @@ export default {
|
||||
},
|
||||
cellRightClick(event) {
|
||||
if (event.target?.innerText) {
|
||||
navigator.clipboard.writeText(event.target.innerText)
|
||||
copyString(event.target.innerText, true)
|
||||
}
|
||||
event.preventDefault()
|
||||
},
|
||||
summaryRightClick(event) {
|
||||
let targetDom
|
||||
if (event.target.classList.contains('elx-cell--item')) {
|
||||
targetDom = event.target
|
||||
}
|
||||
if (!targetDom) {
|
||||
const tmp = event.target.getElementsByClassName('elx-cell--item')
|
||||
if (tmp.length) {
|
||||
targetDom = tmp.item(0)
|
||||
}
|
||||
}
|
||||
if (targetDom) {
|
||||
const content = targetDom.innerText
|
||||
if (content?.trim()) {
|
||||
copyString(content, true)
|
||||
}
|
||||
event.preventDefault()
|
||||
}
|
||||
},
|
||||
antVActionPost(dimensionList, name, param) {
|
||||
this.pointParam = {
|
||||
data: {
|
||||
|
||||
@ -70,6 +70,7 @@
|
||||
<el-col :span="16">
|
||||
<div class="filter-options-right">
|
||||
<span style="padding-right: 10px;">
|
||||
|
||||
<el-checkbox
|
||||
v-model="attrs.showTitle"
|
||||
@change="showTitleChange"
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
label-width="180px"
|
||||
label-position="right"
|
||||
>
|
||||
<el-form-item
|
||||
<el-form-item v-if="showItem(driverForm.id)"
|
||||
:label="$t('driver.driver')"
|
||||
prop="driverClass"
|
||||
>
|
||||
@ -41,6 +41,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-upload
|
||||
v-show="showItem(driverForm.id)"
|
||||
:action="baseUrl + 'driver/file/upload'"
|
||||
:multiple="true"
|
||||
:show-file-list="false"
|
||||
@ -62,7 +63,7 @@
|
||||
{{ uploading ? $t('dataset.uploading') : $t('dataset.upload_file') }}
|
||||
</deBtn>
|
||||
</el-upload>
|
||||
<p class="tips">
|
||||
<p class="tips" v-show="showItem(driverForm.id)">
|
||||
{{ $t('datasource.can_be_uploaded') }}
|
||||
</p>
|
||||
<div class="jar-cont">
|
||||
@ -303,7 +304,14 @@ export default {
|
||||
},
|
||||
refreshType(form) {
|
||||
this.$emit('refresh-type', form)
|
||||
}
|
||||
},
|
||||
showItem(id){
|
||||
if (id !== '' && id.indexOf("default") !== -1) {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -216,7 +216,7 @@
|
||||
:label="$t('datasource.driver_name')"
|
||||
prop="name"
|
||||
>
|
||||
<el-input
|
||||
<el-input :disabled="disabledEdit(driverForm.id)"
|
||||
v-model="driverForm.name"
|
||||
:placeholder="$t('fu.search_bar.please_input')"
|
||||
/>
|
||||
@ -379,6 +379,7 @@ export default {
|
||||
dialogTitle: '',
|
||||
editDriver: false,
|
||||
driverForm: {
|
||||
id: '',
|
||||
name: '',
|
||||
desc: '',
|
||||
type: ''
|
||||
@ -457,6 +458,13 @@ export default {
|
||||
handleClick() {
|
||||
document.querySelector(`.${this.tabActive}`).scrollIntoView()
|
||||
},
|
||||
disabledEdit(id){
|
||||
if (id !== '' && id.indexOf("default") !== -1) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
createDriveOrDs() {
|
||||
if (this.showView === 'Driver') {
|
||||
this.addDriver()
|
||||
@ -830,6 +838,7 @@ export default {
|
||||
this.$refs['driverForm'].resetFields()
|
||||
this.editDriver = false
|
||||
this.driverForm = {
|
||||
id: '',
|
||||
name: '',
|
||||
desc: '',
|
||||
type: ''
|
||||
|
||||
@ -105,7 +105,7 @@ export default {
|
||||
activeName: 'zero',
|
||||
isPluginLoaded: false,
|
||||
engineMode: 'local',
|
||||
showProxy: false
|
||||
showProxy: true
|
||||
}
|
||||
},
|
||||
beforeCreate() {
|
||||
|
||||
@ -65,7 +65,7 @@ export default {
|
||||
head: this.$t('wizard.online_document'),
|
||||
content: this.$t('wizard.online_document_hint'),
|
||||
bottom: '',
|
||||
href: 'https://dataease.io/docs/index.html',
|
||||
href: 'https://dataease.io/docs/v1/index.html',
|
||||
component: 'CardDetail'
|
||||
},
|
||||
{
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
</el-row>
|
||||
<el-row class="demo_bottom">
|
||||
<a
|
||||
href="https://dataease.io/docs/dev_manual/dev_manual/"
|
||||
href="https://dataease.io/docs/v1/dev_manual/dev_manual/"
|
||||
target="_blank"
|
||||
>{{ $t('wizard.click_show') }}</a>
|
||||
</el-row>
|
||||
|
||||
@ -161,7 +161,7 @@ export default {
|
||||
content: this.$t('wizard.online_document_hint'),
|
||||
img: 'wizard_help',
|
||||
bgColor: '#F3F2FF',
|
||||
href: 'https://dataease.io/docs/index.html'
|
||||
href: 'https://dataease.io/docs/v1/index.html'
|
||||
},
|
||||
{
|
||||
head: this.$t('wizard.enterprise_edition'),
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dataease-mobile",
|
||||
"version": "1.18.16",
|
||||
"version": "1.18.17",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "npm run dev:h5",
|
||||
|
||||
@ -12,7 +12,7 @@ export default {
|
||||
return {
|
||||
urls: [
|
||||
'https://github.com/dataease/dataease',
|
||||
'https://dataease.io/docs/user_manual/general/'
|
||||
'https://dataease.io/docs/v1/user_manual/general/'
|
||||
],
|
||||
banner: {}
|
||||
}
|
||||
|
||||
@ -82,10 +82,15 @@ public class DmDsProvider extends DefaultJdbcProvider {
|
||||
if (isDefaultClassLoader(customDriver)) {
|
||||
driverClassName = defaultDriver;
|
||||
jdbcClassLoader = extendedJdbcClassLoader;
|
||||
for (DataSourceType value : SpringContextUtil.getApplicationContext().getBeansOfType(DataSourceType.class).values()) {
|
||||
if(value.getType().equalsIgnoreCase(datasourceRequest.getDatasource().getType())){
|
||||
surpportVersions = value.getSurpportVersions();
|
||||
DeDriver driver = deDriverMapper.selectByPrimaryKey("default-" + datasourceRequest.getDatasource().getType());
|
||||
if (driver == null) {
|
||||
for (DataSourceType value : SpringContextUtil.getApplicationContext().getBeansOfType(DataSourceType.class).values()) {
|
||||
if (value.getType().equalsIgnoreCase(datasourceRequest.getDatasource().getType())) {
|
||||
surpportVersions = value.getSurpportVersions();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
surpportVersions = driver.getSurpportVersions();
|
||||
}
|
||||
} else {
|
||||
if (deDriver == null) {
|
||||
@ -107,10 +112,10 @@ public class DmDsProvider extends DefaultJdbcProvider {
|
||||
} finally {
|
||||
Thread.currentThread().setContextClassLoader(classLoader);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(surpportVersions) && surpportVersions.split(",").length > 0){
|
||||
if(! Arrays.asList(surpportVersions.split(",")).contains(String.valueOf(conn.getMetaData().getDatabaseMajorVersion()))){
|
||||
if (StringUtils.isNotEmpty(surpportVersions) && surpportVersions.split(",").length > 0) {
|
||||
if (!Arrays.asList(surpportVersions.split(",")).contains(String.valueOf(conn.getMetaData().getDatabaseMajorVersion()))) {
|
||||
DataEaseException.throwException("当前驱动不支持此版本!");
|
||||
};
|
||||
}
|
||||
}
|
||||
return conn;
|
||||
}
|
||||
|
||||
@ -1320,11 +1320,11 @@ public class DmQueryProvider extends QueryProvider {
|
||||
whereValue = "('" + String.join("','", value.split(",")) + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "like")) {
|
||||
whereValue = "'%" + value + "%'";
|
||||
}else if (StringUtils.equalsIgnoreCase(item.getTerm(), "begin_with")) {
|
||||
} else if (StringUtils.equalsIgnoreCase(item.getTerm(), "begin_with")) {
|
||||
whereValue = "'" + value + "%'";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "end_with")) {
|
||||
whereValue = "'%" + value + "'";
|
||||
} else {
|
||||
} else {
|
||||
if (field.getDeType() == 1) {
|
||||
whereValue = String.format(OracleConstants.TO_DATE, "'" + value + "'", OracleConstants.DEFAULT_DATE_FORMAT);
|
||||
} else {
|
||||
@ -1562,7 +1562,12 @@ public class DmQueryProvider extends QueryProvider {
|
||||
String whereValue = "";
|
||||
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
// 过滤空数据
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
@ -1581,7 +1586,12 @@ public class DmQueryProvider extends QueryProvider {
|
||||
whereValue = String.format(OracleConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||
}
|
||||
} else {
|
||||
whereValue = String.format(OracleConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(OracleConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(OracleConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
@ -1589,7 +1599,7 @@ public class DmQueryProvider extends QueryProvider {
|
||||
.build());
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
@ -64,10 +64,15 @@ public class KingbaseDsProvider extends DefaultJdbcProvider {
|
||||
if (isDefaultClassLoader(customDriver)) {
|
||||
driverClassName = defaultDriver;
|
||||
jdbcClassLoader = extendedJdbcClassLoader;
|
||||
for (DataSourceType value : SpringContextUtil.getApplicationContext().getBeansOfType(DataSourceType.class).values()) {
|
||||
if(value.getType().equalsIgnoreCase(datasourceRequest.getDatasource().getType())){
|
||||
surpportVersions = value.getSurpportVersions();
|
||||
DeDriver driver = deDriverMapper.selectByPrimaryKey("default-" + datasourceRequest.getDatasource().getType());
|
||||
if (driver == null) {
|
||||
for (DataSourceType value : SpringContextUtil.getApplicationContext().getBeansOfType(DataSourceType.class).values()) {
|
||||
if (value.getType().equalsIgnoreCase(datasourceRequest.getDatasource().getType())) {
|
||||
surpportVersions = value.getSurpportVersions();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
surpportVersions = driver.getSurpportVersions();
|
||||
}
|
||||
} else {
|
||||
if (deDriver == null) {
|
||||
|
||||
@ -1270,11 +1270,11 @@ public class KingbaseQueryProvider extends QueryProvider {
|
||||
whereValue = "('" + String.join("','", value.split(",")) + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "like")) {
|
||||
whereValue = "'%" + value + "%'";
|
||||
}else if (StringUtils.equalsIgnoreCase(item.getTerm(), "begin_with")) {
|
||||
} else if (StringUtils.equalsIgnoreCase(item.getTerm(), "begin_with")) {
|
||||
whereValue = "'" + value + "%'";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "end_with")) {
|
||||
whereValue = "'%" + value + "'";
|
||||
} else {
|
||||
} else {
|
||||
whereValue = String.format(KingbaseConstants.WHERE_VALUE_VALUE, value);
|
||||
}
|
||||
SQLObj build = SQLObj.builder()
|
||||
@ -1600,7 +1600,12 @@ public class KingbaseQueryProvider extends QueryProvider {
|
||||
String whereValue = "";
|
||||
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
// 过滤空数据
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
@ -1615,7 +1620,12 @@ public class KingbaseQueryProvider extends QueryProvider {
|
||||
whereValue = String.format(KingbaseConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||
}
|
||||
} else {
|
||||
whereValue = String.format(KingbaseConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(KingbaseConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(KingbaseConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
@ -1623,7 +1633,7 @@ public class KingbaseQueryProvider extends QueryProvider {
|
||||
.build());
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
@ -58,10 +58,15 @@ public class KylinDsProvider extends DefaultJdbcProvider {
|
||||
if(isDefaultClassLoader(customDriver)){
|
||||
driverClassName = defaultDriver;
|
||||
jdbcClassLoader = extendedJdbcClassLoader;
|
||||
for (DataSourceType value : SpringContextUtil.getApplicationContext().getBeansOfType(DataSourceType.class).values()) {
|
||||
if(value.getType().equalsIgnoreCase(datasourceRequest.getDatasource().getType())){
|
||||
surpportVersions = value.getSurpportVersions();
|
||||
DeDriver driver = deDriverMapper.selectByPrimaryKey("default-" + datasourceRequest.getDatasource().getType());
|
||||
if (driver == null) {
|
||||
for (DataSourceType value : SpringContextUtil.getApplicationContext().getBeansOfType(DataSourceType.class).values()) {
|
||||
if (value.getType().equalsIgnoreCase(datasourceRequest.getDatasource().getType())) {
|
||||
surpportVersions = value.getSurpportVersions();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
surpportVersions = driver.getSurpportVersions();
|
||||
}
|
||||
}else {
|
||||
if(deDriver == null){
|
||||
|
||||
@ -1321,7 +1321,12 @@ public class KylinQueryProvider extends QueryProvider {
|
||||
String whereValue = "";
|
||||
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
// 过滤空数据
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
@ -1336,7 +1341,12 @@ public class KylinQueryProvider extends QueryProvider {
|
||||
whereValue = String.format(KylinConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||
}
|
||||
} else {
|
||||
whereValue = String.format(KylinConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(KylinConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(KylinConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
@ -1344,7 +1354,7 @@ public class KylinQueryProvider extends QueryProvider {
|
||||
.build());
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
@ -1120,11 +1120,11 @@ public class MaxcomputeQueryProvider extends QueryProvider {
|
||||
whereValue = "('" + String.join("','", value.split(",")) + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "like")) {
|
||||
whereValue = "'%" + value + "%'";
|
||||
}else if (StringUtils.equalsIgnoreCase(item.getTerm(), "begin_with")) {
|
||||
} else if (StringUtils.equalsIgnoreCase(item.getTerm(), "begin_with")) {
|
||||
whereValue = "'" + value + "%'";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "end_with")) {
|
||||
whereValue = "'%" + value + "'";
|
||||
} else {
|
||||
} else {
|
||||
whereValue = String.format(MaxConstants.WHERE_VALUE_VALUE, value);
|
||||
}
|
||||
SQLObj build = SQLObj.builder()
|
||||
@ -1341,7 +1341,12 @@ public class MaxcomputeQueryProvider extends QueryProvider {
|
||||
String whereValue = "";
|
||||
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
// 过滤空数据
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
@ -1356,7 +1361,12 @@ public class MaxcomputeQueryProvider extends QueryProvider {
|
||||
whereValue = String.format(MaxConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||
}
|
||||
} else {
|
||||
whereValue = String.format(MaxConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(MaxConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(MaxConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
@ -1364,7 +1374,7 @@ public class MaxcomputeQueryProvider extends QueryProvider {
|
||||
.build());
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
@ -62,10 +62,15 @@ public class MongobiDsProvider extends DefaultJdbcProvider {
|
||||
if(isDefaultClassLoader(customDriver)){
|
||||
driverClassName = defaultDriver;
|
||||
jdbcClassLoader = extendedJdbcClassLoader;
|
||||
for (DataSourceType value : SpringContextUtil.getApplicationContext().getBeansOfType(DataSourceType.class).values()) {
|
||||
if(value.getType().equalsIgnoreCase(datasourceRequest.getDatasource().getType())){
|
||||
surpportVersions = value.getSurpportVersions();
|
||||
DeDriver driver = deDriverMapper.selectByPrimaryKey("default-" + datasourceRequest.getDatasource().getType());
|
||||
if (driver == null) {
|
||||
for (DataSourceType value : SpringContextUtil.getApplicationContext().getBeansOfType(DataSourceType.class).values()) {
|
||||
if (value.getType().equalsIgnoreCase(datasourceRequest.getDatasource().getType())) {
|
||||
surpportVersions = value.getSurpportVersions();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
surpportVersions = driver.getSurpportVersions();
|
||||
}
|
||||
}else {
|
||||
if(deDriver == null){
|
||||
|
||||
@ -1333,7 +1333,12 @@ public class MongobiQueryProvider extends QueryProvider {
|
||||
String whereValue = "";
|
||||
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
// 过滤空数据
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
@ -1348,7 +1353,12 @@ public class MongobiQueryProvider extends QueryProvider {
|
||||
whereValue = String.format(MongoConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||
}
|
||||
} else {
|
||||
whereValue = String.format(MongoConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(MongoConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(MongoConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
@ -1356,7 +1366,7 @@ public class MongobiQueryProvider extends QueryProvider {
|
||||
.build());
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
@ -54,10 +54,15 @@ public class PrestoDsProvider extends DefaultJdbcProvider {
|
||||
ExtendedJdbcClassLoader classLoader;
|
||||
if(isDefaultClassLoader(customDriver)){
|
||||
classLoader = extendedJdbcClassLoader;
|
||||
for (DataSourceType value : SpringContextUtil.getApplicationContext().getBeansOfType(DataSourceType.class).values()) {
|
||||
if(value.getType().equalsIgnoreCase(datasourceRequest.getDatasource().getType())){
|
||||
surpportVersions = value.getSurpportVersions();
|
||||
DeDriver driver = deDriverMapper.selectByPrimaryKey("default-" + datasourceRequest.getDatasource().getType());
|
||||
if (driver == null) {
|
||||
for (DataSourceType value : SpringContextUtil.getApplicationContext().getBeansOfType(DataSourceType.class).values()) {
|
||||
if (value.getType().equalsIgnoreCase(datasourceRequest.getDatasource().getType())) {
|
||||
surpportVersions = value.getSurpportVersions();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
surpportVersions = driver.getSurpportVersions();
|
||||
}
|
||||
}else {
|
||||
deDriver = deDriverMapper.selectByPrimaryKey(customDriver);
|
||||
|
||||
@ -1031,11 +1031,11 @@ public class PrestoQueryProvider extends QueryProvider {
|
||||
whereValue = "('" + String.join("','", value.split(",")) + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "like")) {
|
||||
whereValue = "'%" + value + "%'";
|
||||
}else if (StringUtils.equalsIgnoreCase(item.getTerm(), "begin_with")) {
|
||||
} else if (StringUtils.equalsIgnoreCase(item.getTerm(), "begin_with")) {
|
||||
whereValue = "'" + value + "%'";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "end_with")) {
|
||||
whereValue = "'%" + value + "'";
|
||||
} else {
|
||||
} else {
|
||||
whereValue = String.format(PrestoConstants.WHERE_VALUE_VALUE, value);
|
||||
}
|
||||
SQLObj build = SQLObj.builder()
|
||||
@ -1337,7 +1337,12 @@ public class PrestoQueryProvider extends QueryProvider {
|
||||
String whereValue = "";
|
||||
|
||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
// 过滤空数据
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
String keyword = value.get(0).toUpperCase();
|
||||
whereValue = "'%" + keyword + "%'";
|
||||
@ -1354,7 +1359,12 @@ public class PrestoQueryProvider extends QueryProvider {
|
||||
whereValue = String.format(PrestoConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||
}
|
||||
} else {
|
||||
whereValue = String.format(PrestoConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
// 过滤空数据
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(PrestoConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(PrestoConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
@ -1362,7 +1372,7 @@ public class PrestoQueryProvider extends QueryProvider {
|
||||
.build());
|
||||
}
|
||||
List<String> strList = new ArrayList<>();
|
||||
list.forEach(ele -> strList.add(ele.getWhereField() + " " + ele.getWhereTermAndValue()));
|
||||
list.forEach(ele -> strList.add("(" + ele.getWhereField() + " " + ele.getWhereTermAndValue() + ")"));
|
||||
return CollectionUtils.isNotEmpty(list) ? "(" + String.join(" AND ", strList) + ")" : null;
|
||||
}
|
||||
|
||||
|
||||
2
pom.xml
2
pom.xml
@ -9,7 +9,7 @@
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<dataease.version>1.18.16</dataease.version>
|
||||
<dataease.version>1.18.17</dataease.version>
|
||||
</properties>
|
||||
|
||||
<name>dataease</name>
|
||||
|
||||
@ -34,4 +34,6 @@ public class SQLConstants {
|
||||
public static final String ORDER_ALIAS_X_PREFIX = "o_ax_%s";
|
||||
public static final String ORDER_ALIAS_Y_PREFIX = "o_ay_%s";
|
||||
public static final String WHERE_ALIAS_PREFIX = "w_a_%s";
|
||||
}
|
||||
|
||||
public static final String EMPTY_SIGN = "_empty_$";
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@ public abstract class ViewPluginService extends PluginComponentService {
|
||||
|
||||
private PluginViewRSHandler<Map> rsHandler;
|
||||
|
||||
|
||||
public abstract PluginViewType viewType();
|
||||
|
||||
public abstract Object format(Object param);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user