Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tanpu-community
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
探普后端
tanpu-community
Commits
3617c248
Commit
3617c248
authored
Feb 18, 2022
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
评论回复评论
parent
3e985168
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
5 deletions
+28
-5
CommentQo.java
...main/java/com/tanpu/community/api/beans/qo/CommentQo.java
+7
-0
CodeAutoGenerator.java
.../main/java/com/tanpu/community/dao/CodeAutoGenerator.java
+1
-1
CommentEntity.java
...m/tanpu/community/dao/entity/community/CommentEntity.java
+13
-1
CommentMapper.java
...m/tanpu/community/dao/mapper/community/CommentMapper.java
+1
-1
ConvertUtil.java
...e/src/main/java/com/tanpu/community/util/ConvertUtil.java
+5
-2
CommentEntityMapper.xml
...c/main/resources/mapper/community/CommentEntityMapper.xml
+1
-0
No files found.
community-api/src/main/java/com/tanpu/community/api/beans/qo/CommentQo.java
View file @
3617c248
...
@@ -23,6 +23,12 @@ public class CommentQo {
...
@@ -23,6 +23,12 @@ public class CommentQo {
@ApiModelProperty
(
value
=
"作者id"
)
@ApiModelProperty
(
value
=
"作者id"
)
private
String
authorId
;
private
String
authorId
;
@ApiModelProperty
(
value
=
"回复对象的用户id,根据这个来判断是否有回复对象"
)
private
String
replyUserId
;
@ApiModelProperty
(
value
=
"回复对象的用户名"
)
private
String
replyUserName
;
@ApiModelProperty
(
value
=
"点赞次数"
)
@ApiModelProperty
(
value
=
"点赞次数"
)
private
Integer
likeCount
;
private
Integer
likeCount
;
...
@@ -44,6 +50,7 @@ public class CommentQo {
...
@@ -44,6 +50,7 @@ public class CommentQo {
@ApiModelProperty
(
value
=
"是否讨论区管理员"
)
@ApiModelProperty
(
value
=
"是否讨论区管理员"
)
private
boolean
isManager
;
private
boolean
isManager
;
// 认证标签相关
// 认证标签相关
@ApiModelProperty
(
"认证标签用-用户等级体系 0 游客 1注册用户 10投资人 20 探普理顾 30 探普专家理顾 40 交易理财师 50 首席投顾"
)
@ApiModelProperty
(
"认证标签用-用户等级体系 0 游客 1注册用户 10投资人 20 探普理顾 30 探普专家理顾 40 交易理财师 50 首席投顾"
)
private
Integer
levelGrade
;
private
Integer
levelGrade
;
...
...
community-service/src/main/java/com/tanpu/community/dao/CodeAutoGenerator.java
View file @
3617c248
...
@@ -23,7 +23,7 @@ public class CodeAutoGenerator {
...
@@ -23,7 +23,7 @@ public class CodeAutoGenerator {
String
mysqlPassword
=
"@imeng123"
;
String
mysqlPassword
=
"@imeng123"
;
String
jdbcUrl
=
"jdbc:mysql://rm-uf6r22t3d798q4kmkao.mysql.rds.aliyuncs.com:3306/tamp_community"
;
String
jdbcUrl
=
"jdbc:mysql://rm-uf6r22t3d798q4kmkao.mysql.rds.aliyuncs.com:3306/tamp_community"
;
// String[] tables = new String[]{"theme"};
// String[] tables = new String[]{"theme"};
String
[]
tables
=
new
String
[]{
"
topic_follow_rel
"
};
String
[]
tables
=
new
String
[]{
"
comment
"
};
String
basePackage
=
"com.tanpu.community"
;
String
basePackage
=
"com.tanpu.community"
;
String
mapperPackage
=
"dao.mapper.community"
;
String
mapperPackage
=
"dao.mapper.community"
;
String
entityPackage
=
"dao.entity.community"
;
String
entityPackage
=
"dao.entity.community"
;
...
...
community-service/src/main/java/com/tanpu/community/dao/entity/community/CommentEntity.java
View file @
3617c248
...
@@ -18,7 +18,7 @@ import java.time.LocalDateTime;
...
@@ -18,7 +18,7 @@ import java.time.LocalDateTime;
* </p>
* </p>
*
*
* @author xudong
* @author xudong
* @since 202
1-07-2
8
* @since 202
2-02-1
8
*/
*/
@TableName
(
"comment"
)
@TableName
(
"comment"
)
@ApiModel
(
value
=
"CommentEntity对象"
,
description
=
"评论"
)
@ApiModel
(
value
=
"CommentEntity对象"
,
description
=
"评论"
)
...
@@ -54,6 +54,9 @@ public class CommentEntity implements Serializable {
...
@@ -54,6 +54,9 @@ public class CommentEntity implements Serializable {
@ApiModelProperty
(
value
=
"回复评论id"
)
@ApiModelProperty
(
value
=
"回复评论id"
)
private
String
replyId
;
private
String
replyId
;
@ApiModelProperty
(
value
=
"回复对象的用户id"
)
private
String
replyUserId
;
@ApiModelProperty
(
value
=
"审核状态 0:初始值 1:已通过(管理后台使用)"
)
@ApiModelProperty
(
value
=
"审核状态 0:初始值 1:已通过(管理后台使用)"
)
private
Integer
reviewStatus
;
private
Integer
reviewStatus
;
...
@@ -131,6 +134,14 @@ public class CommentEntity implements Serializable {
...
@@ -131,6 +134,14 @@ public class CommentEntity implements Serializable {
this
.
replyId
=
replyId
;
this
.
replyId
=
replyId
;
}
}
public
String
getReplyUserId
()
{
return
replyUserId
;
}
public
void
setReplyUserId
(
String
replyUserId
)
{
this
.
replyUserId
=
replyUserId
;
}
public
Integer
getReviewStatus
()
{
public
Integer
getReviewStatus
()
{
return
reviewStatus
;
return
reviewStatus
;
}
}
...
@@ -182,6 +193,7 @@ public class CommentEntity implements Serializable {
...
@@ -182,6 +193,7 @@ public class CommentEntity implements Serializable {
", themeId="
+
themeId
+
", themeId="
+
themeId
+
", parentId="
+
parentId
+
", parentId="
+
parentId
+
", replyId="
+
replyId
+
", replyId="
+
replyId
+
", replyUserId="
+
replyUserId
+
", reviewStatus="
+
reviewStatus
+
", reviewStatus="
+
reviewStatus
+
", reportStatus="
+
reportStatus
+
", reportStatus="
+
reportStatus
+
", createTime="
+
createTime
+
", createTime="
+
createTime
+
...
...
community-service/src/main/java/com/tanpu/community/dao/mapper/community/CommentMapper.java
View file @
3617c248
...
@@ -16,7 +16,7 @@ import java.util.List;
...
@@ -16,7 +16,7 @@ import java.util.List;
* </p>
* </p>
*
*
* @author xudong
* @author xudong
* @since 202
1-07-22
* @since 202
2-02-18
*/
*/
public
interface
CommentMapper
extends
BaseMapper
<
CommentEntity
>
{
public
interface
CommentMapper
extends
BaseMapper
<
CommentEntity
>
{
...
...
community-service/src/main/java/com/tanpu/community/util/ConvertUtil.java
View file @
3617c248
...
@@ -15,8 +15,8 @@ import com.tanpu.community.api.beans.vo.feign.fatools.UserInfoResp;
...
@@ -15,8 +15,8 @@ import com.tanpu.community.api.beans.vo.feign.fatools.UserInfoResp;
import
com.tanpu.community.api.enums.DeleteTagEnum
;
import
com.tanpu.community.api.enums.DeleteTagEnum
;
import
com.tanpu.community.api.enums.NotificationTypeEnum
;
import
com.tanpu.community.api.enums.NotificationTypeEnum
;
import
com.tanpu.community.api.enums.TopicSpecialPermissionEnum
;
import
com.tanpu.community.api.enums.TopicSpecialPermissionEnum
;
import
com.tanpu.community.dao.entity.NotificationLikeDO
;
import
com.tanpu.community.dao.entity.NotificationForwardDO
;
import
com.tanpu.community.dao.entity.NotificationForwardDO
;
import
com.tanpu.community.dao.entity.NotificationLikeDO
;
import
com.tanpu.community.dao.entity.community.CommentEntity
;
import
com.tanpu.community.dao.entity.community.CommentEntity
;
import
com.tanpu.community.dao.entity.community.FileRecordEntity
;
import
com.tanpu.community.dao.entity.community.FileRecordEntity
;
import
com.tanpu.community.dao.entity.community.NotificationEntity
;
import
com.tanpu.community.dao.entity.community.NotificationEntity
;
...
@@ -24,8 +24,8 @@ import com.tanpu.community.dao.entity.community.ThemeAttachmentEntity;
...
@@ -24,8 +24,8 @@ import com.tanpu.community.dao.entity.community.ThemeAttachmentEntity;
import
com.tanpu.community.dao.entity.community.ThemeEntity
;
import
com.tanpu.community.dao.entity.community.ThemeEntity
;
import
com.tanpu.community.dao.entity.community.TopicEntity
;
import
com.tanpu.community.dao.entity.community.TopicEntity
;
import
com.tanpu.community.dao.entity.community.VisitLogEntity
;
import
com.tanpu.community.dao.entity.community.VisitLogEntity
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.util.StringUtils
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.time.ZoneOffset
;
import
java.time.ZoneOffset
;
...
@@ -159,6 +159,9 @@ public class ConvertUtil {
...
@@ -159,6 +159,9 @@ public class ConvertUtil {
BeanUtils
.
copyProperties
(
entity
,
qo
);
BeanUtils
.
copyProperties
(
entity
,
qo
);
qo
.
setContent
(
OtherUtil
.
blockPhoneAndEmail
(
entity
.
getContent
()));
qo
.
setContent
(
OtherUtil
.
blockPhoneAndEmail
(
entity
.
getContent
()));
qo
.
setUpdateTime
(
TimeUtils
.
getTimestampOfDateTime
(
entity
.
getUpdateTime
()));
qo
.
setUpdateTime
(
TimeUtils
.
getTimestampOfDateTime
(
entity
.
getUpdateTime
()));
if
(
StringUtils
.
isBlank
(
entity
.
getReplyUserId
())){
qo
.
setReplyUserId
(
null
);
}
return
qo
;
return
qo
;
}
}
...
...
community-service/src/main/resources/mapper/community/CommentEntityMapper.xml
View file @
3617c248
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
<result
column=
"theme_id"
property=
"themeId"
/>
<result
column=
"theme_id"
property=
"themeId"
/>
<result
column=
"parent_id"
property=
"parentId"
/>
<result
column=
"parent_id"
property=
"parentId"
/>
<result
column=
"reply_id"
property=
"replyId"
/>
<result
column=
"reply_id"
property=
"replyId"
/>
<result
column=
"reply_user_id"
property=
"replyUserId"
/>
<result
column=
"review_status"
property=
"reviewStatus"
/>
<result
column=
"review_status"
property=
"reviewStatus"
/>
<result
column=
"report_status"
property=
"reportStatus"
/>
<result
column=
"report_status"
property=
"reportStatus"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment