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
3ea431fa
Commit
3ea431fa
authored
Sep 22, 2021
by
田超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixbug/fixshangyou' into 'master'
bug: [none] nft See merge request rays/pcloud-book!1415
parents
ee0ca50c
50c29b83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
ResourcePageBizImpl.java
...a/com/pcloud/book/group/biz/impl/ResourcePageBizImpl.java
+48
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/ResourcePageBizImpl.java
View file @
3ea431fa
...
@@ -82,6 +82,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -82,6 +82,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -175,6 +176,17 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -175,6 +176,17 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
@Autowired
@Autowired
private
TradeConsr
tradeConsr
;
private
TradeConsr
tradeConsr
;
@Value
(
"${nft.book}"
)
private
List
<
Long
>
nftBookId
;
@Value
(
"${nft.resourcePageId}"
)
private
Long
pageId
;
@Value
(
"${nft.naviId}"
)
private
Long
naviId
;
@Value
(
"${nft.sceneId}"
)
private
Long
nftSceneId
;
@Value
(
"${nft.bookGroupId}"
)
private
Long
nftBookGroupId
;
@Override
@Override
public
Long
updateResourcePage
(
UpdateResourcePageVO
updateResourcePageVO
)
{
public
Long
updateResourcePage
(
UpdateResourcePageVO
updateResourcePageVO
)
{
if
(
null
==
updateResourcePageVO
.
getBookGroupId
()
&&
null
==
updateResourcePageVO
.
getSceneId
())
{
if
(
null
==
updateResourcePageVO
.
getBookGroupId
()
&&
null
==
updateResourcePageVO
.
getSceneId
())
{
...
@@ -638,6 +650,22 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -638,6 +650,22 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"参数缺失"
);
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"参数缺失"
);
}
}
ResourcePageVO
resourcePageVO
=
new
ResourcePageVO
();
ResourcePageVO
resourcePageVO
=
new
ResourcePageVO
();
ResourcePage
bySceneId
=
null
;
if
(
null
!=
bookGroupId
)
{
bySceneId
=
resourcePageDao
.
getByBookGroupId
(
bookGroupId
);
}
else
if
(
null
!=
sceneId
)
{
bySceneId
=
resourcePageDao
.
getBySceneId
(
sceneId
);
}
//上邮临时处理方案
if
(
null
!=
bySceneId
&&
null
!=
bySceneId
.
getBookId
()
&&
nftBookId
.
contains
(
bySceneId
.
getBookId
()))
{
if
(
null
!=
bookGroupId
)
{
bookGroupId
=
nftBookGroupId
;
}
else
if
(
null
!=
sceneId
)
{
sceneId
=
nftSceneId
;
}
}
if
(
null
!=
bookGroupId
)
{
if
(
null
!=
bookGroupId
)
{
ResourcePage
resourcePage
=
resourcePageDao
.
getByBookGroupId
(
bookGroupId
);
ResourcePage
resourcePage
=
resourcePageDao
.
getByBookGroupId
(
bookGroupId
);
if
(
null
==
resourcePage
)
{
if
(
null
==
resourcePage
)
{
...
@@ -700,6 +728,16 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -700,6 +728,16 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
@Override
@Override
public
List
<
ResourceColumnAndServeVO
>
getColumnAndServeListByPageId
(
Long
resourcePageId
,
Long
wechatUserId
,
Long
bookId
,
Long
adviserId
,
Long
channelId
,
Integer
enableAdverting
,
Long
navigationId
)
{
public
List
<
ResourceColumnAndServeVO
>
getColumnAndServeListByPageId
(
Long
resourcePageId
,
Long
wechatUserId
,
Long
bookId
,
Long
adviserId
,
Long
channelId
,
Integer
enableAdverting
,
Long
navigationId
)
{
//上邮临时处理方案
ResourcePage
byId
=
resourcePageDao
.
getById
(
resourcePageId
);
if
(
null
==
byId
)
{
throw
new
BizException
(
BizException
.
PARAM_IS_NULL
.
getCode
(),
"找不到资源配置"
);
}
if
(
nftBookId
.
contains
(
byId
.
getBookId
()))
{
resourcePageId
=
pageId
;
navigationId
=
naviId
;
}
List
<
ResourceColumnAndServeVO
>
serveVOS
=
resourcePageColumnDao
.
getColumnListByPageId
(
resourcePageId
,
navigationId
);
List
<
ResourceColumnAndServeVO
>
serveVOS
=
resourcePageColumnDao
.
getColumnListByPageId
(
resourcePageId
,
navigationId
);
if
(
CollUtil
.
isNotEmpty
(
serveVOS
))
{
if
(
CollUtil
.
isNotEmpty
(
serveVOS
))
{
List
<
ResourcePageItemVO
>
itemVOList
;
List
<
ResourcePageItemVO
>
itemVOList
;
...
@@ -1442,6 +1480,16 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -1442,6 +1480,16 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
}
else
if
(
null
!=
sceneId
)
{
}
else
if
(
null
!=
sceneId
)
{
resourcePageVO
=
getResourcePageBySceneId4Wechat
(
sceneId
);
resourcePageVO
=
getResourcePageBySceneId4Wechat
(
sceneId
);
}
}
//上邮临时处理方案
if
(
null
!=
resourcePageVO
&&
null
!=
resourcePageVO
.
getBookId
()
&&
nftBookId
.
contains
(
resourcePageVO
.
getBookId
()))
{
if
(
null
!=
bookGroupId
)
{
bookGroupId
=
nftBookGroupId
;
resourcePageVO
=
getResourcePageByBookGroupId4Wechat
(
bookGroupId
,
wechatUserId
);
}
else
if
(
null
!=
sceneId
)
{
sceneId
=
nftSceneId
;
resourcePageVO
=
getResourcePageBySceneId4Wechat
(
sceneId
);
}
}
if
(
null
!=
resourcePageVO
.
getId
())
{
if
(
null
!=
resourcePageVO
.
getId
())
{
//查收藏状态
//查收藏状态
ResourcePageCollect
collect
=
resourcePageCollectDao
.
getCollectRecordByUser
(
wechatUserId
,
resourcePageVO
.
getId
());
ResourcePageCollect
collect
=
resourcePageCollectDao
.
getCollectRecordByUser
(
wechatUserId
,
resourcePageVO
.
getId
());
...
...
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