From 558b6eac5739230eace256d048e18df92ec548bd Mon Sep 17 00:00:00 2001 From: "kuang.yife" Date: Fri, 21 Jun 2024 21:35:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E4=BC=97=E5=8F=B7=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/impl/PublicDetailShareAppServiceImpl.java | 10 ++++++++++ .../app/impl/PublicUserRecordAppServiceImpl.java | 3 +++ .../templates/system/playlet/account/add.html | 9 +++++++++ .../templates/system/playlet/account/edit.html | 9 +++++++++ .../templates/system/playlet/detail/add.html | 14 +++++++------- .../templates/system/playlet/detail/detail.html | 4 ++-- .../templates/system/playlet/detail/edit.html | 14 +++++++------- .../system/domain/PlayletPublicAccount.java | 3 +++ .../mapper/system/PlayletPublicAccountMapper.xml | 6 +++++- .../mapper/system/PlayletPublicDetailMapper.xml | 1 + 10 files changed, 56 insertions(+), 17 deletions(-) diff --git a/playlet-admin/src/main/java/com/playlet/web/service/app/impl/PublicDetailShareAppServiceImpl.java b/playlet-admin/src/main/java/com/playlet/web/service/app/impl/PublicDetailShareAppServiceImpl.java index fd7fb36..8dba7cd 100644 --- a/playlet-admin/src/main/java/com/playlet/web/service/app/impl/PublicDetailShareAppServiceImpl.java +++ b/playlet-admin/src/main/java/com/playlet/web/service/app/impl/PublicDetailShareAppServiceImpl.java @@ -1,7 +1,9 @@ package com.playlet.web.service.app.impl; +import com.playlet.system.domain.PlayletPublicDetail; import com.playlet.system.domain.PlayletPublicUser; import com.playlet.system.domain.PublicDetailShare; +import com.playlet.system.service.IPlayletPublicDetailService; import com.playlet.system.service.IPlayletPublicUserService; import com.playlet.system.service.IPublicDetailShareService; import com.playlet.web.service.app.PublicDetailShareAppService; @@ -19,6 +21,8 @@ public class PublicDetailShareAppServiceImpl implements PublicDetailShareAppServ private final IPlayletPublicUserService iPlayletPublicUserService; + private final IPlayletPublicDetailService iPlayletPublicDetailService; + @Override public void addRecord(PublicDetailShare publicDetailShare) { // 翻译 @@ -32,5 +36,11 @@ public class PublicDetailShareAppServiceImpl implements PublicDetailShareAppServ publicDetailShare.setReaderTwoName(userTwo.getName()); } iPublicDetailShareService.insertPublicDetailShare(publicDetailShare); + // 添加浏览记录时,同时需要增加一下文章表上面的阅读次数 + PlayletPublicDetail playletPublicDetail = iPlayletPublicDetailService.getById(publicDetailShare.getDetailId()); + if(playletPublicDetail != null){ + playletPublicDetail.setReadCount(playletPublicDetail.getReadCount() + 1); + iPlayletPublicDetailService.updateById(playletPublicDetail); + } } } diff --git a/playlet-admin/src/main/java/com/playlet/web/service/app/impl/PublicUserRecordAppServiceImpl.java b/playlet-admin/src/main/java/com/playlet/web/service/app/impl/PublicUserRecordAppServiceImpl.java index 015ab8e..fa4a68b 100644 --- a/playlet-admin/src/main/java/com/playlet/web/service/app/impl/PublicUserRecordAppServiceImpl.java +++ b/playlet-admin/src/main/java/com/playlet/web/service/app/impl/PublicUserRecordAppServiceImpl.java @@ -1,6 +1,7 @@ package com.playlet.web.service.app.impl; import com.playlet.system.domain.PublicUserRecord; +import com.playlet.system.service.IPlayletPublicDetailService; import com.playlet.system.service.IPublicUserRecordService; import com.playlet.web.service.app.PublicUserRecordAppService; import lombok.RequiredArgsConstructor; @@ -15,6 +16,8 @@ public class PublicUserRecordAppServiceImpl implements PublicUserRecordAppServic private final IPublicUserRecordService iPublicUserRecordService; + private final IPlayletPublicDetailService iPlayletPublicDetailService; + @Override public void addRecord(PublicUserRecord userRecord) { iPublicUserRecordService.insertPublicUserRecord(userRecord); diff --git a/playlet-admin/src/main/resources/templates/system/playlet/account/add.html b/playlet-admin/src/main/resources/templates/system/playlet/account/add.html index 23f6af9..f9edbae 100644 --- a/playlet-admin/src/main/resources/templates/system/playlet/account/add.html +++ b/playlet-admin/src/main/resources/templates/system/playlet/account/add.html @@ -22,6 +22,15 @@ +
+ +
+ + +
+
diff --git a/playlet-admin/src/main/resources/templates/system/playlet/account/edit.html b/playlet-admin/src/main/resources/templates/system/playlet/account/edit.html index f6ee485..31b285f 100644 --- a/playlet-admin/src/main/resources/templates/system/playlet/account/edit.html +++ b/playlet-admin/src/main/resources/templates/system/playlet/account/edit.html @@ -23,6 +23,15 @@
+
+ +
+ + +
+
diff --git a/playlet-admin/src/main/resources/templates/system/playlet/detail/add.html b/playlet-admin/src/main/resources/templates/system/playlet/detail/add.html index 82be4f3..58d9e8c 100644 --- a/playlet-admin/src/main/resources/templates/system/playlet/detail/add.html +++ b/playlet-admin/src/main/resources/templates/system/playlet/detail/add.html @@ -43,7 +43,7 @@
- +
@@ -69,6 +69,12 @@
+
+ +
+ +
+
@@ -142,12 +148,6 @@
-
- -
- -
-
diff --git a/playlet-admin/src/main/resources/templates/system/playlet/detail/detail.html b/playlet-admin/src/main/resources/templates/system/playlet/detail/detail.html index fbc34c1..8140037 100644 --- a/playlet-admin/src/main/resources/templates/system/playlet/detail/detail.html +++ b/playlet-admin/src/main/resources/templates/system/playlet/detail/detail.html @@ -95,9 +95,9 @@ }, { field: 'imgUrl', - title: '图片', + title: '缩略图', formatter: function(value) { - if (value != null && value !== ''){return '图片';} + if (value != null && value !== ''){return '缩略图';} else {return ''} } }, diff --git a/playlet-admin/src/main/resources/templates/system/playlet/detail/edit.html b/playlet-admin/src/main/resources/templates/system/playlet/detail/edit.html index 01faf9c..c84f963 100644 --- a/playlet-admin/src/main/resources/templates/system/playlet/detail/edit.html +++ b/playlet-admin/src/main/resources/templates/system/playlet/detail/edit.html @@ -30,7 +30,7 @@
- +
@@ -56,6 +56,12 @@
+
+ +
+ +
+
@@ -69,12 +75,6 @@
-
- -
- -
-
diff --git a/playlet-system/src/main/java/com/playlet/system/domain/PlayletPublicAccount.java b/playlet-system/src/main/java/com/playlet/system/domain/PlayletPublicAccount.java index 49f6eeb..d97a69e 100644 --- a/playlet-system/src/main/java/com/playlet/system/domain/PlayletPublicAccount.java +++ b/playlet-system/src/main/java/com/playlet/system/domain/PlayletPublicAccount.java @@ -39,6 +39,9 @@ public class PlayletPublicAccount extends BaseEntity @ApiModelProperty(value = "类型 例如: 01.男频, 02.女频") private String publicType; + @ApiModelProperty(value = "认证标识 01.个人,02.企业") + private String detailType; + /** 简介 */ @Excel(name = "简介") @ApiModelProperty(value = "简介") diff --git a/playlet-system/src/main/resources/mapper/system/PlayletPublicAccountMapper.xml b/playlet-system/src/main/resources/mapper/system/PlayletPublicAccountMapper.xml index e6ba8fb..7c822f8 100644 --- a/playlet-system/src/main/resources/mapper/system/PlayletPublicAccountMapper.xml +++ b/playlet-system/src/main/resources/mapper/system/PlayletPublicAccountMapper.xml @@ -8,6 +8,7 @@ + @@ -23,7 +24,7 @@ - select id, name, public_type, introduction, author_alias, manager_id, logo_url, address, original_content_count, followers_count, create_by, create_time, update_by, update_time, remark from playlet_public_account + select id, name, public_type, detail_type, introduction, author_alias, manager_id, logo_url, address, original_content_count, followers_count, create_by, create_time, update_by, update_time, remark from playlet_public_account