Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
115cf55e
Commit
115cf55e
authored
Aug 21, 2023
by
songyinghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 互动记录
parent
4afd56e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
InteractRecordController.java
...nage/web/controller/content/InteractRecordController.java
+14
-10
ContentMaterialAdaptor.java
...eb/controller/content/adaptor/ContentMaterialAdaptor.java
+3
-0
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/InteractRecordController.java
View file @
115cf55e
...
...
@@ -9,6 +9,7 @@ import com.gic.content.api.dto.material.ContentMaterialBaseDTO;
import
com.gic.haoban.manage.api.dto.qdto.content.InteractRecordQDTO
;
import
com.gic.haoban.manage.api.enums.content.InteractRecordExtendInfoDTO
;
import
com.gic.haoban.manage.api.enums.content.InteractRecordInfoDTO
;
import
com.gic.haoban.manage.api.enums.content.ShareBizType
;
import
com.gic.haoban.manage.api.service.content.InteractRecordApiService
;
import
com.gic.haoban.manage.web.controller.content.adaptor.ContentMaterialAdaptor
;
import
com.gic.haoban.manage.web.qo.content.InteractRecordQO
;
...
...
@@ -59,6 +60,7 @@ public class InteractRecordController {
List
<
Long
>
materialIds
=
serviceResponse
.
getResult
()
.
getResult
()
.
stream
()
.
filter
(
item
->
ShareBizType
.
MATERIAL
.
getCode
().
equals
(
item
.
getBizType
()))
.
map
(
item
->
Long
.
parseLong
(
item
.
getBizId
()))
.
distinct
()
.
collect
(
Collectors
.
toList
());
...
...
@@ -74,17 +76,19 @@ public class InteractRecordController {
InteractRecordExtendInfoVO
extendInfoVO
=
EntityUtil
.
changeEntityByJSON
(
InteractRecordExtendInfoVO
.
class
,
item
.
getExtendInfo
());
interactRecordVO
.
setExtendInfo
(
extendInfoVO
);
}
ContentMaterialBaseDTO
materialBaseInfo
=
materialBaseMap
.
get
(
Long
.
parseLong
(
item
.
getBizId
()));
if
(
materialBaseInfo
!=
null
)
{
ContentMaterialInfoVO
temp
=
new
ContentMaterialInfoVO
();
BeanUtils
.
copyProperties
(
materialBaseInfo
,
temp
);
if
(
StringUtils
.
isNotBlank
(
materialBaseInfo
.
getMaterialThumbnailImageUrls
()))
{
temp
.
setMaterialThumbnailImageUrls
(
StrSpliter
.
split
(
materialBaseInfo
.
getMaterialThumbnailImageUrls
(),
","
,
true
,
true
));
if
(
ShareBizType
.
MATERIAL
.
getCode
().
equals
(
item
.
getBizType
()))
{
ContentMaterialBaseDTO
materialBaseInfo
=
materialBaseMap
.
get
(
Long
.
parseLong
(
item
.
getBizId
()));
if
(
materialBaseInfo
!=
null
)
{
ContentMaterialInfoVO
temp
=
new
ContentMaterialInfoVO
();
BeanUtils
.
copyProperties
(
materialBaseInfo
,
temp
);
if
(
StringUtils
.
isNotBlank
(
materialBaseInfo
.
getMaterialThumbnailImageUrls
()))
{
temp
.
setMaterialThumbnailImageUrls
(
StrSpliter
.
split
(
materialBaseInfo
.
getMaterialThumbnailImageUrls
(),
","
,
true
,
true
));
}
if
(
StringUtils
.
isNotBlank
(
materialBaseInfo
.
getMaterialImageUrls
()))
{
temp
.
setMaterialImageUrls
(
StrSpliter
.
split
(
materialBaseInfo
.
getMaterialImageUrls
(),
","
,
true
,
true
));
}
interactRecordVO
.
setContentMaterialInfoVO
(
temp
);
}
if
(
StringUtils
.
isNotBlank
(
materialBaseInfo
.
getMaterialImageUrls
()))
{
temp
.
setMaterialImageUrls
(
StrSpliter
.
split
(
materialBaseInfo
.
getMaterialImageUrls
(),
","
,
true
,
true
));
}
interactRecordVO
.
setContentMaterialInfoVO
(
temp
);
}
return
interactRecordVO
;
})
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/adaptor/ContentMaterialAdaptor.java
View file @
115cf55e
...
...
@@ -35,6 +35,9 @@ public class ContentMaterialAdaptor {
* @return
*/
public
Map
<
Long
,
ContentMaterialBaseDTO
>
queryMaterialInfoMap
(
String
enterpriseId
,
List
<
Long
>
materialIds
)
{
if
(
CollectionUtils
.
isEmpty
(
materialIds
))
{
return
Collections
.
emptyMap
();
}
ServiceResponse
<
List
<
ContentMaterialBaseDTO
>>
serviceResponse
=
contentMaterialApiService
.
listMaterialIdByMaterialIdList
(
enterpriseId
,
materialIds
,
null
);
if
(!
serviceResponse
.
isSuccess
())
{
return
Collections
.
emptyMap
();
...
...
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