mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
营销文章:修正文章浏览量类型错误,新增时初始化浏览量
This commit is contained in:
parent
6081ce30d5
commit
ffbf9278b8
@ -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;
|
||||
|
||||
|
@ -54,7 +54,7 @@ public class ArticleDO extends BaseDO {
|
||||
/**
|
||||
* 浏览次数
|
||||
*/
|
||||
private String browseCount;
|
||||
private Integer browseCount;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
|
@ -42,6 +42,7 @@ public class ArticleServiceImpl implements ArticleService {
|
||||
|
||||
// 插入
|
||||
ArticleDO article = ArticleConvert.INSTANCE.convert(createReqVO);
|
||||
article.setBrowseCount(0); // 初始浏览量
|
||||
articleMapper.insert(article);
|
||||
// 返回
|
||||
return article.getId();
|
||||
|
Loading…
Reference in New Issue
Block a user