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
e28e2ca3
Commit
e28e2ca3
authored
Aug 11, 2020
by
吴博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:[1003350] 小程序首页栏目资讯自更新
parent
9f817115
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
AppletNewsPoolBizImpl.java
...om/pcloud/book/applet/biz/impl/AppletNewsPoolBizImpl.java
+13
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/impl/AppletNewsPoolBizImpl.java
View file @
e28e2ca3
...
@@ -4,6 +4,7 @@ import cn.hutool.core.util.PageUtil;
...
@@ -4,6 +4,7 @@ import cn.hutool.core.util.PageUtil;
import
com.alibaba.druid.sql.PagerUtils
;
import
com.alibaba.druid.sql.PagerUtils
;
import
com.pcloud.book.applet.biz.AppletNewsBiz
;
import
com.pcloud.book.applet.biz.AppletNewsBiz
;
import
com.pcloud.book.applet.biz.AppletNewsPoolBiz
;
import
com.pcloud.book.applet.biz.AppletNewsPoolBiz
;
import
com.pcloud.book.applet.dao.AppletNewsDao
;
import
com.pcloud.book.applet.dao.AppletNewsPoolDAO
;
import
com.pcloud.book.applet.dao.AppletNewsPoolDAO
;
import
com.pcloud.book.applet.dto.AppletNewsPoolDTO
;
import
com.pcloud.book.applet.dto.AppletNewsPoolDTO
;
import
com.pcloud.book.applet.entity.AppletNews
;
import
com.pcloud.book.applet.entity.AppletNews
;
...
@@ -41,6 +42,8 @@ public class AppletNewsPoolBizImpl implements AppletNewsPoolBiz {
...
@@ -41,6 +42,8 @@ public class AppletNewsPoolBizImpl implements AppletNewsPoolBiz {
private
AppletNewsBiz
appletNewsBiz
;
private
AppletNewsBiz
appletNewsBiz
;
@Autowired
@Autowired
private
RightsSettingBiz
rightsSettingBiz
;
private
RightsSettingBiz
rightsSettingBiz
;
@Autowired
private
AppletNewsDao
appletNewsDao
;
@Override
@Override
@ParamLog
(
"根据id获取详情"
)
@ParamLog
(
"根据id获取详情"
)
...
@@ -90,6 +93,7 @@ public class AppletNewsPoolBizImpl implements AppletNewsPoolBiz {
...
@@ -90,6 +93,7 @@ public class AppletNewsPoolBizImpl implements AppletNewsPoolBiz {
if
(
MapUtils
.
isEmpty
(
appletNewsPoolMap
))
{
if
(
MapUtils
.
isEmpty
(
appletNewsPoolMap
))
{
return
;
return
;
}
}
addResource
(
appletNewsPoolDTO
);
appletNewsPoolIds
.
stream
().
forEach
(
id
->
{
appletNewsPoolIds
.
stream
().
forEach
(
id
->
{
AppletNews
appletNews
=
new
AppletNews
();
AppletNews
appletNews
=
new
AppletNews
();
BeanUtils
.
copyProperties
(
appletNewsPoolDTO
,
appletNews
);
BeanUtils
.
copyProperties
(
appletNewsPoolDTO
,
appletNews
);
...
@@ -112,6 +116,15 @@ public class AppletNewsPoolBizImpl implements AppletNewsPoolBiz {
...
@@ -112,6 +116,15 @@ public class AppletNewsPoolBizImpl implements AppletNewsPoolBiz {
}
}
}
}
private
void
addResource
(
AppletNewsPoolDTO
appletNewsPoolDTO
)
{
String
resource
=
appletNewsPoolDTO
.
getSource
();
Boolean
exist
=
appletNewsDao
.
newsSourceExist
(
resource
);
if
(!
exist
)
{
appletNewsDao
.
insertSource
(
resource
);
}
return
;
}
private
void
importCheck
(
AppletNewsPoolDTO
appletNewsPoolDTO
)
{
private
void
importCheck
(
AppletNewsPoolDTO
appletNewsPoolDTO
)
{
if
(
null
==
appletNewsPoolDTO
)
{
if
(
null
==
appletNewsPoolDTO
)
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"导入资讯不能为空"
);
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"导入资讯不能为空"
);
...
...
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