Merge branch 'dev' into v1.18
This commit is contained in:
commit
03b23a2669
@ -90,7 +90,7 @@ curl -sSL https://dataease.oss-cn-hangzhou.aliyuncs.com/quick_start.sh | sh
|
||||
|
||||
**加入微信交流群**
|
||||
|
||||
<img src="https://dataease.oss-cn-hangzhou.aliyuncs.com/img/wechat-group.png" width="156" height="156"/>
|
||||
<img src="https://dataease.oss-cn-hangzhou.aliyuncs.com/img/wechat-helper.png" width="156" height="156"/>
|
||||
|
||||
## DataEase 的技术栈
|
||||
|
||||
|
||||
@ -185,7 +185,7 @@
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<version>6.8</version>
|
||||
<version>7.7.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<!-- ehcache 缓存 -->
|
||||
|
||||
@ -46,7 +46,7 @@ public class SqlInjectAop {
|
||||
String[] value = annotation.value();
|
||||
boolean illegal = isIllegal(value, request.getOrders());
|
||||
if (illegal) {
|
||||
DEException.throwException("Illegal order exp");
|
||||
DEException.throwException("Illegal sort exp");
|
||||
}
|
||||
return point.proceed(args);
|
||||
} catch (Throwable e) {
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
package io.dataease.controller.sys.request;
|
||||
|
||||
import io.dataease.controller.sys.base.BaseGridRequest;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel("消息条件")
|
||||
public class MsgRequest implements Serializable {
|
||||
public class MsgRequest extends BaseGridRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1920091635946508658L;
|
||||
|
||||
@ -19,6 +19,4 @@ public class MsgRequest implements Serializable {
|
||||
@ApiModelProperty("是否订阅")
|
||||
private Boolean status;
|
||||
|
||||
@ApiModelProperty("排序描述")
|
||||
private List<String> orders;
|
||||
}
|
||||
|
||||
@ -4,9 +4,12 @@ import io.dataease.plugins.common.base.domain.DatasetTableField;
|
||||
import io.dataease.plugins.common.base.domain.Datasource;
|
||||
import io.dataease.commons.utils.TableUtils;
|
||||
import io.dataease.provider.DDLProviderImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @Author gin
|
||||
@ -25,6 +28,30 @@ public class MysqlDDLProvider extends DDLProviderImpl {
|
||||
return "CREATE or replace view " + name + " AS (" + viewSQL + ")";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String insertSql(String name, List<String[]> dataList, int page, int pageNumber) {
|
||||
String insertSql = "INSERT INTO TABLE_NAME VALUES ".replace("TABLE_NAME", name);
|
||||
StringBuffer values = new StringBuffer();
|
||||
|
||||
Integer realSize = page * pageNumber < dataList.size() ? page * pageNumber : dataList.size();
|
||||
for (String[] strings : dataList.subList((page - 1) * pageNumber, realSize)) {
|
||||
String[] strings1 = new String[strings.length];
|
||||
for (int i = 0; i < strings.length; i++) {
|
||||
if (StringUtils.isEmpty(strings[i])) {
|
||||
strings1[i] = null;
|
||||
} else {
|
||||
strings1[i] = strings[i].replace("'", "\\'");
|
||||
}
|
||||
}
|
||||
values.append("('").append(UUID.randomUUID())
|
||||
.append("','").append(String.join("','", Arrays.asList(strings1)))
|
||||
.append("'),");
|
||||
}
|
||||
return (insertSql + values.substring(0, values.length() - 1)).replaceAll(",'null'", ",null");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String dropTable(String name) {
|
||||
return "DROP TABLE IF EXISTS " + name;
|
||||
@ -67,7 +94,7 @@ public class MysqlDDLProvider extends DDLProviderImpl {
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
Column_Fields.append("varchar(100)").append(",`");
|
||||
Column_Fields.append("bigint(20)").append(",`");
|
||||
break;
|
||||
case 3:
|
||||
Column_Fields.append("varchar(100)").append(",`");
|
||||
|
||||
@ -882,7 +882,7 @@ public class ChartViewService {
|
||||
Map<String, String> dimValMap = head.getDimensionList().stream().collect(Collectors.toMap(ChartDimensionDTO::getId, ChartDimensionDTO::getValue));
|
||||
Map<String, ChartViewFieldDTO> fieldMap = Stream.of(xAxisBase, xAxisExt, extStack).
|
||||
flatMap(Collection::stream).
|
||||
collect(Collectors.toMap(ChartViewFieldDTO::getId, o -> o));
|
||||
collect(Collectors.toMap(ChartViewFieldDTO::getId, o -> o, ((p, n) -> p)));
|
||||
for (int i = 0; i < drillRequestList.size(); i++) {
|
||||
ChartDrillRequest request = drillRequestList.get(i);
|
||||
ChartViewFieldDTO chartViewFieldDTO = drill.get(i);
|
||||
@ -893,6 +893,7 @@ public class ChartViewService {
|
||||
fieldsToFilter.add(chartViewFieldDTO);
|
||||
dimValMap.put(requestDimension.getId(), requestDimension.getValue());
|
||||
if (!checkDrillExist(xAxis, extStack, requestDimension.getId(), view)) {
|
||||
fieldMap.put(chartViewFieldDTO.getId(), chartViewFieldDTO);
|
||||
xAxis.add(chartViewFieldDTO);
|
||||
}
|
||||
if (i == drillRequestList.size() - 1) {
|
||||
|
||||
@ -927,7 +927,6 @@ export default {
|
||||
).sql
|
||||
}
|
||||
this.variables = JSON.parse(table.sqlVariableDetails)
|
||||
this.getSQLPreview()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user