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
3453c70f
Commit
3453c70f
authored
Jul 27, 2021
by
张辰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://47.100.44.39:10001/tp-backend/tanpu-community
into dev
parents
b821c2f1
59db1312
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
2 deletions
+46
-2
BatchFeignCallService.java
...va/com/tanpu/community/service/BatchFeignCallService.java
+12
-0
RecommendService.java
...in/java/com/tanpu/community/service/RecommendService.java
+33
-1
application-dev.yml
community-service/src/main/resources/application-dev.yml
+1
-1
No files found.
community-service/src/main/java/com/tanpu/community/service/BatchFeignCallService.java
View file @
3453c70f
...
...
@@ -16,6 +16,7 @@ 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
;
...
...
@@ -392,6 +393,17 @@ public class BatchFeignCallService {
themeQo
.
setUserInvestorType
(
userInfo
.
getUserInvestorType
());
themeQo
.
setBelongUserOrgId
(
userInfo
.
getBelongUserOrgId
());
themeQo
.
setBelongUserOrgName
(
userInfo
.
getBelongUserOrgName
());
//工作室相关
themeQo
.
setWorkshopName
(
userInfo
.
getWorkshopName
());
themeQo
.
setWorkshopStatus
(
userInfo
.
getWorkshopStatus
());
themeQo
.
setWorkshopIntroduction
(
userInfo
.
getWorkshopIntroduction
());
//首席投顾
if
(
UserLevelEnum
.
USER_CHIEF_FINANCIAL_ADVISER
.
getCode
()
==
userInfo
.
getLevelGrade
()
&&
userInfo
.
getUserInfoNewChief
()
!=
null
)
{
themeQo
.
setNickName
(
userInfo
.
getUserInfoNewChief
().
getUserName
());
themeQo
.
setUserImg
(
userInfo
.
getUserInfoNewChief
().
getHeadImageUrl
());
themeQo
.
setUserIntroduction
(
userInfo
.
getUserInfoNewChief
().
getPersonalProfile
());
}
}
if
(
themeQo
.
getContent
()
==
null
)
{
continue
;
...
...
community-service/src/main/java/com/tanpu/community/service/RecommendService.java
View file @
3453c70f
...
...
@@ -127,7 +127,39 @@ public class RecommendService {
}
//逐个插入
private
List
<
String
>
mergeList
(
List
<
String
>
hotThemeIds
,
List
<
String
>
newThemeIds
,
List
<
String
>
recThemeIds
)
{
ArrayList
<
String
>
result
=
new
ArrayList
<>();
Integer
hotIdx
=
0
;
Integer
newIdx
=
0
;
Integer
recIdx
=
0
;
while
(
hotThemeIds
.
size
()
>
hotIdx
||
newThemeIds
.
size
()
>
newIdx
||
recThemeIds
.
size
()
>
recIdx
)
{
int
hotTimes
=
hotRatio
;
int
newTimes
=
newRatio
;
int
recTimes
=
pythonRatio
;
String
id
;
while
(
hotTimes
>
0
&&
hotThemeIds
.
size
()
>
hotIdx
)
{
id
=
hotThemeIds
.
get
(
hotIdx
);
result
.
add
(
id
);
hotIdx
++;
hotTimes
--;
}
while
(
newTimes
>
0
&&
newThemeIds
.
size
()
>
newIdx
)
{
id
=
newThemeIds
.
get
(
newIdx
);
result
.
add
(
id
);
newIdx
++;
newTimes
--;
}
while
(
recTimes
>
0
&&
recThemeIds
.
size
()
>
recIdx
)
{
id
=
recThemeIds
.
get
(
recIdx
);
result
.
add
(
id
);
recIdx
++;
recTimes
--;
}
}
return
result
;
}
private
void
getResultList
(
List
<
String
>
hotThemeIds
,
Integer
hotTag
,
List
<
String
>
newThemeIds
,
Integer
newTag
,
List
<
String
>
recThemeIds
,
Integer
recTag
,
Set
<
String
>
returnedIds
,
List
<
String
>
result
,
Integer
pageSize
,
String
userId
)
{
if
(
hotThemeIds
.
size
()
<=
hotTag
&&
newThemeIds
.
size
()
<=
newTag
&&
recThemeIds
.
size
()
<=
recTag
)
{
...
...
community-service/src/main/resources/application-dev.yml
View file @
3453c70f
apollo.bootstrap.enabled
:
fals
e
apollo.bootstrap.enabled
:
tru
e
#app.id: tanpu-community
#apollo:
...
...
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