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
51cd17e5
Commit
51cd17e5
authored
Jul 30, 2021
by
张辰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move biz common
parent
30ed778b
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
26 additions
and
523 deletions
+26
-523
pom.xml
community-api/pom.xml
+4
-0
ClientConstant.java
...ava/com/tanpu/community/api/constants/ClientConstant.java
+0
-21
CollectionTypeEnum.java
...ava/com/tanpu/community/api/enums/CollectionTypeEnum.java
+0
-32
CommentTypeEnum.java
...n/java/com/tanpu/community/api/enums/CommentTypeEnum.java
+0
-30
QueryRecordTypeEnum.java
...va/com/tanpu/community/api/enums/QueryRecordTypeEnum.java
+0
-34
RelTypeEnum.java
.../main/java/com/tanpu/community/api/enums/RelTypeEnum.java
+0
-138
ReportStatusEnum.java
.../java/com/tanpu/community/api/enums/ReportStatusEnum.java
+0
-36
ReportTypeEnum.java
...in/java/com/tanpu/community/api/enums/ReportTypeEnum.java
+0
-40
ThemeAttachmentEnum.java
...va/com/tanpu/community/api/enums/ThemeAttachmentEnum.java
+0
-34
TopicStatusEnum.java
...n/java/com/tanpu/community/api/enums/TopicStatusEnum.java
+0
-31
UserLevelEnum.java
...ain/java/com/tanpu/community/api/enums/UserLevelEnum.java
+0
-80
UserTypeEnum.java
...main/java/com/tanpu/community/api/enums/UserTypeEnum.java
+0
-31
CommentManager.java
...main/java/com/tanpu/community/manager/CommentManager.java
+3
-3
HomePageManager.java
...ain/java/com/tanpu/community/manager/HomePageManager.java
+2
-0
ThemeManager.java
...c/main/java/com/tanpu/community/manager/ThemeManager.java
+3
-0
BatchFeignCallService.java
...va/com/tanpu/community/service/BatchFeignCallService.java
+2
-2
CollectionService.java
...n/java/com/tanpu/community/service/CollectionService.java
+1
-1
CommentService.java
...main/java/com/tanpu/community/service/CommentService.java
+2
-2
RankService.java
...rc/main/java/com/tanpu/community/service/RankService.java
+2
-2
ReportLogService.java
...in/java/com/tanpu/community/service/ReportLogService.java
+2
-2
ThemeService.java
...c/main/java/com/tanpu/community/service/ThemeService.java
+1
-1
BizUtils.java
...vice/src/main/java/com/tanpu/community/util/BizUtils.java
+2
-1
ConvertUtil.java
...e/src/main/java/com/tanpu/community/util/ConvertUtil.java
+2
-2
No files found.
community-api/pom.xml
View file @
51cd17e5
...
...
@@ -17,6 +17,10 @@
<groupId>
com.tanpu
</groupId>
<artifactId>
common
</artifactId>
</dependency>
<dependency>
<groupId>
com.tanpu
</groupId>
<artifactId>
tanpu-biz-common
</artifactId>
</dependency>
<dependency>
<groupId>
com.github.pagehelper
</groupId>
<artifactId>
pagehelper
</artifactId>
...
...
community-api/src/main/java/com/tanpu/community/api/constants/ClientConstant.java
deleted
100644 → 0
View file @
30ed778b
package
com
.
tanpu
.
community
.
api
.
constants
;
public
class
ClientConstant
{
private
static
final
String
PRODUCT_SERVICE_NAME
=
"service-product"
;
private
static
final
String
PRODUCT_WEB_BASE_PATH
=
"product"
;
private
static
final
String
PRODUCT_SERVICE_URL
=
"${tanpu.qm-product.svc}"
;
private
static
final
String
COURSE_SERVICE_NAME
=
"service-course"
;
private
static
final
String
COURSE_WEB_BASE_PATH
=
"course"
;
private
static
final
String
COURSE_SERVICE_URL
=
"${tanpu.qm-course.svc}"
;
private
static
final
String
TANPUROOM_SERVICE_NAME
=
"service-tanpuroom"
;
private
static
final
String
TANPUROOM_WEB_BASE_PATH
=
"tanpuroom"
;
private
static
final
String
TANPUROOM_SERVICE_URL
=
"${tanpu.qm-tanpuroom.svc}"
;
private
static
final
String
ZHIBO_SERVICE_NAME
=
"service-zhibo"
;
private
static
final
String
ZHIBO_WEB_BASE_PATH
=
"zhibo"
;
private
static
final
String
ZHIBO_SERVICE_URL
=
"${tanpu.qm-zhibo.svc}"
;
}
community-api/src/main/java/com/tanpu/community/api/enums/CollectionTypeEnum.java
deleted
100644 → 0
View file @
30ed778b
package
com
.
tanpu
.
community
.
api
.
enums
;
public
enum
CollectionTypeEnum
{
LIKE_THEME
(
1
,
"点赞主题"
),
COLLECT_THEME
(
2
,
"收藏主题"
),
LIKE_COMMENT
(
3
,
"点赞评论"
);
private
Integer
code
;
private
String
type
;
CollectionTypeEnum
(
Integer
code
,
String
type
)
{
this
.
code
=
code
;
this
.
type
=
type
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
}
community-api/src/main/java/com/tanpu/community/api/enums/CommentTypeEnum.java
deleted
100644 → 0
View file @
30ed778b
package
com
.
tanpu
.
community
.
api
.
enums
;
public
enum
CommentTypeEnum
{
THEME
(
1
,
"对主题的评论"
);
private
Integer
code
;
private
String
type
;
CommentTypeEnum
(
Integer
code
,
String
type
)
{
this
.
code
=
code
;
this
.
type
=
type
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
}
community-api/src/main/java/com/tanpu/community/api/enums/QueryRecordTypeEnum.java
deleted
100644 → 0
View file @
30ed778b
package
com
.
tanpu
.
community
.
api
.
enums
;
public
enum
QueryRecordTypeEnum
{
QUERY_PUBLISH
(
1
,
"发布"
),
QUERY_COMMENT
(
2
,
"评论"
),
QUERY_LIKE
(
3
,
"点赞"
),
QUERY_COLLECT
(
4
,
"收藏"
);
private
Integer
code
;
private
String
type
;
QueryRecordTypeEnum
(
Integer
code
,
String
type
)
{
this
.
code
=
code
;
this
.
type
=
type
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
}
community-api/src/main/java/com/tanpu/community/api/enums/RelTypeEnum.java
deleted
100644 → 0
View file @
30ed778b
package
com
.
tanpu
.
community
.
api
.
enums
;
/**
* 资源类型
*/
public
enum
RelTypeEnum
{
/**
* 专栏
*/
COLUMN
(
1
,
"栏目"
,
4
),
/**
* 课程包
*/
PACKAGE
(
2
,
"课程包"
,
2
),
/**
* 直播
*/
LIVE
(
3
,
"直播"
,
1
),
/**
* 视频
*/
VIDEO
(
4
,
"视频"
,
2
),
/**
* 音频
*/
AUDIO
(
5
,
"音频"
,
2
),
/**
* 短视频
*/
SHORT_VIDEO
(
6
,
"小视频"
,
6
),
/**
* 课件
*/
COURSE_WARE
(
7
,
"直播课件"
),
FUND
(
88
,
"产品"
,
88
),
PINGLUN
(
99
,
"评论"
,
99
),
TAMP_CAMP
(
101
,
"训练营"
,
101
),
TEXT
(
108
,
"圈子-文本"
,
108
),
SINGLE_IMG
(
109
,
"圈子-单图"
,
109
),
MULTIPLE_IMAGE
(
110
,
"圈子-多图"
,
110
),
RES_FILE
(
121
,
"资源文件"
,
121
),
IMAGE_FILE
(
122
,
"图片文件"
,
122
),
ARTICLE
(
202
,
"文章"
,
202
),
DAYREPORT
(
204
,
"早报"
,
204
),
/**
* 新版课程
*/
NEW_COURSE_WARE
(
300
,
"新版课程 - 课程包"
,
300
),
/**
* 新版课程
*/
NEW_COURSE_CHAPTER
(
301
,
"新版课程 - 章节"
,
301
),
/**
* 新版课程
*/
NEW_COURSE_SECTION_AUDIO
(
303
,
"新版课程 - 小节 - 音频"
,
303
),
/**
* 新版课程
*/
NEW_COURSE_SECTION_VIDEO
(
304
,
"新版课程 - 小节 - 视频"
,
304
),
/**
* 新版课程附件
*/
NEW_COURSE_COURSE_ATTACHMENT
(
305
,
"新版课程 - 课件"
,
305
),
/**
* 运营活动 对应 tamp_jifen.activity_config
*/
ACTIVITY_CONFIG
(
306
,
"活动"
,
306
),
INVITE_ACTIVITY
(
307
,
"邀请活动"
,
307
),
GROUP_BUY
(
310
,
"拼团活动"
,
307
),
SYSTEM
(
999
,
"系统赠送"
,
999
),
;
/**
* 前端用的类型
*/
public
String
type
;
/**
* 名称
*/
public
String
name
;
/**
* 服务端使用的类型
*/
public
Integer
serverType
;
RelTypeEnum
(
Integer
type
,
String
name
)
{
this
.
type
=
type
.
toString
();
this
.
name
=
name
;
}
RelTypeEnum
(
Integer
type
,
String
name
,
Integer
serverType
)
{
this
.
type
=
type
.
toString
();
this
.
name
=
name
;
this
.
serverType
=
serverType
;
}
/**
* 获取名称
*
* @param type
* @return
*/
public
static
String
getTypeName
(
Integer
type
)
{
if
(
type
==
null
)
{
return
""
;
}
for
(
RelTypeEnum
relTypeEnum
:
RelTypeEnum
.
values
())
{
if
(
Integer
.
valueOf
(
relTypeEnum
.
type
)==
type
)
{
return
relTypeEnum
.
name
;
}
}
return
""
;
}
}
community-api/src/main/java/com/tanpu/community/api/enums/ReportStatusEnum.java
deleted
100644 → 0
View file @
30ed778b
package
com
.
tanpu
.
community
.
api
.
enums
;
public
enum
ReportStatusEnum
{
NORMAL
(
0
,
"正常"
),
REPORTED
(
1
,
"被举报"
),
DONE
(
1
,
"已处理"
);
private
Integer
code
;
private
String
type
;
ReportStatusEnum
(
Integer
code
,
String
type
)
{
this
.
code
=
code
;
this
.
type
=
type
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
}
community-api/src/main/java/com/tanpu/community/api/enums/ReportTypeEnum.java
deleted
100644 → 0
View file @
30ed778b
package
com
.
tanpu
.
community
.
api
.
enums
;
import
org.apache.commons.collections4.SetUtils
;
import
java.util.HashSet
;
public
enum
ReportTypeEnum
{
THEME
(
1
,
"举报主题"
),
COMMENT
(
2
,
"举报评论"
),
USER
(
3
,
"举报用户"
);
public
static
final
HashSet
<
String
>
imageTypeSet
=
SetUtils
.
hashSet
(
"jpg"
,
"jpeg"
,
"png"
);
private
Integer
code
;
private
String
type
;
ReportTypeEnum
(
Integer
code
,
String
type
)
{
this
.
code
=
code
;
this
.
type
=
type
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
}
community-api/src/main/java/com/tanpu/community/api/enums/ThemeAttachmentEnum.java
deleted
100644 → 0
View file @
30ed778b
package
com
.
tanpu
.
community
.
api
.
enums
;
//1:产品 2:直播 3:短视频 4:课程
public
enum
ThemeAttachmentEnum
{
PRODUCT
(
1
,
"产品"
),
ZHIBO
(
2
,
"直播"
),
SHORTVIDEO
(
3
,
"短视频"
),
COURSE
(
4
,
"课程"
);
private
Integer
code
;
private
String
type
;
ThemeAttachmentEnum
(
Integer
code
,
String
type
)
{
this
.
code
=
code
;
this
.
type
=
type
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
}
community-api/src/main/java/com/tanpu/community/api/enums/TopicStatusEnum.java
deleted
100644 → 0
View file @
30ed778b
package
com
.
tanpu
.
community
.
api
.
enums
;
public
enum
TopicStatusEnum
{
HOTTEST
(
1
,
"最热"
),
NEWEST
(
2
,
"最新"
);;
private
Integer
code
;
private
String
type
;
TopicStatusEnum
(
Integer
code
,
String
type
)
{
this
.
code
=
code
;
this
.
type
=
type
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
}
community-api/src/main/java/com/tanpu/community/api/enums/UserLevelEnum.java
deleted
100644 → 0
View file @
30ed778b
package
com
.
tanpu
.
community
.
api
.
enums
;
import
com.tanpu.common.api.CommonResp
;
import
javax.validation.constraints.NotNull
;
/**
* @program: wealthgrow-new
* @description: 用户权限等级
* @author: zejia zj wu
* @create: 2021-07-22 10:59
**/
public
enum
UserLevelEnum
{
USER_TOURIST
(
0
,
"游客"
,
"游客"
),
USER_REGISTERED
(
1
,
"注册会员"
,
"注册会员"
),
/**
* 如果当前登录用户是投资人且要求权限大于投资人 返回 actionCode T1
* 弹框提示
* 该功能只对{levelGrade}开放哦
* 如需更改认证信息,可前往“我的”进行重新认证
* 点击「知道了」关闭弹框
*/
USER_INVESTOR
(
10
,
"投资人"
,
"普通会员"
,
"D2"
),
/**
* tamp理顾问卷 D2
*/
USER_FINANCIAL_PRACTITIONER
(
20
,
"探普理顾"
,
"投资顾问"
,
"D2"
),
/**
* tamp专家理顾问卷 D3
*/
USER_FINANCIAL_ADVISOR
(
30
,
"探普专家理顾"
,
"专家投顾"
,
"D3"
),
/**
* 发生基金交易 (系统自动判断) T0 (提示文案: 该功能只对完成交易的探普理财师开放)
*/
USER_SENIOR_FINANCIAL_ADVISER
(
40
,
"交易理财师"
,
"专家投顾"
,
"T0"
),
/**
* 探普签约理财师
*/
USER_CHIEF_FINANCIAL_ADVISER
(
50
,
"首席投顾"
,
"首席投顾"
,
"T0"
),
/**
* 白名单用户
*/
USER_WHITE_LIST
(
999
,
"白名单用户"
,
"特定用户"
,
"T0"
),
;
private
int
code
;
private
String
name
;
private
String
label
;
private
String
actionCode
;
UserLevelEnum
(
int
code
,
String
name
,
String
label
)
{
this
.
code
=
code
;
this
.
name
=
name
;
this
.
label
=
label
;
}
UserLevelEnum
(
int
code
,
String
name
,
String
label
,
String
functionCode
)
{
this
.
code
=
code
;
this
.
name
=
name
;
this
.
label
=
label
;
this
.
actionCode
=
functionCode
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
public
String
getLabel
()
{
return
label
;
}
public
String
getActionCode
()
{
return
actionCode
;
}
}
community-api/src/main/java/com/tanpu/community/api/enums/UserTypeEnum.java
deleted
100644 → 0
View file @
30ed778b
package
com
.
tanpu
.
community
.
api
.
enums
;
public
enum
UserTypeEnum
{
USER_GENERAL
(
1
,
"普通个人"
),
USER_ORG
(
2
,
"机构账号"
),
USER_ORG_PERSONNEL
(
3
,
"机构人员"
);
private
Integer
code
;
private
String
type
;
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getType
()
{
return
type
;
}
public
void
setType
(
String
type
)
{
this
.
type
=
type
;
}
UserTypeEnum
(
Integer
code
,
String
type
)
{
this
.
code
=
code
;
this
.
type
=
type
;
}
}
community-service/src/main/java/com/tanpu/community/manager/CommentManager.java
View file @
51cd17e5
package
com
.
tanpu
.
community
.
manager
;
import
com.tanpu.biz.common.enums.community.CollectionTypeEnum
;
import
com.tanpu.biz.common.enums.community.CommentTypeEnum
;
import
com.tanpu.biz.common.enums.community.ReportTypeEnum
;
import
com.tanpu.common.api.CommonResp
;
import
com.tanpu.common.exception.BizException
;
import
com.tanpu.community.api.beans.qo.CommentQo
;
...
...
@@ -7,10 +10,7 @@ import com.tanpu.community.api.beans.req.comment.CreateCommentReq;
import
com.tanpu.community.api.beans.req.comment.LikeCommentReq
;
import
com.tanpu.community.api.beans.req.comment.ReportCommentReq
;
import
com.tanpu.community.api.beans.vo.feign.fatools.UserInfoResp
;
import
com.tanpu.community.api.enums.CollectionTypeEnum
;
import
com.tanpu.community.api.enums.CommentTypeEnum
;
import
com.tanpu.community.api.enums.OperationTypeEnum
;
import
com.tanpu.community.api.enums.ReportTypeEnum
;
import
com.tanpu.community.cache.RedisCache
;
import
com.tanpu.community.dao.entity.community.CommentEntity
;
import
com.tanpu.community.feign.fatools.FeignClientForFatools
;
...
...
community-service/src/main/java/com/tanpu/community/manager/HomePageManager.java
View file @
51cd17e5
package
com
.
tanpu
.
community
.
manager
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.tanpu.biz.common.enums.user.UserLevelEnum
;
import
com.tanpu.biz.common.enums.user.UserTypeEnum
;
import
com.tanpu.common.api.CommonResp
;
import
com.tanpu.common.constant.BizStatus
;
import
com.tanpu.common.exception.BizException
;
...
...
community-service/src/main/java/com/tanpu/community/manager/ThemeManager.java
View file @
51cd17e5
...
...
@@ -2,6 +2,9 @@ package com.tanpu.community.manager;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.google.common.collect.Sets
;
import
com.tanpu.biz.common.enums.RelTypeEnum
;
import
com.tanpu.biz.common.enums.community.CollectionTypeEnum
;
import
com.tanpu.biz.common.enums.community.ReportTypeEnum
;
import
com.tanpu.common.api.CommonResp
;
import
com.tanpu.common.exception.BizException
;
import
com.tanpu.common.util.JsonUtil
;
...
...
community-service/src/main/java/com/tanpu/community/service/BatchFeignCallService.java
View file @
51cd17e5
...
...
@@ -2,6 +2,8 @@ package com.tanpu.community.service;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Sets
;
import
com.tanpu.biz.common.enums.RelTypeEnum
;
import
com.tanpu.biz.common.enums.user.UserLevelEnum
;
import
com.tanpu.common.api.CommonResp
;
import
com.tanpu.common.enums.fund.ProductTypeEnum
;
import
com.tanpu.common.util.JsonUtil
;
...
...
@@ -15,8 +17,6 @@ import com.tanpu.community.api.beans.vo.feign.fatools.UserInfoResp;
import
com.tanpu.community.api.beans.vo.feign.product.FundInfoBaseResp
;
import
com.tanpu.community.api.beans.vo.feign.product.ProductInfoVO
;
import
com.tanpu.community.api.beans.vo.feign.zhibo.ZhiboListResp
;
import
com.tanpu.community.api.enums.RelTypeEnum
;
import
com.tanpu.community.api.enums.UserLevelEnum
;
import
com.tanpu.community.dao.entity.community.FileRecordEntity
;
import
com.tanpu.community.dao.entity.community.TopicEntity
;
import
com.tanpu.community.feign.course.FeignClientForCourse
;
...
...
community-service/src/main/java/com/tanpu/community/service/CollectionService.java
View file @
51cd17e5
package
com
.
tanpu
.
community
.
service
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.tanpu.
community.api.enums
.CollectionTypeEnum
;
import
com.tanpu.
biz.common.enums.community
.CollectionTypeEnum
;
import
com.tanpu.community.api.enums.DeleteTagEnum
;
import
com.tanpu.community.dao.entity.community.CollectionEntity
;
import
com.tanpu.community.dao.entity.community.TimesCountEntity
;
...
...
community-service/src/main/java/com/tanpu/community/service/CommentService.java
View file @
51cd17e5
...
...
@@ -2,11 +2,11 @@ package com.tanpu.community.service;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.tanpu.biz.common.enums.community.CommentTypeEnum
;
import
com.tanpu.biz.common.enums.community.ReportStatusEnum
;
import
com.tanpu.common.exception.BizException
;
import
com.tanpu.common.uuid.UuidGenHelper
;
import
com.tanpu.community.api.enums.CommentTypeEnum
;
import
com.tanpu.community.api.enums.DeleteTagEnum
;
import
com.tanpu.community.api.enums.ReportStatusEnum
;
import
com.tanpu.community.cache.RedisCache
;
import
com.tanpu.community.dao.entity.community.CommentEntity
;
import
com.tanpu.community.dao.entity.community.TimesCountEntity
;
...
...
community-service/src/main/java/com/tanpu/community/service/RankService.java
View file @
51cd17e5
package
com
.
tanpu
.
community
.
service
;
import
com.tanpu.biz.common.enums.community.CollectionTypeEnum
;
import
com.tanpu.biz.common.enums.community.TopicStatusEnum
;
import
com.tanpu.community.api.beans.qo.ThemeAnalysDO
;
import
com.tanpu.community.api.beans.qo.TopicRankQo
;
import
com.tanpu.community.api.beans.vo.feign.fatools.UserInfoResp
;
import
com.tanpu.community.api.enums.CollectionTypeEnum
;
import
com.tanpu.community.api.enums.TopicStatusEnum
;
import
com.tanpu.community.api.enums.VisitTypeEnum
;
import
com.tanpu.community.cache.RedisCache
;
import
com.tanpu.community.dao.entity.community.ThemeEntity
;
...
...
community-service/src/main/java/com/tanpu/community/service/ReportLogService.java
View file @
51cd17e5
package
com
.
tanpu
.
community
.
service
;
import
com.tanpu.
community.api.enums
.ReportTypeEnum
;
import
com.tanpu.
biz.common.enums.community
.ReportTypeEnum
;
import
com.tanpu.community.dao.entity.community.ReportLogEntity
;
import
com.tanpu.community.dao.mapper.community.ReportLogMapper
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -16,7 +16,7 @@ public class ReportLogService {
@Resource
private
ReportLogMapper
reportLogMapper
;
public
void
insert
(
ReportTypeEnum
type
,
String
userId
,
String
themeId
,
String
authorId
,
String
reason
){
public
void
insert
(
ReportTypeEnum
type
,
String
userId
,
String
themeId
,
String
authorId
,
String
reason
){
ReportLogEntity
entity
=
ReportLogEntity
.
builder
().
userId
(
userId
)
.
reportType
(
type
.
getCode
())
.
targetId
(
themeId
)
...
...
community-service/src/main/java/com/tanpu/community/service/ThemeService.java
View file @
51cd17e5
...
...
@@ -2,11 +2,11 @@ package com.tanpu.community.service;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.tanpu.biz.common.enums.community.ReportStatusEnum
;
import
com.tanpu.common.exception.BizException
;
import
com.tanpu.common.redis.RedisHelper
;
import
com.tanpu.common.uuid.UuidGenHelper
;
import
com.tanpu.community.api.enums.DeleteTagEnum
;
import
com.tanpu.community.api.enums.ReportStatusEnum
;
import
com.tanpu.community.dao.entity.community.ThemeEntity
;
import
com.tanpu.community.dao.entity.community.TimesCountEntity
;
import
com.tanpu.community.dao.mapper.community.ThemeMapper
;
...
...
community-service/src/main/java/com/tanpu/community/util/BizUtils.java
View file @
51cd17e5
package
com
.
tanpu
.
community
.
util
;
import
com.tanpu.biz.common.enums.RelTypeEnum
;
import
com.tanpu.community.api.beans.qo.ThemeContentQo
;
import
com.tanpu.community.api.beans.qo.ThemeQo
;
import
org.apache.commons.codec.binary.Base64
;
import
com.tanpu.community.api.enums.RelTypeEnum
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -49,6 +49,7 @@ public class BizUtils {
public
static
void
main
(
String
[]
args
)
{
String
sk
=
"59V9ke9txaIFzWxHFKTb1eoOOpmKpJ"
;
String
policy
=
"{\"expiration\":\"2021-07-30T12:00:00.000Z\",\"conditions\":[[\"content-length-range\",0,1024*1024*1024]]}"
;
System
.
out
.
println
(
policy
);
String
encodePolicy
=
new
String
(
Base64
.
encodeBase64
(
policy
.
getBytes
()));
String
sign
=
com
.
aliyun
.
oss
.
common
.
auth
.
ServiceSignature
.
create
().
computeSignature
(
sk
,
encodePolicy
);
...
...
community-service/src/main/java/com/tanpu/community/util/ConvertUtil.java
View file @
51cd17e5
package
com
.
tanpu
.
community
.
util
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.tanpu.biz.common.enums.RelTypeEnum
;
import
com.tanpu.biz.common.enums.community.TopicStatusEnum
;
import
com.tanpu.common.util.JsonUtil
;
import
com.tanpu.community.api.beans.qo.*
;
import
com.tanpu.community.api.beans.req.theme.CreateThemeReq
;
...
...
@@ -10,8 +12,6 @@ import com.tanpu.community.api.beans.vo.ImagesDTO;
import
com.tanpu.community.api.beans.vo.KafkaDurationUptMsg
;
import
com.tanpu.community.api.beans.vo.feign.fatools.UserInfoResp
;
import
com.tanpu.community.api.enums.DeleteTagEnum
;
import
com.tanpu.community.api.enums.RelTypeEnum
;
import
com.tanpu.community.api.enums.TopicStatusEnum
;
import
com.tanpu.community.dao.entity.community.*
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.util.StringUtils
;
...
...
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