From ffbf9278b8af78f23c39ecb0af7e1f87261f0864 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 18 Oct 2023 11:27:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=90=A5=E9=94=80=E6=96=87=E7=AB=A0=EF=BC=9A?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=96=87=E7=AB=A0=E6=B5=8F=E8=A7=88=E9=87=8F?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF=EF=BC=8C=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=97=B6=E5=88=9D=E5=A7=8B=E5=8C=96=E6=B5=8F=E8=A7=88=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/article/vo/article/ArticleRespVO.java | 3 +++ .../module/promotion/dal/dataobject/article/ArticleDO.java | 2 +- .../module/promotion/service/article/ArticleServiceImpl.java | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/article/vo/article/ArticleRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/article/vo/article/ArticleRespVO.java index a1553e471..3f9281a17 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/article/vo/article/ArticleRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/article/vo/article/ArticleRespVO.java @@ -16,6 +16,9 @@ public class ArticleRespVO extends ArticleBaseVO { @Schema(description = "文章编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "8606") private Long id; + @Schema(description = "浏览量", requiredMode = Schema.RequiredMode.REQUIRED, example = "99999") + private Integer browseCount; + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime createTime; diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/article/ArticleDO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/article/ArticleDO.java index 078bde94f..426d9d9c7 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/article/ArticleDO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/article/ArticleDO.java @@ -54,7 +54,7 @@ public class ArticleDO extends BaseDO { /** * 浏览次数 */ - private String browseCount; + private Integer browseCount; /** * 排序 */ diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/article/ArticleServiceImpl.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/article/ArticleServiceImpl.java index 51a620b4d..5b95753ff 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/article/ArticleServiceImpl.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/article/ArticleServiceImpl.java @@ -42,6 +42,7 @@ public class ArticleServiceImpl implements ArticleService { // 插入 ArticleDO article = ArticleConvert.INSTANCE.convert(createReqVO); + article.setBrowseCount(0); // 初始浏览量 articleMapper.insert(article); // 返回 return article.getId();