Skip to content

Commit 0a93e2e

Browse files
committed
Merge branch 'feature-sprint2' of https://10.30.90.89:10080/luban/dataspherestudio into feature-sprint2
2 parents cd53634 + 9a90817 commit 0a93e2e

File tree

76 files changed

+3274
-1328
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+3274
-1328
lines changed

conf/dss-guide-server.properties

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
# Spring configurations
2020
spring.server.port=9210
2121
spring.spring.application.name=dss-guide-server
22+
23+
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
24+
spring.jackson.time-zone=GMT+8
25+
2226
wds.linkis.server.version=v1
2327

2428
wds.linkis.log.clear=true
@@ -38,4 +42,5 @@ wds.linkis.server.mybatis.BasePackage=com.webank.wedatasphere.dss.guide.server.d
3842
#wds.linkis.gateway.url=http://127.0.0.1:9001/
3943

4044
## guide_images_path
41-
guide.content.images.path=/opt/dss/dss-guide-server/guide_images/
45+
guide.content.images.path=/opt/dss/dss-guide-server/guide_images/
46+
guide.chapter.images.path=/opt/dss/dss-guide-server/guide_images/

db/dss_ddl.sql

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,6 +1291,7 @@ alter table dss_orchestrator_version_info add context_id varchar(200) DEFAULT
12911291

12921292
ALTER TABLE dss_onestop_user_favorites ADD COLUMN `type` varchar(20) comment '类型,区分收藏和盯一盯';
12931293

1294+
12941295
/**
12951296
* 鲁班产品及文档 dss-guide
12961297
*/
@@ -1327,3 +1328,33 @@ CREATE TABLE IF NOT EXISTS `dss_guide_content` (
13271328
PRIMARY KEY (`id`)
13281329
) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='用户向导页面内容详情';
13291330

1331+
1332+
DROP TABLE IF EXISTS `dss_guide_catalog`;
1333+
CREATE TABLE IF NOT EXISTS `dss_guide_catalog` (
1334+
`id` BIGINT(13) NOT NULL AUTO_INCREMENT,
1335+
`parent_id` BIGINT(13) NOT NULL COMMENT '父级目录ID,-1代表最顶级目录',
1336+
`title` VARCHAR(50) DEFAULT NULL COMMENT '标题',
1337+
`description` VARCHAR(200) DEFAULT NULL COMMENT '描述',
1338+
`create_by` VARCHAR(255) DEFAULT NULL COMMENT '创建者',
1339+
`create_time` DATETIME DEFAULT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
1340+
`update_by` VARCHAR(255) DEFAULT NULL COMMENT '更新者',
1341+
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
1342+
`is_delete` TINYINT(1) DEFAULT '0' COMMENT '0:未删除(默认), 1已删除',
1343+
PRIMARY KEY (`id`)
1344+
) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='用户向导知识库目录';
1345+
1346+
DROP TABLE IF EXISTS `dss_guide_chapter`;
1347+
CREATE TABLE IF NOT EXISTS `dss_guide_chapter` (
1348+
`id` BIGINT(13) NOT NULL AUTO_INCREMENT,
1349+
`catalog_id` BIGINT(13) NOT NULL COMMENT '目录ID',
1350+
`title` VARCHAR(50) DEFAULT NULL COMMENT '标题',
1351+
`title_alias` VARCHAR(50) DEFAULT NULL COMMENT '标题简称',
1352+
`content` TEXT DEFAULT NULL COMMENT 'Markdown格式的内容',
1353+
`content_html` TEXT DEFAULT NULL COMMENT 'Markdown转换为html内容',
1354+
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
1355+
`create_time` datetime DEFAULT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
1356+
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
1357+
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
1358+
`is_delete` tinyint(1) DEFAULT '0' COMMENT '0:未删除(默认), 1已删除',
1359+
PRIMARY KEY (`id`)
1360+
) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='用户向导知识库文章';

