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
9b9d7302
Commit
9b9d7302
authored
Jul 29, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字段修改
parent
7d7f4d03
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
52 deletions
+16
-52
TopicRankQo.java
...in/java/com/tanpu/community/api/beans/qo/TopicRankQo.java
+4
-1
CreateThemeReq.java
...m/tanpu/community/api/beans/req/theme/CreateThemeReq.java
+0
-2
ThemeContentReq.java
.../tanpu/community/api/beans/req/theme/ThemeContentReq.java
+1
-1
PayDetailVO.java
...m/tanpu/community/api/beans/vo/feign/pay/PayDetailVO.java
+0
-37
ThemeController.java
.../java/com/tanpu/community/controller/ThemeController.java
+2
-4
TopicEntity.java
...com/tanpu/community/dao/entity/community/TopicEntity.java
+4
-4
ThemeManager.java
...c/main/java/com/tanpu/community/manager/ThemeManager.java
+5
-3
No files found.
community-api/src/main/java/com/tanpu/community/api/beans/qo/TopicRankQo.java
View file @
9b9d7302
...
...
@@ -26,6 +26,9 @@ public class TopicRankQo {
@ApiModelProperty
(
value
=
"是否置顶"
)
private
Integer
isTop
;
@ApiModelProperty
(
value
=
"浏览量调整基数"
)
private
Integer
viewCntAdjust
;
/**
* TODO 热度计算算法
* @return
...
...
@@ -35,6 +38,6 @@ public class TopicRankQo {
if
(
isTop
>
0
){
return
Integer
.
MAX_VALUE
;
}
return
this
.
viewCount
+
this
.
disscussCount
*
3
;
return
this
.
viewCount
+
this
.
disscussCount
*
3
+
viewCount
;
}
}
community-api/src/main/java/com/tanpu/community/api/beans/req/theme/CreateThemeReq.java
View file @
9b9d7302
...
...
@@ -10,8 +10,6 @@ import java.util.List;
@Data
public
class
CreateThemeReq
{
private
static
final
long
serialVersionUID
=
1L
;
@NotNull
(
message
=
"类型不能为空"
)
@ApiModelProperty
(
value
=
"类型 1:讨论无标题 2:长文有标题"
)
...
...
community-api/src/main/java/com/tanpu/community/api/beans/req/theme/ThemeContentReq.java
View file @
9b9d7302
...
...
@@ -11,7 +11,7 @@ import java.util.List;
@ApiModel
(
value
=
"主题内容"
)
public
class
ThemeContentReq
{
@ApiModelProperty
(
value
=
"RelTypeEnum类型,
8:文本,88:产品 3:直播 6:短视频 2:课程,9:图片 10:多图(讨论
)"
)
@ApiModelProperty
(
value
=
"RelTypeEnum类型,
108:文本,88:产品 3:直播 6:短视频 303:新版课程-视频,304: 新版课程-音频,109:单图(长文) 110:多图(讨论)
)"
)
private
String
type
;
@ApiModelProperty
(
value
=
"文本的值是内容,附件的值为id"
)
...
...
community-api/src/main/java/com/tanpu/community/api/beans/vo/feign/pay/PayDetailVO.java
deleted
100644 → 0
View file @
7d7f4d03
package
com
.
tanpu
.
community
.
api
.
beans
.
vo
.
feign
.
pay
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
value
=
"支付详情"
)
public
class
PayDetailVO
{
private
String
id
;
private
String
title
;
private
String
cover
;
private
String
info
;
private
Integer
score
;
private
Long
price
;
/**
* 划线价
*/
private
Long
crossedPrice
;
private
Integer
availableScore
;
private
Integer
balance
;
/**
* 1:免费 2:积分 3现金
*/
private
Integer
chargeMode
;
/**
* 类型:1:栏目 3:直播 4:视频 5 音频 7:直播课件
*/
private
Integer
relType
;
}
community-service/src/main/java/com/tanpu/community/controller/ThemeController.java
View file @
9b9d7302
...
...
@@ -8,7 +8,6 @@ import com.tanpu.community.api.beans.qo.ThemeQo;
import
com.tanpu.community.api.beans.req.theme.*
;
import
com.tanpu.community.api.beans.resp.CreateThemeResp
;
import
com.tanpu.community.api.beans.resp.ThemeListResp
;
import
com.tanpu.community.cache.RedisCache
;
import
com.tanpu.community.manager.ThemeManager
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -17,7 +16,6 @@ import org.springframework.validation.annotation.Validated;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@Slf4j
...
...
@@ -77,12 +75,12 @@ public class ThemeController {
}
@AuthLogin
@ApiOperation
(
"用户删除
自有
主题"
)
@ApiOperation
(
"用户删除主题"
)
@GetMapping
(
value
=
"/delete"
)
@ResponseBody
public
CommonResp
<
Void
>
delete
(
@RequestParam
(
value
=
"themeId"
)
String
themeId
)
{
String
userId
=
userHolder
.
getUserId
();
themeManager
.
delete
(
themeId
);
themeManager
.
delete
(
themeId
,
userId
);
return
CommonResp
.
success
();
}
...
...
community-service/src/main/java/com/tanpu/community/dao/entity/community/TopicEntity.java
View file @
9b9d7302
...
...
@@ -17,7 +17,7 @@ import lombok.NoArgsConstructor;
* </p>
*
* @author xudong
* @since 2021-07-2
2
* @since 2021-07-2
9
*/
@TableName
(
"topic"
)
@ApiModel
(
value
=
"TopicEntity对象"
,
description
=
"话题"
)
...
...
@@ -45,7 +45,7 @@ public class TopicEntity implements Serializable {
private
Integer
isConceal
;
@ApiModelProperty
(
value
=
"浏览量调整基数"
)
private
Long
viewCntAdjust
;
private
Integer
viewCntAdjust
;
private
LocalDateTime
createTime
;
...
...
@@ -94,11 +94,11 @@ public class TopicEntity implements Serializable {
this
.
isConceal
=
isConceal
;
}
public
Long
getViewCntAdjust
()
{
public
Integer
getViewCntAdjust
()
{
return
viewCntAdjust
;
}
public
void
setViewCntAdjust
(
Long
viewCntAdjust
)
{
public
void
setViewCntAdjust
(
Integer
viewCntAdjust
)
{
this
.
viewCntAdjust
=
viewCntAdjust
;
}
...
...
community-service/src/main/java/com/tanpu/community/manager/ThemeManager.java
View file @
9b9d7302
...
...
@@ -134,7 +134,8 @@ public class ThemeManager {
themeEntity
.
setContent
(
JsonUtil
.
toJson
(
req
.
getContent
()));
// 腾讯云敏感词校验
// 腾讯云敏感词校验,
// TODO 图片校验
checkContent
(
themeEntity
.
getContent
());
if
(
StringUtils
.
isEmpty
(
req
.
getEditThemeId
()))
{
...
...
@@ -282,6 +283,7 @@ public class ThemeManager {
// 组装和当前用户相关信息
private
void
buildThemeExtraInfoByUser
(
String
userId
,
ThemeQo
themeQo
)
{
//todo 批量查询 IN
String
themeId
=
themeQo
.
getThemeId
();
// 是否关注作者
themeQo
.
setFollow
(
followRelService
.
checkFollow
(
themeQo
.
getAuthorId
(),
userId
));
...
...
@@ -413,8 +415,8 @@ public class ThemeManager {
}
//逻辑删除主题
public
void
delete
(
String
themeId
)
{
//逻辑删除主题
TODO
public
void
delete
(
String
themeId
,
String
userId
)
{
themeService
.
deleteById
(
themeId
);
}
...
...
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