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
690f911e
Commit
690f911e
authored
Jul 09, 2021
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
主题接口修改
parent
99a46b20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
662 additions
and
97 deletions
+662
-97
AttachmentDetailVo.java
.../com/tanpu/community/api/beans/qo/AttachmentDetailVo.java
+8
-5
ThemeContentQo.java
...java/com/tanpu/community/api/beans/qo/ThemeContentQo.java
+14
-4
CreateThemeReq.java
...m/tanpu/community/api/beans/req/theme/CreateThemeReq.java
+3
-4
ThemeContentReq.java
.../tanpu/community/api/beans/req/theme/ThemeContentReq.java
+8
-2
BaseCoursePackage.java
...tanpu/community/api/beans/vo/feign/BaseCoursePackage.java
+99
-0
CoursePackageDetail.java
...npu/community/api/beans/vo/feign/CoursePackageDetail.java
+61
-0
LikeCourse.java
...va/com/tanpu/community/api/beans/vo/feign/LikeCourse.java
+36
-0
GroupBuyConfig.java
...anpu/community/api/beans/vo/feign/pay/GroupBuyConfig.java
+111
-0
PayDetailVO.java
...m/tanpu/community/api/beans/vo/feign/pay/PayDetailVO.java
+37
-0
Price.java
...ava/com/tanpu/community/api/beans/vo/feign/pay/Price.java
+107
-0
ResBmInfoResp.java
...tanpu/community/api/beans/vo/feign/pay/ResBmInfoResp.java
+60
-0
Time3Type.java
...com/tanpu/community/api/beans/vo/feign/pay/Time3Type.java
+34
-0
RelTypeEnum.java
.../main/java/com/tanpu/community/api/enums/RelTypeEnum.java
+3
-0
ThemeController.java
.../java/com/tanpu/community/controller/ThemeController.java
+3
-4
FeignBackClientForCourse.java
...anpu/community/feign/course/FeignBackClientForCourse.java
+8
-0
FeignClientForCourse.java
...om/tanpu/community/feign/course/FeignClientForCourse.java
+5
-0
ThemeManager.java
...c/main/java/com/tanpu/community/manager/ThemeManager.java
+59
-76
ConvertUtil.java
...e/src/main/java/com/tanpu/community/util/ConvertUtil.java
+6
-2
No files found.
community-api/src/main/java/com/tanpu/community/api/beans/qo/AttachmentDetailVo.java
View file @
690f911e
package
com
.
tanpu
.
community
.
api
.
beans
.
qo
;
import
com.tanpu.community.api.beans.vo.feign.CourseDetailExt
;
import
com.tanpu.community.api.beans.vo.feign.ProductInfoVO
;
import
com.tanpu.community.api.beans.vo.feign.ShortVideoBaseInfoResp
;
import
com.tanpu.community.api.beans.vo.feign.ZhiboDetailVO
;
import
com.tanpu.community.api.beans.vo.feign.*
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
value
=
"附件对象"
)
public
class
AttachmentDetailVo
{
...
...
@@ -22,6 +25,6 @@ public class AttachmentDetailVo {
private
ShortVideoBaseInfoResp
shortVideoBaseInfoResp
;
@ApiModelProperty
(
value
=
"课程"
)
private
Course
DetailExt
courseDetailExt
;
private
Course
PackageDetail
coursePackageDetail
;
}
community-api/src/main/java/com/tanpu/community/api/beans/qo/ThemeContentQo.java
View file @
690f911e
package
com
.
tanpu
.
community
.
api
.
beans
.
qo
;
import
com.tanpu.community.api.beans.ImagesDTO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@Data
@ApiModel
(
value
=
"主题内容"
)
public
class
ThemeContentQo
{
@ApiModelProperty
(
value
=
"
类型,0:文本,1:产品 2:直播 3:短视频 4:课程,5:图片 6:图片列表
(讨论)"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"
RelTypeEnum类型,8:文本,88:产品 3:直播 6:短视频 2:课程,9:图片 10:多图
(讨论)"
)
private
String
type
;
@ApiModelProperty
(
value
=
"文本的值是内容,附件的值为id"
)
private
String
value
;
@ApiModelProperty
(
value
=
"类型为6时,传入图片列表"
)
private
String
[]
imgList
;
@ApiModelProperty
(
value
=
"产品类型,0 公募,1 私募,2 白名单,3 私有"
)
private
Integer
productType
;
@ApiModelProperty
(
value
=
"产品推荐语"
)
private
String
remark
;
@ApiModelProperty
(
value
=
"讨论中的图片列表"
)
private
List
<
ImagesDTO
>
imgList
;
@ApiModelProperty
(
value
=
"对象详情"
)
private
AttachmentDetailVo
detail
;
...
...
community-api/src/main/java/com/tanpu/community/api/beans/req/theme/CreateThemeReq.java
View file @
690f911e
package
com
.
tanpu
.
community
.
api
.
beans
.
req
.
theme
;
import
com.tanpu.community.api.beans.ImagesDTO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotEmpty
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
@Data
...
...
@@ -13,7 +13,7 @@ public class CreateThemeReq {
private
static
final
long
serialVersionUID
=
1L
;
@Not
Empty
(
message
=
"类型不能为空"
)
@Not
Null
(
message
=
"类型不能为空"
)
@ApiModelProperty
(
value
=
"类型 1:讨论无标题 2:长文有标题"
)
private
Integer
themeType
;
...
...
@@ -28,6 +28,5 @@ public class CreateThemeReq {
@ApiModelProperty
(
value
=
"所属的话题id"
)
private
String
topicId
;
@ApiModelProperty
(
value
=
"讨论中的图片列表"
)
private
List
<
ImagesDTO
>
imgList
;
}
community-api/src/main/java/com/tanpu/community/api/beans/req/theme/ThemeContentReq.java
View file @
690f911e
package
com
.
tanpu
.
community
.
api
.
beans
.
req
.
theme
;
import
com.tanpu.community.api.beans.ImagesDTO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@Data
@ApiModel
(
value
=
"主题内容"
)
public
class
ThemeContentReq
{
@ApiModelProperty
(
value
=
"RelTypeEnum类型,8:文本,88:产品 3:直播
3:短视频 4:课程,5:图片 6:图片列表
(讨论)"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"RelTypeEnum类型,8:文本,88:产品 3:直播
6:短视频 2:课程,9:图片 10:多图
(讨论)"
)
private
String
type
;
@ApiModelProperty
(
value
=
"文本的值是内容,附件的值为id"
)
private
String
value
;
...
...
@@ -20,4 +23,7 @@ public class ThemeContentReq {
@ApiModelProperty
(
value
=
"产品推荐语"
)
private
String
remark
;
@ApiModelProperty
(
value
=
"讨论中的图片列表"
)
private
List
<
ImagesDTO
>
imgList
;
}
community-api/src/main/java/com/tanpu/community/api/beans/vo/feign/BaseCoursePackage.java
0 → 100644
View file @
690f911e
package
com
.
tanpu
.
community
.
api
.
beans
.
vo
.
feign
;
import
com.tanpu.community.api.beans.vo.feign.pay.Price
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.List
;
/**
* @author: zhoupeng
* <p>
* =========================================
* =========================================
* ======== ========
* ======= ========== ======= =======
* ====== ===== == ==== ======
* ===== ===== == === =====
* ===== ===== == === =====
* ===== ===== == === =====
* ====== ========== == ======
* ======= =======
* =========================================
* =========================================
* <p>
* @email: zhoupeng_08@163.com
*/
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
"课程基础属性 BaseCoursePackage"
)
@Data
public
class
BaseCoursePackage
extends
Price
{
@ApiModelProperty
(
"包名称"
)
private
String
packageName
;
@ApiModelProperty
(
"副标题"
)
private
String
twoTitle
;
@ApiModelProperty
(
"结构类型 1:目录 2:资源"
)
private
Integer
courseType
;
@ApiModelProperty
(
"包id"
)
private
String
packageId
;
@ApiModelProperty
(
"标签信息"
)
private
List
<
Type
>
tagTypes
;
@ApiModelProperty
(
"总期数"
)
private
Integer
totalNum
;
@ApiModelProperty
(
"多少人已学习"
)
private
Integer
readNum
;
@ApiModelProperty
(
"试听数量"
)
private
Integer
everySelectNum
=
0
;
@ApiModelProperty
(
"是否收藏 0:没收藏 1:收藏"
)
private
Integer
isFavorite
;
@ApiModelProperty
(
"是否引用讲师头像 0否 1是;bgStatus=0时,直接展示squareImg;bgStatus=1时,将squareImg与bgImg叠加展示"
)
private
Integer
bgStatus
;
@ApiModelProperty
(
"方图"
)
private
String
squareImg
;
@ApiModelProperty
(
"背景图地址"
)
private
String
bgImg
;
@ApiModelProperty
(
"发刊词状态 1:有发刊词 2:没有发刊词"
)
private
Integer
progressionStatus
;
@ApiModelProperty
(
"发刊词"
)
private
String
progressionId
;
@ApiModelProperty
(
"发刊词名称"
)
private
String
progressionName
;
@ApiModelProperty
(
"发刊词地址"
)
private
String
progressionUrl
;
@ApiModelProperty
(
"发刊词资源类型 音/视频"
)
private
Integer
progressionResType
;
@ApiModelProperty
(
"是否学习过 0: 否 1:是"
)
private
Integer
progressIsListen
;
@ApiModelProperty
(
"发刊词的课程id"
)
private
String
progressionContext
;
@ApiModelProperty
(
"发刊词数量"
)
private
Integer
progressionReadNum
;
@ApiModelProperty
(
"发刊词数量"
)
private
Integer
progressionLengthTime
;
@ApiModelProperty
(
"试听类型 1:任意选择课程 2:指定课程"
)
private
Integer
auditionType
;
@ApiModelProperty
(
"试听设置 0:无试听 1:有试听"
)
private
Integer
auditionSetting
;
@ApiModelProperty
(
"发刊词mp3Url"
)
private
String
progressionMp3Url
;
}
community-api/src/main/java/com/tanpu/community/api/beans/vo/feign/CoursePackageDetail.java
0 → 100644
View file @
690f911e
package
com
.
tanpu
.
community
.
api
.
beans
.
vo
.
feign
;
import
com.tanpu.community.api.beans.vo.feign.pay.GroupBuyConfig
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.List
;
/**
* @author: zhoupeng
* <p>
* =========================================
* =========================================
* ======== ========
* ======= ========== ======= =======
* ====== ===== == ==== ======
* ===== ===== == === =====
* ===== ===== == === =====
* ===== ===== == === =====
* ====== ========== == ======
* ======= =======
* =========================================
* =========================================
* <p>
* @email: zhoupeng_08@163.com
*/
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@ApiModel
(
"课程章节详情"
)
public
class
CoursePackageDetail
extends
BaseCoursePackage
{
@ApiModelProperty
(
"课程亮点"
)
private
String
courseSparkle
;
@ApiModelProperty
(
"购买须知"
)
private
String
buyNotice
;
@ApiModelProperty
(
"课程表"
)
private
String
courseTable
;
@ApiModelProperty
(
"已学过列表"
)
private
List
<
String
>
listenedIds
;
@ApiModelProperty
(
"试听id"
)
private
List
<
String
>
listerIds
;
@ApiModelProperty
(
"喜欢"
)
private
List
<
LikeCourse
>
likeCourses
;
@ApiModelProperty
(
"已试听课程数量"
)
private
Integer
selectNums
=
0
;
@ApiModelProperty
(
"是否正在参与拼团活动 0不参加 1参加"
)
private
Integer
isJoinGroupBuy
=
0
;
@ApiModelProperty
(
"拼团活动配置信息"
)
private
GroupBuyConfig
groupBuyConfig
;
}
community-api/src/main/java/com/tanpu/community/api/beans/vo/feign/LikeCourse.java
0 → 100644
View file @
690f911e
package
com
.
tanpu
.
community
.
api
.
beans
.
vo
.
feign
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* @author: zhoupeng
* <p>
* =========================================
* =========================================
* ======== ========
* ======= ========== ======= =======
* ====== ===== == ==== ======
* ===== ===== == === =====
* ===== ===== == === =====
* ===== ===== == === =====
* ====== ========== == ======
* ======= =======
* =========================================
* =========================================
* <p>
* @email: zhoupeng_08@163.com
*/
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
class
LikeCourse
extends
BaseCoursePackage
{
private
String
coursePackageId
;
private
String
coursePackageMainTitle
;
@ApiModelProperty
(
"讲师名称"
)
private
String
name
;
}
community-api/src/main/java/com/tanpu/community/api/beans/vo/feign/pay/GroupBuyConfig.java
0 → 100644
View file @
690f911e
package
com
.
tanpu
.
community
.
api
.
beans
.
vo
.
feign
.
pay
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @description: 拼团配置
* @author: zejia zj wu
* @create: 2021-06-21 15:43
**/
@ApiModel
(
value
=
"拼团配置"
)
@Data
public
class
GroupBuyConfig
implements
Serializable
{
/**
* 唯一主键
*/
@ApiModelProperty
(
value
=
"唯一主键"
)
private
Integer
id
;
/**
* 拼团配置id
*/
@ApiModelProperty
(
value
=
"拼团配置id"
)
private
String
groupBuyConfigId
;
/**
* 资源id
*/
@ApiModelProperty
(
value
=
"资源id"
)
private
String
resId
;
/**
* 资源类型 300新版课程包
*/
@ApiModelProperty
(
value
=
"资源类型 300新版课程包"
)
private
Integer
resType
;
/**
* 拼团价
*/
@ApiModelProperty
(
value
=
"拼团价"
)
private
Integer
groupBuyPrice
;
/**
* 活动开始时间
*/
@ApiModelProperty
(
value
=
"活动开始时间"
)
private
Long
timeStart
;
/**
* 活动结束时间
*/
@ApiModelProperty
(
value
=
"活动结束时间"
)
private
Long
timeEnd
;
/**
* 拼团时限 单位小时
*/
@ApiModelProperty
(
value
=
"拼团时限 单位小时"
)
private
Long
timeLimit
;
/**
* 拼团规定人数
*/
@ApiModelProperty
(
value
=
"拼团规定人数"
)
private
Integer
peopleNumber
;
/**
* 是否开启 在线拼团 0不开启 1开启
*/
@ApiModelProperty
(
value
=
"是否开启 在线拼团 0不开启 1开启"
)
private
Integer
isShow
;
/**
* 拼团规则总述
*/
@ApiModelProperty
(
value
=
"拼团规则总述"
)
private
String
ruleMain
;
/**
* 拼团规则详细
*/
@ApiModelProperty
(
value
=
"拼团规则详细"
)
private
String
ruleDetail
;
/**
* 创建时间
*/
@ApiModelProperty
(
value
=
"创建时间"
)
private
Long
createTime
;
/**
* 修改时间
*/
@ApiModelProperty
(
value
=
"修改时间"
)
private
Long
updateTime
;
/**
* 删除标识
*/
@ApiModelProperty
(
value
=
"删除标识"
)
private
Integer
deleteTag
;
@ApiModelProperty
(
value
=
"拼团标识 1未参与 2拼团进行中 3拼团成功 4拼团失败"
)
private
Integer
groupBuyStatus
;
private
static
final
long
serialVersionUID
=
1L
;
}
community-api/src/main/java/com/tanpu/community/api/beans/vo/feign/pay/PayDetailVO.java
0 → 100644
View file @
690f911e
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-api/src/main/java/com/tanpu/community/api/beans/vo/feign/pay/Price.java
0 → 100644
View file @
690f911e
package
com
.
tanpu
.
community
.
api
.
beans
.
vo
.
feign
.
pay
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.experimental.SuperBuilder
;
/**
* @author: zhoupeng
* <p>
* =========================================
* =========================================
* ======== ========
* ======= ========== ======= =======
* ====== ===== == ==== ======
* ===== ===== == === =====
* ===== ===== == === =====
* ===== ===== == === =====
* ====== ========== == ======
* ======= =======
* =========================================
* =========================================
* <p>
* @email: zhoupeng_08@163.com
*/
@Data
@SuperBuilder
(
toBuilder
=
true
)
@AllArgsConstructor
@NoArgsConstructor
public
class
Price
{
@ApiModelProperty
(
"资源id"
)
private
String
resId
;
@ApiModelProperty
(
"是不是白名单 0:不是 1:是白名单"
)
private
Integer
isWhite
;
@ApiModelProperty
(
"价格"
)
private
String
totalPrice
;
@ApiModelProperty
(
"积分"
)
private
String
totalScore
;
@ApiModelProperty
(
"付费模式 1:免费 2:积分 3:现金"
)
private
Integer
chargeMode
;
@ApiModelProperty
(
"划线价格"
)
private
String
discountPrice
;
@ApiModelProperty
(
"划线积分"
)
private
String
discountScore
;
@ApiModelProperty
(
"促销时间"
)
private
Time3Type
time3Type
;
@ApiModelProperty
(
"会员打折价"
)
private
String
memberDiscountPrice
;
@ApiModelProperty
(
"会员促销时间"
)
private
Time3Type
memberTime3Type
;
@ApiModelProperty
(
"报名信息 0:不需要 1:需要"
)
private
Integer
bmStatus
;
@ApiModelProperty
(
"报名信息 0:没有 1:已报名"
)
private
Integer
bmInfo
;
@ApiModelProperty
(
"审批状态 0:待审批 1:审批通过 2:审批失败"
)
private
Integer
spStatus
;
@ApiModelProperty
(
"action"
)
private
String
action
;
@ApiModelProperty
(
"报名信息"
)
private
ResBmInfoResp
resBmInfoResp
;
/*@ApiModelProperty("会员身分")
private Integer memberLevel;
@ApiModelProperty("1:不上浮包含 2:上浮包含等级")
private Integer rose;*/
@ApiModelProperty
(
"最终价格"
)
private
String
finalPrice
;
@ApiModelProperty
(
"最终积分"
)
private
String
finalScore
;
@ApiModelProperty
(
"最终身份"
)
private
Integer
finalLevel
;
@ApiModelProperty
(
"最终付费模式 1:免费 2:积分 3:现金"
)
private
Integer
finalChargeMode
;
@ApiModelProperty
(
"需不需要支付 2:不需要 1:需要"
)
private
Integer
isNeedBuy
;
@ApiModelProperty
(
"有没有支付 2:已购买 1:未购买"
)
private
Integer
isBuy
;
@ApiModelProperty
(
"是否正在参与拼团活动 0不参加 1参加"
)
private
Integer
isJoinGroupBuy
=
0
;
@ApiModelProperty
(
"拼团活动配置信息"
)
private
GroupBuyConfig
groupBuyConfig
;
}
community-api/src/main/java/com/tanpu/community/api/beans/vo/feign/pay/ResBmInfoResp.java
0 → 100644
View file @
690f911e
package
com
.
tanpu
.
community
.
api
.
beans
.
vo
.
feign
.
pay
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @author: zhoupeng
* <p>
* =========================================
* =========================================
* ======== ========
* ======= ========== ======= =======
* ====== ===== == ==== ======
* ===== ===== == === =====
* ===== ===== == === =====
* ===== ===== == === =====
* ====== ========== == ======
* ======= =======
* =========================================
* =========================================
* <p>
* @email: zhoupeng_08@163.com
*/
@Data
@ApiModel
(
"报名信息"
)
public
class
ResBmInfoResp
{
private
String
id
;
private
String
resId
;
private
Integer
resType
;
private
String
operUser
;
private
String
bmRemark
;
private
String
wechat
;
private
String
wechatQrCode
;
private
String
title
;
private
String
bmRemind
;
private
String
bmNotice
;
private
String
templateId
;
private
Date
createTime
;
private
String
createBy
;
private
Date
updateTime
;
private
String
updateBy
;
private
Integer
deleteTag
;
}
community-api/src/main/java/com/tanpu/community/api/beans/vo/feign/pay/Time3Type.java
0 → 100644
View file @
690f911e
package
com
.
tanpu
.
community
.
api
.
beans
.
vo
.
feign
.
pay
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author: zhoupeng
* <p>
* =========================================
* =========================================
* ======== ========
* ======= ========== ======= =======
* ====== ===== == ==== ======
* ===== ===== == === =====
* ===== ===== == === =====
* ===== ===== == === =====
* ====== ========== == ======
* ======= =======
* =========================================
* =========================================
* <p>
* @email: zhoupeng_08@163.com
*/
@ApiModel
(
"时间对象"
)
@Data
public
class
Time3Type
{
@ApiModelProperty
(
"开始时间"
)
private
Long
begin
;
@ApiModelProperty
(
"结束时间"
)
private
Long
end
;
}
community-api/src/main/java/com/tanpu/community/api/enums/RelTypeEnum.java
View file @
690f911e
...
...
@@ -42,6 +42,9 @@ public enum RelTypeEnum {
*/
TEXT
(
8
,
"文本"
),
SINGLE_IMG
(
9
,
"单图"
),
MULTIPLE_IMAGE
(
10
,
"多图"
),
FUND
(
88
,
"产品"
),
PINGLUN
(
99
,
"评论"
),
...
...
community-service/src/main/java/com/tanpu/community/controller/ThemeController.java
View file @
690f911e
...
...
@@ -2,7 +2,6 @@ package com.tanpu.community.controller;
import
com.tanpu.common.api.CommonResp
;
import
com.tanpu.community.api.beans.qo.MainTextQo
;
import
com.tanpu.community.api.beans.qo.ThemeQo
;
import
com.tanpu.community.api.beans.req.theme.CreateThemeReq
;
import
com.tanpu.community.api.beans.req.theme.ForwardThemeReq
;
...
...
@@ -60,10 +59,10 @@ public class ThemeController {
@ApiOperation
(
"主题正文"
)
@GetMapping
(
value
=
"/detail"
)
@ResponseBody
public
CommonResp
<
MainText
Qo
>
getThemeMainText
(
@RequestParam
String
topicId
)
{
public
CommonResp
<
Theme
Qo
>
getThemeMainText
(
@RequestParam
String
topicId
)
{
String
userId
=
"liujm"
;
MainTextQo
mainTextQo
=
themeManager
.
getMainText
(
topicId
,
userId
);
return
CommonResp
.
success
(
mainText
Qo
);
ThemeQo
themeQo
=
themeManager
.
getDetail
(
topicId
,
userId
);
return
CommonResp
.
success
(
theme
Qo
);
}
@ApiOperation
(
"转发主题"
)
...
...
community-service/src/main/java/com/tanpu/community/feign/course/FeignBackClientForCourse.java
View file @
690f911e
...
...
@@ -2,6 +2,7 @@ package com.tanpu.community.feign.course;
import
com.tanpu.common.api.CommonResp
;
import
com.tanpu.community.api.beans.vo.feign.CourseDetailExt
;
import
com.tanpu.community.api.beans.vo.feign.CoursePackageDetail
;
import
feign.hystrix.FallbackFactory
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
...
...
@@ -18,6 +19,13 @@ public class FeignBackClientForCourse implements FallbackFactory<FeignClientForC
log
.
error
(
"FeignClientForCourse.getCourseIdDetailInfo-查询课程id:{},package:{}"
,
id
,
packageId
);
return
null
;
}
@Override
public
CommonResp
<
CoursePackageDetail
>
getCoursePackageDetailInfo
(
String
id
)
{
log
.
error
(
"请求信息"
,
throwable
);
log
.
error
(
"FeignClientForCourse.getCoursePackageDetailInfo-查询课程包id:{}"
,
id
);
return
null
;
}
};
}
}
community-service/src/main/java/com/tanpu/community/feign/course/FeignClientForCourse.java
View file @
690f911e
...
...
@@ -2,6 +2,7 @@ package com.tanpu.community.feign.course;
import
com.tanpu.common.api.CommonResp
;
import
com.tanpu.community.api.beans.vo.feign.CourseDetailExt
;
import
com.tanpu.community.api.beans.vo.feign.CoursePackageDetail
;
import
com.tanpu.community.feign.product.FeignBackClientForProducts
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
...
...
@@ -20,4 +21,8 @@ public interface FeignClientForCourse {
CommonResp
<
CourseDetailExt
>
getCourseIdDetailInfo
(
@ApiParam
(
"课程详情id"
)
@RequestParam
(
"id"
)
String
id
,
@ApiParam
(
"课程包id"
)
@RequestParam
(
"packageId"
)
String
packageId
);
@ApiOperation
(
"详情页信息"
)
@GetMapping
(
"/course/detail"
)
CommonResp
<
CoursePackageDetail
>
getCoursePackageDetailInfo
(
@ApiParam
(
value
=
"课程包id"
,
required
=
true
)
@RequestParam
(
"id"
)
String
id
);
}
community-service/src/main/java/com/tanpu/community/manager/ThemeManager.java
View file @
690f911e
This diff is collapsed.
Click to expand it.
community-service/src/main/java/com/tanpu/community/util/ConvertUtil.java
View file @
690f911e
package
com
.
tanpu
.
community
.
util
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.tanpu.common.util.JsonUtil
;
import
com.tanpu.community.api.beans.TopicDO
;
import
com.tanpu.community.api.beans.qo.*
;
import
com.tanpu.community.api.beans.req.theme.CreateThemeReq
;
...
...
@@ -15,9 +17,11 @@ import java.util.stream.Collectors;
public
class
ConvertUtil
{
public
static
ThemeQo
themeEntityTo
DTO
(
ThemeEntity
themeEntity
)
{
public
static
ThemeQo
themeEntityTo
Qo
(
ThemeEntity
themeEntity
)
{
ThemeQo
themeQO
=
new
ThemeQo
();
BeanUtils
.
copyProperties
(
themeEntity
,
themeQO
);
List
<
ThemeContentQo
>
themeContentQos
=
JsonUtil
.
toBean
(
themeEntity
.
getContent
(),
new
TypeReference
<
List
<
ThemeContentQo
>>()
{});
themeQO
.
setContent
(
themeContentQos
);
return
themeQO
;
}
...
...
@@ -29,7 +33,7 @@ public class ConvertUtil {
}
public
static
List
<
ThemeQo
>
themeEntitiesToDTOs
(
List
<
ThemeEntity
>
themeEntities
)
{
return
themeEntities
.
stream
().
map
(
ConvertUtil:
:
themeEntityTo
DTO
).
collect
(
Collectors
.
toList
());
return
themeEntities
.
stream
().
map
(
ConvertUtil:
:
themeEntityTo
Qo
).
collect
(
Collectors
.
toList
());
}
...
...
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