dss-guide/dss-guide-server/src/main/java/com/webank/wedatasphere/dss/guide/server/conf/GuideConf.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
public interface GuideConf {
1313
CommonVars<String> GUIDE_CONTENT_IMAGES_PATH = CommonVars.apply("guide.content.images.path", "/usr/local/anlexander/all_bak/dss_linkis/dss-linkis-1.0.2/images");
1414

15+
CommonVars<String> GUIDE_CHAPTER_IMAGES_PATH = CommonVars.apply("guide.chapter.images.path", "/usr/local/anlexander/all_bak/dss_linkis/dss-linkis-1.0.2/images");
1516
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.webank.wedatasphere.dss.guide.server.dao;
2+
3+
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4+
import com.webank.wedatasphere.dss.guide.server.entity.GuideCatalog;
5+
import org.apache.ibatis.annotations.Mapper;
6+
import org.apache.ibatis.annotations.Param;
7+
import org.apache.ibatis.annotations.Select;
8+
9+
import java.util.List;
10+
11+
/**
12+
* @author suyc
13+
* @Classname GuideCatalogMapper
14+
* @Description TODO
15+
* @Date 2022/1/13 20:30
16+
* @Created by suyc
17+
*/
18+
@Mapper
19+
public interface GuideCatalogMapper extends BaseMapper<GuideCatalog> {
20+
/**
21+
* parent_id =-1 标识该目录属于最顶层的一级目录
22+
*/
23+
@Select("SELECT * FROM dss_guide_catalog WHERE is_delete =0 AND parent_id =-1 ORDER BY id ASC")
24+
List<GuideCatalog> queryGuideCatalogListForTop();
25+
26+
@Select("SELECT * FROM dss_guide_catalog WHERE is_delete =0 AND parent_id =#{id} ORDER BY id ASC")
27+
List<GuideCatalog> queryGuideCatalogChildrenById(@Param("id") Long id);
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.webank.wedatasphere.dss.guide.server.dao;
2+
3+
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4+
import com.webank.wedatasphere.dss.guide.server.entity.GuideChapter;
5+
import org.apache.ibatis.annotations.Mapper;
6+
import org.apache.ibatis.annotations.Param;
7+
import org.apache.ibatis.annotations.Select;
8+
9+
import java.util.List;
10+
11+
/**
12+
* @author suyc
13+
* @Classname GuideChapterMapper
14+
* @Description TODO
15+
* @Date 2022/1/13 20:31
16+
* @Created by suyc
17+
*/
18+
@Mapper
19+
public interface GuideChapterMapper extends BaseMapper<GuideChapter> {
20+
@Select("SELECT * FROM dss_guide_chapter WHERE is_delete =0 AND catalog_id =#{catalogId} ORDER BY id ASC")
21+
List<GuideChapter> queryGuideChapterListByCatalogId(@Param("catalogId") Long catalogId);
22+
23+
@Select("SELECT * FROM dss_guide_chapter WHERE is_delete =0 AND content LIKE CONCAT('%', #{keyword}, '%') ORDER BY id ASC")
24+
List<GuideChapter> searchGuideChapterListByKeyword(@Param("keyword") String keyword);
25+
}

dss-guide/dss-guide-server/src/main/java/com/webank/wedatasphere/dss/guide/server/dao/GuideContentMapper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ public interface GuideContentMapper extends BaseMapper<GuideContent> {
2222
List<GuideContent> getGuideContentListByPath(@Param("path") String path);
2323

2424
@Select("SELECT content FROM dss_guide_content WHERE id=#{id}")
25-
String getContentById(@Param("id") long id);
25+
String getGuideContentById(@Param("id") long id);
2626

2727
@Update("UPDATE dss_guide_content SET content =#{content},content_html =#{contentHtml} WHERE id =#{id}")
28-
void updateContentById(@Param("id") long id, @Param("content") String content, @Param("contentHtml") String contentHtml);
28+
void updateGuideContentById(@Param("id") long id, @Param("content") String content, @Param("contentHtml") String contentHtml);
2929

30-
@Update("UPDATE dss_guide_content SET `is_delete` = 1,`update_time` = NOW() WHERE `id` = #{id}")
31-
void deleteContent(@Param("id") Long id);
30+
// @Update("UPDATE dss_guide_content SET `is_delete` = 1,`update_time` = NOW() WHERE `id` = #{id}")
31+
// void deleteGuideContent(@Param("id") Long id);
3232
}

dss-guide/dss-guide-server/src/main/java/com/webank/wedatasphere/dss/guide/server/dao/GuideGroupMapper.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
import com.webank.wedatasphere.dss.guide.server.entity.GuideGroup;
55
import org.apache.ibatis.annotations.Mapper;
66
import org.apache.ibatis.annotations.Param;
7-
import org.apache.ibatis.annotations.Select;
8-
import org.apache.ibatis.annotations.Update;
97

108
import java.util.List;
119

@@ -22,6 +20,6 @@ public interface GuideGroupMapper extends BaseMapper<GuideGroup> {
2220

2321
List<GuideGroup> getAllGuideGroupDetails();
2422

25-
@Update("UPDATE dss_guide_group SET `is_delete` = 1,`update_time` = NOW() WHERE `id` = #{id}")
26-
void deleteGroup(@Param("id") Long id);
23+
// @Update("UPDATE dss_guide_group SET `is_delete` = 1,`update_time` = NOW() WHERE `id` = #{id}")
24+
// void deleteGuideGroup(@Param("id") Long id);
2725
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
2+
<mapper namespace="com.webank.wedatasphere.dss.guide.server.dao.GuideCatalogMapper">
3+
4+
</mapper>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
2+
<mapper namespace="com.webank.wedatasphere.dss.guide.server.dao.GuideChapterMapper">
3+
4+
</mapper>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package com.webank.wedatasphere.dss.guide.server.entity;
2+
3+
import com.baomidou.mybatisplus.annotation.IdType;
4+
import com.baomidou.mybatisplus.annotation.TableId;
5+
import com.baomidou.mybatisplus.annotation.TableName;
6+
import com.fasterxml.jackson.annotation.JsonFormat;
7+
import lombok.Data;
8+
import org.springframework.format.annotation.DateTimeFormat;
9+
10+
import java.util.Date;
11+
12+
/**
13+
* @author suyc
14+
* @Classname GuideCatalog
15+
* @Description TODO
16+
* @Date 2022/1/13 16:40
17+
* @Created by suyc
18+
*/
19+
@Data
20+
@TableName(value = "dss_guide_catalog")
21+
public class GuideCatalog {
22+
@TableId(value = "id", type = IdType.AUTO)
23+
private Long id;
24+
private Long parentId;
25+
26+
private String title;
27+
private String description;
28+
29+
private String createBy;
30+
private String updateBy;
31+
32+
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
33+
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
34+
private Date createTime;
35+
36+
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
37+
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
38+
private Date updateTime;
39+
//private Integer isDelete;
40+
}

0 commit comments

Comments
 (0)