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
6d214c43
Commit
6d214c43
authored
Jul 07, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sql字段优化
parent
f2b5a80c
Hide whitespace changes
Inline
Side-by-side
Showing
50 changed files
with
470 additions
and
384 deletions
+470
-384
ThemeController.java
.../java/com/tanpu/community/controller/ThemeController.java
+2
-2
CodeAutoGenerator.java
.../main/java/com/tanpu/community/dao/CodeAutoGenerator.java
+6
-6
BlackListEntity.java
...tanpu/community/dao/entity/community/BlackListEntity.java
+10
-18
CollectionEntity.java
...anpu/community/dao/entity/community/CollectionEntity.java
+31
-29
CommentEntity.java
...m/tanpu/community/dao/entity/community/CommentEntity.java
+52
-35
FileRecordEntity.java
...anpu/community/dao/entity/community/FileRecordEntity.java
+51
-74
FollowRelEntity.java
...tanpu/community/dao/entity/community/FollowRelEntity.java
+45
-33
HomePageEntity.java
.../tanpu/community/dao/entity/community/HomePageEntity.java
+8
-27
ThemeAttachmentEntity.java
...community/dao/entity/community/ThemeAttachmentEntity.java
+9
-9
ThemeEntity.java
...com/tanpu/community/dao/entity/community/ThemeEntity.java
+44
-27
TopicEntity.java
...com/tanpu/community/dao/entity/community/TopicEntity.java
+21
-28
VisitSummaryEntity.java
...pu/community/dao/entity/community/VisitSummaryEntity.java
+10
-3
BlackListMapper.java
...tanpu/community/dao/mapper/community/BlackListMapper.java
+1
-1
CollectionMapper.java
...anpu/community/dao/mapper/community/CollectionMapper.java
+1
-1
CommentMapper.java
...m/tanpu/community/dao/mapper/community/CommentMapper.java
+1
-1
FileRecordMapper.java
...anpu/community/dao/mapper/community/FileRecordMapper.java
+2
-2
FollowRelMapper.java
...tanpu/community/dao/mapper/community/FollowRelMapper.java
+3
-3
HomePageMapper.java
.../tanpu/community/dao/mapper/community/HomePageMapper.java
+1
-1
ThemeAttachmentMapper.java
...community/dao/mapper/community/ThemeAttachmentMapper.java
+1
-1
ThemeMapper.java
...com/tanpu/community/dao/mapper/community/ThemeMapper.java
+1
-1
TopicMapper.java
...com/tanpu/community/dao/mapper/community/TopicMapper.java
+1
-1
VisitSummaryMapper.java
...pu/community/dao/mapper/community/VisitSummaryMapper.java
+1
-5
HomePageManager.java
...ain/java/com/tanpu/community/manager/HomePageManager.java
+6
-6
ThemeManager.java
...c/main/java/com/tanpu/community/manager/ThemeManager.java
+11
-10
TopicManager.java
...c/main/java/com/tanpu/community/manager/TopicManager.java
+2
-2
CollectionService.java
...n/java/com/tanpu/community/service/CollectionService.java
+31
-12
CommentService.java
...main/java/com/tanpu/community/service/CommentService.java
+8
-2
FollowRelService.java
...in/java/com/tanpu/community/service/FollowRelService.java
+40
-0
HomePageService.java
...ain/java/com/tanpu/community/service/HomePageService.java
+2
-2
OSSFileService.java
...main/java/com/tanpu/community/service/OSSFileService.java
+10
-6
ThemeService.java
...c/main/java/com/tanpu/community/service/ThemeService.java
+6
-0
TopicService.java
...c/main/java/com/tanpu/community/service/TopicService.java
+5
-2
VisitSummaryService.java
...java/com/tanpu/community/service/VisitSummaryService.java
+1
-2
BlackListService.java
...a/com/tanpu/community/service/other/BlackListService.java
+1
-1
CurriculumPriceService.java
...tanpu/community/service/other/CurriculumPriceService.java
+1
-1
CurriculumResService.java
...m/tanpu/community/service/other/CurriculumResService.java
+1
-1
FinProResService.java
...a/com/tanpu/community/service/other/FinProResService.java
+1
-1
OrderFlowService.java
...a/com/tanpu/community/service/other/OrderFlowService.java
+1
-1
UserService.java
...n/java/com/tanpu/community/service/other/UserService.java
+1
-1
ZhiboService.java
.../java/com/tanpu/community/service/other/ZhiboService.java
+1
-1
ConvertUtil.java
...e/src/main/java/com/tanpu/community/util/ConvertUtil.java
+1
-1
BlackListEntityMapper.xml
...main/resources/mapper/community/BlackListEntityMapper.xml
+0
-1
CollectionEntityMapper.xml
...ain/resources/mapper/community/CollectionEntityMapper.xml
+3
-3
CommentEntityMapper.xml
...c/main/resources/mapper/community/CommentEntityMapper.xml
+4
-3
FileRecordEntityMapper.xml
...ain/resources/mapper/community/FileRecordEntityMapper.xml
+4
-7
FollowRelEntityMapper.xml
...main/resources/mapper/community/FollowRelEntityMapper.xml
+17
-0
HomePageEntityMapper.xml
.../main/resources/mapper/community/HomePageEntityMapper.xml
+2
-2
ThemeAttachmentEntityMapper.xml
...esources/mapper/community/ThemeAttachmentEntityMapper.xml
+5
-4
ThemeEntityMapper.xml
...src/main/resources/mapper/community/ThemeEntityMapper.xml
+1
-2
TopicEntityMapper.xml
...src/main/resources/mapper/community/TopicEntityMapper.xml
+2
-2
No files found.
community-service/src/main/java/com/tanpu/community/controller/ThemeController.java
View file @
6d214c43
...
...
@@ -8,7 +8,7 @@ import com.tanpu.community.api.beans.qo.ThemeQo;
import
com.tanpu.community.api.beans.req.CreateCommentReq
;
import
com.tanpu.community.api.beans.req.CreateThemeReq
;
import
com.tanpu.community.manager.ThemeManager
;
import
com.tanpu.community.service.F
ans
RelService
;
import
com.tanpu.community.service.F
ollow
RelService
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -26,7 +26,7 @@ public class ThemeController {
private
ThemeManager
themeManager
;
@Autowired
private
F
ansRelService
fans
RelService
;
private
F
ollowRelService
follow
RelService
;
@ApiOperation
(
"发表主题"
)
@PostMapping
(
value
=
"/publish"
)
...
...
community-service/src/main/java/com/tanpu/community/dao/CodeAutoGenerator.java
View file @
6d214c43
...
...
@@ -19,15 +19,15 @@ public class CodeAutoGenerator {
String
currentPath
=
System
.
getProperty
(
"user.dir"
);
String
codeBaseHome
=
"/community-service/src/main/java"
;
String
author
=
"xudong"
;
String
mysqlUserName
=
"
tamp_admin
"
;
String
mysqlPassword
=
"
@
imeng123"
;
String
jdbcUrl
=
"jdbc:mysql://
rm-uf6r22t3d798q4kmkao.mysql.rds.aliyuncs.com:3306
/tamp_community"
;
String
[]
tables
=
new
String
[]{
"home_page
"
};
// String[] tables = new String[]{"visit_summary", "black_list","collection","comment","fans_rel","file_record","home_page","theme","topic
"};
String
mysqlUserName
=
"
dev
"
;
String
mysqlPassword
=
"
q
imeng123"
;
String
jdbcUrl
=
"jdbc:mysql://
47.101.189.151:31931
/tamp_community"
;
// String[] tables = new String[]{"follow_rel
"};
String
[]
tables
=
new
String
[]{
"visit_summary"
,
"black_list"
,
"collection"
,
"comment"
,
"follow_rel"
,
"file_record"
,
"home_page"
,
"theme"
,
"topic"
,
"theme_attachment
"
};
String
basePackage
=
"com.tanpu.community"
;
String
mapperPackage
=
"dao.mapper.community"
;
String
entityPackage
=
"dao.entity.community"
;
String
xmlPath
=
"D:\\
code\\backend\\tanpu-community\\community-service\\src\\main\\resources\\mapper\\user
"
;
String
xmlPath
=
"D:\\
IdeaProjects\\tanpu-community\\community-service\\src\\main\\resources\\mapper\\community
"
;
AutoGenerator
autoGenerator
=
new
AutoGenerator
();
//全局配置
GlobalConfig
gc
=
new
GlobalConfig
();
...
...
community-service/src/main/java/com/tanpu/community/dao/entity/community/BlackListEntity.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
dao
.
entity
.
community
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -16,24 +18,25 @@ import java.time.LocalDateTime;
* </p>
*
* @author xudong
* @since 2021-0
6-10
* @since 2021-0
7-07
*/
@TableName
(
"black_list"
)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@
TableName
(
"black_list"
)
@
NoArgsConstructor
@ApiModel
(
value
=
"BlackListEntity对象"
,
description
=
"黑名单"
)
public
class
BlackListEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"id"
)
private
String
id
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"屏蔽发起人"
)
private
String
blocker
;
@ApiModelProperty
(
value
=
"屏蔽类型"
)
@ApiModelProperty
(
value
=
"屏蔽类型
,1:用户,2:内容
"
)
private
Integer
blockedType
;
@ApiModelProperty
(
value
=
"被屏蔽的"
)
...
...
@@ -43,18 +46,16 @@ public class BlackListEntity implements Serializable {
private
LocalDateTime
createTime
;
private
String
updateBy
;
private
LocalDateTime
updateTime
;
private
Integer
deleteTag
;
public
String
getId
()
{
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
...
...
@@ -98,14 +99,6 @@ public class BlackListEntity implements Serializable {
this
.
createTime
=
createTime
;
}
public
String
getUpdateBy
()
{
return
updateBy
;
}
public
void
setUpdateBy
(
String
updateBy
)
{
this
.
updateBy
=
updateBy
;
}
public
LocalDateTime
getUpdateTime
()
{
return
updateTime
;
}
...
...
@@ -131,7 +124,6 @@ public class BlackListEntity implements Serializable {
", blockedId="
+
blockedId
+
", createBy="
+
createBy
+
", createTime="
+
createTime
+
", updateBy="
+
updateBy
+
", updateTime="
+
updateTime
+
", deleteTag="
+
deleteTag
+
"}"
;
...
...
community-service/src/main/java/com/tanpu/community/dao/entity/community/CollectionEntity.java
View file @
6d214c43
...
...
@@ -16,12 +16,12 @@ import java.time.LocalDateTime;
* </p>
*
* @author xudong
* @since 2021-0
6-10
* @since 2021-0
7-07
*/
@TableName
(
"collection"
)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@
TableName
(
"collection"
)
@
NoArgsConstructor
@ApiModel
(
value
=
"CollectionEntity对象"
,
description
=
"收藏/点赞"
)
public
class
CollectionEntity
implements
Serializable
{
...
...
@@ -30,20 +30,22 @@ public class CollectionEntity implements Serializable {
@ApiModelProperty
(
value
=
"id"
)
private
String
id
;
@ApiModelProperty
(
value
=
"类型"
)
@ApiModelProperty
(
value
=
"类型
1:点赞,2:收藏
"
)
private
Integer
collectionType
;
@ApiModelProperty
(
value
=
"
作者
id"
)
private
String
autho
rId
;
@ApiModelProperty
(
value
=
"
用户
id"
)
private
String
use
rId
;
@ApiModelProperty
(
value
=
"
评论的
目标id"
)
@ApiModelProperty
(
value
=
"目标id"
)
private
String
targetId
;
private
String
createBy
;
@ApiModelProperty
(
value
=
"收藏时间"
)
private
LocalDateTime
collectionTime
;
private
LocalDateTime
createTime
;
@ApiModelProperty
(
value
=
"取消收藏时间"
)
private
LocalDateTime
uncollectionTime
;
private
String
updateBy
;
private
LocalDateTime
createTime
;
private
LocalDateTime
updateTime
;
...
...
@@ -66,12 +68,12 @@ public class CollectionEntity implements Serializable {
this
.
collectionType
=
collectionType
;
}
public
String
get
Autho
rId
()
{
return
autho
rId
;
public
String
get
Use
rId
()
{
return
use
rId
;
}
public
void
set
AuthorId
(
String
autho
rId
)
{
this
.
authorId
=
autho
rId
;
public
void
set
UserId
(
String
use
rId
)
{
this
.
userId
=
use
rId
;
}
public
String
getTargetId
()
{
...
...
@@ -82,28 +84,28 @@ public class CollectionEntity implements Serializable {
this
.
targetId
=
targetId
;
}
public
String
getCreateBy
()
{
return
c
reateBy
;
public
LocalDateTime
getCollectionTime
()
{
return
c
ollectionTime
;
}
public
void
setC
reateBy
(
String
createBy
)
{
this
.
c
reateBy
=
createBy
;
public
void
setC
ollectionTime
(
LocalDateTime
collectionTime
)
{
this
.
c
ollectionTime
=
collectionTime
;
}
public
LocalDateTime
get
Create
Time
()
{
return
create
Time
;
public
LocalDateTime
get
Uncollection
Time
()
{
return
uncollection
Time
;
}
public
void
set
CreateTime
(
LocalDateTime
create
Time
)
{
this
.
createTime
=
create
Time
;
public
void
set
UncollectionTime
(
LocalDateTime
uncollection
Time
)
{
this
.
uncollectionTime
=
uncollection
Time
;
}
public
String
getUpdateBy
()
{
return
updateBy
;
public
LocalDateTime
getCreateTime
()
{
return
createTime
;
}
public
void
set
UpdateBy
(
String
updateBy
)
{
this
.
updateBy
=
updateBy
;
public
void
set
CreateTime
(
LocalDateTime
createTime
)
{
this
.
createTime
=
createTime
;
}
public
LocalDateTime
getUpdateTime
()
{
...
...
@@ -127,11 +129,11 @@ public class CollectionEntity implements Serializable {
return
"CollectionEntity{"
+
"id="
+
id
+
", collectionType="
+
collectionType
+
",
authorId="
+
autho
rId
+
",
userId="
+
use
rId
+
", targetId="
+
targetId
+
", createBy="
+
createBy
+
", collectionTime="
+
collectionTime
+
", uncollectionTime="
+
uncollectionTime
+
", createTime="
+
createTime
+
", updateBy="
+
updateBy
+
", updateTime="
+
updateTime
+
", deleteTag="
+
deleteTag
+
"}"
;
...
...
community-service/src/main/java/com/tanpu/community/dao/entity/community/CommentEntity.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
dao
.
entity
.
community
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -16,19 +18,23 @@ import java.time.LocalDateTime;
* </p>
*
* @author xudong
* @since 2021-0
6-10
* @since 2021-0
7-07
*/
@TableName
(
"comment"
)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@
TableName
(
"comment"
)
@
NoArgsConstructor
@ApiModel
(
value
=
"CommentEntity对象"
,
description
=
"评论"
)
public
class
CommentEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"id"
)
private
String
id
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"uuid"
)
private
String
commentId
;
@ApiModelProperty
(
value
=
"类型"
)
private
Integer
commentType
;
...
...
@@ -39,31 +45,41 @@ public class CommentEntity implements Serializable {
@ApiModelProperty
(
value
=
"作者id"
)
private
String
authorId
;
@ApiModelProperty
(
value
=
"评论的目标id"
)
private
String
targetId
;
@ApiModelProperty
(
value
=
"主题id"
)
private
String
themeId
;
@ApiModelProperty
(
value
=
"一级评论id"
)
private
String
parentId
;
@ApiModelProperty
(
value
=
"回复评论id"
)
private
String
replyId
;
@ApiModelProperty
(
value
=
"是否屏蔽"
)
private
Integer
isBlock
;
private
String
createBy
;
private
LocalDateTime
createTime
;
private
String
updateBy
;
private
LocalDateTime
updateTime
;
private
Integer
deleteTag
;
public
String
getId
()
{
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getCommentId
()
{
return
commentId
;
}
public
void
setCommentId
(
String
commentId
)
{
this
.
commentId
=
commentId
;
}
public
Integer
getCommentType
()
{
return
commentType
;
}
...
...
@@ -88,44 +104,44 @@ public class CommentEntity implements Serializable {
this
.
authorId
=
authorId
;
}
public
String
getT
arget
Id
()
{
return
t
arget
Id
;
public
String
getT
heme
Id
()
{
return
t
heme
Id
;
}
public
void
setT
argetId
(
String
target
Id
)
{
this
.
t
argetId
=
target
Id
;
public
void
setT
hemeId
(
String
theme
Id
)
{
this
.
t
hemeId
=
theme
Id
;
}
public
Integer
getIsBlock
()
{
return
isBlock
;
public
String
getParentId
()
{
return
parentId
;
}
public
void
set
IsBlock
(
Integer
isBlock
)
{
this
.
isBlock
=
isBlock
;
public
void
set
ParentId
(
String
parentId
)
{
this
.
parentId
=
parentId
;
}
public
String
get
CreateBy
()
{
return
createBy
;
public
String
get
ReplyId
()
{
return
replyId
;
}
public
void
set
CreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
public
void
set
ReplyId
(
String
replyId
)
{
this
.
replyId
=
replyId
;
}
public
LocalDateTime
getCreateTime
()
{
return
createTime
;
public
Integer
getIsBlock
()
{
return
isBlock
;
}
public
void
set
CreateTime
(
LocalDateTime
createTime
)
{
this
.
createTime
=
createTime
;
public
void
set
IsBlock
(
Integer
isBlock
)
{
this
.
isBlock
=
isBlock
;
}
public
String
getUpdateBy
()
{
return
updateBy
;
public
LocalDateTime
getCreateTime
()
{
return
createTime
;
}
public
void
set
UpdateBy
(
String
updateBy
)
{
this
.
updateBy
=
updateBy
;
public
void
set
CreateTime
(
LocalDateTime
createTime
)
{
this
.
createTime
=
createTime
;
}
public
LocalDateTime
getUpdateTime
()
{
...
...
@@ -148,14 +164,15 @@ public class CommentEntity implements Serializable {
public
String
toString
()
{
return
"CommentEntity{"
+
"id="
+
id
+
", commentId="
+
commentId
+
", commentType="
+
commentType
+
", content="
+
content
+
", authorId="
+
authorId
+
", targetId="
+
targetId
+
", themeId="
+
themeId
+
", parentId="
+
parentId
+
", replyId="
+
replyId
+
", isBlock="
+
isBlock
+
", createBy="
+
createBy
+
", createTime="
+
createTime
+
", updateBy="
+
updateBy
+
", updateTime="
+
updateTime
+
", deleteTag="
+
deleteTag
+
"}"
;
...
...
community-service/src/main/java/com/tanpu/community/dao/entity/community/FileRecordEntity.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
dao
.
entity
.
community
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* 文件
*
上传
文件
* </p>
*
* @author xudong
* @since 2021-0
6-1
7
* @since 2021-0
7-0
7
*/
@TableName
(
"file_record"
)
@ApiModel
(
value
=
"FileRecordEntity对象"
,
description
=
"文件"
)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
value
=
"FileRecordEntity对象"
,
description
=
"上传文件"
)
public
class
FileRecordEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"id"
)
private
String
id
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"UUID"
)
private
String
fileId
;
@ApiModelProperty
(
value
=
"类型:1:图片"
)
private
Integer
fileType
;
@ApiModelProperty
(
value
=
"文件名称"
)
private
String
original
Name
;
private
String
file
Name
;
@ApiModelProperty
(
value
=
"
逻辑url
"
)
private
String
logic
Key
;
@ApiModelProperty
(
value
=
"
阿里云key
"
)
private
String
fileOss
Key
;
@ApiModelProperty
(
value
=
"预览url"
)
private
String
previewUrl
;
private
String
presignedUrl
;
@ApiModelProperty
(
value
=
"关联的内容类型"
)
private
Integer
relType
;
@ApiModelProperty
(
value
=
"关联的内容ID"
)
private
String
relId
;
private
String
createBy
;
private
LocalDateTime
createTime
;
private
String
updateBy
;
private
LocalDateTime
updateTime
;
private
Integer
deleteTag
;
public
String
getId
()
{
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getOriginalName
()
{
return
originalName
;
}
public
void
setOriginalName
(
String
originalName
)
{
this
.
originalName
=
originalName
;
}
public
String
getLogicKey
()
{
return
logicKey
;
public
String
getFileId
()
{
return
fileId
;
}
public
void
set
LogicKey
(
String
logicKey
)
{
this
.
logicKey
=
logicKey
;
public
void
set
FileId
(
String
fileId
)
{
this
.
fileId
=
fileId
;
}
public
String
getPreviewUrl
()
{
return
previewUrl
;
}
public
void
setPreviewUrl
(
String
previewUrl
)
{
this
.
previewUrl
=
previewUrl
;
}
public
String
getPresignedUrl
()
{
return
presignedUrl
;
public
Integer
getFileType
()
{
return
fileType
;
}
public
void
set
PresignedUrl
(
String
presignedUrl
)
{
this
.
presignedUrl
=
presignedUrl
;
public
void
set
FileType
(
Integer
fileType
)
{
this
.
fileType
=
fileType
;
}
public
Integer
getRelTyp
e
()
{
return
relTyp
e
;
public
String
getFileNam
e
()
{
return
fileNam
e
;
}
public
void
set
RelType
(
Integer
relTyp
e
)
{
this
.
relType
=
relTyp
e
;
public
void
set
FileName
(
String
fileNam
e
)
{
this
.
fileName
=
fileNam
e
;
}
public
String
get
RelId
()
{
return
relId
;
public
String
get
FileOssKey
()
{
return
fileOssKey
;
}
public
void
set
RelId
(
String
relId
)
{
this
.
relId
=
relId
;
public
void
set
FileOssKey
(
String
fileOssKey
)
{
this
.
fileOssKey
=
fileOssKey
;
}
public
String
get
CreateBy
()
{
return
createBy
;
public
String
get
PreviewUrl
()
{
return
previewUrl
;
}
public
void
set
CreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
public
void
set
PreviewUrl
(
String
previewUrl
)
{
this
.
previewUrl
=
previewUrl
;
}
public
LocalDateTime
getCreateTime
()
{
...
...
@@ -123,14 +111,6 @@ public class FileRecordEntity implements Serializable {
this
.
createTime
=
createTime
;
}
public
String
getUpdateBy
()
{
return
updateBy
;
}
public
void
setUpdateBy
(
String
updateBy
)
{
this
.
updateBy
=
updateBy
;
}
public
LocalDateTime
getUpdateTime
()
{
return
updateTime
;
}
...
...
@@ -151,15 +131,12 @@ public class FileRecordEntity implements Serializable {
public
String
toString
()
{
return
"FileRecordEntity{"
+
"id="
+
id
+
", originalName="
+
originalName
+
", logicKey="
+
logicKey
+
", fileId="
+
fileId
+
", fileType="
+
fileType
+
", fileName="
+
fileName
+
", fileOssKey="
+
fileOssKey
+
", previewUrl="
+
previewUrl
+
", presignedUrl="
+
presignedUrl
+
", relType="
+
relType
+
", relId="
+
relId
+
", createBy="
+
createBy
+
", createTime="
+
createTime
+
", updateBy="
+
updateBy
+
", updateTime="
+
updateTime
+
", deleteTag="
+
deleteTag
+
"}"
;
...
...
community-service/src/main/java/com/tanpu/community/dao/entity/community/F
ans
RelEntity.java
→
community-service/src/main/java/com/tanpu/community/dao/entity/community/F
ollow
RelEntity.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
dao
.
entity
.
community
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
...
...
@@ -12,48 +18,54 @@ import io.swagger.annotations.ApiModelProperty;
* </p>
*
* @author xudong
* @since 2021-0
6-10
* @since 2021-0
7-07
*/
@TableName
(
"fans_rel"
)
@ApiModel
(
value
=
"FansRelEntity对象"
,
description
=
"粉丝关系"
)
public
class
FansRelEntity
implements
Serializable
{
@TableName
(
"follow_rel"
)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
value
=
"FollowRelEntity对象"
,
description
=
"粉丝关系"
)
public
class
FollowRelEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"id"
)
private
String
id
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"被关注的人id"
)
private
String
idol
Id
;
private
String
follow
Id
;
@ApiModelProperty
(
value
=
"粉丝id"
)
private
String
followerId
;
private
String
createBy
;
@ApiModelProperty
(
value
=
"关注时间"
)
private
LocalDateTime
followTime
;
private
LocalDateTime
createTime
;
@ApiModelProperty
(
value
=
"取消关注时间"
)
private
LocalDateTime
unfollowTime
;
private
String
updateBy
;
private
LocalDateTime
createTime
;
private
LocalDateTime
updateTime
;
private
Integer
deleteTag
;
public
String
getId
()
{
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
get
Idol
Id
()
{
return
idol
Id
;
public
String
get
Follow
Id
()
{
return
follow
Id
;
}
public
void
set
IdolId
(
String
idol
Id
)
{
this
.
idolId
=
idol
Id
;
public
void
set
FollowId
(
String
follow
Id
)
{
this
.
followId
=
follow
Id
;
}
public
String
getFollowerId
()
{
...
...
@@ -64,28 +76,28 @@ public class FansRelEntity implements Serializable {
this
.
followerId
=
followerId
;
}
public
String
getCreateBy
()
{
return
createBy
;
public
LocalDateTime
getFollowTime
()
{
return
followTime
;
}
public
void
set
CreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
public
void
set
FollowTime
(
LocalDateTime
followTime
)
{
this
.
followTime
=
followTime
;
}
public
LocalDateTime
get
Create
Time
()
{
return
create
Time
;
public
LocalDateTime
get
Unfollow
Time
()
{
return
unfollow
Time
;
}
public
void
set
CreateTime
(
LocalDateTime
create
Time
)
{
this
.
createTime
=
create
Time
;
public
void
set
UnfollowTime
(
LocalDateTime
unfollow
Time
)
{
this
.
unfollowTime
=
unfollow
Time
;
}
public
String
getUpdateBy
()
{
return
updateBy
;
public
LocalDateTime
getCreateTime
()
{
return
createTime
;
}
public
void
set
UpdateBy
(
String
updateBy
)
{
this
.
updateBy
=
updateBy
;
public
void
set
CreateTime
(
LocalDateTime
createTime
)
{
this
.
createTime
=
createTime
;
}
public
LocalDateTime
getUpdateTime
()
{
...
...
@@ -106,13 +118,13 @@ public class FansRelEntity implements Serializable {
@Override
public
String
toString
()
{
return
"F
ans
RelEntity{"
+
return
"F
ollow
RelEntity{"
+
"id="
+
id
+
",
idolId="
+
idol
Id
+
",
followId="
+
follow
Id
+
", followerId="
+
followerId
+
", createBy="
+
createBy
+
", followTime="
+
followTime
+
", unfollowTime="
+
unfollowTime
+
", createTime="
+
createTime
+
", updateBy="
+
updateBy
+
", updateTime="
+
updateTime
+
", deleteTag="
+
deleteTag
+
"}"
;
...
...
community-service/src/main/java/com/tanpu/community/dao/entity/community/HomePageEntity.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
dao
.
entity
.
community
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -16,19 +18,20 @@ import java.time.LocalDateTime;
* </p>
*
* @author xudong
* @since 2021-0
6-29
* @since 2021-0
7-07
*/
@TableName
(
"home_page"
)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName
(
"home_page"
)
@ApiModel
(
value
=
"HomePageEntity对象"
,
description
=
"个人主页"
)
public
class
HomePageEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"id"
)
private
String
id
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"用户id"
)
private
String
userId
;
...
...
@@ -48,22 +51,18 @@ public class HomePageEntity implements Serializable {
@ApiModelProperty
(
value
=
"地址"
)
private
String
location
;
private
String
createBy
;
private
LocalDateTime
createTime
;
private
String
updateBy
;
private
LocalDateTime
updateTime
;
private
Integer
deleteTag
;
public
String
getId
()
{
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
...
...
@@ -115,14 +114,6 @@ public class HomePageEntity implements Serializable {
this
.
location
=
location
;
}
public
String
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
LocalDateTime
getCreateTime
()
{
return
createTime
;
}
...
...
@@ -131,14 +122,6 @@ public class HomePageEntity implements Serializable {
this
.
createTime
=
createTime
;
}
public
String
getUpdateBy
()
{
return
updateBy
;
}
public
void
setUpdateBy
(
String
updateBy
)
{
this
.
updateBy
=
updateBy
;
}
public
LocalDateTime
getUpdateTime
()
{
return
updateTime
;
}
...
...
@@ -165,9 +148,7 @@ public class HomePageEntity implements Serializable {
", introduction="
+
introduction
+
", sex="
+
sex
+
", location="
+
location
+
", createBy="
+
createBy
+
", createTime="
+
createTime
+
", updateBy="
+
updateBy
+
", updateTime="
+
updateTime
+
", deleteTag="
+
deleteTag
+
"}"
;
...
...
community-service/src/main/java/com/tanpu/community/dao/entity/community/ThemeAttachmentEntity.java
View file @
6d214c43
...
...
@@ -16,12 +16,12 @@ import java.time.LocalDateTime;
* </p>
*
* @author xudong
* @since 2021-0
6-28
* @since 2021-0
7-07
*/
@TableName
(
"theme_attachment"
)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName
(
"theme_attachment"
)
@ApiModel
(
value
=
"ThemeAttachmentEntity对象"
,
description
=
"主题附件"
)
public
class
ThemeAttachmentEntity
implements
Serializable
{
...
...
@@ -33,11 +33,11 @@ public class ThemeAttachmentEntity implements Serializable {
@ApiModelProperty
(
value
=
"主题ID"
)
private
String
themeId
;
@ApiModelProperty
(
value
=
"附件类型"
)
@ApiModelProperty
(
value
=
"附件类型
:1:产品 2:直播 3:短视频 4:课程 5图片
"
)
private
Integer
attachType
;
@ApiModelProperty
(
value
=
"附件对应的ID"
)
private
String
attchId
;
private
String
att
a
chId
;
private
String
createBy
;
...
...
@@ -74,12 +74,12 @@ public class ThemeAttachmentEntity implements Serializable {
this
.
attachType
=
attachType
;
}
public
String
getAttchId
()
{
return
attchId
;
public
String
getAtt
a
chId
()
{
return
att
a
chId
;
}
public
void
setAtt
chId
(
String
att
chId
)
{
this
.
att
chId
=
att
chId
;
public
void
setAtt
achId
(
String
atta
chId
)
{
this
.
att
achId
=
atta
chId
;
}
public
String
getCreateBy
()
{
...
...
@@ -128,7 +128,7 @@ public class ThemeAttachmentEntity implements Serializable {
"id="
+
id
+
", themeId="
+
themeId
+
", attachType="
+
attachType
+
", att
chId="
+
att
chId
+
", att
achId="
+
atta
chId
+
", createBy="
+
createBy
+
", createTime="
+
createTime
+
", updateBy="
+
updateBy
+
...
...
community-service/src/main/java/com/tanpu/community/dao/entity/community/ThemeEntity.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
dao
.
entity
.
community
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -16,19 +18,23 @@ import java.time.LocalDateTime;
* </p>
*
* @author xudong
* @since 2021-0
6-28
* @since 2021-0
7-07
*/
@TableName
(
"theme"
)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName
(
"theme"
)
@ApiModel
(
value
=
"ThemeEntity对象"
,
description
=
"主题内容"
)
public
class
ThemeEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"id"
)
private
String
id
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"UUID"
)
private
String
themeId
;
@ApiModelProperty
(
value
=
"标题"
)
private
String
title
;
...
...
@@ -39,6 +45,12 @@ public class ThemeEntity implements Serializable {
@ApiModelProperty
(
value
=
"文本内容"
)
private
String
content
;
@ApiModelProperty
(
value
=
"附件类型"
)
private
Integer
attachType
;
@ApiModelProperty
(
value
=
"附件内容"
)
private
String
attachment
;
@ApiModelProperty
(
value
=
"作者id"
)
private
String
authorId
;
...
...
@@ -48,25 +60,29 @@ public class ThemeEntity implements Serializable {
@ApiModelProperty
(
value
=
"所属的话题"
)
private
String
topicId
;
private
String
createBy
;
private
LocalDateTime
createTime
;
private
String
updateBy
;
private
LocalDateTime
updateTime
;
private
Integer
deleteTag
;
public
String
getId
()
{
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getThemeId
()
{
return
themeId
;
}
public
void
setThemeId
(
String
themeId
)
{
this
.
themeId
=
themeId
;
}
public
String
getTitle
()
{
return
title
;
}
...
...
@@ -91,6 +107,22 @@ public class ThemeEntity implements Serializable {
this
.
content
=
content
;
}
public
Integer
getAttachType
()
{
return
attachType
;
}
public
void
setAttachType
(
Integer
attachType
)
{
this
.
attachType
=
attachType
;
}
public
String
getAttachment
()
{
return
attachment
;
}
public
void
setAttachment
(
String
attachment
)
{
this
.
attachment
=
attachment
;
}
public
String
getAuthorId
()
{
return
authorId
;
}
...
...
@@ -115,14 +147,6 @@ public class ThemeEntity implements Serializable {
this
.
topicId
=
topicId
;
}
public
String
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
LocalDateTime
getCreateTime
()
{
return
createTime
;
}
...
...
@@ -131,14 +155,6 @@ public class ThemeEntity implements Serializable {
this
.
createTime
=
createTime
;
}
public
String
getUpdateBy
()
{
return
updateBy
;
}
public
void
setUpdateBy
(
String
updateBy
)
{
this
.
updateBy
=
updateBy
;
}
public
LocalDateTime
getUpdateTime
()
{
return
updateTime
;
}
...
...
@@ -159,15 +175,16 @@ public class ThemeEntity implements Serializable {
public
String
toString
()
{
return
"ThemeEntity{"
+
"id="
+
id
+
", themeId="
+
themeId
+
", title="
+
title
+
", themeType="
+
themeType
+
", content="
+
content
+
", attachType="
+
attachType
+
", attachment="
+
attachment
+
", authorId="
+
authorId
+
", formerThemeId="
+
formerThemeId
+
", topicId="
+
topicId
+
", createBy="
+
createBy
+
", createTime="
+
createTime
+
", updateBy="
+
updateBy
+
", updateTime="
+
updateTime
+
", deleteTag="
+
deleteTag
+
"}"
;
...
...
community-service/src/main/java/com/tanpu/community/dao/entity/community/TopicEntity.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
dao
.
entity
.
community
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -16,19 +18,23 @@ import java.time.LocalDateTime;
* </p>
*
* @author xudong
* @since 2021-0
6-18
* @since 2021-0
7-07
*/
@TableName
(
"topic"
)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@
TableName
(
"topic"
)
@
NoArgsConstructor
@ApiModel
(
value
=
"TopicEntity对象"
,
description
=
"话题"
)
public
class
TopicEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"id"
)
private
String
id
;
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"uuid"
)
private
String
topicId
;
@ApiModelProperty
(
value
=
"话题名称"
)
private
String
topicTitle
;
...
...
@@ -42,25 +48,29 @@ public class TopicEntity implements Serializable {
@ApiModelProperty
(
value
=
"浏览量调整"
)
private
Long
viewAmountModify
;
private
String
createBy
;
private
LocalDateTime
createTime
;
private
String
updateBy
;
private
LocalDateTime
updateTime
;
private
Integer
deleteTag
;
public
String
getId
()
{
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getTopicId
()
{
return
topicId
;
}
public
void
setTopicId
(
String
topicId
)
{
this
.
topicId
=
topicId
;
}
public
String
getTopicTitle
()
{
return
topicTitle
;
}
...
...
@@ -93,14 +103,6 @@ public class TopicEntity implements Serializable {
this
.
viewAmountModify
=
viewAmountModify
;
}
public
String
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
LocalDateTime
getCreateTime
()
{
return
createTime
;
}
...
...
@@ -109,14 +111,6 @@ public class TopicEntity implements Serializable {
this
.
createTime
=
createTime
;
}
public
String
getUpdateBy
()
{
return
updateBy
;
}
public
void
setUpdateBy
(
String
updateBy
)
{
this
.
updateBy
=
updateBy
;
}
public
LocalDateTime
getUpdateTime
()
{
return
updateTime
;
}
...
...
@@ -137,13 +131,12 @@ public class TopicEntity implements Serializable {
public
String
toString
()
{
return
"TopicEntity{"
+
"id="
+
id
+
", topicId="
+
topicId
+
", topicTitle="
+
topicTitle
+
", isTop="
+
isTop
+
", isConceal="
+
isConceal
+
", viewAmountModify="
+
viewAmountModify
+
", createBy="
+
createBy
+
", createTime="
+
createTime
+
", updateBy="
+
updateBy
+
", updateTime="
+
updateTime
+
", deleteTag="
+
deleteTag
+
"}"
;
...
...
community-service/src/main/java/com/tanpu/community/dao/entity/community/VisitSummaryEntity.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
dao
.
entity
.
community
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
...
...
@@ -12,9 +16,12 @@ import io.swagger.annotations.ApiModelProperty;
* </p>
*
* @author xudong
* @since 2021-0
6-15
* @since 2021-0
7-07
*/
@TableName
(
"visit_summary"
)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
value
=
"VisitSummaryEntity对象"
,
description
=
"浏览记录"
)
public
class
VisitSummaryEntity
implements
Serializable
{
...
...
community-service/src/main/java/com/tanpu/community/dao/mapper/community/BlackListMapper.java
View file @
6d214c43
...
...
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* </p>
*
* @author xudong
* @since 2021-0
6-16
* @since 2021-0
7-07
*/
public
interface
BlackListMapper
extends
BaseMapper
<
BlackListEntity
>
{
...
...
community-service/src/main/java/com/tanpu/community/dao/mapper/community/CollectionMapper.java
View file @
6d214c43
...
...
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* </p>
*
* @author xudong
* @since 2021-0
6-10
* @since 2021-0
7-07
*/
public
interface
CollectionMapper
extends
BaseMapper
<
CollectionEntity
>
{
...
...
community-service/src/main/java/com/tanpu/community/dao/mapper/community/CommentMapper.java
View file @
6d214c43
...
...
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* </p>
*
* @author xudong
* @since 2021-0
6-10
* @since 2021-0
7-07
*/
public
interface
CommentMapper
extends
BaseMapper
<
CommentEntity
>
{
...
...
community-service/src/main/java/com/tanpu/community/dao/mapper/community/FileRecordMapper.java
View file @
6d214c43
...
...
@@ -5,11 +5,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 文件 Mapper 接口
*
上传
文件 Mapper 接口
* </p>
*
* @author xudong
* @since 2021-0
6-1
7
* @since 2021-0
7-0
7
*/
public
interface
FileRecordMapper
extends
BaseMapper
<
FileRecordEntity
>
{
...
...
community-service/src/main/java/com/tanpu/community/dao/mapper/community/F
ans
RelMapper.java
→
community-service/src/main/java/com/tanpu/community/dao/mapper/community/F
ollow
RelMapper.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
dao
.
mapper
.
community
;
import
com.tanpu.community.dao.entity.community.F
ans
RelEntity
;
import
com.tanpu.community.dao.entity.community.F
ollow
RelEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
...
...
@@ -9,8 +9,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* </p>
*
* @author xudong
* @since 2021-0
6-10
* @since 2021-0
7-07
*/
public
interface
F
ansRelMapper
extends
BaseMapper
<
Fans
RelEntity
>
{
public
interface
F
ollowRelMapper
extends
BaseMapper
<
Follow
RelEntity
>
{
}
community-service/src/main/java/com/tanpu/community/dao/mapper/community/HomePageMapper.java
View file @
6d214c43
...
...
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* </p>
*
* @author xudong
* @since 2021-0
6-10
* @since 2021-0
7-07
*/
public
interface
HomePageMapper
extends
BaseMapper
<
HomePageEntity
>
{
...
...
community-service/src/main/java/com/tanpu/community/dao/mapper/community/ThemeAttachmentMapper.java
View file @
6d214c43
...
...
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* </p>
*
* @author xudong
* @since 2021-0
6-28
* @since 2021-0
7-07
*/
public
interface
ThemeAttachmentMapper
extends
BaseMapper
<
ThemeAttachmentEntity
>
{
...
...
community-service/src/main/java/com/tanpu/community/dao/mapper/community/ThemeMapper.java
View file @
6d214c43
...
...
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* </p>
*
* @author xudong
* @since 2021-0
6-10
* @since 2021-0
7-07
*/
public
interface
ThemeMapper
extends
BaseMapper
<
ThemeEntity
>
{
...
...
community-service/src/main/java/com/tanpu/community/dao/mapper/community/TopicMapper.java
View file @
6d214c43
...
...
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* </p>
*
* @author xudong
* @since 2021-0
6-18
* @since 2021-0
7-07
*/
public
interface
TopicMapper
extends
BaseMapper
<
TopicEntity
>
{
...
...
community-service/src/main/java/com/tanpu/community/dao/mapper/community/VisitSummaryMapper.java
View file @
6d214c43
...
...
@@ -2,8 +2,6 @@ package com.tanpu.community.dao.mapper.community;
import
com.tanpu.community.dao.entity.community.VisitSummaryEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Update
;
/**
* <p>
...
...
@@ -11,10 +9,8 @@ import org.apache.ibatis.annotations.Update;
* </p>
*
* @author xudong
* @since 2021-0
6-15
* @since 2021-0
7-07
*/
public
interface
VisitSummaryMapper
extends
BaseMapper
<
VisitSummaryEntity
>
{
@Update
(
"update visit_summary set duration=duration+#{dur} where ident=#{ident}"
)
void
updateDurByIdent
(
@Param
(
"ident"
)
String
ident
,
@Param
(
"dur"
)
Integer
dur
);
}
community-service/src/main/java/com/tanpu/community/manager/HomePageManager.java
View file @
6d214c43
...
...
@@ -3,7 +3,7 @@ package com.tanpu.community.manager;
import
com.tanpu.community.api.beans.qo.FollowQo
;
import
com.tanpu.community.api.beans.req.HomePageReq
;
import
com.tanpu.community.dao.entity.community.HomePageEntity
;
import
com.tanpu.community.service.F
ans
RelService
;
import
com.tanpu.community.service.F
ollow
RelService
;
import
com.tanpu.community.service.HomePageService
;
import
com.tanpu.community.util.ConvertUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -18,7 +18,7 @@ import java.util.stream.Collectors;
public
class
HomePageManager
{
@Autowired
private
F
ansRelService
fans
RelService
;
private
F
ollowRelService
follow
RelService
;
@Resource
private
HomePageService
homePageService
;
...
...
@@ -43,21 +43,21 @@ public class HomePageManager {
//获取用户的关注列表
public
List
<
FollowQo
>
queryIdolsByFollowerId
(
String
followerId
)
{
List
<
String
>
idolIds
=
f
ans
RelService
.
queryFansByFollowerId
(
followerId
);
List
<
String
>
idolIds
=
f
ollow
RelService
.
queryFansByFollowerId
(
followerId
);
List
<
HomePageEntity
>
list
=
homePageService
.
selectListByUserIds
(
idolIds
);
return
list
.
stream
().
map
(
ConvertUtil:
:
homePageEntity2FollowQo
).
collect
(
Collectors
.
toList
());
}
//获取用户的粉丝列表
public
List
<
FollowQo
>
queryFansByIdolId
(
String
idolId
)
{
List
<
String
>
fanIds
=
f
ans
RelService
.
queryFansByIdolId
(
idolId
);
List
<
String
>
fanIds
=
f
ollow
RelService
.
queryFansByIdolId
(
idolId
);
List
<
HomePageEntity
>
list
=
homePageService
.
selectListByUserIds
(
fanIds
);
return
list
.
stream
().
map
(
ConvertUtil:
:
homePageEntity2FollowQo
).
collect
(
Collectors
.
toList
());
}
//判断返回列表中的用户是否被当前用户关注
public
List
<
FollowQo
>
judgeFollowed
(
List
<
FollowQo
>
followQos
,
String
followerId
){
Set
<
String
>
idolSet
=
f
ans
RelService
.
queryFansByFollowerId
(
followerId
).
stream
().
collect
(
Collectors
.
toSet
());
Set
<
String
>
idolSet
=
f
ollow
RelService
.
queryFansByFollowerId
(
followerId
).
stream
().
collect
(
Collectors
.
toSet
());
return
followQos
.
stream
().
map
(
o
->{
if
(
idolSet
.
contains
(
o
.
getUserId
())){
o
.
setFollowed
(
true
);
...
...
@@ -68,6 +68,6 @@ public class HomePageManager {
}
public
void
addIdol
(
String
idolId
,
String
followerId
)
{
f
ans
RelService
.
addFans
(
idolId
,
followerId
);
f
ollow
RelService
.
addFans
(
idolId
,
followerId
);
}
}
community-service/src/main/java/com/tanpu/community/manager/ThemeManager.java
View file @
6d214c43
...
...
@@ -22,6 +22,7 @@ import com.tanpu.community.feign.vo.ShortVideoBaseInfoResp;
import
com.tanpu.community.feign.zhibo.FeignClientForZhibo
;
import
com.tanpu.community.feign.zhibo.vo.ZhiboDetailVO
;
import
com.tanpu.community.service.*
;
import
com.tanpu.community.service.other.*
;
import
com.tanpu.community.util.ConvertUtil
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -46,7 +47,7 @@ public class ThemeManager {
private
CommentService
commentService
;
@Autowired
private
F
ansRelService
fans
RelService
;
private
F
ollowRelService
follow
RelService
;
@Autowired
private
BlackListService
blackListService
;
...
...
@@ -84,13 +85,15 @@ public class ThemeManager {
@Autowired
private
FeignClientForCourse
feignClientForCourse
;
public
void
publishTheme
(
CreateThemeReq
req
,
String
userId
)
{
ThemeEntity
themeEntity
=
new
ThemeEntity
();
BeanUtils
.
copyProperties
(
req
,
themeEntity
);
themeEntity
.
setAuthorId
(
userId
);
themeService
.
insertTheme
(
themeEntity
);
List
<
ThemeAttachmentEntity
>
themeAttachments
=
ConvertUtil
.
themeReqToAttachmentList
(
req
,
themeEntity
.
getId
());
List
<
ThemeAttachmentEntity
>
themeAttachments
=
ConvertUtil
.
themeReqToAttachmentList
(
req
,
themeEntity
.
get
Theme
Id
());
//TODO 敏感词过滤
themeAttachmentService
.
insertList
(
themeAttachments
);
...
...
@@ -107,7 +110,7 @@ public class ThemeManager {
// 返回关注主题
public
List
<
ThemeQo
>
selectInterestThemes
(
String
userId
)
{
List
<
String
>
fansList
=
f
ans
RelService
.
queryFansByFollowerId
(
userId
);
List
<
String
>
fansList
=
f
ollow
RelService
.
queryFansByFollowerId
(
userId
);
List
<
ThemeEntity
>
themeEntities
=
themeService
.
selectByFans
(
fansList
);
List
<
ThemeQo
>
themeQos
=
convertEntityToQo
(
themeEntities
,
userId
);
return
themeQos
;
...
...
@@ -137,9 +140,8 @@ public class ThemeManager {
// 评论(对主题)
public
void
comment
(
CreateCommentReq
req
,
String
userId
)
{
CommentEntity
commentEntity
=
CommentEntity
.
builder
()
.
t
arget
Id
(
req
.
getThemeId
())
.
t
heme
Id
(
req
.
getThemeId
())
.
authorId
(
userId
)
.
createBy
(
userId
)
.
content
(
req
.
getComment
())
.
commentType
(
CommentTypeEnum
.
THEME
.
getCode
())
.
build
();
...
...
@@ -155,7 +157,6 @@ public class ThemeManager {
.
topicId
(
req
.
getTopicId
())
.
formerThemeId
(
req
.
getFormerThemeId
())
.
authorId
(
userId
)
.
createBy
(
userId
)
.
themeType
(
ThemeTypeEnum
.
DISCUSSION
.
getCode
())
.
build
();
...
...
@@ -221,14 +222,14 @@ public class ThemeManager {
List
<
ThemeAttachmentEntity
>
attachments
=
themeAttachmentService
.
selectByThemeId
(
themeQO
.
getId
());
if
(!
CollectionUtils
.
isEmpty
(
attachments
))
{
HashMap
<
String
,
Object
>
attachmentQos
=
new
HashMap
<>();
attachments
.
forEach
(
o
->
attachmentQos
.
put
(
o
.
getAttchId
(),
transferAttachment
(
o
,
userId
)));
attachments
.
forEach
(
o
->
attachmentQos
.
put
(
o
.
getAtt
a
chId
(),
transferAttachment
(
o
,
userId
)));
themeQO
.
setAttachment
(
attachmentQos
);
}
//迄今时间
themeQO
.
setUpToNowTime
(
calUpToNowTime
(
themeQO
.
getCreateTime
()));
//是否关注作者
String
authorId
=
themeQO
.
getAuthorId
();
Set
<
String
>
fansSet
=
new
HashSet
<>(
f
ans
RelService
.
queryFansByFollowerId
(
userId
));
Set
<
String
>
fansSet
=
new
HashSet
<>(
f
ollow
RelService
.
queryFansByFollowerId
(
userId
));
themeQO
.
setFollow
(
fansSet
.
contains
(
authorId
));
//用户信息:头像、昵称
HomePageEntity
userEntity
=
homePageService
.
selectByUserId
(
userId
);
...
...
@@ -246,7 +247,7 @@ public class ThemeManager {
List
<
ThemeAttachmentEntity
>
attachments
=
themeAttachmentService
.
selectByThemeId
(
maintTextQo
.
getId
());
if
(!
CollectionUtils
.
isEmpty
(
attachments
))
{
HashMap
<
String
,
Object
>
attachmentQos
=
new
HashMap
<>();
attachments
.
forEach
(
o
->
attachmentQos
.
put
(
o
.
getAttchId
(),
transferAttachment
(
o
,
userId
)));
attachments
.
forEach
(
o
->
attachmentQos
.
put
(
o
.
getAtt
a
chId
(),
transferAttachment
(
o
,
userId
)));
maintTextQo
.
setAttachment
(
attachmentQos
);
}
//迄今时间
...
...
@@ -270,7 +271,7 @@ public class ThemeManager {
public
Object
transferAttachment
(
ThemeAttachmentEntity
themeAttachment
,
String
userId
)
{
String
attachmentId
=
themeAttachment
.
getAttchId
();
String
attachmentId
=
themeAttachment
.
getAtt
a
chId
();
switch
(
themeAttachment
.
getAttachType
())
{
//附件类型 1:产品 2:直播 3:短视频 4:课程
//TODO ENTITY 转 DTO
...
...
community-service/src/main/java/com/tanpu/community/manager/TopicManager.java
View file @
6d214c43
...
...
@@ -117,10 +117,10 @@ public class TopicManager {
public
void
refreshRedisCache
()
{
List
<
TopicEntity
>
topicEntities
=
topicService
.
queryAll
();
for
(
TopicEntity
topic
:
topicEntities
)
{
String
topicId
=
topic
.
getId
();
String
topicId
=
topic
.
get
Topic
Id
();
Long
viewAmountModify
=
topic
.
getViewAmountModify
();
List
<
ThemeEntity
>
themeEntities
=
themeService
.
selectByTopic
(
topicId
);
List
<
String
>
themeIds
=
themeEntities
.
stream
().
map
(
ThemeEntity:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
String
>
themeIds
=
themeEntities
.
stream
().
map
(
ThemeEntity:
:
get
Theme
Id
).
collect
(
Collectors
.
toList
());
Long
likeAmountByThemeIds
=
collectionService
.
getLikeAmountByThemeIds
(
themeIds
);
Long
bookAmountByThemeIds
=
collectionService
.
getBookAmountByThemeIds
(
themeIds
);
Long
commentAmountByThemeIds
=
commentService
.
getCommentAmountByThemeIds
(
themeIds
);
...
...
community-service/src/main/java/com/tanpu/community/service/CollectionService.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
service
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.tanpu.common.uuid.UuidGenHelper
;
import
com.tanpu.community.api.enums.CollectionTypeEnum
;
import
com.tanpu.community.api.enums.DeleteTagEnum
;
import
com.tanpu.community.dao.entity.community.CollectionEntity
;
import
com.tanpu.community.dao.mapper.community.CollectionMapper
;
import
com.tanpu.community.util.ConvertUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
import
java.util.List
;
@Service
...
...
@@ -16,20 +18,21 @@ public class CollectionService {
@Resource
private
CollectionMapper
collectionMapper
;
// 若不存在则新增,若存在则修改deleteTag
public
void
addIfNotExist
(
String
themeId
,
String
userId
,
CollectionTypeEnum
type
)
{
// 判断是否
存在
CollectionEntity
queryCollection
=
getTargetCollection
(
themeId
,
userId
,
type
);
// 判断是否
删除
CollectionEntity
queryCollection
=
get
Deleted
TargetCollection
(
themeId
,
userId
,
type
);
if
(
queryCollection
!=
null
)
{
Integer
oldDeleteTag
=
queryCollection
.
getDeleteTag
(
);
queryCollection
.
set
DeleteTag
(
ConvertUtil
.
deleteTagShift
(
oldDeleteTag
));
queryCollection
.
setDeleteTag
(
DeleteTagEnum
.
NOT_DELETED
.
getCode
()
);
queryCollection
.
set
CollectionTime
(
LocalDateTime
.
now
(
));
collectionMapper
.
updateById
(
queryCollection
);
}
else
{
CollectionEntity
entity
=
CollectionEntity
.
builder
()
.
collectionType
(
type
.
getCode
())
.
autho
rId
(
userId
)
.
use
rId
(
userId
)
.
targetId
(
themeId
)
.
c
reateBy
(
userId
)
.
c
ollectionTime
(
LocalDateTime
.
now
()
)
.
build
();
collectionMapper
.
insert
(
entity
);
...
...
@@ -37,12 +40,22 @@ public class CollectionService {
}
//根据用户、主题、类型查询
//根据用户、主题、类型查询
未删除对象
public
CollectionEntity
getTargetCollection
(
String
themeId
,
String
userId
,
CollectionTypeEnum
type
)
{
return
collectionMapper
.
selectOne
(
new
LambdaQueryWrapper
<
CollectionEntity
>()
.
eq
(
CollectionEntity:
:
getCollectionType
,
type
.
getCode
())
.
eq
(
CollectionEntity:
:
getAuthorId
,
userId
)
.
eq
(
CollectionEntity:
:
getTargetId
,
themeId
));
.
eq
(
CollectionEntity:
:
getUserId
,
userId
)
.
eq
(
CollectionEntity:
:
getTargetId
,
themeId
)
.
eq
(
CollectionEntity:
:
getDeleteTag
,
DeleteTagEnum
.
NOT_DELETED
.
getCode
()));
}
//根据用户、主题、类型查询已删除对象
public
CollectionEntity
getDeletedTargetCollection
(
String
themeId
,
String
userId
,
CollectionTypeEnum
type
)
{
return
collectionMapper
.
selectOne
(
new
LambdaQueryWrapper
<
CollectionEntity
>()
.
eq
(
CollectionEntity:
:
getCollectionType
,
type
.
getCode
())
.
eq
(
CollectionEntity:
:
getUserId
,
userId
)
.
eq
(
CollectionEntity:
:
getTargetId
,
themeId
)
.
eq
(
CollectionEntity:
:
getDeleteTag
,
DeleteTagEnum
.
DELETED
.
getCode
()));
}
// 根据用户id获取点赞列表
...
...
@@ -96,7 +109,13 @@ public class CollectionService {
.
size
();
}
public
void
delete
(
String
themeId
,
String
userId
,
CollectionTypeEnum
book
)
{
//TODO
//逻辑删除,修改delete_tag
public
void
delete
(
String
themeId
,
String
userId
,
CollectionTypeEnum
type
)
{
CollectionEntity
queryCollection
=
getTargetCollection
(
themeId
,
userId
,
type
);
if
(
queryCollection
!=
null
)
{
queryCollection
.
setDeleteTag
(
DeleteTagEnum
.
DELETED
.
getCode
());
queryCollection
.
setUncollectionTime
(
LocalDateTime
.
now
());
collectionMapper
.
updateById
(
queryCollection
);
}
}
}
community-service/src/main/java/com/tanpu/community/service/CommentService.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
service
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.tanpu.common.uuid.UuidGenHelper
;
import
com.tanpu.community.api.enums.DeleteTagEnum
;
import
com.tanpu.community.api.enums.TopicStatusEnum
;
import
com.tanpu.community.dao.entity.community.CommentEntity
;
import
com.tanpu.community.dao.mapper.community.CommentMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
...
...
@@ -18,7 +20,11 @@ public class CommentService {
@Resource
private
CommentMapper
commentMapper
;
@Autowired
private
UuidGenHelper
uuidGenHelper
;
public
void
insertComment
(
CommentEntity
commentEntity
)
{
commentEntity
.
setCommentId
(
uuidGenHelper
.
getUuidStr
());
commentMapper
.
insert
(
commentEntity
);
}
...
...
@@ -30,13 +36,13 @@ public class CommentService {
//统计主题集合的评论量
public
Long
getCommentAmountByThemeIds
(
List
<
String
>
themeIds
)
{
return
(
long
)
commentMapper
.
selectList
((
new
LambdaQueryWrapper
<
CommentEntity
>()
.
in
(
CommentEntity:
:
getT
arget
Id
,
themeIds
)))
.
in
(
CommentEntity:
:
getT
heme
Id
,
themeIds
)))
.
size
();
}
public
Set
<
String
>
getCommentUserAmount
(
List
<
String
>
themeIds
)
{
return
commentMapper
.
selectList
((
new
LambdaQueryWrapper
<
CommentEntity
>()
.
in
(
CommentEntity:
:
getT
arget
Id
,
themeIds
)))
.
in
(
CommentEntity:
:
getT
heme
Id
,
themeIds
)))
.
stream
().
map
(
CommentEntity:
:
getAuthorId
).
collect
(
Collectors
.
toSet
());
}
...
...
community-service/src/main/java/com/tanpu/community/service/F
ans
RelService.java
→
community-service/src/main/java/com/tanpu/community/service/F
ollow
RelService.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
service
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.tanpu.community.dao.entity.community.F
ans
RelEntity
;
import
com.tanpu.community.dao.mapper.community.F
ans
RelMapper
;
import
com.tanpu.community.dao.entity.community.F
ollow
RelEntity
;
import
com.tanpu.community.dao.mapper.community.F
ollow
RelMapper
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.stereotype.Service
;
...
...
@@ -12,29 +12,29 @@ import java.util.stream.Collectors;
@EnableCaching
@Service
public
class
F
ans
RelService
{
public
class
F
ollow
RelService
{
@Resource
private
F
ansRelMapper
fans
RelMapper
;
private
F
ollowRelMapper
follow
RelMapper
;
public
List
<
String
>
queryFansByFollowerId
(
String
followerId
)
{
return
f
ansRelMapper
.
selectList
(
new
LambdaQueryWrapper
<
Fans
RelEntity
>()
.
eq
(
F
ans
RelEntity:
:
getFollowerId
,
followerId
))
.
stream
().
map
(
F
ansRelEntity:
:
getIdol
Id
).
collect
(
Collectors
.
toList
());
return
f
ollowRelMapper
.
selectList
(
new
LambdaQueryWrapper
<
Follow
RelEntity
>()
.
eq
(
F
ollow
RelEntity:
:
getFollowerId
,
followerId
))
.
stream
().
map
(
F
ollowRelEntity:
:
getFollow
Id
).
collect
(
Collectors
.
toList
());
}
// @Cacheable(value = "tempCache", keyGenerator = "communityKeyGenerator")
public
List
<
String
>
queryFansByIdolId
(
String
idolId
)
{
return
f
ansRelMapper
.
selectList
(
new
LambdaQueryWrapper
<
Fans
RelEntity
>()
.
eq
(
F
ansRelEntity:
:
getIdol
Id
,
idolId
))
.
stream
().
map
(
F
ans
RelEntity:
:
getFollowerId
).
collect
(
Collectors
.
toList
());
return
f
ollowRelMapper
.
selectList
(
new
LambdaQueryWrapper
<
Follow
RelEntity
>()
.
eq
(
F
ollowRelEntity:
:
getFollow
Id
,
idolId
))
.
stream
().
map
(
F
ollow
RelEntity:
:
getFollowerId
).
collect
(
Collectors
.
toList
());
}
public
void
addFans
(
String
idolId
,
String
followerId
)
{
F
ansRelEntity
rel
=
new
Fans
RelEntity
();
rel
.
set
Idol
Id
(
idolId
);
F
ollowRelEntity
rel
=
new
Follow
RelEntity
();
rel
.
set
Follow
Id
(
idolId
);
rel
.
setFollowerId
(
followerId
);
f
ans
RelMapper
.
insert
(
rel
);
f
ollow
RelMapper
.
insert
(
rel
);
}
}
community-service/src/main/java/com/tanpu/community/service/HomePageService.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
service
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.tanpu.common.uuid.UuidGenHelper
;
import
com.tanpu.community.dao.entity.community.HomePageEntity
;
import
com.tanpu.community.dao.mapper.community.HomePageMapper
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
...
...
@@ -18,8 +20,6 @@ public class HomePageService {
private
HomePageMapper
homePageMapper
;
public
HomePageEntity
selectByUserId
(
String
userId
){
return
homePageMapper
.
selectOne
(
new
LambdaQueryWrapper
<
HomePageEntity
>()
.
eq
(
HomePageEntity:
:
getUserId
,
userId
));
...
...
community-service/src/main/java/com/tanpu/community/service/OSSFileService.java
View file @
6d214c43
...
...
@@ -2,6 +2,7 @@ package com.tanpu.community.service;
import
com.tanpu.common.constant.BizStatus
;
import
com.tanpu.common.util.AliyunOSSHelper
;
import
com.tanpu.common.uuid.UuidGenHelper
;
import
com.tanpu.community.api.enums.OssRelType
;
import
com.tanpu.community.dao.entity.community.FileRecordEntity
;
import
com.tanpu.community.dao.mapper.community.FileRecordMapper
;
...
...
@@ -35,6 +36,10 @@ public class OSSFileService {
@Resource
private
FileRecordMapper
fileRecordMapper
;
@Autowired
private
UuidGenHelper
uuidGenHelper
;
@PostConstruct
public
void
init
()
{
ossHelper
=
AliyunOSSHelper
.
build
(
endpoint
,
accessId
,
accessSK
);
...
...
@@ -62,13 +67,12 @@ public class OSSFileService {
ossHelper
.
writeFile
(
bucketName
,
key
,
data
,
fileSuffix
);
FileRecordEntity
record
=
new
FileRecordEntity
();
record
.
set
Id
(
id
);
record
.
set
FileId
(
uuidGenHelper
.
getUuidStr
()
);
record
.
setDeleteTag
(
BizStatus
.
DeleteTag
.
tag_init
);
record
.
setLogicKey
(
key
);
record
.
setOriginalName
(
fileName
);
record
.
setPresignedUrl
(
ossHelper
.
getPreSignedUrl
(
bucketName
,
key
));
record
.
setRelType
(
relType
.
type
);
record
.
setRelId
(
relId
);
record
.
setFileOssKey
(
key
);
record
.
setFileId
(
fileName
);
record
.
setPreviewUrl
(
ossHelper
.
getPreSignedUrl
(
bucketName
,
key
));
record
.
setFileType
(
relType
.
type
);
fileRecordMapper
.
insert
(
record
);
...
...
community-service/src/main/java/com/tanpu/community/service/ThemeService.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
service
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.tanpu.common.uuid.UuidGenHelper
;
import
com.tanpu.community.dao.entity.community.ThemeEntity
;
import
com.tanpu.community.dao.mapper.community.ThemeMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
...
...
@@ -16,7 +18,11 @@ public class ThemeService {
@Resource
private
ThemeMapper
themeMapper
;
@Autowired
private
UuidGenHelper
uuidGenHelper
;
public
void
insertTheme
(
ThemeEntity
themeEntity
){
themeEntity
.
setThemeId
(
uuidGenHelper
.
getUuidStr
());
themeMapper
.
insert
(
themeEntity
);
}
...
...
community-service/src/main/java/com/tanpu/community/service/TopicService.java
View file @
6d214c43
...
...
@@ -2,10 +2,12 @@ package com.tanpu.community.service;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.tanpu.common.uuid.UuidGenHelper
;
import
com.tanpu.community.api.enums.DeleteTagEnum
;
import
com.tanpu.community.api.enums.TopicStatusEnum
;
import
com.tanpu.community.dao.entity.community.TopicEntity
;
import
com.tanpu.community.dao.mapper.community.TopicMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.stereotype.Service
;
...
...
@@ -20,6 +22,8 @@ public class TopicService {
@Resource
private
TopicMapper
topicMapper
;
@Autowired
private
UuidGenHelper
uuidGenHelper
;
public
List
<
TopicEntity
>
queryAll
()
{
return
topicMapper
.
selectList
(
new
LambdaQueryWrapper
<
TopicEntity
>()
...
...
@@ -29,9 +33,8 @@ public class TopicService {
public
void
addTopic
(
String
topicTitle
,
String
userId
)
{
TopicEntity
entity
=
TopicEntity
.
builder
()
.
topicId
(
uuidGenHelper
.
getUuidStr
())
.
topicTitle
(
topicTitle
)
.
createBy
(
userId
)
.
updateBy
(
userId
)
.
isTop
(
TopicStatusEnum
.
FALSE
.
getCode
())
.
isConceal
(
TopicStatusEnum
.
FALSE
.
getCode
())
.
build
();
...
...
community-service/src/main/java/com/tanpu/community/service/VisitSummaryService.java
View file @
6d214c43
...
...
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.tanpu.community.dao.entity.community.VisitSummaryEntity
;
import
com.tanpu.community.dao.mapper.community.VisitSummaryMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.ibatis.annotations.Update
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
...
...
@@ -25,6 +24,6 @@ public class VisitSummaryService {
// 更新访问时长
public
void
updateDurByIdent
(
String
ident
,
Integer
dur
)
{
visitSummaryMapper
.
updateDurByIdent
(
ident
,
dur
);
//
visitSummaryMapper.updateDurByIdent(ident, dur);
}
}
community-service/src/main/java/com/tanpu/community/service/BlackListService.java
→
community-service/src/main/java/com/tanpu/community/service/
other/
BlackListService.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
service
;
package
com
.
tanpu
.
community
.
service
.
other
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.tanpu.common.exception.BizException
;
...
...
community-service/src/main/java/com/tanpu/community/service/CurriculumPriceService.java
→
community-service/src/main/java/com/tanpu/community/service/
other/
CurriculumPriceService.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
service
;
package
com
.
tanpu
.
community
.
service
.
other
;
import
com.tanpu.community.dao.entity.user.CurriculumPriceEntity
;
import
com.tanpu.community.dao.mapper.user.CurriculumPriceMapper
;
...
...
community-service/src/main/java/com/tanpu/community/service/CurriculumResService.java
→
community-service/src/main/java/com/tanpu/community/service/
other/
CurriculumResService.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
service
;
package
com
.
tanpu
.
community
.
service
.
other
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.tanpu.community.api.enums.CurriculumEnum
;
...
...
community-service/src/main/java/com/tanpu/community/service/FinProResService.java
→
community-service/src/main/java/com/tanpu/community/service/
other/
FinProResService.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
service
;
package
com
.
tanpu
.
community
.
service
.
other
;
import
com.tanpu.community.dao.entity.user.FinProResEntity
;
import
com.tanpu.community.dao.mapper.user.FinProResMapper
;
...
...
community-service/src/main/java/com/tanpu/community/service/OrderFlowService.java
→
community-service/src/main/java/com/tanpu/community/service/
other/
OrderFlowService.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
service
;
package
com
.
tanpu
.
community
.
service
.
other
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.tanpu.community.api.enums.DeleteTagEnum
;
...
...
community-service/src/main/java/com/tanpu/community/service/UserService.java
→
community-service/src/main/java/com/tanpu/community/service/
other/
UserService.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
service
;
package
com
.
tanpu
.
community
.
service
.
other
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.tanpu.community.dao.entity.user.UserRistRzEntity
;
...
...
community-service/src/main/java/com/tanpu/community/service/ZhiboService.java
→
community-service/src/main/java/com/tanpu/community/service/
other/
ZhiboService.java
View file @
6d214c43
package
com
.
tanpu
.
community
.
service
;
package
com
.
tanpu
.
community
.
service
.
other
;
import
com.tanpu.community.dao.entity.zhibo.ZhiboThemeEntity
;
import
com.tanpu.community.dao.mapper.zhibo.ZhiboThemeMapper
;
...
...
community-service/src/main/java/com/tanpu/community/util/ConvertUtil.java
View file @
6d214c43
...
...
@@ -95,7 +95,7 @@ public class ConvertUtil {
req
.
getAttachment
().
forEach
((
k
,
v
)
->
{
list
.
add
(
ThemeAttachmentEntity
.
builder
()
.
attachType
(
Integer
.
valueOf
(
k
))
.
attchId
(
v
)
.
att
a
chId
(
v
)
.
themeId
(
themeId
)
.
build
());
});
...
...
community-service/src/main/resources/mapper/community/BlackListEntityMapper.xml
View file @
6d214c43
...
...
@@ -10,7 +10,6 @@
<result
column=
"blocked_id"
property=
"blockedId"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"delete_tag"
property=
"deleteTag"
/>
</resultMap>
...
...
community-service/src/main/resources/mapper/community/CollectionEntityMapper.xml
View file @
6d214c43
...
...
@@ -6,11 +6,11 @@
<resultMap
id=
"BaseResultMap"
type=
"com.tanpu.community.dao.entity.community.CollectionEntity"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"collection_type"
property=
"collectionType"
/>
<result
column=
"
author_id"
property=
"autho
rId"
/>
<result
column=
"
user_id"
property=
"use
rId"
/>
<result
column=
"target_id"
property=
"targetId"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"collection_time"
property=
"collectionTime"
/>
<result
column=
"uncollection_time"
property=
"uncollectionTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"delete_tag"
property=
"deleteTag"
/>
</resultMap>
...
...
community-service/src/main/resources/mapper/community/CommentEntityMapper.xml
View file @
6d214c43
...
...
@@ -5,14 +5,15 @@
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.tanpu.community.dao.entity.community.CommentEntity"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"comment_id"
property=
"commentId"
/>
<result
column=
"comment_type"
property=
"commentType"
/>
<result
column=
"content"
property=
"content"
/>
<result
column=
"author_id"
property=
"authorId"
/>
<result
column=
"target_id"
property=
"targetId"
/>
<result
column=
"theme_id"
property=
"themeId"
/>
<result
column=
"parent_id"
property=
"parentId"
/>
<result
column=
"reply_id"
property=
"replyId"
/>
<result
column=
"is_block"
property=
"isBlock"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"delete_tag"
property=
"deleteTag"
/>
</resultMap>
...
...
community-service/src/main/resources/mapper/community/FileRecordEntityMapper.xml
View file @
6d214c43
...
...
@@ -5,15 +5,12 @@
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.tanpu.community.dao.entity.community.FileRecordEntity"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"original_name"
property=
"originalName"
/>
<result
column=
"logic_key"
property=
"logicKey"
/>
<result
column=
"file_id"
property=
"fileId"
/>
<result
column=
"file_type"
property=
"fileType"
/>
<result
column=
"file_name"
property=
"fileName"
/>
<result
column=
"file_oss_key"
property=
"fileOssKey"
/>
<result
column=
"preview_url"
property=
"previewUrl"
/>
<result
column=
"presigned_url"
property=
"presignedUrl"
/>
<result
column=
"rel_type"
property=
"relType"
/>
<result
column=
"rel_id"
property=
"relId"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"delete_tag"
property=
"deleteTag"
/>
</resultMap>
...
...
community-service/src/main/resources/mapper/community/FollowRelEntityMapper.xml
0 → 100644
View file @
6d214c43
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.tanpu.community.dao.mapper.community.FollowRelMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.tanpu.community.dao.entity.community.FollowRelEntity"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"follow_id"
property=
"followId"
/>
<result
column=
"follower_id"
property=
"followerId"
/>
<result
column=
"follow_time"
property=
"followTime"
/>
<result
column=
"unfollow_time"
property=
"unfollowTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"delete_tag"
property=
"deleteTag"
/>
</resultMap>
</mapper>
community-service/src/main/resources/mapper/community/HomePageEntityMapper.xml
View file @
6d214c43
...
...
@@ -9,9 +9,9 @@
<result
column=
"head_img"
property=
"headImg"
/>
<result
column=
"nick_name"
property=
"nickName"
/>
<result
column=
"introduction"
property=
"introduction"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"sex"
property=
"sex"
/>
<result
column=
"location"
property=
"location"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"delete_tag"
property=
"deleteTag"
/>
</resultMap>
...
...
community-service/src/main/resources/mapper/community/
FansRel
EntityMapper.xml
→
community-service/src/main/resources/mapper/community/
ThemeAttachment
EntityMapper.xml
View file @
6d214c43
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.tanpu.community.dao.mapper.community.
FansRel
Mapper"
>
<mapper
namespace=
"com.tanpu.community.dao.mapper.community.
ThemeAttachment
Mapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.tanpu.community.dao.entity.community.
FansRel
Entity"
>
<resultMap
id=
"BaseResultMap"
type=
"com.tanpu.community.dao.entity.community.
ThemeAttachment
Entity"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"idol_id"
property=
"idolId"
/>
<result
column=
"follower_id"
property=
"followerId"
/>
<result
column=
"theme_id"
property=
"themeId"
/>
<result
column=
"attach_type"
property=
"attachType"
/>
<result
column=
"attach_id"
property=
"attachId"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
...
...
community-service/src/main/resources/mapper/community/ThemeEntityMapper.xml
View file @
6d214c43
...
...
@@ -5,6 +5,7 @@
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.tanpu.community.dao.entity.community.ThemeEntity"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"theme_id"
property=
"themeId"
/>
<result
column=
"title"
property=
"title"
/>
<result
column=
"theme_type"
property=
"themeType"
/>
<result
column=
"content"
property=
"content"
/>
...
...
@@ -13,9 +14,7 @@
<result
column=
"author_id"
property=
"authorId"
/>
<result
column=
"former_theme_id"
property=
"formerThemeId"
/>
<result
column=
"topic_id"
property=
"topicId"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"delete_tag"
property=
"deleteTag"
/>
</resultMap>
...
...
community-service/src/main/resources/mapper/community/TopicEntityMapper.xml
View file @
6d214c43
...
...
@@ -5,12 +5,12 @@
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.tanpu.community.dao.entity.community.TopicEntity"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"topic_id"
property=
"topicId"
/>
<result
column=
"topic_title"
property=
"topicTitle"
/>
<result
column=
"is_top"
property=
"isTop"
/>
<result
column=
"is_conceal"
property=
"isConceal"
/>
<result
column=
"
create_by"
property=
"createB
y"
/>
<result
column=
"
view_amount_modify"
property=
"viewAmountModif
y"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"delete_tag"
property=
"deleteTag"
/>
</resultMap>
...
...
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