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
b6945a14
Commit
b6945a14
authored
Jul 30, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
9733212e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
181 additions
and
25 deletions
+181
-25
TopicRankLogEntity.java
...pu/community/dao/entity/community/TopicRankLogEntity.java
+126
-0
TopicRankLogMapper.java
...pu/community/dao/mapper/community/TopicRankLogMapper.java
+16
-0
ThemeManager.java
...c/main/java/com/tanpu/community/manager/ThemeManager.java
+2
-2
TopicRankLogEntityMapper.xml
...n/resources/mapper/community/TopicRankLogEntityMapper.xml
+17
-0
create.sql
docs/create.sql
+20
-23
No files found.
community-service/src/main/java/com/tanpu/community/dao/entity/community/TopicRankLogEntity.java
0 → 100644
View file @
b6945a14
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
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* 话题排序日志记录’
* </p>
*
* @author xudong
* @since 2021-07-30
*/
@TableName
(
"topic_rank_log"
)
@ApiModel
(
value
=
"TopicRankLogEntity对象"
,
description
=
"话题排序日志记录’"
)
public
class
TopicRankLogEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"id"
)
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
@ApiModelProperty
(
value
=
"总排序数量"
)
private
Integer
totalCount
;
@ApiModelProperty
(
value
=
"页码"
)
private
Integer
pageNumber
;
@ApiModelProperty
(
value
=
"页面大小"
)
private
Integer
pageSize
;
@ApiModelProperty
(
value
=
"排序内容"
)
private
String
info
;
private
LocalDateTime
createTime
;
private
LocalDateTime
updateTime
;
private
Integer
deleteTag
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Integer
getTotalCount
()
{
return
totalCount
;
}
public
void
setTotalCount
(
Integer
totalCount
)
{
this
.
totalCount
=
totalCount
;
}
public
Integer
getPageNumber
()
{
return
pageNumber
;
}
public
void
setPageNumber
(
Integer
pageNumber
)
{
this
.
pageNumber
=
pageNumber
;
}
public
Integer
getPageSize
()
{
return
pageSize
;
}
public
void
setPageSize
(
Integer
pageSize
)
{
this
.
pageSize
=
pageSize
;
}
public
String
getInfo
()
{
return
info
;
}
public
void
setInfo
(
String
info
)
{
this
.
info
=
info
;
}
public
LocalDateTime
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
LocalDateTime
createTime
)
{
this
.
createTime
=
createTime
;
}
public
LocalDateTime
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
LocalDateTime
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getDeleteTag
()
{
return
deleteTag
;
}
public
void
setDeleteTag
(
Integer
deleteTag
)
{
this
.
deleteTag
=
deleteTag
;
}
@Override
public
String
toString
()
{
return
"TopicRankLogEntity{"
+
"id="
+
id
+
", totalCount="
+
totalCount
+
", pageNumber="
+
pageNumber
+
", pageSize="
+
pageSize
+
", info="
+
info
+
", createTime="
+
createTime
+
", updateTime="
+
updateTime
+
", deleteTag="
+
deleteTag
+
"}"
;
}
}
community-service/src/main/java/com/tanpu/community/dao/mapper/community/TopicRankLogMapper.java
0 → 100644
View file @
b6945a14
package
com
.
tanpu
.
community
.
dao
.
mapper
.
community
;
import
com.tanpu.community.dao.entity.community.TopicRankLogEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* 话题排序日志记录’ Mapper 接口
* </p>
*
* @author xudong
* @since 2021-07-30
*/
public
interface
TopicRankLogMapper
extends
BaseMapper
<
TopicRankLogEntity
>
{
}
community-service/src/main/java/com/tanpu/community/manager/ThemeManager.java
View file @
b6945a14
...
@@ -140,7 +140,7 @@ public class ThemeManager {
...
@@ -140,7 +140,7 @@ public class ThemeManager {
BeanUtils
.
copyProperties
(
req
,
themeEntity
);
BeanUtils
.
copyProperties
(
req
,
themeEntity
);
themeEntity
.
setAuthorId
(
userId
);
themeEntity
.
setAuthorId
(
userId
);
themeEntity
.
setContent
(
JsonUtil
.
toJson
(
req
.
getContent
()));
themeEntity
.
setContent
(
JsonUtil
.
toJson
(
req
.
getContent
()));
List
<
ThemeAttachmentEntity
>
themeAttachments
=
ConvertUtil
.
themeReqToAttachmentList
(
req
,
themeEntity
.
getThemeId
());
// 腾讯云敏感词校验
// 腾讯云敏感词校验
// TODO 图片校验
// TODO 图片校验
...
@@ -158,7 +158,7 @@ public class ThemeManager {
...
@@ -158,7 +158,7 @@ public class ThemeManager {
themeEntity
.
setThemeId
(
req
.
getEditThemeId
());
themeEntity
.
setThemeId
(
req
.
getEditThemeId
());
}
}
// 保存附件表
// 保存附件表
List
<
ThemeAttachmentEntity
>
themeAttachments
=
ConvertUtil
.
themeReqToAttachmentList
(
req
,
themeEntity
.
getThemeId
());
if
(
StringUtils
.
isNotEmpty
(
req
.
getEditThemeId
()))
{
if
(
StringUtils
.
isNotEmpty
(
req
.
getEditThemeId
()))
{
// 修改需要刪除
// 修改需要刪除
themeAttachmentService
.
deleteByThemeId
(
req
.
getEditThemeId
());
themeAttachmentService
.
deleteByThemeId
(
req
.
getEditThemeId
());
...
...
community-service/src/main/resources/mapper/community/TopicRankLogEntityMapper.xml
0 → 100644
View file @
b6945a14
<?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.TopicRankLogMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.tanpu.community.dao.entity.community.TopicRankLogEntity"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"total_count"
property=
"totalCount"
/>
<result
column=
"page_number"
property=
"pageNumber"
/>
<result
column=
"page_size"
property=
"pageSize"
/>
<result
column=
"info"
property=
"info"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"delete_tag"
property=
"deleteTag"
/>
</resultMap>
</mapper>
docs/create.sql
View file @
b6945a14
...
@@ -243,15 +243,15 @@ CREATE TABLE `topic` (
...
@@ -243,15 +243,15 @@ CREATE TABLE `topic` (
CREATE
TABLE
`user_visit_statistics`
(
CREATE
TABLE
`user_visit_statistics`
(
`id`
bigint
(
32
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
`id`
bigint
(
32
)
unsigned
NOT
NULL
AUTO_INCREMENT
,
`visitor_id`
varchar
(
64
)
DEFAULT
NULL
,
`visitor_id`
varchar
(
64
)
DEFAULT
NULL
,
`ref_id`
varchar
(
64
)
DEFAULT
NULL
,
`ref_id`
varchar
(
64
)
DEFAULT
NULL
,
`ref_type`
int
(
8
)
DEFAULT
NULL
,
`ref_type`
int
(
8
)
DEFAULT
NULL
,
`total_duration`
bigint
(
20
)
DEFAULT
NULL
,
`total_duration`
bigint
(
20
)
DEFAULT
NULL
,
`first_visit_time`
datetime
DEFAULT
NULL
,
`first_visit_time`
datetime
DEFAULT
NULL
,
`last_visit_time`
datetime
DEFAULT
NULL
,
`last_visit_time`
datetime
DEFAULT
NULL
,
`total_visit`
int
(
16
)
DEFAULT
NULL
,
`total_visit`
int
(
16
)
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
;
...
@@ -273,17 +273,14 @@ CREATE TABLE `visit_summary` (
...
@@ -273,17 +273,14 @@ CREATE TABLE `visit_summary` (
KEY
`idx_author`
(
`author_id`
)
USING
BTREE
KEY
`idx_author`
(
`author_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'浏览记录'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'浏览记录'
;
CREATE
TABLE
`topic_rank_log`
(
-- tamp_community.worker_node definition
`id`
bigint
(
32
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'id'
,
`total_count`
int
NOT
NULL
COMMENT
'总排序数量'
,
CREATE
TABLE
`worker_node`
(
`page_number`
int
NOT
NULL
COMMENT
'处理结果 0:无操作 1:屏蔽 2:删除 '
,
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'auto increment id'
,
`page_size`
int
NOT
NULL
COMMENT
'处理管理员'
,
`host_name`
varchar
(
64
)
NOT
NULL
COMMENT
'host name'
,
`info`
text
COMMENT
'排序内容'
,
`port`
varchar
(
64
)
NOT
NULL
COMMENT
'port'
,
`create_time`
datetime
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`type`
varchar
(
32
)
NOT
NULL
COMMENT
'node type: realhost or container'
,
`update_time`
datetime
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
,
`launch_date`
date
NOT
NULL
COMMENT
'launch date'
,
`delete_tag`
int
(
3
)
NOT
NULL
DEFAULT
'0'
,
`created`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'created time'
,
PRIMARY
KEY
(
`id`
)
`modified`
timestamp
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'modified time'
,
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
9
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'话题排序日志记录’'
;
PRIMARY
KEY
(
`id`
),
\ No newline at end of file
UNIQUE
KEY
`idx_host_name_port`
(
`host_name`
,
`port`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'分布式唯一ID生成,DB WorkerID Assigner for UID Generator'
;
\ No newline at end of file
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