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
2513e73f
Commit
2513e73f
authored
Aug 14, 2020
by
pansy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug: [none] 资讯从资讯库中导入分类没有映射值
parent
ea2a4b66
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
4 deletions
+63
-4
AppletNewsBizImpl.java
...va/com/pcloud/book/applet/biz/impl/AppletNewsBizImpl.java
+14
-4
AppletNews.xml
...vice-book/src/main/resources/mapper/applet/AppletNews.xml
+49
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/impl/AppletNewsBizImpl.java
View file @
2513e73f
...
@@ -306,9 +306,9 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
...
@@ -306,9 +306,9 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
paramMap
.
put
(
"subjectLabelId"
,
subjectLabelId
);
paramMap
.
put
(
"subjectLabelId"
,
subjectLabelId
);
}
}
PageBeanNew
<
AppletNewsDTO
>
pageBeanNew
=
appletNewsDao
.
listPageNew
(
PageBeanNew
<
AppletNewsDTO
>
pageBeanNew
=
appletNewsDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
)
,
paramMap
,
"listAppletNews
"
);
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
,
"listAppletNews"
,
"listAppletNewsCount
"
);
if
(
null
==
pageBeanNew
||
ListUtils
.
isEmpty
(
pageBeanNew
.
getRecordList
()))
{
if
(
null
==
pageBeanNew
||
ListUtils
.
isEmpty
(
pageBeanNew
.
getRecordList
()))
{
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
0
,
new
ArrayList
<>());
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
0
,
new
ArrayList
<>());
}
}
fillLabel
(
pageBeanNew
.
getRecordList
());
fillLabel
(
pageBeanNew
.
getRecordList
());
setLabelContent
(
pageBeanNew
.
getRecordList
());
setLabelContent
(
pageBeanNew
.
getRecordList
());
...
@@ -556,7 +556,7 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
...
@@ -556,7 +556,7 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
Long
newsId
=
newsDTO
.
getId
();
Long
newsId
=
newsDTO
.
getId
();
List
<
AppletNewsCategoryDTO
>
newsCategoryDTOList
=
appletNewsCategoryDao
.
getByNewsId
(
newsId
);
List
<
AppletNewsCategoryDTO
>
newsCategoryDTOList
=
appletNewsCategoryDao
.
getByNewsId
(
newsId
);
if
(
ListUtils
.
isEmpty
(
newsCategoryDTOList
))
{
if
(
ListUtils
.
isEmpty
(
newsCategoryDTOList
))
{
return
;
continue
;
}
}
List
<
Long
>
firstClassifyIds
=
newsCategoryDTOList
.
stream
().
map
(
AppletNewsCategoryDTO:
:
getFirstClassify
)
List
<
Long
>
firstClassifyIds
=
newsCategoryDTOList
.
stream
().
map
(
AppletNewsCategoryDTO:
:
getFirstClassify
)
...
@@ -1003,7 +1003,17 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
...
@@ -1003,7 +1003,17 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
if
(
ListUtils
.
isEmpty
(
appletNewsList
))
{
if
(
ListUtils
.
isEmpty
(
appletNewsList
))
{
return
;
return
;
}
}
appletNewsDao
.
insert
(
appletNewsList
);
appletNewsDao
.
insert
(
appletNewsList
);
for
(
AppletNews
appletNews:
appletNewsList
){
AppletNewsCategory
category
=
new
AppletNewsCategory
();
category
.
setFirstClassify
(
appletNews
.
getFirstClassify
());
category
.
setSecondClassify
(
appletNews
.
getSecondClassify
());
category
.
setGradeLabelId
(
appletNews
.
getGradeLabelId
());
category
.
setSubjectLabelId
(
appletNews
.
getSubjectLabelId
());
saveAppletNewsCategory
(
Arrays
.
asList
(
category
),
appletNews
.
getId
());
}
}
}
@Override
@Override
...
...
pcloud-service-book/src/main/resources/mapper/applet/AppletNews.xml
View file @
2513e73f
...
@@ -129,6 +129,55 @@
...
@@ -129,6 +129,55 @@
where id=#{id}
where id=#{id}
</delete>
</delete>
<select
id=
"listAppletNewsCount"
parameterType=
"map"
resultType=
"integer"
>
SELECT count(DISTINCT n.id)
FROM applet_news n
LEFT JOIN applet_news_classify c ON n.news_classify_id=c.id
LEFT JOIN rights_setting_classify d ON n.rights_classify_id = d.id
LEFT JOIN applet_news_custom_tag t ON n.custom_tag_id = t.id
LEFT JOIN applet_news_category category on n.id = category.applet_news_id
WHERE 1=1
<if
test=
"name != null"
>
AND (n.news_name LIKE CONCAT("%",#{name},"%") OR n.url_number LIKE CONCAT("%",#{name},"%"))
</if>
<if
test=
"newsClassifyId >0"
>
AND n.news_classify_id = #{newsClassifyId}
</if>
<if
test=
"showState != null"
>
AND n.show_state = #{showState}
</if>
<if
test=
"firstClassify!=null"
>
AND category.first_classify =#{firstClassify}
</if>
<if
test=
"secondClassify!=null"
>
AND category.second_classify =#{secondClassify}
</if>
<if
test=
"gradeLabelId != null"
>
AND category.grade_label_id = #{gradeLabelId}
</if>
<if
test=
"subjectLabelId != null"
>
AND category.subject_label_id = #{subjectLabelId}
</if>
<if
test=
"rightsClassifyId!=null"
>
AND n.rights_classify_id =#{rightsClassifyId}
</if>
<if
test=
"source != null"
>
AND n.source = #{source}
</if>
<if
test=
"customTagId != null"
>
AND n.custom_tag_id = #{customTagId}
</if>
<choose>
<when
test=
"agentId != null"
>
and n.agent_id = #{agentId}
</when>
<otherwise>
and n.agent_id = 0
</otherwise>
</choose>
ORDER BY n.update_time DESC
</select>
<select
id=
"listAppletNews"
parameterType=
"map"
resultType=
"com.pcloud.book.applet.dto.AppletNewsDTO"
>
<select
id=
"listAppletNews"
parameterType=
"map"
resultType=
"com.pcloud.book.applet.dto.AppletNewsDTO"
>
SELECT DISTINCT
SELECT DISTINCT
n.id,
n.id,
...
...
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