diff --git a/luoo_music/src/main/java/com/luoo/music/controller/CMSEssayController.java b/luoo_music/src/main/java/com/luoo/music/controller/CMSEssayController.java index ed6def9..3e7d9e6 100644 --- a/luoo_music/src/main/java/com/luoo/music/controller/CMSEssayController.java +++ b/luoo_music/src/main/java/com/luoo/music/controller/CMSEssayController.java @@ -62,6 +62,10 @@ public class CMSEssayController { }) public Result update(@RequestHeader(value="Authorization",required = true) String authorization ,@PathVariable String id, @RequestBody Essay essay) { essay.setId(id); + Essay essay1 = essayService.getById(id); + essay.setReadCount(essay1.getReadCount()); + essay.setCreateTime(essay1.getCreateTime()); + essayService.update(essay); return Result.success(); } diff --git a/luoo_music/src/main/resources/sql/20240724.sql b/luoo_music/src/main/resources/sql/20240724.sql index a54f131..326f2e3 100644 --- a/luoo_music/src/main/resources/sql/20240724.sql +++ b/luoo_music/src/main/resources/sql/20240724.sql @@ -2,7 +2,7 @@ create table tb_essay ( id varchar(20) not null comment 'id' primary key, - title varchar(20) null comment '标题', + title varchar(200) null comment '标题', summary varchar(200) null comment '摘要', read_count int null comment '阅读数', content text null comment '内容',