wiki接口

This commit is contained in:
暮光:城中城
2019-02-27 21:38:25 +08:00
parent b930103058
commit b14e2c5989
9 changed files with 225 additions and 31 deletions

View File

@@ -1,17 +1,18 @@
package com.zyplayer.doc.data.repository.manage.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
*
*
* </p>
*
* @author 暮光:城中城
* @since 2019-02-26
* @since 2019-02-27
*/
public class WikiPage implements Serializable {
@@ -38,6 +39,11 @@ public class WikiPage implements Serializable {
*/
private Long parentId;
/**
* 节点类型 0=有子节点 1=终节点
*/
private Integer nodeType;
/**
* 创建人ID
*/
@@ -91,6 +97,13 @@ public class WikiPage implements Serializable {
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public Integer getNodeType() {
return nodeType;
}
public void setNodeType(Integer nodeType) {
this.nodeType = nodeType;
}
public Long getCreateUid() {
return createUid;
}
@@ -134,6 +147,7 @@ public class WikiPage implements Serializable {
", spaceId=" + spaceId +
", name=" + name +
", parentId=" + parentId +
", nodeType=" + nodeType +
", createUid=" + createUid +
", createTime=" + createTime +
", updateUid=" + updateUid +

View File

@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* </p>
*
* @author 暮光:城中城
* @since 2019-02-26
* @since 2019-02-27
*/
public interface WikiPageMapper extends BaseMapper<WikiPage> {

View File

@@ -19,7 +19,7 @@ public class CodeGenerator {
final String moduleName = "manage";
// final String[] tableName = { "zyplayer_storage", "auth_info", "user_auth", "user_info" };
// final String[] tableName = { "wiki_space", "wiki_page", "wiki_page_content", "wiki_page_file", "wiki_page_comment", "wiki_page_zan" };
final String[] tableName = { "wiki_page", "wiki_page_comment" };
final String[] tableName = { "wiki_page" };
// 代码生成器
AutoGenerator mpg = new AutoGenerator();

View File

@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* </p>
*
* @author 暮光:城中城
* @since 2019-02-26
* @since 2019-02-27
*/
public interface WikiPageService extends IService<WikiPage> {

View File

@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
* </p>
*
* @author 暮光:城中城
* @since 2019-02-26
* @since 2019-02-27
*/
@Service
public class WikiPageServiceImpl extends ServiceImpl<WikiPageMapper, WikiPage> implements WikiPageService {

View File

@@ -33,6 +33,9 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<zyplayer.doc.version>1.0.1</zyplayer.doc.version>
<!-- 打包跳过单元测试 -->
<skipTests>true</skipTests>
<destDir>${project.build.outputDirectory}/META-INF/resources/webjars/${project.artifactId}/${project.version}</destDir>
</properties>
<dependencies>
@@ -55,4 +58,150 @@
<version>${zyplayer.doc.version}</version>
</dependency>
</dependencies>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<scm>
<connection>scm:git@git.oschina.net:zyplayer/zyplayer-doc.git</connection>
<developerConnection>scm:git@git.oschina.net:zyplayer/zyplayer-doc.git</developerConnection>
<url>git@git.oschina.net:zyplayer/zyplayer-doc.git</url>
</scm>
<distributionManagement>
<snapshotRepository>
<id>snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>snapshots</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<targetPath>META-INF/resources/</targetPath>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/webapp</directory>
<includes>
<include>**/*</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.2</version>
<configuration>
<aggregate>true</aggregate>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<skipTests>${skipTests}</skipTests>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.2</version>
<configuration>
<aggregate>true</aggregate>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@@ -41,6 +41,8 @@ public class WikiPageController {
UpdateWrapper<WikiPage> wrapper = new UpdateWrapper<>();
wrapper.eq("del_flag", 0);
wrapper.eq("space_id", wikiPage.getSpaceId());
wrapper.isNull(wikiPage.getParentId() == null, "parent_id");
wrapper.eq(wikiPage.getParentId() != null, "parent_id", wikiPage.getParentId());
List<WikiPage> authList = wikiPageService.list(wrapper);
return DocResponseJson.ok(authList);
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,11 @@
1、markdown
https://github.com/hinesboy/mavonEditor
https://md.zhystar.com/
http://47.99.49.57/markdown/
https://github.com/coinsuper/vue-markdown
2、富文本编辑器
http://www.wangeditor.com/index.html
https://simditor.tower.im/