瀏覽代碼

新增文章加入 抽奖,下载,评论字段

fangqing 6 月之前
父節點
當前提交
4de02fa480

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

@@ -108,6 +108,20 @@ public class CommunityArticle implements Serializable {
     @ApiModelProperty("是否允许评价")
     private boolean isComment;
 
+    /**
+     * 是否允许下载照片视频
+     */
+    @ApiModelProperty("是否允许下载照片视频")
+    private boolean isDownload;
+
+
+    /**
+     * 是否允许抽奖
+     */
+    @ApiModelProperty("是否允许抽奖")
+    private boolean isRaffle;
+
+
     /**
      * 浏览量
      */

+ 3 - 0
ruoyi-generator/src/main/java/com/ruoyi/generator/service/CommunityArticleServiceImpl.java

@@ -257,6 +257,9 @@ public class CommunityArticleServiceImpl extends ServiceImpl<CommunityArticleMap
         communityArticle.setCreateBy(userId);
         communityArticle.setUpdateBy(userId);
         communityArticle.setIsDelete(false);
+        communityArticle.setComment(false);
+        communityArticle.setDownload(false);
+        communityArticle.setRaffle(false);
         communityArticle.setUpdateTime(DateUtils.parseDate(DateUtils.getTime()));
         communityArticle.setCreateTime(DateUtils.parseDate(DateUtils.getTime()));
         communityArticleMapper.insert(communityArticle);