Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
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
徐少华
midjourney-proxy
Commits
b4a3cbe7
Commit
b4a3cbe7
authored
Aug 26, 2020
by
吴博
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixbug/fixNews' into 'master'
bug:[none] fixNews See merge request rays/pcloud-book!915
parents
433160dc
74b37981
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
1 deletions
+45
-1
AppletNewsBiz.java
...c/main/java/com/pcloud/book/applet/biz/AppletNewsBiz.java
+1
-0
AppletNewsBizImpl.java
...va/com/pcloud/book/applet/biz/impl/AppletNewsBizImpl.java
+43
-0
AppletHomeFacade.java
.../java/com/pcloud/book/applet/facade/AppletHomeFacade.java
+1
-1
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/AppletNewsBiz.java
View file @
b4a3cbe7
...
...
@@ -285,4 +285,5 @@ public interface AppletNewsBiz {
*/
void
updateCardShowState
(
AppletNews
appletNews
);
AppletNewsDTO
getNewsById4Applet
(
Long
newsId
);
}
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/impl/AppletNewsBizImpl.java
View file @
b4a3cbe7
...
...
@@ -62,6 +62,7 @@ import com.pcloud.common.page.PageParam;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.cache.redis.JedisClusterUtils
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.readercenter.common.enums.YesOrNoNumEnum
;
import
com.pcloud.readercenter.wechat.entity.WechatUser
;
import
org.apache.commons.collections.MapUtils
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -1178,4 +1179,46 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
appletNewsDao
.
updateCardShowState
(
appletNews
);
JedisClusterUtils
.
del
(
AppletConstants
.
HOME_NEWS_LIST
);
}
@Override
public
AppletNewsDTO
getNewsById4Applet
(
Long
id
)
{
AppletNews
appletNews
=
appletNewsDao
.
getById
(
id
);
AppletNewsDTO
appletNewsDTO
=
new
AppletNewsDTO
();
if
(
null
!=
appletNews
){
BeanUtils
.
copyProperties
(
appletNews
,
appletNewsDTO
);
}
// this.fillAppletNewsServe(appletNewsDTO);
this
.
fillBrowseCount
(
Lists
.
newArrayList
(
appletNewsDTO
));
fillLabel
(
Arrays
.
asList
(
appletNewsDTO
));
//填充类别集合
fillCategory
(
Arrays
.
asList
(
appletNewsDTO
));
//填充第三方资源
fillThirdResources4Applet
(
Arrays
.
asList
(
appletNewsDTO
));
fillBusinessCard
(
appletNewsDTO
);
// 填充城市信息
if
(
StrUtil
.
isNotBlank
(
appletNews
.
getCityCode
()))
{
appletNewsDTO
.
setCity
(
regionMapMapper
.
getCitysByCode
(
appletNews
.
getCityCode
()));
}
return
appletNewsDTO
;
}
private
void
fillThirdResources4Applet
(
List
<
AppletNewsDTO
>
appletNewsDTOList
)
{
if
(
ListUtils
.
isEmpty
(
appletNewsDTOList
))
{
return
;
}
for
(
AppletNewsDTO
newsDTO
:
appletNewsDTOList
)
{
Long
newsId
=
newsDTO
.
getId
();
if
(
null
!=
newsDTO
.
getShowState
()
&&
newsDTO
.
getShowState
())
{
List
<
AppletThirdResources
>
thirdResourcesList
=
thirdResourcesDao
.
getThirdResourcesByNewsId
(
newsId
);
if
(
ListUtils
.
isEmpty
(
thirdResourcesList
))
{
continue
;
}
newsDTO
.
setThirdResourcesRelations
(
thirdResourcesList
);
}
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/applet/facade/AppletHomeFacade.java
View file @
b4a3cbe7
...
...
@@ -631,7 +631,7 @@ public class AppletHomeFacade {
if
(
null
==
newsId
){
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"缺少参数"
);
}
return
new
ResponseDto
<>(
appletNewsBiz
.
getNewsById
(
newsId
));
return
new
ResponseDto
<>(
appletNewsBiz
.
getNewsById
4Applet
(
newsId
));
}
@ApiOperation
(
"查图书详情-出版作者分类书名"
)
...
...
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