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
3fec1b58
Commit
3fec1b58
authored
Apr 23, 2021
by
朱亚洁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug:[none]超级作者作品自动上架
parent
c21c8baa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
ResourcePageBizImpl.java
...a/com/pcloud/book/group/biz/impl/ResourcePageBizImpl.java
+14
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/ResourcePageBizImpl.java
View file @
3fec1b58
...
@@ -274,6 +274,8 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -274,6 +274,8 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
createOfficialAccountUrl
(
resourcePageColumnId
,
updateResourceColumnVO
);
createOfficialAccountUrl
(
resourcePageColumnId
,
updateResourceColumnVO
);
return
;
return
;
}
}
//作品id
List
<
Long
>
productIds4Shelve
=
updateResourceColumnVO
.
getItemVOList
().
stream
().
filter
(
s
->
s
.
getServeType
().
equals
(
ResourcePageConstants
.
ServeTypeEnum
.
PRODUCT
.
getValue
())).
map
(
ResourcePageItemVO:
:
getServeId
).
distinct
().
collect
(
Collectors
.
toList
());
if
(!
ListUtils
.
isEmpty
(
updateResourceColumnVO
.
getItemVOList
()))
{
if
(!
ListUtils
.
isEmpty
(
updateResourceColumnVO
.
getItemVOList
()))
{
List
<
ResourcePageItemVO
>
itemVOList
=
updateResourceColumnVO
.
getItemVOList
();
List
<
ResourcePageItemVO
>
itemVOList
=
updateResourceColumnVO
.
getItemVOList
();
List
<
ResourcePageItem
>
itemList
=
new
ArrayList
<>();
List
<
ResourcePageItem
>
itemList
=
new
ArrayList
<>();
...
@@ -304,6 +306,14 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -304,6 +306,14 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
}
}
resourcePageItemDao
.
insert
(
itemList
);
resourcePageItemDao
.
insert
(
itemList
);
}
}
if
(!
ListUtils
.
isEmpty
(
productIds4Shelve
)){
//作品自动上架
List
<
Long
>
productIds
=
productIds4Shelve
;
ThreadPoolUtils
.
OTHER_POOL
.
execute
(()->{
Long
channelId
=
getChannelIdFromUrl
(
updateResourceColumnVO
.
getItemVOList
().
get
(
0
).
getLinkUrl
());
productConsr
.
productAutoOnShelves
(
channelId
,
productIds
);
});
}
}
}
private
void
checkResourceColumn
(
UpdateResourceColumnVO
updateResourceColumnVO
)
throws
BizException
{
private
void
checkResourceColumn
(
UpdateResourceColumnVO
updateResourceColumnVO
)
throws
BizException
{
...
@@ -313,6 +323,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -313,6 +323,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
if
(
ListUtils
.
isEmpty
(
updateResourceColumnVO
.
getItemVOList
()))
{
if
(
ListUtils
.
isEmpty
(
updateResourceColumnVO
.
getItemVOList
()))
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
updateResourceColumnVO
.
getColumnName
()+
"缺少资源"
);
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
updateResourceColumnVO
.
getColumnName
()+
"缺少资源"
);
}
}
List
<
String
>
typeCodes
=
Arrays
.
asList
(
ResourcePageConstants
.
ServeTypeEnum
.
APP
.
getValue
(),
ResourcePageConstants
.
ServeTypeEnum
.
PRODUCT
.
getValue
());
for
(
ResourcePageItemVO
itemVO
:
updateResourceColumnVO
.
getItemVOList
())
{
for
(
ResourcePageItemVO
itemVO
:
updateResourceColumnVO
.
getItemVOList
())
{
if
(
ResourcePageConstants
.
ServeTypeEnum
.
ADVISER_BOOK
.
getValue
().
equals
(
itemVO
.
getServeType
())
&&
if
(
ResourcePageConstants
.
ServeTypeEnum
.
ADVISER_BOOK
.
getValue
().
equals
(
itemVO
.
getServeType
())
&&
(
null
==
itemVO
.
getLinkFrom
()
||
StringUtil
.
isEmpty
(
itemVO
.
getLinkUrl
())))
{
(
null
==
itemVO
.
getLinkFrom
()
||
StringUtil
.
isEmpty
(
itemVO
.
getLinkUrl
())))
{
...
@@ -322,6 +333,9 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -322,6 +333,9 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
&&
(
null
==
itemVO
.
getServeId
()
||
StringUtil
.
isEmpty
(
itemVO
.
getServeType
())))
{
&&
(
null
==
itemVO
.
getServeId
()
||
StringUtil
.
isEmpty
(
itemVO
.
getServeType
())))
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"缺少资源id或类型"
);
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"缺少资源id或类型"
);
}
}
if
(
typeCodes
.
contains
(
itemVO
.
getServeType
())
&&
StringUtil
.
isEmpty
(
itemVO
.
getLinkUrl
()))
{
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