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
ccd4051e
Commit
ccd4051e
authored
Sep 11, 2021
by
朱亚洁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:[1005255]取消运营平台限制
parent
a5bc3788
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
3 deletions
+28
-3
ProductConsr.java
.../java/com/pcloud/book/consumer/resource/ProductConsr.java
+11
-0
ResourcePageBizImpl.java
...a/com/pcloud/book/group/biz/impl/ResourcePageBizImpl.java
+13
-3
UpdateResourceColumnVO.java
...java/com/pcloud/book/group/vo/UpdateResourceColumnVO.java
+4
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/consumer/resource/ProductConsr.java
View file @
ccd4051e
...
@@ -373,4 +373,15 @@ public class ProductConsr {
...
@@ -373,4 +373,15 @@ public class ProductConsr {
LOGGER
.
error
(
"自主审核失败[productService.selfAudit]:创建失败:article:{}"
+
e
.
getMessage
(),
product
);
LOGGER
.
error
(
"自主审核失败[productService.selfAudit]:创建失败:article:{}"
+
e
.
getMessage
(),
product
);
}
}
}
}
public
void
setOffShelvesProductOnShelves
(
Long
channelId
,
List
<
Long
>
productIds
)
throws
BizException
{
LOGGER
.
info
(
"【资源中心(消)】设置下架作品上架,<START>.[channelId]="
+
channelId
+
" [productIds]="
+
productIds
+
"]"
);
if
(
channelId
==
null
||
ListUtils
.
isEmpty
(
productIds
))
{
return
;
}
try
{
productService
.
setOffShelvesProductOnShelves
(
channelId
,
productIds
);
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"【资源中心(消)】调用失败[setOffShelvesProductOnShelves]:"
+
e
.
getMessage
(),
e
);
}
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/ResourcePageBizImpl.java
View file @
ccd4051e
...
@@ -92,6 +92,7 @@ import java.util.concurrent.ExecutionException;
...
@@ -92,6 +92,7 @@ import java.util.concurrent.ExecutionException;
import
java.util.concurrent.Future
;
import
java.util.concurrent.Future
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeoutException
;
import
java.util.concurrent.TimeoutException
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -403,8 +404,16 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -403,8 +404,16 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
//作品自动上架
//作品自动上架
List
<
Long
>
productIds
=
productIds4Shelve
;
List
<
Long
>
productIds
=
productIds4Shelve
;
ThreadPoolUtils
.
OTHER_POOL
.
execute
(()->{
ThreadPoolUtils
.
OTHER_POOL
.
execute
(()->{
Long
channelId
=
getChannelIdFromUrl
(
updateResourceColumnVO
.
getItemVOList
().
get
(
0
).
getLinkUrl
());
Long
channelId
=
updateResourceColumnVO
.
getChannelId
();
productConsr
.
productAutoOnShelves
(
channelId
,
productIds
);
if
(
null
==
channelId
)
{
channelId
=
getChannelIdFromUrl
(
updateResourceColumnVO
.
getItemVOList
().
get
(
0
).
getLinkUrl
());
}
Map
<
Long
,
String
>
offShelvesMap
=
productConsr
.
productAutoOnShelves
(
channelId
,
productIds
);
if
(!
MapUtils
.
isEmpty
(
offShelvesMap
))
{
//已下架的作品重新上架
List
<
Long
>
proIds
=
new
ArrayList
<>(
offShelvesMap
.
keySet
());
productConsr
.
setOffShelvesProductOnShelves
(
channelId
,
proIds
);
}
});
});
}
}
}
}
...
@@ -1337,6 +1346,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -1337,6 +1346,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Long
updateResourcePageAndColumn
(
UpdateResourcePageVO
updateResourcePageVO
)
{
public
Long
updateResourcePageAndColumn
(
UpdateResourcePageVO
updateResourcePageVO
)
{
Long
resourcePageId
=
this
.
updateResourcePage
(
updateResourcePageVO
);
Long
resourcePageId
=
this
.
updateResourcePage
(
updateResourcePageVO
);
ResourcePage
page
=
resourcePageDao
.
getById
(
resourcePageId
);
//当前所有栏目
//当前所有栏目
List
<
Long
>
originColumnIds
=
resourcePageColumnDao
.
getColumnIdsByPageId
(
resourcePageId
);
List
<
Long
>
originColumnIds
=
resourcePageColumnDao
.
getColumnIdsByPageId
(
resourcePageId
);
//删除栏目资源
//删除栏目资源
...
@@ -1348,6 +1358,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -1348,6 +1358,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
for
(
UpdateResourceColumnVO
columnVO
:
list
)
{
for
(
UpdateResourceColumnVO
columnVO
:
list
)
{
columnVO
.
setResourcePageId
(
resourcePageId
);
columnVO
.
setResourcePageId
(
resourcePageId
);
columnVO
.
setCreateUser
(
updateResourcePageVO
.
getCreateUser
());
columnVO
.
setCreateUser
(
updateResourcePageVO
.
getCreateUser
());
columnVO
.
setChannelId
(
page
.
getChannelId
());
columnVO
.
setColumnSeq
(
list
.
indexOf
(
columnVO
)
+
1
);
columnVO
.
setColumnSeq
(
list
.
indexOf
(
columnVO
)
+
1
);
if
(
null
!=
columnVO
.
getResourcePageColumnId
())
{
if
(
null
!=
columnVO
.
getResourcePageColumnId
())
{
columnIds
.
add
(
columnVO
.
getResourcePageColumnId
());
columnIds
.
add
(
columnVO
.
getResourcePageColumnId
());
...
@@ -1380,7 +1391,6 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -1380,7 +1391,6 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
}
}
// 更新图书封面
// 更新图书封面
ResourcePage
page
=
resourcePageDao
.
getById
(
resourcePageId
);
if
(
StrUtil
.
isNotBlank
(
updateResourcePageVO
.
getBookCover
())
&&
Objects
.
nonNull
(
page
))
{
if
(
StrUtil
.
isNotBlank
(
updateResourcePageVO
.
getBookCover
())
&&
Objects
.
nonNull
(
page
))
{
Long
bookId
;
Long
bookId
;
if
(
Objects
.
nonNull
(
page
.
getBookGroupId
()))
{
if
(
Objects
.
nonNull
(
page
.
getBookGroupId
()))
{
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/vo/UpdateResourceColumnVO.java
View file @
ccd4051e
...
@@ -70,4 +70,8 @@ public class UpdateResourceColumnVO {
...
@@ -70,4 +70,8 @@ public class UpdateResourceColumnVO {
* 导航id
* 导航id
*/
*/
private
Long
navigationId
;
private
Long
navigationId
;
/**
* 渠道id
*/
private
Long
channelId
;
}
}
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