Commit 20f90604 by 段启岩

重新生成代码

parent 3cf56ca0
......@@ -29,3 +29,4 @@ build/
### VS Code ###
.vscode/
src/gen/
\ No newline at end of file
package cn.meteor.beyondclouds.common.gendrator;
package cn.meteor.beyondclouds.common.generator;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.generator.AutoGenerator;
import com.baomidou.mybatisplus.generator.InjectionConfig;
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
import com.baomidou.mybatisplus.generator.config.GlobalConfig;
import com.baomidou.mybatisplus.generator.config.PackageConfig;
......@@ -12,17 +12,78 @@ import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
* @author meteor
*/
public class CodeGenerator {
static class Module {
private String moduleName;
private String[] include;
public Module(String moduleName, String[] include) {
this.moduleName = moduleName;
this.include = include;
}
public static Module of(String moduleName, String... include) {
return new Module(moduleName, include);
}
}
public static void main(String[] args) {
Module[] modules = new Module[] {
// 博客模块
Module.of("blog",
"blog", "blog_category", "blog_comment", "blog_ext", "blog_tag"),
// 资讯模块
Module.of("news",
"news"),
// 动态模块
Module.of("post",
"post", "post_comment"),
// 项目模块
Module.of("project",
"project", "project_category", "project_comment", "project_ext"),
// 问答模块
Module.of("question",
"question", "question_category", "question_ext", "question_reply", "question_reply_comment", "question_tag"),
// 标签模块
Module.of("tag",
"tag"),
// 话题模块
Module.of("topic",
"topic", "topic_follow", "topic_reference"),
// 上传资源模块
Module.of("resource",
"upload_resource"),
// 用户模块
Module.of("user",
"user", "user_auth_app", "user_auth_local", "user_follow"),
};
for (Module module :
modules) {
execute(module.moduleName, module.include);
}
}
private static void execute(String moduleName, String... include) {
// 代码生成器
AutoGenerator mpg = new AutoGenerator();
// 全局配置
GlobalConfig gc = new GlobalConfig();
gc.setIdType(IdType.ASSIGN_UUID);
String projectPath = "/Users/meteor/code/java/beyond-clouds";
gc.setOutputDir(projectPath + "/src/main/java");
gc.setOutputDir(projectPath + "/src/gen/java");
gc.setAuthor("段启岩");
gc.setOpen(false);
// gc.setSwagger2(true); 实体属性 Swagger2 注解
gc.setSwagger2(true); // 实体属性 Swagger2 注解
mpg.setGlobalConfig(gc);
// 数据源配置
......@@ -33,20 +94,19 @@ public class CodeGenerator {
dsc.setPassword("100Centa30821%mysql");
mpg.setDataSource(dsc);
// 策略配置,数据库表配置
StrategyConfig strategy = new StrategyConfig();
strategy.setNaming(NamingStrategy.underline_to_camel);
strategy.setNaming(NamingStrategy.underline_to_camel);
strategy.setColumnNaming(NamingStrategy.underline_to_camel);
strategy.setEntityLombokModel(true);
strategy.setInclude("news");
strategy.setInclude(include);
mpg.setStrategy(strategy);
// 包配置
PackageConfig pc = new PackageConfig();
pc.setModuleName("news");
pc.setParent("cn.meteor.beyondclouds.modules");
pc.setModuleName(moduleName);
mpg.setPackageInfo(pc);
// mpg.execute();
mpg.execute();
}
}
package cn.meteor.beyondclouds.modules.blog.entity;
import java.time.LocalDateTime;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 博客
* 博客
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Blog对象", description="博客表")
public class Blog implements Serializable {
private static final long serialVersionUID=1L;
@TableId(type = IdType.ASSIGN_UUID)
@TableId(value = "blog_id", type = IdType.ASSIGN_UUID)
private String blogId;
@ApiModelProperty(value = "所属类别ID")
private Integer categoryId;
@ApiModelProperty(value = "标题")
private String blogTitle;
@ApiModelProperty(value = "摘要")
private String blogAbstract;
@ApiModelProperty(value = "封面图")
private String cover;
@ApiModelProperty(value = "原文链接")
private String originLink;
@ApiModelProperty(value = "查看权限")
private Integer viewPrivileges;
@ApiModelProperty(value = "是否允许评论")
private Boolean allowComment;
@ApiModelProperty(value = "是否允许转发")
private Boolean allowForward;
private LocalDateTime createTime;
private LocalDateTime updateTime;
}
package cn.meteor.beyondclouds.modules.blog.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 博客类别表
* </p>
*
* @author 段启岩
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="BlogCategory对象", description="博客类别表")
public class BlogCategory implements Serializable {
private static final long serialVersionUID=1L;
@TableId(value = "category_id", type = IdType.AUTO)
private Integer categoryId;
@ApiModelProperty(value = "父类别ID")
private Integer parentId;
@ApiModelProperty(value = "类别名称")
private String category;
@ApiModelProperty(value = "类别路径")
private String thread;
@ApiModelProperty(value = "类别名称路径")
private String categoryThread;
private LocalDateTime createTime;
private LocalDateTime updateTime;
}
package cn.meteor.beyondclouds.modules.blog.entity;
import java.time.LocalDateTime;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 博客评论
* 博客评论
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="BlogComment对象", description="博客评论表")
public class BlogComment implements Serializable {
private static final long serialVersionUID=1L;
@TableId(type = IdType.ASSIGN_UUID)
private String commentId;
@TableId(value = "comment_id", type = IdType.AUTO)
private Integer commentId;
@ApiModelProperty(value = "博客ID")
private String blogId;
private String parentId;
@ApiModelProperty(value = "评论者ID")
private String userId;
@ApiModelProperty(value = "上一级评论ID")
private Integer parentId;
private String content;
@ApiModelProperty(value = "评论内容")
private String comment;
@ApiModelProperty(value = "评论深度")
private Integer depth;
@ApiModelProperty(value = "评论路径")
private String thread;
private LocalDateTime createTime;
......
package cn.meteor.beyondclouds.modules.blog.entity;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 博客扩展字段
* 博客扩展
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="BlogExt对象", description="博客扩展表")
public class BlogExt implements Serializable {
private static final long serialVersionUID=1L;
private String blogId;
@ApiModelProperty(value = "博客详情")
private String content;
private LocalDateTime createTime;
private LocalDateTime updateTime;
}
package cn.meteor.beyondclouds.modules.blog.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 博客标签,用来关联博客和标签,发布博客的时候选择多个标签
* 博客标签表,用来记录博客里面引用了哪些标签
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="BlogTag对象", description="博客标签表,用来记录博客里面引用了哪些标签")
public class BlogTag implements Serializable {
private static final long serialVersionUID=1L;
@ApiModelProperty(value = "博客主键")
@TableId(value = "blog_id", type = IdType.ASSIGN_UUID)
private String blogId;
@ApiModelProperty(value = "标签主键")
private String tagId;
......
package cn.meteor.beyondclouds.modules.blog.mapper;
import cn.meteor.beyondclouds.modules.blog.entity.BlogCategory;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 博客类别表 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-30
*/
public interface BlogCategoryMapper extends BaseMapper<BlogCategory> {
}
......@@ -4,9 +4,13 @@ import cn.meteor.beyondclouds.modules.blog.entity.BlogComment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 博客评论表 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IBlogCommentMapper extends BaseMapper<BlogComment> {
public interface BlogCommentMapper extends BaseMapper<BlogComment> {
}
......@@ -4,9 +4,13 @@ import cn.meteor.beyondclouds.modules.blog.entity.BlogExt;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 博客扩展表 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IBlogExtMapper extends BaseMapper<BlogExt> {
public interface BlogExtMapper extends BaseMapper<BlogExt> {
}
......@@ -4,9 +4,13 @@ import cn.meteor.beyondclouds.modules.blog.entity.Blog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 博客表 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IBlogMapper extends BaseMapper<Blog> {
public interface BlogMapper extends BaseMapper<Blog> {
}
......@@ -4,9 +4,13 @@ import cn.meteor.beyondclouds.modules.blog.entity.BlogTag;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 博客标签表,用来记录博客里面引用了哪些标签 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IBlogTagMapper extends BaseMapper<BlogTag> {
public interface BlogTagMapper extends BaseMapper<BlogTag> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.blog.mapper.BlogCategoryMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.blog.mapper.IBlogCommentMapper">
<mapper namespace="cn.meteor.beyondclouds.modules.blog.mapper.BlogCommentMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.blog.mapper.IBlogExtMapper">
<mapper namespace="cn.meteor.beyondclouds.modules.blog.mapper.BlogExtMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.blog.mapper.IBlogMapper">
<mapper namespace="cn.meteor.beyondclouds.modules.blog.mapper.BlogMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.blog.mapper.IBlogTagMapper">
<mapper namespace="cn.meteor.beyondclouds.modules.blog.mapper.BlogTagMapper">
</mapper>
package cn.meteor.beyondclouds.modules.blog.service;
import cn.meteor.beyondclouds.modules.blog.entity.BlogCategory;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 博客类别表 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-30
*/
public interface IBlogCategoryService extends IService<BlogCategory> {
}
......@@ -4,8 +4,12 @@ import cn.meteor.beyondclouds.modules.blog.entity.BlogComment;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 博客评论表 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IBlogCommentService extends IService<BlogComment> {
......
......@@ -4,8 +4,12 @@ import cn.meteor.beyondclouds.modules.blog.entity.BlogExt;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 博客扩展表 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IBlogExtService extends IService<BlogExt> {
......
......@@ -4,8 +4,12 @@ import cn.meteor.beyondclouds.modules.blog.entity.Blog;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 博客表 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IBlogService extends IService<Blog> {
......
......@@ -4,8 +4,12 @@ import cn.meteor.beyondclouds.modules.blog.entity.BlogTag;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 博客标签表,用来记录博客里面引用了哪些标签 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IBlogTagService extends IService<BlogTag> {
......
package cn.meteor.beyondclouds.modules.blog.service.impl;
import cn.meteor.beyondclouds.modules.blog.entity.BlogCategory;
import cn.meteor.beyondclouds.modules.blog.mapper.BlogCategoryMapper;
import cn.meteor.beyondclouds.modules.blog.service.IBlogCategoryService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 博客类别表 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-30
*/
@Service
public class BlogCategoryServiceImpl extends ServiceImpl<BlogCategoryMapper, BlogCategory> implements IBlogCategoryService {
}
package cn.meteor.beyondclouds.modules.blog.service.impl;
import cn.meteor.beyondclouds.modules.blog.entity.BlogComment;
import cn.meteor.beyondclouds.modules.blog.mapper.IBlogCommentMapper;
import cn.meteor.beyondclouds.modules.blog.mapper.BlogCommentMapper;
import cn.meteor.beyondclouds.modules.blog.service.IBlogCommentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 博客评论表 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Service
public class BlogCommentServiceImpl extends ServiceImpl<IBlogCommentMapper, BlogComment> implements IBlogCommentService {
public class BlogCommentServiceImpl extends ServiceImpl<BlogCommentMapper, BlogComment> implements IBlogCommentService {
}
package cn.meteor.beyondclouds.modules.blog.service.impl;
import cn.meteor.beyondclouds.modules.blog.entity.BlogExt;
import cn.meteor.beyondclouds.modules.blog.mapper.IBlogExtMapper;
import cn.meteor.beyondclouds.modules.blog.mapper.BlogExtMapper;
import cn.meteor.beyondclouds.modules.blog.service.IBlogExtService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 博客扩展表 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Service
public class BlogExtServiceImpl extends ServiceImpl<IBlogExtMapper, BlogExt> implements IBlogExtService {
public class BlogExtServiceImpl extends ServiceImpl<BlogExtMapper, BlogExt> implements IBlogExtService {
}
package cn.meteor.beyondclouds.modules.blog.service.impl;
import cn.meteor.beyondclouds.modules.blog.entity.Blog;
import cn.meteor.beyondclouds.modules.blog.mapper.IBlogMapper;
import cn.meteor.beyondclouds.modules.blog.mapper.BlogMapper;
import cn.meteor.beyondclouds.modules.blog.service.IBlogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 博客表 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Service
public class BlogServiceImpl extends ServiceImpl<IBlogMapper, Blog> implements IBlogService {
public class BlogServiceImpl extends ServiceImpl<BlogMapper, Blog> implements IBlogService {
}
package cn.meteor.beyondclouds.modules.blog.service.impl;
import cn.meteor.beyondclouds.modules.blog.entity.BlogTag;
import cn.meteor.beyondclouds.modules.blog.mapper.IBlogTagMapper;
import cn.meteor.beyondclouds.modules.blog.mapper.BlogTagMapper;
import cn.meteor.beyondclouds.modules.blog.service.IBlogTagService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 博客标签表,用来记录博客里面引用了哪些标签 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Service
public class BlogTagServiceImpl extends ServiceImpl<IBlogTagMapper, BlogTag> implements IBlogTagService {
public class BlogTagServiceImpl extends ServiceImpl<BlogTagMapper, BlogTag> implements IBlogTagService {
}
package cn.meteor.beyondclouds.modules.news.entity;
import java.time.LocalDateTime;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 资讯
* 新闻资讯表
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="News对象", description="新闻资讯表")
public class News implements Serializable {
private static final long serialVersionUID=1L;
@TableId(type = IdType.ASSIGN_UUID)
@TableId(value = "news_id", type = IdType.ASSIGN_UUID)
private String newsId;
@ApiModelProperty(value = "资讯标题")
private String newsTitle;
private String newsCover;
@ApiModelProperty(value = "资讯封面图")
private String cover;
@ApiModelProperty(value = "资讯内容")
private String content;
private LocalDateTime createTime;
......
......@@ -4,9 +4,13 @@ import cn.meteor.beyondclouds.modules.news.entity.News;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 新闻资讯表 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface INewsMapper extends BaseMapper<News> {
public interface NewsMapper extends BaseMapper<News> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.news.mapper.INewsMapper">
<mapper namespace="cn.meteor.beyondclouds.modules.news.mapper.NewsMapper">
</mapper>
......@@ -4,8 +4,12 @@ import cn.meteor.beyondclouds.modules.news.entity.News;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 新闻资讯表 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface INewsService extends IService<News> {
......
package cn.meteor.beyondclouds.modules.news.service.impl;
import cn.meteor.beyondclouds.modules.news.entity.News;
import cn.meteor.beyondclouds.modules.news.mapper.INewsMapper;
import cn.meteor.beyondclouds.modules.news.mapper.NewsMapper;
import cn.meteor.beyondclouds.modules.news.service.INewsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 新闻资讯表 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Service
public class NewsServiceImpl extends ServiceImpl<INewsMapper, News> implements INewsService {
public class NewsServiceImpl extends ServiceImpl<NewsMapper, News> implements INewsService {
}
package cn.meteor.beyondclouds.modules.post.entity;
import java.time.LocalDateTime;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 动态
* 动态
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Post对象", description="动态表")
public class Post implements Serializable {
private static final long serialVersionUID=1L;
@TableId(type = IdType.ASSIGN_UUID)
@TableId(value = "post_id", type = IdType.ASSIGN_UUID)
private String postId;
@ApiModelProperty(value = "用户ID")
private String userId;
@ApiModelProperty(value = "动态类型")
private Integer type;
@ApiModelProperty(value = "动态内容")
private String content;
@ApiModelProperty(value = "动态里面的图片")
private String pictures;
private LocalDateTime createTime;
......
package cn.meteor.beyondclouds.modules.post.entity;
import java.time.LocalDateTime;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 动态评论
* 动态评论
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="PostComment对象", description="动态评论表")
public class PostComment implements Serializable {
private static final long serialVersionUID=1L;
@TableId(type = IdType.ASSIGN_UUID)
private String commentId;
@TableId(value = "comment_id", type = IdType.AUTO)
private Integer commentId;
private String postId;
private String parentId;
@ApiModelProperty(value = "评论者 ID")
private String userId;
@ApiModelProperty(value = "上级评论ID")
private Integer parentId;
private String content;
@ApiModelProperty(value = "评论内容")
private String comment;
@ApiModelProperty(value = "评论深度")
private Integer depth;
@ApiModelProperty(value = "评论路径")
private String thread;
private LocalDateTime createTime;
......
......@@ -4,9 +4,13 @@ import cn.meteor.beyondclouds.modules.post.entity.PostComment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 动态评论表 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IPostCommentMapper extends BaseMapper<PostComment> {
public interface PostCommentMapper extends BaseMapper<PostComment> {
}
......@@ -4,9 +4,13 @@ import cn.meteor.beyondclouds.modules.post.entity.Post;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 动态表 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IPostMapper extends BaseMapper<Post> {
public interface PostMapper extends BaseMapper<Post> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.post.mapper.IPostCommentMapper">
<mapper namespace="cn.meteor.beyondclouds.modules.post.mapper.PostCommentMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.post.mapper.IPostMapper">
<mapper namespace="cn.meteor.beyondclouds.modules.post.mapper.PostMapper">
</mapper>
......@@ -4,8 +4,12 @@ import cn.meteor.beyondclouds.modules.post.entity.PostComment;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 动态评论表 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IPostCommentService extends IService<PostComment> {
......
......@@ -4,8 +4,12 @@ import cn.meteor.beyondclouds.modules.post.entity.Post;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 动态表 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IPostService extends IService<Post> {
......
package cn.meteor.beyondclouds.modules.post.service.impl;
import cn.meteor.beyondclouds.modules.post.entity.PostComment;
import cn.meteor.beyondclouds.modules.post.mapper.IPostCommentMapper;
import cn.meteor.beyondclouds.modules.post.mapper.PostCommentMapper;
import cn.meteor.beyondclouds.modules.post.service.IPostCommentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 动态评论表 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Service
public class PostCommentServiceImpl extends ServiceImpl<IPostCommentMapper, PostComment> implements IPostCommentService {
public class PostCommentServiceImpl extends ServiceImpl<PostCommentMapper, PostComment> implements IPostCommentService {
}
package cn.meteor.beyondclouds.modules.post.service.impl;
import cn.meteor.beyondclouds.modules.post.entity.Post;
import cn.meteor.beyondclouds.modules.post.mapper.IPostMapper;
import cn.meteor.beyondclouds.modules.post.mapper.PostMapper;
import cn.meteor.beyondclouds.modules.post.service.IPostService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 动态表 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Service
public class PostServiceImpl extends ServiceImpl<IPostMapper, Post> implements IPostService {
public class PostServiceImpl extends ServiceImpl<PostMapper, Post> implements IPostService {
}
package cn.meteor.beyondclouds.modules.project.entity;
import java.time.LocalDateTime;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 项目
* 项目
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Project对象", description="项目表")
public class Project implements Serializable {
private static final long serialVersionUID=1L;
@TableId(type = IdType.ASSIGN_UUID)
private String projectId;
@TableId(value = "project_id", type = IdType.AUTO)
private Integer projectId;
@ApiModelProperty(value = "项目名称")
private String projectName;
private String projectLink;
@ApiModelProperty(value = "项目类别ID")
private Integer categoryId;
@ApiModelProperty(value = "项目源码链接")
private String sourceLink;
private String projectHome;
@ApiModelProperty(value = "项目主页链接")
private String homeLink;
private String projectDoc;
@ApiModelProperty(value = "项目文档链接")
private String docLink;
@ApiModelProperty(value = "项目类型")
private String projectType;
@ApiModelProperty(value = "协议")
private String license;
@ApiModelProperty(value = "项目开发语言")
private String devLang;
@ApiModelProperty(value = "项目运行平台")
private String runtimePlatform;
@ApiModelProperty(value = "项目作者")
private String author;
@ApiModelProperty(value = "项目描述")
private String projectDescription;
private String projectCover;
@ApiModelProperty(value = "封面图")
private String cover;
private LocalDateTime createTime;
......
package cn.meteor.beyondclouds.modules.project.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 项目类别表
* </p>
*
* @author 段启岩
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="ProjectCategory对象", description="项目类别表")
public class ProjectCategory implements Serializable {
private static final long serialVersionUID=1L;
@TableId(value = "category_id", type = IdType.AUTO)
private Integer categoryId;
@ApiModelProperty(value = "父类别ID")
private Integer parentId;
@ApiModelProperty(value = "类别名称")
private String category;
@ApiModelProperty(value = "类别路径")
private String thread;
@ApiModelProperty(value = "类别名称路径")
private String categoryThread;
private LocalDateTime createTime;
private LocalDateTime updateTime;
}
package cn.meteor.beyondclouds.modules.project.entity;
import java.time.LocalDateTime;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 项目评论
* 项目评论
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="ProjectComment对象", description="项目评论表")
public class ProjectComment implements Serializable {
private static final long serialVersionUID=1L;
@TableId(type = IdType.ASSIGN_UUID)
private String commentId;
@TableId(value = "comment_id", type = IdType.AUTO)
private Integer commentId;
private Integer projectId;
private String projectId;
@ApiModelProperty(value = "评论者ID")
private String userId;
private String parentId;
@ApiModelProperty(value = "父级评论 ID")
private Integer parentId;
private String content;
@ApiModelProperty(value = "评论内容")
private String comment;
@ApiModelProperty(value = "评论深度")
private Integer depth;
@ApiModelProperty(value = "评论路径 ")
private String thread;
private LocalDateTime createTime;
......
package cn.meteor.beyondclouds.modules.project.entity;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 项目扩展字段
* 项目扩展
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="ProjectExt对象", description="项目扩展表")
public class ProjectExt implements Serializable {
private static final long serialVersionUID=1L;
private String projectId;
private Integer projectId;
@ApiModelProperty(value = "项目详情")
private String projectDetail;
private LocalDateTime createTime;
private LocalDateTime updateTime;
}
package cn.meteor.beyondclouds.modules.project.mapper;
import cn.meteor.beyondclouds.modules.project.entity.ProjectCategory;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 项目类别表 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-30
*/
public interface ProjectCategoryMapper extends BaseMapper<ProjectCategory> {
}
......@@ -4,9 +4,13 @@ import cn.meteor.beyondclouds.modules.project.entity.ProjectComment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 项目评论表 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IProjectCommentMapper extends BaseMapper<ProjectComment> {
public interface ProjectCommentMapper extends BaseMapper<ProjectComment> {
}
......@@ -4,9 +4,13 @@ import cn.meteor.beyondclouds.modules.project.entity.ProjectExt;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 项目扩展表 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IProjectExtMapper extends BaseMapper<ProjectExt> {
public interface ProjectExtMapper extends BaseMapper<ProjectExt> {
}
......@@ -4,9 +4,13 @@ import cn.meteor.beyondclouds.modules.project.entity.Project;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 项目表 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IProjectMapper extends BaseMapper<Project> {
public interface ProjectMapper extends BaseMapper<Project> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.project.mapper.ProjectCategoryMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.project.mapper.IProjectCommentMapper">
<mapper namespace="cn.meteor.beyondclouds.modules.project.mapper.ProjectCommentMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.project.mapper.IProjectExtMapper">
<mapper namespace="cn.meteor.beyondclouds.modules.project.mapper.ProjectExtMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.project.mapper.IProjectMapper">
<mapper namespace="cn.meteor.beyondclouds.modules.project.mapper.ProjectMapper">
</mapper>
package cn.meteor.beyondclouds.modules.project.service;
import cn.meteor.beyondclouds.modules.project.entity.ProjectCategory;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 项目类别表 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-30
*/
public interface IProjectCategoryService extends IService<ProjectCategory> {
}
......@@ -4,8 +4,12 @@ import cn.meteor.beyondclouds.modules.project.entity.ProjectComment;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 项目评论表 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IProjectCommentService extends IService<ProjectComment> {
......
......@@ -4,8 +4,12 @@ import cn.meteor.beyondclouds.modules.project.entity.ProjectExt;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 项目扩展表 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IProjectExtService extends IService<ProjectExt> {
......
......@@ -4,8 +4,12 @@ import cn.meteor.beyondclouds.modules.project.entity.Project;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 项目表 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IProjectService extends IService<Project> {
......
package cn.meteor.beyondclouds.modules.project.service.impl;
import cn.meteor.beyondclouds.modules.project.entity.ProjectCategory;
import cn.meteor.beyondclouds.modules.project.mapper.ProjectCategoryMapper;
import cn.meteor.beyondclouds.modules.project.service.IProjectCategoryService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 项目类别表 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-30
*/
@Service
public class ProjectCategoryServiceImpl extends ServiceImpl<ProjectCategoryMapper, ProjectCategory> implements IProjectCategoryService {
}
package cn.meteor.beyondclouds.modules.project.service.impl;
import cn.meteor.beyondclouds.modules.project.entity.ProjectComment;
import cn.meteor.beyondclouds.modules.project.mapper.IProjectCommentMapper;
import cn.meteor.beyondclouds.modules.project.mapper.ProjectCommentMapper;
import cn.meteor.beyondclouds.modules.project.service.IProjectCommentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 项目评论表 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Service
public class ProjectCommentServiceImpl extends ServiceImpl<IProjectCommentMapper, ProjectComment> implements IProjectCommentService {
public class ProjectCommentServiceImpl extends ServiceImpl<ProjectCommentMapper, ProjectComment> implements IProjectCommentService {
}
package cn.meteor.beyondclouds.modules.project.service.impl;
import cn.meteor.beyondclouds.modules.project.entity.ProjectExt;
import cn.meteor.beyondclouds.modules.project.mapper.IProjectExtMapper;
import cn.meteor.beyondclouds.modules.project.mapper.ProjectExtMapper;
import cn.meteor.beyondclouds.modules.project.service.IProjectExtService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 项目扩展表 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Service
public class ProjectExtServiceImpl extends ServiceImpl<IProjectExtMapper, ProjectExt> implements IProjectExtService {
public class ProjectExtServiceImpl extends ServiceImpl<ProjectExtMapper, ProjectExt> implements IProjectExtService {
}
package cn.meteor.beyondclouds.modules.project.service.impl;
import cn.meteor.beyondclouds.modules.project.entity.Project;
import cn.meteor.beyondclouds.modules.project.mapper.IProjectMapper;
import cn.meteor.beyondclouds.modules.project.mapper.ProjectMapper;
import cn.meteor.beyondclouds.modules.project.service.IProjectService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 项目表 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Service
public class ProjectServiceImpl extends ServiceImpl<IProjectMapper, Project> implements IProjectService {
public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> implements IProjectService {
}
package cn.meteor.beyondclouds.modules.question.entity;
import java.time.LocalDateTime;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 问题
* 问题
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Question对象", description="问题表")
public class Question implements Serializable {
private static final long serialVersionUID=1L;
@TableId(type = IdType.ASSIGN_UUID)
@TableId(value = "question_id", type = IdType.ASSIGN_UUID)
private String questionId;
@ApiModelProperty(value = "问题类别ID")
private Integer categoryId;
@ApiModelProperty(value = "问题标题")
private String questionTitle;
@ApiModelProperty(value = "问题摘要")
private String questionAbstract;
private LocalDateTime createTime;
private LocalDateTime updateTime;
......
package cn.meteor.beyondclouds.modules.question.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 问题类别表
* </p>
*
* @author 段启岩
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="QuestionCategory对象", description="问题类别表")
public class QuestionCategory implements Serializable {
private static final long serialVersionUID=1L;
@TableId(value = "category_id", type = IdType.AUTO)
private Integer categoryId;
@ApiModelProperty(value = "类别名称")
private String category;
private LocalDateTime createTime;
private LocalDateTime updateTime;
}
package cn.meteor.beyondclouds.modules.question.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 问题扩展字段
* 问题扩展
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="QuestionExt对象", description="问题扩展表")
public class QuestionExt implements Serializable {
private static final long serialVersionUID=1L;
private String questionId;
@ApiModelProperty(value = "问题详情")
private String questionDetail;
......
package cn.meteor.beyondclouds.modules.question.entity;
import java.time.LocalDateTime;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 问题回复
* 问题回复
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="QuestionReply对象", description="问题回复表")
public class QuestionReply implements Serializable {
private static final long serialVersionUID=1L;
@TableId(type = IdType.ASSIGN_UUID)
@TableId(value = "reply_id", type = IdType.ASSIGN_UUID)
private String replyId;
private String questionId;
private String content;
@ApiModelProperty(value = "回复内容")
private String reply;
@ApiModelProperty(value = "回复状态:0-正常,1-被采纳")
private Integer replyStatus;
private LocalDateTime createTime;
......
package cn.meteor.beyondclouds.modules.question.entity;
import java.time.LocalDateTime;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 问题回复评论
* 问题回复评论
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="QuestionReplyComment对象", description="问题回复评论表")
public class QuestionReplyComment implements Serializable {
private static final long serialVersionUID=1L;
@TableId(type = IdType.ASSIGN_UUID)
@TableId(value = "comment_id", type = IdType.ASSIGN_UUID)
private String commentId;
private String replyId;
......
package cn.meteor.beyondclouds.modules.question.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 问题标签,关联问题和标签
* 问题标签表,用来记录问题里面引用的标签
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="QuestionTag对象", description="问题标签表,用来记录问题里面引用的标签")
public class QuestionTag implements Serializable {
private static final long serialVersionUID=1L;
@ApiModelProperty(value = "标签ID")
@TableId(value = "tag_id", type = IdType.ASSIGN_UUID)
private String tagId;
@ApiModelProperty(value = "问题ID")
private String questionId;
......
package cn.meteor.beyondclouds.modules.question.mapper;
import cn.meteor.beyondclouds.modules.question.entity.QuestionCategory;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 问题类别表 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-30
*/
public interface QuestionCategoryMapper extends BaseMapper<QuestionCategory> {
}
......@@ -4,9 +4,13 @@ import cn.meteor.beyondclouds.modules.question.entity.QuestionExt;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 问题扩展表 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IQuestionExtMapper extends BaseMapper<QuestionExt> {
public interface QuestionExtMapper extends BaseMapper<QuestionExt> {
}
......@@ -4,9 +4,13 @@ import cn.meteor.beyondclouds.modules.question.entity.Question;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 问题表 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IQuestionMapper extends BaseMapper<Question> {
public interface QuestionMapper extends BaseMapper<Question> {
}
......@@ -4,9 +4,13 @@ import cn.meteor.beyondclouds.modules.question.entity.QuestionReplyComment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 问题回复评论表 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IQuestionReplyCommentMapper extends BaseMapper<QuestionReplyComment> {
public interface QuestionReplyCommentMapper extends BaseMapper<QuestionReplyComment> {
}
......@@ -4,9 +4,13 @@ import cn.meteor.beyondclouds.modules.question.entity.QuestionReply;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 问题回复表 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IQuestionReplyMapper extends BaseMapper<QuestionReply> {
public interface QuestionReplyMapper extends BaseMapper<QuestionReply> {
}
......@@ -4,9 +4,13 @@ import cn.meteor.beyondclouds.modules.question.entity.QuestionTag;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 问题标签表,用来记录问题里面引用的标签 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IQuestionTagMapper extends BaseMapper<QuestionTag> {
public interface QuestionTagMapper extends BaseMapper<QuestionTag> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.question.mapper.QuestionCategoryMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.question.mapper.IQuestionExtMapper">
<mapper namespace="cn.meteor.beyondclouds.modules.question.mapper.QuestionExtMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.question.mapper.IQuestionMapper">
<mapper namespace="cn.meteor.beyondclouds.modules.question.mapper.QuestionMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.question.mapper.IQuestionReplyCommentMapper">
<mapper namespace="cn.meteor.beyondclouds.modules.question.mapper.QuestionReplyCommentMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.question.mapper.IQuestionReplyMapper">
<mapper namespace="cn.meteor.beyondclouds.modules.question.mapper.QuestionReplyMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.question.mapper.IQuestionTagMapper">
<mapper namespace="cn.meteor.beyondclouds.modules.question.mapper.QuestionTagMapper">
</mapper>
package cn.meteor.beyondclouds.modules.question.service;
import cn.meteor.beyondclouds.modules.question.entity.QuestionCategory;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 问题类别表 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-30
*/
public interface IQuestionCategoryService extends IService<QuestionCategory> {
}
......@@ -4,8 +4,12 @@ import cn.meteor.beyondclouds.modules.question.entity.QuestionExt;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 问题扩展表 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IQuestionExtService extends IService<QuestionExt> {
......
......@@ -4,8 +4,12 @@ import cn.meteor.beyondclouds.modules.question.entity.QuestionReplyComment;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 问题回复评论表 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IQuestionReplyCommentService extends IService<QuestionReplyComment> {
......
......@@ -4,8 +4,12 @@ import cn.meteor.beyondclouds.modules.question.entity.QuestionReply;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 问题回复表 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IQuestionReplyService extends IService<QuestionReply> {
......
......@@ -4,8 +4,12 @@ import cn.meteor.beyondclouds.modules.question.entity.Question;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 问题表 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IQuestionService extends IService<Question> {
......
......@@ -4,8 +4,12 @@ import cn.meteor.beyondclouds.modules.question.entity.QuestionTag;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 问题标签表,用来记录问题里面引用的标签 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface IQuestionTagService extends IService<QuestionTag> {
......
package cn.meteor.beyondclouds.modules.question.service.impl;
import cn.meteor.beyondclouds.modules.question.entity.QuestionCategory;
import cn.meteor.beyondclouds.modules.question.mapper.QuestionCategoryMapper;
import cn.meteor.beyondclouds.modules.question.service.IQuestionCategoryService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 问题类别表 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-30
*/
@Service
public class QuestionCategoryServiceImpl extends ServiceImpl<QuestionCategoryMapper, QuestionCategory> implements IQuestionCategoryService {
}
package cn.meteor.beyondclouds.modules.question.service.impl;
import cn.meteor.beyondclouds.modules.question.entity.QuestionExt;
import cn.meteor.beyondclouds.modules.question.mapper.IQuestionExtMapper;
import cn.meteor.beyondclouds.modules.question.mapper.QuestionExtMapper;
import cn.meteor.beyondclouds.modules.question.service.IQuestionExtService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 问题扩展表 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Service
public class QuestionExtServiceImpl extends ServiceImpl<IQuestionExtMapper, QuestionExt> implements IQuestionExtService {
public class QuestionExtServiceImpl extends ServiceImpl<QuestionExtMapper, QuestionExt> implements IQuestionExtService {
}
package cn.meteor.beyondclouds.modules.question.service.impl;
import cn.meteor.beyondclouds.modules.question.entity.QuestionReplyComment;
import cn.meteor.beyondclouds.modules.question.mapper.IQuestionReplyCommentMapper;
import cn.meteor.beyondclouds.modules.question.mapper.QuestionReplyCommentMapper;
import cn.meteor.beyondclouds.modules.question.service.IQuestionReplyCommentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 问题回复评论表 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Service
public class QuestionReplyCommentServiceImpl extends ServiceImpl<IQuestionReplyCommentMapper, QuestionReplyComment> implements IQuestionReplyCommentService {
public class QuestionReplyCommentServiceImpl extends ServiceImpl<QuestionReplyCommentMapper, QuestionReplyComment> implements IQuestionReplyCommentService {
}
package cn.meteor.beyondclouds.modules.question.service.impl;
import cn.meteor.beyondclouds.modules.question.entity.QuestionReply;
import cn.meteor.beyondclouds.modules.question.mapper.IQuestionReplyMapper;
import cn.meteor.beyondclouds.modules.question.mapper.QuestionReplyMapper;
import cn.meteor.beyondclouds.modules.question.service.IQuestionReplyService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 问题回复表 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Service
public class QuestionReplyServiceImpl extends ServiceImpl<IQuestionReplyMapper, QuestionReply> implements IQuestionReplyService {
public class QuestionReplyServiceImpl extends ServiceImpl<QuestionReplyMapper, QuestionReply> implements IQuestionReplyService {
}
package cn.meteor.beyondclouds.modules.question.service.impl;
import cn.meteor.beyondclouds.modules.question.entity.Question;
import cn.meteor.beyondclouds.modules.question.mapper.IQuestionMapper;
import cn.meteor.beyondclouds.modules.question.mapper.QuestionMapper;
import cn.meteor.beyondclouds.modules.question.service.IQuestionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 问题表 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Service
public class QuestionServiceImpl extends ServiceImpl<IQuestionMapper, Question> implements IQuestionService {
public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> implements IQuestionService {
}
package cn.meteor.beyondclouds.modules.question.service.impl;
import cn.meteor.beyondclouds.modules.question.entity.QuestionTag;
import cn.meteor.beyondclouds.modules.question.mapper.IQuestionTagMapper;
import cn.meteor.beyondclouds.modules.question.mapper.QuestionTagMapper;
import cn.meteor.beyondclouds.modules.question.service.IQuestionTagService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 问题标签表,用来记录问题里面引用的标签 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Service
public class QuestionTagServiceImpl extends ServiceImpl<IQuestionTagMapper, QuestionTag> implements IQuestionTagService {
public class QuestionTagServiceImpl extends ServiceImpl<QuestionTagMapper, QuestionTag> implements IQuestionTagService {
}
package cn.meteor.beyondclouds.modules.resource.entity;
import java.time.LocalDateTime;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 文件上传资源表
* </p>
*
* @author 段启岩
* @since 2020-01-30
*/
@Data
@ToString
@TableName("upload_resource")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="UploadResource对象", description="文件上传资源表")
public class UploadResource implements Serializable {
@TableField
private static final long serialVersionUID=1L;
@TableId(type = IdType.ASSIGN_UUID)
private String resourceId;
@TableField
@ApiModelProperty(value = "用户 ID")
private String userId;
@TableField
@ApiModelProperty(value = "资源URL")
private String resourceUrl;
@TableField
@ApiModelProperty(value = "资源类型")
private Integer resourceType;
@TableField
private Date createTime;
private LocalDateTime createTime;
private LocalDateTime updateTime;
@TableField
private Date updateTime;
}
......@@ -21,13 +21,13 @@ public enum UploadType {
return basePath;
}
public int getOrdinal() {
public int getType() {
return ordinal;
}
public static UploadType valueOf(int ordinal) {
public static UploadType valueOf(int type) {
for (UploadType uploadType : values()) {
if (uploadType.getOrdinal() == ordinal) {
if (uploadType.getType() == type) {
return uploadType;
}
}
......
......@@ -41,7 +41,7 @@ public class FileUploadServiceImpl implements IFileUploadService {
String downloadUrl = ossHelper.upload(ins, uploadPath);
UploadResource uploadResource = new UploadResource();
uploadResource.setUserId(userId);
uploadResource.setResourceType(uploadType.getOrdinal());
uploadResource.setResourceType(uploadType.getType());
uploadResource.setResourceUrl(downloadUrl);
uploadResourceService.save(uploadResource);
return downloadUrl;
......
package cn.meteor.beyondclouds.modules.tag.entity;
import java.time.LocalDateTime;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
* 标签
* 标签
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Tag对象", description="标签表")
public class Tag implements Serializable {
private static final long serialVersionUID=1L;
@TableId(type = IdType.ASSIGN_UUID)
@TableId(value = "tag_id", type = IdType.ASSIGN_UUID)
private String tagId;
@ApiModelProperty(value = "标签名称")
private String tagName;
@ApiModelProperty(value = "标签类型:0博客标签,2-问题标签")
private Integer tagType;
private LocalDateTime createTime;
......
......@@ -4,9 +4,13 @@ import cn.meteor.beyondclouds.modules.tag.entity.Tag;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 标签表 Mapper 接口
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface ITagMapper extends BaseMapper<Tag> {
public interface TagMapper extends BaseMapper<Tag> {
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.meteor.beyondclouds.modules.tag.mapper.ITagMapper">
<mapper namespace="cn.meteor.beyondclouds.modules.tag.mapper.TagMapper">
</mapper>
......@@ -4,8 +4,12 @@ import cn.meteor.beyondclouds.modules.tag.entity.Tag;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 标签表 服务类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
public interface ITagService extends IService<Tag> {
......
package cn.meteor.beyondclouds.modules.tag.service.impl;
import cn.meteor.beyondclouds.modules.tag.entity.Tag;
import cn.meteor.beyondclouds.modules.tag.mapper.ITagMapper;
import cn.meteor.beyondclouds.modules.tag.mapper.TagMapper;
import cn.meteor.beyondclouds.modules.tag.service.ITagService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 标签表 服务实现类
* </p>
*
* @author 段启岩
* @since 2020-01-18
* @since 2020-01-30
*/
@Service
public class TagServiceImpl extends ServiceImpl<ITagMapper, Tag> implements ITagService {
public class TagServiceImpl extends ServiceImpl<TagMapper, Tag> implements ITagService {
}
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