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
d8e9b1ca
Commit
d8e9b1ca
authored
Mar 24, 2022
by
田超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fixbug/1006818' into 'master'
feat:[1006818] 斗罗 See merge request rays/pcloud-book!1528
parents
b9dbcd89
0a982be3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
ResourcePageBizImpl.java
...a/com/pcloud/book/group/biz/impl/ResourcePageBizImpl.java
+10
-2
ResourcePageConstants.java
...com/pcloud/book/group/constant/ResourcePageConstants.java
+5
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/ResourcePageBizImpl.java
View file @
d8e9b1ca
...
@@ -194,6 +194,8 @@ import cn.hutool.extra.qrcode.QrCodeUtil;
...
@@ -194,6 +194,8 @@ import cn.hutool.extra.qrcode.QrCodeUtil;
import
cn.hutool.http.HttpUtil
;
import
cn.hutool.http.HttpUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
static
com
.
pcloud
.
book
.
group
.
constant
.
ResourcePageConstants
.
DL_BOOK_SERVES_CACHE
;
/**
/**
* @ClassName com.pcloud.book.group.biz.impl.ResourcePageBizImpl
* @ClassName com.pcloud.book.group.biz.impl.ResourcePageBizImpl
* @Author zhuyajie
* @Author zhuyajie
...
@@ -1894,6 +1896,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -1894,6 +1896,7 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
});
});
//删除缓存
//删除缓存
JedisClusterUtils
.
del
(
"FUNCTION:DOULUO_APP"
);
JedisClusterUtils
.
del
(
"FUNCTION:DOULUO_APP"
);
JedisClusterUtils
.
del
(
DL_BOOK_SERVES_CACHE
+
updateResourcePageVO
.
getSceneId
());
return
resourcePageId
;
return
resourcePageId
;
}
}
...
@@ -3943,17 +3946,18 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -3943,17 +3946,18 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
@Override
@Override
public
List
<
ResourcePageItemVO
>
getServerList4Wechat
(
Long
wechatUserId
,
Long
sceneId
)
{
public
List
<
ResourcePageItemVO
>
getServerList4Wechat
(
Long
wechatUserId
,
Long
sceneId
)
{
List
<
ResourcePageItemVO
>
itemVOList
=
JedisClusterUtils
.
getJsonList
(
DL_BOOK_SERVES_CACHE
+
sceneId
,
ResourcePageItemVO
.
class
);
if
(
CollUtil
.
isEmpty
(
itemVOList
))
{
ResourcePage
bySceneId
=
resourcePageDao
.
getBySceneId
(
sceneId
);
ResourcePage
bySceneId
=
resourcePageDao
.
getBySceneId
(
sceneId
);
if
(
null
==
bySceneId
)
{
if
(
null
==
bySceneId
)
{
return
new
ArrayList
<>();
return
new
ArrayList
<>();
}
}
List
<
ResourcePageItemVO
>
itemVOList
=
resourcePageItemDao
.
getResourcePageItemByPageId
(
bySceneId
.
getId
(),
true
);
itemVOList
=
resourcePageItemDao
.
getResourcePageItemByPageId
(
bySceneId
.
getId
(),
true
);
if
(
CollUtil
.
isEmpty
(
itemVOList
))
{
if
(
CollUtil
.
isEmpty
(
itemVOList
))
{
return
new
ArrayList
<>();
return
new
ArrayList
<>();
}
}
if
(
CollUtil
.
isNotEmpty
(
itemVOList
))
{
if
(
CollUtil
.
isNotEmpty
(
itemVOList
))
{
//二维码类型
//二维码类型
fillQrcodeType
(
bySceneId
.
getId
(),
itemVOList
);
Map
<
String
,
List
<
ResourcePageItemVO
>>
listMap
=
itemVOList
.
stream
().
collect
(
Collectors
.
groupingBy
(
ResourcePageItemVO:
:
getServeType
));
Map
<
String
,
List
<
ResourcePageItemVO
>>
listMap
=
itemVOList
.
stream
().
collect
(
Collectors
.
groupingBy
(
ResourcePageItemVO:
:
getServeType
));
itemVOList
=
new
ArrayList
<>();
itemVOList
=
new
ArrayList
<>();
//应用和作品提出来一起查
//应用和作品提出来一起查
...
@@ -3975,6 +3979,10 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
...
@@ -3975,6 +3979,10 @@ public class ResourcePageBizImpl implements ResourcePageBiz {
}
}
itemVOList
.
sort
(
Comparator
.
comparing
(
ResourcePageItemVO:
:
getId
));
itemVOList
.
sort
(
Comparator
.
comparing
(
ResourcePageItemVO:
:
getId
));
}
}
if
(
CollUtil
.
isNotEmpty
(
itemVOList
))
{
JedisClusterUtils
.
setJsonList
(
DL_BOOK_SERVES_CACHE
+
sceneId
,
ResourcePageItemVO
.
class
,
3600
*
72
);
}
}
return
itemVOList
;
return
itemVOList
;
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/constant/ResourcePageConstants.java
View file @
d8e9b1ca
...
@@ -463,4 +463,9 @@ public class ResourcePageConstants {
...
@@ -463,4 +463,9 @@ public class ResourcePageConstants {
}
}
}
}
/**
* 斗罗首页缓存
*/
public
static
final
String
DL_BOOK_SERVES_CACHE
=
"BOOK:DL:SERVES:"
;
}
}
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