Selaa lähdekoodia

新增文章类型字段

fangzhen 4 kuukautta sitten
vanhempi
sitoutus
042d001fb5

+ 1 - 2
ruoyi-generator/src/main/java/com/ruoyi/generator/controller/CommunityArticleController.java

@@ -189,8 +189,7 @@ public class CommunityArticleController extends BaseController {
             if (isSensitiveContent) {
                 return AjaxResult.error(MessageUtils.message("article.content.error"));
             }
-
-
+            
             communityArticleService.insertCommunityArticle(communityArticle);
         } catch (Exception e) {
             System.out.println(e.getMessage());

+ 6 - 0
ruoyi-generator/src/main/java/com/ruoyi/generator/domain/Community/CommunityArticle.java

@@ -204,4 +204,10 @@ public class CommunityArticle implements Serializable {
     @ApiModelProperty("文章at")
     @TableField(exist = false)
     private List<Long> atUserIds;
+
+    /**
+     * 文章类型
+     */
+    @ApiModelProperty("文章类型")
+    private Integer articleType;
 }

+ 8 - 1
ruoyi-generator/src/main/java/com/ruoyi/generator/vo/CommunityArticleVo.java

@@ -159,6 +159,13 @@ public class CommunityArticleVo extends BaseEntity implements Serializable {
      * 文章是否草稿箱
      */
     @ApiModelProperty("文章是否草稿箱")
-    private boolean  isDraft ;
+    private boolean isDraft ;
+
+    /**
+     * 文章类型
+     */
+    @ApiModelProperty("文章类型")
+    @TableField("article_type")
+    private Integer articleType ;
 
 }

+ 1 - 0
ruoyi-generator/src/main/resources/mapper/community/ArticleMapper.xml

@@ -116,6 +116,7 @@
         a.is_comment,
         a.is_raffle,
         a.is_download,
+        a.article_type,
         COALESCE((
         SELECT
         JSON_ARRAYAGG(