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
0a536890
Commit
0a536890
authored
Aug 28, 2020
by
朱亚洁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:[none]bookgroup接口优化
parent
29973a29
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
13 deletions
+57
-13
BookGroupBizImpl.java
...java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
+43
-1
BookBusinessConstants.java
...com/pcloud/book/group/constant/BookBusinessConstants.java
+11
-0
BookGroupMapper.xml
...-book/src/main/resources/mapper/group/BookGroupMapper.xml
+3
-12
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
View file @
0a536890
...
...
@@ -3262,14 +3262,32 @@ public class BookGroupBizImpl implements BookGroupBiz {
if
(!
ListUtils
.
isEmpty
(
bookGroupAnalysisParam
.
getAgentIds
()))
{
paramMap
.
put
(
"agentIds"
,
bookGroupAnalysisParam
.
getAgentIds
());
}
if
(
null
!=
bookGroupAnalysisParam
.
getIsFundSupport
()){
paramMap
.
put
(
"isFundSupport"
,
bookGroupAnalysisParam
.
getIsFundSupport
());
}
if
(
null
!=
bookGroupAnalysisParam
.
getIsCopyright
()){
paramMap
.
put
(
"isCopyright"
,
bookGroupAnalysisParam
.
getIsCopyright
());
}
String
monthDate
=
bookGroupAnalysisParam
.
getMonthDate
();
String
monthKey
=
monthDate
==
null
?
"all"
:
monthDate
;
String
key
=
BookBusinessConstants
.
AGENT_STATISTIC
;
String
field
=
bookGroupAnalysisParam
.
getCurrentPage
()+
"_"
+
bookGroupAnalysisParam
.
getNumPerPage
()+
"_"
+
monthKey
;
String
countKey
=
BookBusinessConstants
.
AGENT_STATISTIC_COUNT
;
if
(
MapUtils
.
isEmpty
(
paramMap
)){
List
<
BookGroupAnalysisVO
>
list
=
JedisClusterUtils
.
hgetJson2List
(
key
,
field
,
BookGroupAnalysisVO
.
class
);
Integer
count
=
0
;
if
(!
StringUtil
.
isEmpty
(
JedisClusterUtils
.
get
(
countKey
))){
count
=
Integer
.
valueOf
(
JedisClusterUtils
.
get
(
countKey
));
}
if
(!
ListUtils
.
isEmpty
(
list
)
&&
count
>
0
){
return
new
PageBeanNew
<>(
bookGroupAnalysisParam
.
getCurrentPage
(),
bookGroupAnalysisParam
.
getNumPerPage
(),
count
,
list
);
}
}
PageBeanNew
<
BookGroupAnalysisVO
>
pageBeanNew
=
bookGroupDao
.
listPageNew
(
new
PageParam
(
bookGroupAnalysisParam
.
getCurrentPage
(),
bookGroupAnalysisParam
.
getNumPerPage
()),
paramMap
,
"listPageBookGroupAnalysis"
);
if
(
null
==
pageBeanNew
||
ListUtils
.
isEmpty
(
pageBeanNew
.
getRecordList
()))
{
return
new
PageBeanNew
<>(
bookGroupAnalysisParam
.
getCurrentPage
(),
bookGroupAnalysisParam
.
getNumPerPage
(),
0
,
new
ArrayList
<>());
}
String
monthDate
=
bookGroupAnalysisParam
.
getMonthDate
();
//设置书刊分类名称
groupSet
.
setTempletName
(
pageBeanNew
.
getRecordList
());
//设置出版运营编辑名称
...
...
@@ -3280,6 +3298,11 @@ public class BookGroupBizImpl implements BookGroupBiz {
groupSet
.
setGroupStatistic
(
pageBeanNew
.
getRecordList
(),
monthDate
);
//设置资源数据(浏览量,读者量,销售额,支付率,客单价)
groupSet
.
setResourceStatistic
(
pageBeanNew
.
getRecordList
(),
monthDate
);
if
(
MapUtils
.
isEmpty
(
paramMap
)){
JedisClusterUtils
.
hset2Json
(
key
,
field
,
pageBeanNew
.
getRecordList
());
JedisClusterUtils
.
expire
(
key
,
60
);
JedisClusterUtils
.
set
(
countKey
,
String
.
valueOf
(
pageBeanNew
.
getTotalCount
()),
60
);
}
return
pageBeanNew
;
}
...
...
@@ -3494,6 +3517,20 @@ public class BookGroupBizImpl implements BookGroupBiz {
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
isSpecial
=
isSpecial
==
null
?
false
:
isSpecial
;
String
key
=
BookBusinessConstants
.
AGENT_STATISTIC
;
String
field
=
currentPage
+
"_"
+
numPerPage
;
String
countKey
=
BookBusinessConstants
.
AGENT_STATISTIC_COUNT
;
if
(
null
==
agentId
&&
!
isSpecial
){
List
<
AgentStatisticsInfoDTO
>
list
=
JedisClusterUtils
.
hgetJson2List
(
key
,
field
,
AgentStatisticsInfoDTO
.
class
);
Integer
count
=
0
;
if
(!
StringUtil
.
isEmpty
(
JedisClusterUtils
.
get
(
countKey
))){
count
=
Integer
.
valueOf
(
JedisClusterUtils
.
get
(
countKey
));
}
if
(!
ListUtils
.
isEmpty
(
list
)
&&
count
>
0
){
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
count
,
list
);
}
}
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"agentId"
,
agentId
);
if
(
isSpecial
!=
null
&&
isSpecial
)
{
...
...
@@ -3508,6 +3545,11 @@ public class BookGroupBizImpl implements BookGroupBiz {
List
<
AgentStatisticsInfoDTO
>
agentStatisticsInfoDTOS
=
pageBeanNew
.
getRecordList
();
groupSet
.
setAgentStatisticsDetailInfo
(
agentStatisticsInfoDTOS
);
}
if
(
null
==
agentId
&&
!
isSpecial
){
JedisClusterUtils
.
hset2Json
(
key
,
field
,
pageBeanNew
.
getRecordList
());
JedisClusterUtils
.
expire
(
key
,
60
);
JedisClusterUtils
.
set
(
countKey
,
String
.
valueOf
(
pageBeanNew
.
getTotalCount
()),
60
);
}
return
pageBeanNew
;
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/constant/BookBusinessConstants.java
View file @
0a536890
package
com
.
pcloud
.
book
.
group
.
constant
;
import
com.pcloud.book.group.dto.AutoUpdateGroupNumDTO
;
import
com.pcloud.common.constant.CacheConstant
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
...
...
@@ -57,4 +58,14 @@ public class BookBusinessConstants {
}
}
/**
* 个人号-出版社统计
*/
public
static
final
String
AGENT_STATISTIC
=
CacheConstant
.
BOOK
+
"BOOKGROUP:getAgentStatisticsInfo"
;
public
static
final
String
AGENT_STATISTIC_COUNT
=
CacheConstant
.
BOOK
+
"BOOKGROUP:getAgentStatisticsInfo_count"
;
/**
* 平台端-社群书分析
*/
public
static
final
String
BOOKGROUP_ANALYSIS
=
CacheConstant
.
BOOK
+
"BOOKGROUP:listPageBookGroupAnalysis"
;
public
static
final
String
BOOKGROUP_ANALYSIS_COUNT
=
CacheConstant
.
BOOK
+
"BOOKGROUP:listPageBookGroupAnalysis_count"
;
}
pcloud-service-book/src/main/resources/mapper/group/BookGroupMapper.xml
View file @
0a536890
...
...
@@ -595,21 +595,12 @@
G.join_group_type
FROM
book_group G
LEFT JOIN BOOK_ADVISER A ON G.BOOK_ID = A.BOOK_ID AND G.CHANNEL_ID = A.CHANNEL_ID AND G.CREATE_USER = A.ADVISER_ID
LEFT JOIN BOOK B ON A.BOOK_ID = B.BOOK_ID
INNER JOIN BOOK_ADVISER A ON G.BOOK_ID = A.BOOK_ID AND G.CHANNEL_ID = A.CHANNEL_ID AND G.CREATE_USER = A.ADVISER_ID AND A.IS_DELETE = 0
INNER JOIN BOOK B ON A.BOOK_ID = B.BOOK_ID AND B.IS_DELETE = 0
LEFT JOIN BOOK_FUND BF ON BF.BOOK_ID = A.BOOK_ID AND BF.END_TIME
<![CDATA[ > ]]>
NOW() AND BF.START_TIME
<![CDATA[ < ]]>
NOW()
LEFT JOIN book_auth_info i ON G.book_id = i.book_id AND i.book_status = 1 AND i.is_group_book = 1
WHERE 1 = 1
AND G.is_delete = 0
AND A.BOOK_ID IS NOT NULL
AND (
A.BOOK_ADVISER_ID IS NULL
OR A.IS_DELETE = 0
)
AND (
B.BOOK_ID IS NULL
OR B.IS_DELETE = 0
)
<if
test=
"isFundSupport != null and isFundSupport == 1"
>
AND BF.BOOK_FUND_ID IS NOT NULL
</if>
...
...
@@ -749,8 +740,8 @@
${item}
</foreach>
</if>
AND agent_id > 0
GROUP BY agent_id
HAVING agent_id IS NOT NULL
ORDER BY groupBookCount DESC
</select>
...
...
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