Commit cc82472f authored by 单奇雲's avatar 单奇雲

修改预案文件查看接口,新增liqubase脚本

parent db3cdd14
...@@ -213,7 +213,7 @@ public class FileController extends BaseController { ...@@ -213,7 +213,7 @@ public class FileController extends BaseController {
return new CommonResponse(SUCCESS, "访问的文件不存在!", "查询成功"); return new CommonResponse(SUCCESS, "访问的文件不存在!", "查询成功");
} }
if (fileName.endsWith(".doc") || fileName.endsWith(".docx")) { if (fileName.endsWith(".doc") || fileName.endsWith(".docx")) {
String htmlFileName = fileName.substring(0, fileName.indexOf(".")) + ".html"; String htmlFileName = fileName.substring(0, fileName.lastIndexOf(".")) + ".html";
File htmlFile = new File(htmlFileName); File htmlFile = new File(htmlFileName);
String data = WordConverterUtils.wordToHtmlString(fileName, readUrl); String data = WordConverterUtils.wordToHtmlString(fileName, readUrl);
Map<String, Object> processData = null; Map<String, Object> processData = null;
......
...@@ -72,6 +72,8 @@ public class TopographyController { ...@@ -72,6 +72,8 @@ public class TopographyController {
@PostMapping(value = "/updateTopo", produces = "application/json;charset=UTF-8") @PostMapping(value = "/updateTopo", produces = "application/json;charset=UTF-8")
@ApiOperation(value = "保存拓扑图", notes = "保存拓扑图") @ApiOperation(value = "保存拓扑图", notes = "保存拓扑图")
public CommonResponse savedonghuanNodes(@ApiParam(value = "", required = false) @RequestBody JSONObject topographyParam) { public CommonResponse savedonghuanNodes(@ApiParam(value = "", required = false) @RequestBody JSONObject topographyParam) {
synchronized (TopographyController.class) {
String appId = topographyParam.getString("appId") != null ? topographyParam.getString("appId") : null; String appId = topographyParam.getString("appId") != null ? topographyParam.getString("appId") : null;
String type = topographyParam.getString("type"); String type = topographyParam.getString("type");
//节点 //节点
...@@ -117,6 +119,7 @@ public class TopographyController { ...@@ -117,6 +119,7 @@ public class TopographyController {
lineService.saveLines(lineData); lineService.saveLines(lineData);
//节点详情 //节点详情
JSONObject nodeDetailJson = topographyParam.getJSONObject("nodeDetail"); JSONObject nodeDetailJson = topographyParam.getJSONObject("nodeDetail");
if(nodeDetailJson != null) { if(nodeDetailJson != null) {
TopographyNodeDetail nodeDetail = JSON.parseObject(JSON.toJSONString(nodeDetailJson), TopographyNodeDetail.class); TopographyNodeDetail nodeDetail = JSON.parseObject(JSON.toJSONString(nodeDetailJson), TopographyNodeDetail.class);
...@@ -136,6 +139,7 @@ public class TopographyController { ...@@ -136,6 +139,7 @@ public class TopographyController {
results.put("linkData", newLinks); results.put("linkData", newLinks);
return CommonResponseUtil.success(results); return CommonResponseUtil.success(results);
} }
}
@ApiOperation(value = "根据nodeid查询节点详情", notes = "根据nodeid查询节点详情") @ApiOperation(value = "根据nodeid查询节点详情", notes = "根据nodeid查询节点详情")
@GetMapping(value = "/detail/{nodeid}") @GetMapping(value = "/detail/{nodeid}")
......
...@@ -314,4 +314,59 @@ ...@@ -314,4 +314,59 @@
</sql> </sql>
</changeSet> </changeSet>
<changeSet author="shanqiyun" id="1586742391611-1">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="f_text_plan"/>
</not>
</preConditions>
<comment>create f_text_plan</comment>
<sql>
CREATE TABLE `f_text_plan` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`app_id` varchar(255) NOT NULL COMMENT '预案id',
`text_name` varchar(255) NOT NULL DEFAULT '' COMMENT '文本预案名称',
`file_path` varchar(255) NOT NULL COMMENT '预案路径',
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
`create_date` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8mb4 COMMENT='文本预案';
</sql>
</changeSet>
<changeSet author="shanqiyun" id="1586742391611-2">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_topography_line" columnName="from_port"/>
</not>
</preConditions>
<comment>f_topography_line add column from_port</comment>
<sql>
ALTER TABLE `f_topography_line` ADD COLUMN `from_port` varchar(32) DEFAULT NULL;
</sql>
</changeSet>
<changeSet author="shanqiyun" id="1586742391611-3">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_topography_line" columnName="to_port"/>
</not>
</preConditions>
<comment>f_topography_line add column to_port</comment>
<sql>
ALTER TABLE `f_topography_line` ADD COLUMN `to_port` varchar(32) DEFAULT NULL;
</sql>
</changeSet>
<changeSet author="shanqiyun" id="1586742391611-4">
<preConditions onFail="MARK_RAN">
<columnExists tableName="f_topography_node_detail " columnName="nodeid"/>
</preConditions>
<comment>"f_topography_node_detail " change column nodeid</comment>
<sql>
ALTER TABLE `f_topography_node_detail`
MODIFY COLUMN `nodeid` varchar(36) DEFAULT NULL;
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment