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
df829e20
Commit
df829e20
authored
Feb 21, 2022
by
刘基明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
讨论区产品
parent
9b60af56
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
288 additions
and
115 deletions
+288
-115
TopicAttachment.java
...ava/com/tanpu/community/api/beans/qo/TopicAttachment.java
+4
-1
TopicAttachmentDetail.java
...m/tanpu/community/api/beans/qo/TopicAttachmentDetail.java
+3
-3
Net.java
...main/java/com/tanpu/community/api/beans/vo/feign/Net.java
+0
-38
ColumnVO.java
.../tanpu/community/api/beans/vo/feign/product/ColumnVO.java
+18
-0
FundCompanyVO.java
...u/community/api/beans/vo/feign/product/FundCompanyVO.java
+2
-1
LabelValVo.java
...anpu/community/api/beans/vo/feign/product/LabelValVo.java
+20
-0
Net.java
...a/com/tanpu/community/api/beans/vo/feign/product/Net.java
+1
-1
ProductInfoVO.java
...u/community/api/beans/vo/feign/product/ProductInfoVO.java
+168
-63
Type.java
.../com/tanpu/community/api/beans/vo/feign/product/Type.java
+49
-0
FeignBackClientForProducts.java
...u/community/feign/product/FeignBackClientForProducts.java
+1
-1
FeignClientForProducts.java
...tanpu/community/feign/product/FeignClientForProducts.java
+3
-3
FeignForPublicFund.java
...com/tanpu/community/feign/product/FeignForPublicFund.java
+1
-1
FeignService.java
...c/main/java/com/tanpu/community/service/FeignService.java
+1
-1
TopicService.java
...c/main/java/com/tanpu/community/service/TopicService.java
+15
-2
application-test.yml
community-service/src/main/resources/application-test.yml
+2
-0
No files found.
community-api/src/main/java/com/tanpu/community/api/beans/qo/TopicAttachment.java
View file @
df829e20
...
...
@@ -14,9 +14,12 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
public
class
TopicAttachment
{
@ApiModelProperty
(
value
=
" 88:产品 300
:课程包 323: 线下活动 未定:
资管人"
)
@ApiModelProperty
(
value
=
" 88:产品 300
:课程包 323:线下活动 90:
资管人"
)
private
String
type
;
@ApiModelProperty
(
value
=
"type=88时 ,0 公募,1 私募,2 白名单,3 私有"
)
private
String
subType
;
@ApiModelProperty
(
value
=
"对象详情"
)
private
TopicAttachmentDetail
detail
;
...
...
community-api/src/main/java/com/tanpu/community/api/beans/qo/TopicAttachmentDetail.java
View file @
df829e20
package
com
.
tanpu
.
community
.
api
.
beans
.
qo
;
import
com.tanpu.community.api.beans.resp.CoursePackageSimpleResp
;
import
com.tanpu.community.api.beans.resp.FundCompanyVO
;
import
com.tanpu.community.api.beans.vo.feign.activity.OfflineActivitySimpleResp
;
import
com.tanpu.community.api.beans.vo.feign.product.FundInfoBaseResp
;
import
com.tanpu.community.api.beans.vo.feign.product.FundCompanyVO
;
import
com.tanpu.community.api.beans.vo.feign.product.ProductInfoVO
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
...
...
@@ -19,7 +19,7 @@ import lombok.NoArgsConstructor;
public
class
TopicAttachmentDetail
{
@ApiModelProperty
(
"产品信息"
)
private
FundInfoBaseResp
product
;
private
ProductInfoVO
fund
;
@ApiModelProperty
(
"新版课程"
)
private
CoursePackageSimpleResp
coursePackage
;
@ApiModelProperty
(
"线下活动"
)
...
...
community-api/src/main/java/com/tanpu/community/api/beans/vo/feign/Net.java
deleted
100644 → 0
View file @
9b60af56
package
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
;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel
(
"净值"
)
@Data
@Builder
@AllArgsConstructor
public
class
Net
{
@ApiModelProperty
(
"基金ID"
)
private
String
fundId
;
@ApiModelProperty
(
"净值日期 返回时间戳"
)
private
Long
netDate
;
@ApiModelProperty
(
"单位净值"
)
private
String
netValue
;
@ApiModelProperty
(
"累计净值(分红再投)"
)
private
String
cumulativeNav
;
public
Net
()
{
}
public
Net
(
Long
netDate
,
String
netValue
,
String
cumulativeNav
)
{
this
.
netDate
=
netDate
;
this
.
netValue
=
netValue
;
this
.
cumulativeNav
=
cumulativeNav
;
}
}
community-api/src/main/java/com/tanpu/community/api/beans/vo/feign/product/ColumnVO.java
0 → 100644
View file @
df829e20
package
com
.
tanpu
.
community
.
api
.
beans
.
vo
.
feign
.
product
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@ApiModel
(
"栏目信息"
)
@Data
public
class
ColumnVO
{
@ApiModelProperty
(
"栏目id"
)
private
String
id
;
@ApiModelProperty
(
"名称"
)
private
String
title
;
}
community-api/src/main/java/com/tanpu/community/api/beans/
resp
/FundCompanyVO.java
→
community-api/src/main/java/com/tanpu/community/api/beans/
vo/feign/product
/FundCompanyVO.java
View file @
df829e20
package
com
.
tanpu
.
community
.
api
.
beans
.
resp
;
package
com
.
tanpu
.
community
.
api
.
beans
.
vo
.
feign
.
product
;
import
com.tanpu.community.api.beans.vo.feign.product.Net
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
community-api/src/main/java/com/tanpu/community/api/beans/vo/feign/product/LabelValVo.java
0 → 100644
View file @
df829e20
package
com
.
tanpu
.
community
.
api
.
beans
.
vo
.
feign
.
product
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author: zyh
* @date: 2021-08-02 1:58 下午
* @description: 通用组装类
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public
class
LabelValVo
{
private
String
label
;
private
String
value
;
}
community-api/src/main/java/com/tanpu/community/api/beans/
resp
/Net.java
→
community-api/src/main/java/com/tanpu/community/api/beans/
vo/feign/product
/Net.java
View file @
df829e20
package
com
.
tanpu
.
community
.
api
.
beans
.
resp
;
package
com
.
tanpu
.
community
.
api
.
beans
.
vo
.
feign
.
product
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
community-api/src/main/java/com/tanpu/community/api/beans/vo/feign/product/ProductInfoVO.java
View file @
df829e20
This diff is collapsed.
Click to expand it.
community-api/src/main/java/com/tanpu/community/api/beans/vo/feign/product/Type.java
0 → 100644
View file @
df829e20
package
com
.
tanpu
.
community
.
api
.
beans
.
vo
.
feign
.
product
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.experimental.SuperBuilder
;
@ApiModel
(
"类型"
)
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public
class
Type
{
@ApiModelProperty
(
"类型id"
)
private
String
id
;
@ApiModelProperty
(
"类型value"
)
private
String
value
;
@ApiModelProperty
(
value
=
"标签名称"
,
notes
=
"获客线索用"
)
private
String
labelName
;
@ApiModelProperty
(
"资源数量"
)
private
Integer
resourceNum
;
@ApiModelProperty
(
"扩展字段"
)
private
String
ext
;
@ApiModelProperty
(
"产品名称"
)
private
String
productName
;
@ApiModelProperty
(
"基金代码"
)
private
String
fundCode
;
@ApiModelProperty
(
"基金类型"
)
private
Integer
fundType
;
@ApiModelProperty
(
"近一年收益"
)
private
String
ret1y
;
@ApiModelProperty
(
"最新净值"
)
private
String
net
;
@ApiModelProperty
(
"最新净值日期"
)
private
String
netDate
;
}
community-service/src/main/java/com/tanpu/community/feign/product/FeignBackClientForProducts.java
View file @
df829e20
package
com
.
tanpu
.
community
.
feign
.
product
;
import
com.tanpu.common.api.CommonResp
;
import
com.tanpu.community.api.beans.
resp
.FundCompanyVO
;
import
com.tanpu.community.api.beans.
vo.feign.product
.FundCompanyVO
;
import
com.tanpu.community.api.beans.vo.feign.fund.FundCompanySimpleVO
;
import
com.tanpu.community.api.beans.vo.feign.product.ProductInfoVO
;
import
feign.hystrix.FallbackFactory
;
...
...
community-service/src/main/java/com/tanpu/community/feign/product/FeignClientForProducts.java
View file @
df829e20
package
com
.
tanpu
.
community
.
feign
.
product
;
import
com.tanpu.common.api.CommonResp
;
import
com.tanpu.community.api.beans.
resp
.FundCompanyVO
;
import
com.tanpu.community.api.beans.
vo.feign.product
.FundCompanyVO
;
import
com.tanpu.community.api.beans.vo.feign.fund.FundCompanySimpleVO
;
import
com.tanpu.community.api.beans.vo.feign.product.ProductInfoVO
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -16,12 +16,12 @@ import java.util.List;
//@FeignClient(value = "service-product", contextId = "product", fallbackFactory = FeignBackClientForProducts.class, url = "http://172.20.0.68:8194/product")
public
interface
FeignClientForProducts
{
@ApiOperation
(
"获取产品详情"
)
@ApiOperation
(
"获取
私募
产品详情"
)
@GetMapping
(
"/product/detail"
)
CommonResp
<
ProductInfoVO
>
getProductDetailInfo
(
@ApiParam
(
"产品id"
)
@RequestParam
(
"id"
)
String
id
);
@ApiOperation
(
"
根据id查询列表
"
)
@ApiOperation
(
"
批量获取私募产品详情
"
)
@GetMapping
(
"/getProductInfoByIds"
)
CommonResp
<
List
<
ProductInfoVO
>>
getProductInfoByIds
(
@ApiParam
(
"产品id"
)
@RequestParam
(
"fundIds"
)
List
<
String
>
fundIds
);
...
...
community-service/src/main/java/com/tanpu/community/feign/product/FeignForPublicFund.java
View file @
df829e20
...
...
@@ -15,7 +15,7 @@ import java.util.List;
//@FeignClient(value = "service-fundpublic",path = "/fundpublic")
public
interface
FeignForPublicFund
{
@ApiOperation
(
"获取产品详情"
)
@ApiOperation
(
"获取
公募
产品详情"
)
@GetMapping
(
"/product/list"
)
CommonResp
<
List
<
ProductInfoVO
>>
getProductList
(
@ApiParam
(
"产品id"
)
@RequestParam
(
"ids"
)
List
<
String
>
ids
);
...
...
community-service/src/main/java/com/tanpu/community/service/FeignService.java
View file @
df829e20
...
...
@@ -3,11 +3,11 @@ package com.tanpu.community.service;
import
com.tanpu.common.api.CommonResp
;
import
com.tanpu.common.exception.BizException
;
import
com.tanpu.community.api.beans.resp.CoursePackageSimpleResp
;
import
com.tanpu.community.api.beans.resp.FundCompanyVO
;
import
com.tanpu.community.api.beans.vo.feign.activity.OfflineActivitySimpleResp
;
import
com.tanpu.community.api.beans.vo.feign.course.CourseSimpleResp
;
import
com.tanpu.community.api.beans.vo.feign.course.ShortVideoBaseInfoResp
;
import
com.tanpu.community.api.beans.vo.feign.fatools.UserInfoResp
;
import
com.tanpu.community.api.beans.vo.feign.product.FundCompanyVO
;
import
com.tanpu.community.api.beans.vo.feign.product.ProductInfoVO
;
import
com.tanpu.community.api.beans.vo.feign.zhibo.ZhiboListResp
;
import
com.tanpu.community.cache.LocalCache
;
...
...
community-service/src/main/java/com/tanpu/community/service/TopicService.java
View file @
df829e20
...
...
@@ -2,6 +2,7 @@ package com.tanpu.community.service;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.tanpu.biz.common.enums.RelTypeEnum
;
import
com.tanpu.common.enums.fund.ProductTypeEnum
;
import
com.tanpu.community.api.beans.qo.ThemeQo
;
import
com.tanpu.community.api.beans.qo.TopicAttachment
;
import
com.tanpu.community.api.beans.qo.TopicAttachmentDetail
;
...
...
@@ -9,9 +10,10 @@ import com.tanpu.community.api.beans.qo.TopicFollowQo;
import
com.tanpu.community.api.beans.qo.TopicPageDetailQo
;
import
com.tanpu.community.api.beans.qo.TopicRankQo
;
import
com.tanpu.community.api.beans.resp.CoursePackageSimpleResp
;
import
com.tanpu.community.api.beans.
resp
.FundCompanyVO
;
import
com.tanpu.community.api.beans.
vo.feign.product
.FundCompanyVO
;
import
com.tanpu.community.api.beans.vo.feign.activity.OfflineActivitySimpleResp
;
import
com.tanpu.community.api.beans.vo.feign.fatools.UserInfoResp
;
import
com.tanpu.community.api.beans.vo.feign.product.ProductInfoVO
;
import
com.tanpu.community.api.enums.DeleteTagEnum
;
import
com.tanpu.community.api.enums.StatusEnum
;
import
com.tanpu.community.api.enums.TopicSpecialPermissionEnum
;
...
...
@@ -32,6 +34,7 @@ import org.springframework.stereotype.Service;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -184,8 +187,18 @@ public class TopicService {
for
(
TopicSubjectEntity
entity
:
topicSubjectEntities
)
{
if
(
RelTypeEnum
.
FUND
.
type
.
equals
(
entity
.
getSubjectType
().
toString
()))
{
List
<
ProductInfoVO
>
fund
=
Collections
.
emptyList
();
// 基金
TopicAttachment
attach
=
TopicAttachment
.
builder
().
type
(
RelTypeEnum
.
FUND
.
type
).
detail
(
null
).
build
();
if
(
entity
.
getSubjectSubType
()
==
ProductTypeEnum
.
PRIVATE
.
type
||
entity
.
getSubjectSubType
()
==
ProductTypeEnum
.
TAMP
.
type
)
{
fund
=
feignService
.
getProductInfoByIds
(
Collections
.
singletonList
(
entity
.
getSubjectId
()));
}
else
if
(
entity
.
getSubjectSubType
()
==
ProductTypeEnum
.
PUBLIC
.
type
)
{
fund
=
feignService
.
getPublicFundList
(
Collections
.
singletonList
(
entity
.
getSubjectId
()));
}
else
{
fund
=
Arrays
.
asList
(
new
ProductInfoVO
());
}
TopicAttachment
attach
=
TopicAttachment
.
builder
().
type
(
RelTypeEnum
.
FUND_COMPANY
.
type
)
.
subType
(
String
.
valueOf
(
entity
.
getSubjectSubType
()))
.
detail
(
TopicAttachmentDetail
.
builder
().
fund
(
fund
.
get
(
0
)).
build
()).
build
();
attachements
.
add
(
attach
);
}
else
if
(
RelTypeEnum
.
FUND_COMPANY
.
type
.
equals
(
entity
.
getSubjectType
().
toString
()))
{
// 资管人
...
...
community-service/src/main/resources/application-test.yml
View file @
df829e20
...
...
@@ -124,6 +124,8 @@ tanpu:
svc
:
https://testtamper.tanpuyun.com
diagnose
:
svc
:
https://testtamper.tanpuyun.com
fundpublic
:
svc
:
https://testtamper.tanpuyun.com
#打印SQL语句
logging
:
...
...
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