增加了application和module的增删改查方法。

This commit is contained in:
root 2025-03-31 16:46:01 +08:00
parent 4f2048abb6
commit f13b8c3c51
8 changed files with 56 additions and 5 deletions

View File

@ -2,6 +2,7 @@ package io.gisbi.application.module.mapper;
import io.gisbi.application.module.domain.Module; import io.gisbi.application.module.domain.Module;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/** /**
* <p> * <p>
@ -11,6 +12,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author zhengsl * @author zhengsl
* @since 2025-03-25 * @since 2025-03-25
*/ */
@Mapper
public interface ModuleMapper extends BaseMapper<Module> { public interface ModuleMapper extends BaseMapper<Module> {
} }

View File

@ -26,6 +26,11 @@ public class CoreDatasetGroup implements Serializable {
*/ */
private String name; private String name;
/**
* 应用ID
*/
private String appId;
/** /**
* 父级ID * 父级ID
*/ */
@ -212,6 +217,7 @@ public class CoreDatasetGroup implements Serializable {
public String toString() { public String toString() {
return "CoreDatasetGroup{" + return "CoreDatasetGroup{" +
"id = " + id + "id = " + id +
", appId = " + appId +
", name = " + name + ", name = " + name +
", pid = " + pid + ", pid = " + pid +
", level = " + level + ", level = " + level +
@ -228,4 +234,12 @@ public class CoreDatasetGroup implements Serializable {
", unionSql = " + unionSql + ", unionSql = " + unionSql +
"}"; "}";
} }
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
} }

View File

@ -23,7 +23,10 @@ public class CoreDatasource implements Serializable {
*/ */
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Long id; private Long id;
/**
* 应用ID
*/
private String appId;
/** /**
* 名称 * 名称
*/ */
@ -218,6 +221,7 @@ public class CoreDatasource implements Serializable {
public String toString() { public String toString() {
return "CoreDatasource{" + return "CoreDatasource{" +
"id = " + id + "id = " + id +
", appId = " + appId +
", name = " + name + ", name = " + name +
", description = " + description + ", description = " + description +
", type = " + type + ", type = " + type +
@ -234,4 +238,12 @@ public class CoreDatasource implements Serializable {
", enableDataFill = " + enableDataFill + ", enableDataFill = " + enableDataFill +
"}"; "}";
} }
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
} }

View File

@ -17,7 +17,10 @@ public class DataVisualizationInfo implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private Long id; private Long id;
/**
* 应用ID
*/
private String appId;
/** /**
* 名称 * 名称
*/ */
@ -342,6 +345,7 @@ public class DataVisualizationInfo implements Serializable {
public String toString() { public String toString() {
return "DataVisualizationInfo{" + return "DataVisualizationInfo{" +
"id = " + id + "id = " + id +
", appId = " + appId +
", name = " + name + ", name = " + name +
", pid = " + pid + ", pid = " + pid +
", orgId = " + orgId + ", orgId = " + orgId +
@ -368,4 +372,12 @@ public class DataVisualizationInfo implements Serializable {
", checkVersion = " + checkVersion + ", checkVersion = " + checkVersion +
"}"; "}";
} }
public String getAppId() {
return appId;
}
public void setAppId(String appId) {
this.appId = appId;
}
} }

View File

@ -657,6 +657,7 @@ public class DataVisualizationServer implements DataVisualizationApi {
String dynamicData = null; String dynamicData = null;
String staticResource = null; String staticResource = null;
String appDataStr = null; String appDataStr = null;
String appId = request.getAppId();
String name = null; String name = null;
String dvType = null; String dvType = null;
Integer version = null; Integer version = null;
@ -758,7 +759,7 @@ public class DataVisualizationServer implements DataVisualizationApi {
request.setCanvasStyleData(templateStyle); request.setCanvasStyleData(templateStyle);
//Store static resource into the server //Store static resource into the server
staticResourceServer.saveFilesToServe(staticResource); staticResourceServer.saveFilesToServe(staticResource);
return new DataVisualizationVO(newDvId, name, dvType, version, templateStyle, templateData, appDataStr, canvasViewInfo, null); return new DataVisualizationVO(newDvId,appId, name, dvType, version, templateStyle, templateData, appDataStr, canvasViewInfo, null);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
DEException.throwException("解析错误"); DEException.throwException("解析错误");

View File

@ -22,6 +22,8 @@ public class BusiDsRequest implements Serializable {
private Long pid; private Long pid;
@Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
private String name; private String name;
@Schema(description = "应用ID", requiredMode = Schema.RequiredMode.REQUIRED)
private String appId;
@Schema(description = "节点类型", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "节点类型", requiredMode = Schema.RequiredMode.REQUIRED)
private String nodeType; private String nodeType;
@Schema(description = "操作类型", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "操作类型", requiredMode = Schema.RequiredMode.REQUIRED)

View File

@ -20,7 +20,10 @@ public class DataVisualizationVO implements Serializable {
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;
/**
* 应用ID
*/
private String appId;
/** /**
* 名称 * 名称
*/ */
@ -189,8 +192,9 @@ public class DataVisualizationVO implements Serializable {
private VisualizationExport2AppVO appData; private VisualizationExport2AppVO appData;
public DataVisualizationVO(Long id, String name, String type, Integer version, String canvasStyleData, String componentData,String appDataStr, Map<Long, ChartViewDTO> canvasViewInfo, Map<Long, VisualizationTemplateExtendDataDTO> extendDataInfo) { public DataVisualizationVO(Long id,String appId, String name, String type, Integer version, String canvasStyleData, String componentData,String appDataStr, Map<Long, ChartViewDTO> canvasViewInfo, Map<Long, VisualizationTemplateExtendDataDTO> extendDataInfo) {
this.id = id; this.id = id;
this.appId = appId;
this.name = name; this.name = name;
this.type = type; this.type = type;
this.canvasStyleData = canvasStyleData; this.canvasStyleData = canvasStyleData;

View File

@ -23,6 +23,10 @@ public class DatasourceDTO implements Serializable {
* 数据源名称 * 数据源名称
*/ */
private String name; private String name;
/**
* 应用ID
*/
private String appId;
/** /**
* 描述 * 描述