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
a802d072
Commit
a802d072
authored
Dec 14, 2020
by
田超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bug/slowSQL' into 'master'
Bug/slow sql See merge request rays/pcloud-book!1102
parents
254f69a0
a3d6b3c0
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
3377 additions
and
64 deletions
+3377
-64
ServeCollectBiz.java
...main/java/com/pcloud/book/applet/biz/ServeCollectBiz.java
+3
-0
ServeCollectBizImpl.java
.../com/pcloud/book/applet/biz/impl/ServeCollectBizImpl.java
+5
-0
ServeCollectDao.java
...main/java/com/pcloud/book/applet/dao/ServeCollectDao.java
+3
-0
ServeCollectDaoImpl.java
.../com/pcloud/book/applet/dao/impl/ServeCollectDaoImpl.java
+6
-0
BookBizImpl.java
.../main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
+2
-2
BookDao.java
...-book/src/main/java/com/pcloud/book/book/dao/BookDao.java
+5
-2
BookDaoImpl.java
.../main/java/com/pcloud/book/book/dao/impl/BookDaoImpl.java
+14
-2
BookProductFacadeImpl.java
...m/pcloud/book/book/facade/impl/BookProductFacadeImpl.java
+2
-0
QrcodeSceneConsr.java
...va/com/pcloud/book/consumer/channel/QrcodeSceneConsr.java
+0
-3
CultivateBizImpl.java
.../com/pcloud/book/cultivate/biz/impl/CultivateBizImpl.java
+4
-16
CultivateDao.java
...main/java/com/pcloud/book/cultivate/dao/CultivateDao.java
+4
-0
CultivateDaoImpl.java
.../com/pcloud/book/cultivate/dao/impl/CultivateDaoImpl.java
+10
-0
BookGroupBiz.java
...src/main/java/com/pcloud/book/group/biz/BookGroupBiz.java
+2
-0
BookGroupBizImpl.java
...java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
+86
-0
BookGroupDaoImpl.java
...java/com/pcloud/book/group/dao/impl/BookGroupDaoImpl.java
+9
-1
BookGroupServeDaoImpl.java
...com/pcloud/book/group/dao/impl/BookGroupServeDaoImpl.java
+39
-12
RightsSettingBiz.java
...a/com/pcloud/book/rightsSetting/biz/RightsSettingBiz.java
+1
-1
RightsSettingBizImpl.java
...oud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
+78
-23
RightsSettingFacede.java
...pcloud/book/rightsSetting/facade/RightsSettingFacede.java
+1
-1
AppletNews.xml
...vice-book/src/main/resources/mapper/applet/AppletNews.xml
+1
-1
ServeCollect.Mapper.xml
.../src/main/resources/mapper/applet/ServeCollect.Mapper.xml
+13
-0
Cultivate.xml
...ce-book/src/main/resources/mapper/cultivate/Cultivate.xml
+9
-0
ESBookAndAdviserBizTest.java
...st/java/com.pcloud.book.test/ESBookAndAdviserBizTest.java
+8
-0
SlowSQLTest.java
...-book/src/test/java/com.pcloud.book.test/SlowSQLTest.java
+54
-0
TestBookList.java
...book/src/test/java/com.pcloud.book.test/TestBookList.java
+3010
-0
BookKeywordWarehouseBizTest.java
...rvice-book/src/test/test/BookKeywordWarehouseBizTest.java
+8
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/ServeCollectBiz.java
View file @
a802d072
...
...
@@ -83,4 +83,6 @@ public interface ServeCollectBiz {
* @return
*/
List
<
ServeCollectDTO
>
getList4Collect
(
List
<
ServeCollectDTO
>
serveCollects
);
List
<
ServeCollect
>
getList4RightsSettingByWechatUserId
(
Long
wechatUserId
);
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/impl/ServeCollectBizImpl.java
View file @
a802d072
...
...
@@ -333,6 +333,11 @@ public class ServeCollectBizImpl implements ServeCollectBiz {
}
@Override
public
List
<
ServeCollect
>
getList4RightsSettingByWechatUserId
(
Long
wechatUserId
)
{
return
serveCollectDao
.
getList4RightsSettingByWechatUserId
(
wechatUserId
);
}
@Override
public
List
<
Long
>
getAllCollect
(
Long
wechatUserId
)
{
return
serveCollectDao
.
getAllCollect
(
wechatUserId
);
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/applet/dao/ServeCollectDao.java
View file @
a802d072
...
...
@@ -23,4 +23,6 @@ public interface ServeCollectDao extends BaseDao<ServeCollect> {
List
<
Long
>
getAllCollect
(
Long
wechatUserId
);
List
<
ServeCollectDTO
>
getList4Collect
(
List
<
ServeCollectDTO
>
serveCollects
);
List
<
ServeCollect
>
getList4RightsSettingByWechatUserId
(
Long
wechatUserId
);
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/applet/dao/impl/ServeCollectDaoImpl.java
View file @
a802d072
...
...
@@ -32,6 +32,12 @@ public class ServeCollectDaoImpl extends BaseDaoImpl<ServeCollect> implements Se
return
getSessionTemplate
().
selectList
(
getStatement
(
"getList4RightsSetting"
),
serveCollects
);
}
@Override
public
List
<
ServeCollect
>
getList4RightsSettingByWechatUserId
(
Long
wechatUserId
)
{
return
getSessionTemplate
().
selectList
(
getStatement
(
"getList4RightsSettingByWechatUserId"
),
wechatUserId
);
}
@Override
public
List
<
Long
>
getAllCollect
(
Long
wechatUserId
)
{
return
getSessionTemplate
().
selectList
(
getStatement
(
"getAllCollect"
),
wechatUserId
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
View file @
a802d072
...
...
@@ -172,7 +172,6 @@ import java.util.ArrayList;
import
java.util.Arrays
;
import
java.util.Calendar
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -826,11 +825,12 @@ public class BookBizImpl implements BookBiz {
public
Map
<
String
,
BookDto
>
listBookGroupByBookIds
(
MapResourceTotalCountDTO
bookDetailDTO
)
throws
BizException
{
Map
<
String
,
BookDto
>
bookMap
=
Maps
.
newHashMap
();
if
(
null
!=
bookDetailDTO
&&
!
ListUtils
.
isEmpty
(
bookDetailDTO
.
getBookIds
())
&&
!
ListUtils
.
isEmpty
(
bookDetailDTO
.
getChannelIds
())
&&
!
ListUtils
.
isEmpty
(
bookDetailDTO
.
getAdviserIds
()))
{
Map
<
String
,
Object
>
paramMap
=
Maps
.
newHashMap
();
paramMap
.
put
(
"bookIds"
,
bookDetailDTO
.
getBookIds
());
paramMap
.
put
(
"channelIds"
,
bookDetailDTO
.
getChannelIds
());
paramMap
.
put
(
"adviserIds"
,
bookDetailDTO
.
getAdviserIds
());
List
<
BookDto
>
bookDtos
=
bookDao
.
listBookGroupByBookIds
(
paramMap
);
List
<
BookDto
>
bookDtos
=
bookDao
.
listBookGroupByBookIds
(
bookDetailDTO
.
getBookIds
(),
bookDetailDTO
.
getChannelIds
(),
bookDetailDTO
.
getAdviserIds
()
);
if
(!
ListUtils
.
isEmpty
(
bookDtos
))
{
for
(
BookDto
bookDto
:
bookDtos
)
{
bookMap
.
put
(
bookDto
.
getBookId
()
+
"_"
+
bookDto
.
getChannelId
()
+
"_"
+
bookDto
.
getAdviserId
(),
bookDto
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/dao/BookDao.java
View file @
a802d072
...
...
@@ -91,10 +91,13 @@ public interface BookDao extends BaseDao<Book> {
/**
* 批量获取书籍信息
* @param paramMap
*
* @param bookIds
* @param channelIds
* @param adviserIds
* @return
*/
List
<
BookDto
>
listBookGroupByBookIds
(
Map
<
String
,
Object
>
paramMap
);
List
<
BookDto
>
listBookGroupByBookIds
(
List
<
Long
>
bookIds
,
List
<
Long
>
channelIds
,
List
<
Long
>
adviserIds
);
/**
* 获取详细信息
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/dao/impl/BookDaoImpl.java
View file @
a802d072
...
...
@@ -15,7 +15,10 @@ import com.pcloud.book.book.vo.BookSaleVO;
import
com.pcloud.book.book.vo.SearchBookVO
;
import
com.pcloud.book.book.dto.BookUniqueNumberDTO
;
import
com.pcloud.book.es.entity.ESBookAndAdviser
;
import
com.pcloud.book.group.vo.BookGroupServeCountVO
;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
com.pcloud.common.utils.ListForInSQL
;
import
com.pcloud.common.utils.ListUtils
;
import
org.springframework.stereotype.Repository
;
import
java.util.HashMap
;
...
...
@@ -94,8 +97,17 @@ public class BookDaoImpl extends BaseDaoImpl<Book> implements BookDao {
}
@Override
public
List
<
BookDto
>
listBookGroupByBookIds
(
Map
<
String
,
Object
>
paramMap
)
{
return
super
.
getSqlSession
().
selectList
(
super
.
getStatement
(
"listBookGroupByBookIds"
),
paramMap
);
public
List
<
BookDto
>
listBookGroupByBookIds
(
List
<
Long
>
bookIds
,
List
<
Long
>
channelIds
,
List
<
Long
>
adviserIds
)
{
return
ListUtils
.
groupList4SQL
(
new
ListForInSQL
<
BookDto
>()
{
@Override
public
<
T
>
List
<
T
>
processSQL
(
List
<
Long
>
list
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"bookIds"
,
list
);
map
.
put
(
"channelIds"
,
channelIds
);
map
.
put
(
"adviserIds"
,
adviserIds
);
return
getSqlSession
().
selectList
(
getStatement
(
"listBookGroupByBookIds"
),
map
);
}
},
bookIds
);
}
@Override
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/facade/impl/BookProductFacadeImpl.java
View file @
a802d072
...
...
@@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.HashSet
;
import
java.util.List
;
/**
...
...
@@ -219,4 +220,5 @@ public class BookProductFacadeImpl implements BookProductFacade {
List
<
BookProductDto
>
bookProductDtos
=
bookProductBiz
.
list4Adviser
(
bookId
,
channelId
,
adviserId
);
return
new
ResponseDto
<
List
<
BookProductDto
>>(
bookProductDtos
==
null
?
new
ArrayList
<>()
:
bookProductDtos
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/consumer/channel/QrcodeSceneConsr.java
View file @
a802d072
...
...
@@ -308,9 +308,6 @@ public class QrcodeSceneConsr {
}
catch
(
BizException
e
)
{
LOGGER
.
error
(
"【渠道(消)】 获取公众号基本信息,<ERROR>.[getById]:"
+
e
.
getMessage
(),
e
);
}
if
(
null
==
accountSettingDto
){
LOGGER
.
error
(
"运营平台未配置公众号,channelId="
+
channelId
);
}
return
accountSettingDto
;
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/cultivate/biz/impl/CultivateBizImpl.java
View file @
a802d072
...
...
@@ -766,23 +766,11 @@ public class CultivateBizImpl implements CultivateBiz {
@Override
public
Integer
getRanking
(
Long
wechatUserId
)
{
Integer
ranking
=
0
;
List
<
Cultivate
>
list
=
cultivateDao
.
getAllOrderByStar
();
if
(
list
==
null
||
list
.
size
()==
0
){
return
ranking
;
}
for
(
int
i
=
0
;
i
<=
list
.
size
()-
1
;
i
++){
Cultivate
cultivate
=
list
.
get
(
i
);
if
(
cultivate
.
getWechatUserId
().
equals
(
wechatUserId
)){
ranking
=
i
+
1
;
return
ranking
;
}
Cultivate
cultivate
=
cultivateDao
.
getByWechatUserId
(
wechatUserId
);
if
(
cultivate
==
null
||
cultivate
.
getStar
()==
0
){
return
cultivateDao
.
getAllCounts
();
}
return
ranking
;
return
cultivateDao
.
getRank
(
cultivate
.
getStar
());
}
@Override
...
...
pcloud-service-book/src/main/java/com/pcloud/book/cultivate/dao/CultivateDao.java
View file @
a802d072
...
...
@@ -15,4 +15,8 @@ public interface CultivateDao extends BaseDao<Cultivate> {
List
<
Cultivate
>
getRandomUserId
(
Long
cultivateId
,
Long
friendCultivateId
);
List
<
Cultivate
>
getByCultivateIds
(
List
<
Long
>
cultivateIds
);
int
getRank
(
Integer
star
);
int
getAllCounts
();
}
pcloud-service-book/src/main/java/com/pcloud/book/cultivate/dao/impl/CultivateDaoImpl.java
View file @
a802d072
...
...
@@ -43,4 +43,14 @@ public class CultivateDaoImpl extends BaseDaoImpl<Cultivate> implements Cultivat
map
.
put
(
"cultivateIds"
,
cultivateIds
);
return
super
.
getSessionTemplate
().
selectList
(
getStatement
(
"getByCultivateIds"
),
map
);
}
@Override
public
int
getRank
(
Integer
star
)
{
return
super
.
getSessionTemplate
().
selectOne
(
getStatement
(
"getRank"
),
star
);
}
@Override
public
int
getAllCounts
()
{
return
super
.
getSessionTemplate
().
selectOne
(
getStatement
(
"getAllCounts"
));
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/BookGroupBiz.java
View file @
a802d072
...
...
@@ -1006,4 +1006,6 @@ public interface BookGroupBiz {
*社群码下载选择样式
*/
BackgroundGroupQrcodeDTO
getBackgroundGroupQr
(
BackgroundGroupQrcodeDTO
backgroundGroupQrcodeDTO
);
List
<
BookServeDTO
>
getBookAndBookGroupServeIdsFive
(
Long
adviserId
,
Long
bookId
,
Long
channelId
);
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
View file @
a802d072
...
...
@@ -5204,7 +5204,93 @@ public class BookGroupBizImpl implements BookGroupBiz {
}
@Override
public
List
<
BookServeDTO
>
getBookAndBookGroupServeIdsFive
(
Long
adviserId
,
Long
bookId
,
Long
channelId
)
{
List
<
BookServeDTO
>
serveDTOList
=
new
ArrayList
<>();
BookGroupDTO
bookGroupDTO
=
bookGroupDao
.
getDTOByBookId
(
bookId
,
channelId
,
adviserId
);
List
<
Long
>
appIds
=
new
ArrayList
<>();
List
<
Long
>
productIds
=
new
ArrayList
<>();
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
channelId
);
if
(
null
==
accountSettingDto
){
return
new
ArrayList
<>();
}
//先排纸书二维码资源,后排社群书资源,张文庆
//现代纸书二维码配置资源
BookServeParamVO
serveParamVO
=
new
BookServeParamVO
();
serveParamVO
.
setAdviserId
(
adviserId
);
serveParamVO
.
setBookId
(
bookId
);
serveParamVO
.
setChannelId
(
channelId
);
List
<
BookServeVO
>
bookServeVOS
=
qrcodeSceneConsr
.
listBookServeIds
(
serveParamVO
);
if
(!
ListUtils
.
isEmpty
(
bookServeVOS
))
{
for
(
BookServeVO
bookServeVO
:
bookServeVOS
)
{
if
(
serveDTOList
.
size
()>=
5
){
break
;
}
Long
serveId
=
bookServeVO
.
getServeId
();
BookServeDTO
bookServeDTO
=
new
BookServeDTO
();
bookServeDTO
.
setTypeCode
(
bookServeVO
.
getTypeCode
());
bookServeDTO
.
setFromType
(
bookServeVO
.
getFromType
());
bookServeDTO
.
setFromTypeName
(
bookServeVO
.
getFromTypeName
());
String
url
=
SendWeixinRequestTools
.
splitUrl
(
accountSettingDto
,
bookServeVO
.
getUrl
());
if
(
AppAndProductTypeEnum
.
APP
.
value
.
equals
(
bookServeVO
.
getTypeCode
())
&&
!
appIds
.
contains
(
serveId
))
{
bookServeDTO
.
setServeId
(
serveId
);
bookServeDTO
.
setServeType
(
bookServeVO
.
getTypeCode
());
bookServeDTO
.
setUrl
(
url
);
serveDTOList
.
add
(
bookServeDTO
);
appIds
.
add
(
serveId
);
}
else
if
(
AppAndProductTypeEnum
.
PRODUCT
.
value
.
equals
(
bookServeVO
.
getTypeCode
())
&&
!
productIds
.
contains
(
serveId
))
{
bookServeDTO
.
setServeId
(
serveId
);
bookServeDTO
.
setServeType
(
bookServeVO
.
getTypeCode
());
bookServeDTO
.
setUrl
(
url
);
serveDTOList
.
add
(
bookServeDTO
);
productIds
.
add
(
serveId
);
}
}
}
if
(
null
!=
bookGroupDTO
&&
serveDTOList
.
size
()<
5
)
{
//有社群书
//社群书配置资源
List
<
BookGroupServe
>
bookGroupServes
=
bookGroupServeDao
.
getListByBookGroupId
(
bookGroupDTO
.
getId
());
if
(!
ListUtils
.
isEmpty
(
bookGroupServes
))
{
for
(
BookGroupServe
bookGroupServe
:
bookGroupServes
)
{
if
(
serveDTOList
.
size
()>=
5
){
break
;
}
BookServeDTO
bookServeDTO
=
new
BookServeDTO
();
BeanUtils
.
copyProperties
(
bookGroupServe
,
bookServeDTO
);
String
url
=
SendWeixinRequestTools
.
splitUrl
(
accountSettingDto
,
bookGroupServe
.
getServeUrl
());
bookServeDTO
.
setUrl
(
url
);
bookServeDTO
.
setTypeCode
(
bookServeDTO
.
getServeType
());
bookServeDTO
.
setFromType
(
bookGroupServe
.
getTypeCode
());
bookServeDTO
.
setFromTypeName
(
bookGroupServe
.
getFromType
());
Long
serveId
=
bookGroupServe
.
getServeId
();
if
(
AppAndProductTypeEnum
.
APP
.
value
.
equals
(
bookServeDTO
.
getServeType
())
&&
!
appIds
.
contains
(
serveId
))
{
serveDTOList
.
add
(
bookServeDTO
);
appIds
.
add
(
serveId
);
}
else
if
(
AppAndProductTypeEnum
.
PRODUCT
.
value
.
equals
(
bookServeDTO
.
getServeType
())
&&
!
productIds
.
contains
(
serveId
)){
serveDTOList
.
add
(
bookServeDTO
);
productIds
.
add
(
serveId
);
}
}
}
}
return
serveDTOList
;
}
@Override
public
List
<
BookServeDTO
>
getBookAndBookGroupServeIds
(
Long
adviserId
,
Long
bookId
,
Long
channelId
)
{
List
<
BookServeDTO
>
result
=
new
ArrayList
();
String
key
=
"getBookAndBookGroupServeIds"
+
adviserId
+
"_"
+
bookId
+
"_"
+
channelId
;
if
(
JedisClusterUtils
.
exists
(
key
)){
result
=
JedisClusterUtils
.
getJsonList
(
key
,
BookServeDTO
.
class
);
}
else
{
result
=
getBookServes
(
adviserId
,
bookId
,
channelId
);
JedisClusterUtils
.
setJsonList
(
key
,
result
,
300
);
}
return
result
;
}
private
List
<
BookServeDTO
>
getBookServes
(
Long
adviserId
,
Long
bookId
,
Long
channelId
)
{
List
<
BookServeDTO
>
serveDTOList
=
new
ArrayList
<>();
BookGroupDTO
bookGroupDTO
=
bookGroupDao
.
getDTOByBookId
(
bookId
,
channelId
,
adviserId
);
List
<
Long
>
appIds
=
new
ArrayList
<>();
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/impl/BookGroupDaoImpl.java
View file @
a802d072
...
...
@@ -10,8 +10,11 @@ import com.pcloud.book.group.dto.TopAgentBookGroupDTO;
import
com.pcloud.book.group.entity.BookGroup
;
import
com.pcloud.book.group.entity.QrChangeRecord
;
import
com.pcloud.book.group.vo.BookGroupAnalysisVO
;
import
com.pcloud.book.group.vo.BookGroupServeCountVO
;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
com.pcloud.common.utils.ListForInSQL
;
import
com.pcloud.common.utils.ListUtils
;
import
org.springframework.stereotype.Repository
;
import
java.util.HashMap
;
...
...
@@ -47,7 +50,12 @@ public class BookGroupDaoImpl extends BaseDaoImpl<BookGroup> implements BookGrou
*/
@Override
public
List
<
BookGroupDTO
>
getDTOByIds
(
List
<
Long
>
bookGroupIds
)
{
return
super
.
getSqlSession
().
selectList
(
getStatement
(
"getDTOByIds"
),
bookGroupIds
);
return
ListUtils
.
groupList4SQL
(
new
ListForInSQL
<
BookGroupDTO
>()
{
@Override
public
<
T
>
List
<
T
>
processSQL
(
List
<
Long
>
list
)
{
return
getSessionTemplate
().
selectList
(
getStatement
(
"getDTOByIds"
),
list
);
}
},
bookGroupIds
);
}
/**
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/impl/BookGroupServeDaoImpl.java
View file @
a802d072
...
...
@@ -8,11 +8,12 @@ import com.pcloud.book.group.entity.BookGroupServe;
import
com.pcloud.book.group.vo.BookGroupServeCountVO
;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
com.pcloud.common.utils.ListForInSQL
;
import
com.pcloud.common.utils.ListUtils
;
import
org.apache.commons.collections.ArrayStack
;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
* @Description
...
...
@@ -101,9 +102,18 @@ public class BookGroupServeDaoImpl extends BaseDaoImpl<BookGroupServe> implement
@Override
public
List
<
BookGroupServeCountVO
>
getServeList4Applet
(
List
<
Long
>
bookIds
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"bookIds"
,
bookIds
);
return
getSessionTemplate
().
selectList
(
getStatement
(
"getServeList4Applet"
),
map
);
return
ListUtils
.
groupList4SQL
(
new
ListForInSQL
<
BookGroupServeCountVO
>()
{
@Override
public
<
T
>
List
<
T
>
processSQL
(
List
<
Long
>
list
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"bookIds"
,
list
);
return
getSessionTemplate
().
selectList
(
getStatement
(
"getServeList4Applet"
),
map
);
}
},
bookIds
);
}
@Override
...
...
@@ -117,11 +127,28 @@ public class BookGroupServeDaoImpl extends BaseDaoImpl<BookGroupServe> implement
@Override
public
Map
<
String
,
BookGroupServeCountDTO
>
mapBookGroupQrcodeServeCount
(
List
<
Long
>
adviserIds
,
List
<
Long
>
bookIds
,
List
<
Long
>
channelIds
,
Integer
joinGroupType
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"adviserIds"
,
adviserIds
);
map
.
put
(
"bookIds"
,
bookIds
);
map
.
put
(
"channelIds"
,
channelIds
);
map
.
put
(
"joinGroupType"
,
joinGroupType
);
return
getSessionTemplate
().
selectMap
(
getStatement
(
"mapBookGroupQrcodeServeCount"
),
map
,
"bookChannelAdviserId"
);
if
(
bookIds
!=
null
&&
bookIds
.
size
()
>
500
)
{
Map
<
String
,
BookGroupServeCountDTO
>
resultMap
=
new
HashMap
<>();
List
<
List
<
Long
>>
lists
=
ListUtils
.
groupList
(
bookIds
);
for
(
List
<
Long
>
list
:
lists
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"adviserIds"
,
adviserIds
);
map
.
put
(
"bookIds"
,
list
);
map
.
put
(
"channelIds"
,
channelIds
);
map
.
put
(
"joinGroupType"
,
joinGroupType
);
Map
<
String
,
BookGroupServeCountDTO
>
objectObjectMap
=
getSessionTemplate
().
selectMap
(
getStatement
(
"mapBookGroupQrcodeServeCount"
),
map
,
"bookChannelAdviserId"
);
if
(
objectObjectMap
!=
null
){
resultMap
.
putAll
(
objectObjectMap
);
}
}
return
resultMap
;
}
else
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"adviserIds"
,
adviserIds
);
map
.
put
(
"bookIds"
,
bookIds
);
map
.
put
(
"channelIds"
,
channelIds
);
map
.
put
(
"joinGroupType"
,
joinGroupType
);
return
getSessionTemplate
().
selectMap
(
getStatement
(
"mapBookGroupQrcodeServeCount"
),
map
,
"bookChannelAdviserId"
);
}
}
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/RightsSettingBiz.java
View file @
a802d072
...
...
@@ -120,7 +120,7 @@ public interface RightsSettingBiz {
FillRightsSettingAppletsDTO
getFillRightsSettingApplets
(
Long
rightsSettingId
,
Long
wechatUserId
,
Long
rightsClassifyId
,
Integer
top
,
Long
bookId
,
Long
officialAccountsId
);
List
<
RightsItemGroup
>
getRightsItemGroups
(
Long
rightsSettingId
,
Long
adviserId
,
Long
bookId
,
Long
channelId
,
Boolean
removeCanNotBuy
,
Integer
readType
,
Long
wechatUserId
);
List
<
RightsItemGroup
>
getRightsItemGroups
(
Long
rightsSettingId
,
Long
adviserId
,
Long
bookId
,
Long
channelId
,
Boolean
removeCanNotBuy
,
Integer
readType
,
Long
wechatUserId
,
boolean
homePage
);
RightsSettingDto
getRightSettingByBookId
(
Long
bookId
,
Long
adviserId
,
Long
channelId
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
View file @
a802d072
...
...
@@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollUtil;
import
cn.hutool.core.math.MathUtil
;
import
cn.hutool.core.util.RandomUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.google.common.collect.Lists
;
import
com.pcloud.appcenter.app.dto.AppDto
;
import
com.pcloud.appcenter.assist.dto.AssistTempletDTO
;
...
...
@@ -141,6 +142,9 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Random
;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.ExecutionException
;
import
java.util.concurrent.FutureTask
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
...
...
@@ -149,6 +153,7 @@ import java.util.stream.Collectors;
@Slf4j
public
class
RightsSettingBizImpl
implements
RightsSettingBiz
{
@Autowired
private
RightsSettingDAO
rightsSettingDAO
;
@Autowired
...
...
@@ -898,7 +903,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
}
}
rightsSettingNow
.
setRightsSettingTitles
(
rightsSettingTitles
);
rightsSettingNow
.
setRightsItemGroups
(
getRightsItemGroups
(
rightsSetting
.
getId
(),
null
,
null
,
null
,
false
,
null
,
null
));
rightsSettingNow
.
setRightsItemGroups
(
getRightsItemGroups
(
rightsSetting
.
getId
(),
null
,
null
,
null
,
false
,
null
,
null
,
false
));
rightsSettingNow
.
setServesTitle
(
servesTitle
);
rightsSetting
.
setRightsSettingNow
(
rightsSettingNow
);
List
<
RightsSettingTitle
>
newRightsSettingTitles
=
new
ArrayList
<>
(
rightsSettingTitles
);
...
...
@@ -1498,12 +1503,35 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
Map
<
Long
,
GroupActivity4AppletDTO
>
groupDtoMap
=
new
HashMap
<>();
Map
<
Long
,
AppletNewsDTO
>
newsDtoMap
=
new
HashMap
<>();
List
<
RightsNowItem
>
list_remove
=
new
ArrayList
<>();
//存储已经删除群的群分类; 精选文章类型并且跳转链接包含qrcode.5rs.me
FutureTask
<
Map
<
Long
,
ProductDto
>>
task
=
null
;
FutureTask
<
Map
<
Long
,
AppDto
>>
task2
=
null
;
if
(!
ListUtils
.
isEmpty
(
productIds
))
{
productDtoMap
=
productConsr
.
getProBasesByIds
(
productIds
);
Callable
<
Map
<
Long
,
ProductDto
>>
callable
=
()
->
productConsr
.
getProBasesByIds
(
productIds
);
task
=
new
FutureTask
<>(
callable
);
new
Thread
(
task
).
start
();
}
if
(!
ListUtils
.
isEmpty
(
appIds
))
{
appDtoMap
=
appConsr
.
mapByIds4AuditPass
(
appIds
);
Callable
<
Map
<
Long
,
AppDto
>>
callable
=
()
->
appConsr
.
mapByIds4AuditPass
(
appIds
);
task2
=
new
FutureTask
<>(
callable
);
new
Thread
(
task2
).
start
();
}
if
(
task
!=
null
)
{
try
{
productDtoMap
=
task
.
get
();
}
catch
(
InterruptedException
e
)
{
log
.
error
(
"获取商品失败fillProductAndApp"
);
}
catch
(
ExecutionException
e
)
{
log
.
error
(
"获取商品失败fillProductAndApp"
);
}
}
if
(
task2
!=
null
)
{
try
{
appDtoMap
=
task2
.
get
();
}
catch
(
InterruptedException
e
)
{
log
.
error
(
"获取应用失败fillProductAndApp"
);
}
catch
(
ExecutionException
e
)
{
log
.
error
(
"获取应用失败fillProductAndApp"
);
}
}
if
(!
ListUtils
.
isEmpty
(
groupIds
))
{
groupDtoMap
=
pcloudGroupActivityBiz
.
getByIds4Now
(
groupIds
);
...
...
@@ -1511,6 +1539,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if
(!
ListUtils
.
isEmpty
(
appletNewsId
))
{
newsDtoMap
=
appletNewsBiz
.
getByIds
(
appletNewsId
);
}
Map
<
Long
,
AccountSettingDto
>
offMap
=
new
HashMap
<>();
for
(
RightsNowItem
item
:
nowItems
)
{
Integer
type
=
item
.
getType
();
if
(
RightsNowItemTypeNew
.
ONLINE_COURSE
.
value
.
equals
(
type
)
...
...
@@ -1542,7 +1571,12 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
}
}
if
(
null
!=
channelId
)
{
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
channelId
);
accountSettingDto
=
offMap
.
get
(
channelId
);
if
(
accountSettingDto
==
null
){
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
channelId
);
offMap
.
put
(
channelId
,
accountSettingDto
);
}
// accountSettingDto = qrcodeSceneConsr.getWechatInfo(channelId);
if
(
null
==
accountSettingDto
){
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"运营平台未配置公众号"
);
}
...
...
@@ -1572,7 +1606,11 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
item
.
setServeTypeCode
(
appDto
.
getTypeCode
());
item
.
setServeTypeName
(
appDto
.
getTypeName
());
item
.
setTransverseImg
(
appDto
.
getTransverseImg
());
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
appDto
.
getChannelId
());
accountSettingDto
=
offMap
.
get
(
appDto
.
getChannelId
());
if
(
accountSettingDto
==
null
){
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
appDto
.
getChannelId
());
offMap
.
put
(
appDto
.
getChannelId
(),
accountSettingDto
);
}
if
(
null
==
accountSettingDto
){
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"运营平台未配置公众号"
);
}
...
...
@@ -2377,7 +2415,16 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
}
// 获取配套资料
if
(
RightsNowItemTypeNew
.
SERVES
.
value
.
equals
(
type
))
{
RightsSetting
rightsSetting4Serves
=
setServe
(
rightsSetting
,
adviserId
,
bookId
,
channelId
,
readType
);
String
key
=
"SERVER_TYPE:"
+
rightsSettingId
+
"_"
+
adviserId
+
"_"
+
bookId
+
"_"
+
channelId
+
"_"
+
readType
;
RightsSetting
rightsSetting4Serves
;
if
(
JedisClusterUtils
.
exists
(
key
)){
String
s
=
JedisClusterUtils
.
get
(
key
);
rightsSetting4Serves
=
JSON
.
parseObject
(
s
,
RightsSetting
.
class
);
}
else
{
rightsSetting4Serves
=
setServe
(
rightsSetting
,
adviserId
,
bookId
,
channelId
,
readType
);
JedisClusterUtils
.
set
(
key
,
JSON
.
toJSONString
(
rightsSetting4Serves
),
10
*
60
);
}
// rightsSetting4Serves = setServe(rightsSetting, adviserId, bookId, channelId, readType);
fillCollect
(
wechatUserId
,
rightsSetting4Serves
,
type
);
}
// 获取抽奖权益
...
...
@@ -2473,15 +2520,16 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if
(
ListUtils
.
isEmpty
(
rightsNowItems
))
{
return
true
;
}
List
<
ServeCollect
>
serveCollects
=
new
ArrayList
<>();
rightsNowItems
.
forEach
(
e
->
{
ServeCollect
serveCollect
=
new
ServeCollect
();
serveCollect
.
setWechatUserId
(
wechatUserId
);
serveCollect
.
setServeId
(
e
.
getServeId
());
serveCollect
.
setServeType
(
Objects
.
equals
(
e
.
getServeType
(),
AppAndProductTypeEnum
.
PRODUCT
.
value
)
?
AppletRecordTypeEnum
.
PRODUCT
.
value
:
AppletRecordTypeEnum
.
APP
.
value
);
serveCollects
.
add
(
serveCollect
);
});
List
<
ServeCollect
>
serveCollectList
=
serveCollectBiz
.
getList4RightsSetting
(
serveCollects
);
// List<ServeCollect> serveCollects = new ArrayList<>();
// rightsNowItems.forEach(e -> {
// ServeCollect serveCollect = new ServeCollect();
// serveCollect.setWechatUserId(wechatUserId);
// serveCollect.setServeId(e.getServeId());
// serveCollect.setServeType(Objects.equals(e.getServeType(), AppAndProductTypeEnum.PRODUCT.value) ? AppletRecordTypeEnum.PRODUCT.value : AppletRecordTypeEnum.APP.value);
// serveCollects.add(serveCollect);
// });
// List<ServeCollect> serveCollectList = serveCollectBiz.getList4RightsSetting(serveCollects);
List
<
ServeCollect
>
serveCollectList
=
serveCollectBiz
.
getList4RightsSettingByWechatUserId
(
wechatUserId
);
if
(
ListUtils
.
isEmpty
(
serveCollectList
))
{
return
true
;
}
...
...
@@ -2527,7 +2575,8 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
serveCollect
.
setServeType
(
Objects
.
equals
(
e
.
getServeType
(),
AppAndProductTypeEnum
.
PRODUCT
.
value
)
?
AppletRecordTypeEnum
.
PRODUCT
.
value
:
AppletRecordTypeEnum
.
APP
.
value
);
serveCollects
.
add
(
serveCollect
);
});
List
<
ServeCollect
>
serveCollectList
=
serveCollectBiz
.
getList4RightsSetting
(
serveCollects
);
// List<ServeCollect> serveCollectList = serveCollectBiz.getList4RightsSetting(serveCollects);
List
<
ServeCollect
>
serveCollectList
=
serveCollectBiz
.
getList4RightsSettingByWechatUserId
(
wechatUserId
);
if
(
ListUtils
.
isEmpty
(
serveCollectList
))
{
return
;
}
...
...
@@ -2710,7 +2759,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
RightsSettingTitle
rightsSettingTitle
=
rightsSettingTitleMapper
.
getByRightSettingIdAndType
(
rightsSetting
.
getId
(),
RightsNowItemTypeNew
.
SERVES
.
value
,
null
);
rightsSetting
.
setServesTitle
(
rightsSettingTitle
!=
null
?
rightsSettingTitle
:
new
RightsSettingTitle
());
rightsSetting
.
setRightsItemGroups
(
getRightsItemGroups
(
rightsSetting
.
getId
(),
adviserId
,
bookId
,
channelId
,
true
,
readType
,
null
));
rightsSetting
.
setRightsItemGroups
(
getRightsItemGroups
(
rightsSetting
.
getId
(),
adviserId
,
bookId
,
channelId
,
true
,
readType
,
null
,
true
));
return
rightsSetting
;
}
...
...
@@ -2821,7 +2870,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
@ParamLog
(
"根据权益id获取即享权益配套资料分组集合"
)
@Override
public
List
<
RightsItemGroup
>
getRightsItemGroups
(
Long
rightsSettingId
,
Long
adviserId
,
Long
bookId
,
Long
channelId
,
Boolean
removeCanNotBuy
,
Integer
readType
,
Long
wechatUserId
)
{
Boolean
removeCanNotBuy
,
Integer
readType
,
Long
wechatUserId
,
boolean
homePage
)
{
if
(
rightsSettingId
==
null
)
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"参数有误!"
);
}
...
...
@@ -2860,7 +2909,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if
(!
ListUtils
.
isEmpty
(
originals
)
&&
adviserId
!=
null
&&
bookId
!=
null
&&
channelId
!=
null
)
{
//获取原有的资源
RightsItemGroup
originalGroup
=
originals
.
get
(
0
);
List
<
RightsNowItem
>
originalItems
=
getOriginalItems
(
originalGroup
.
getId
(),
adviserId
,
bookId
,
channelId
,
rightsSettingId
);
List
<
RightsNowItem
>
originalItems
=
getOriginalItems
(
originalGroup
.
getId
(),
adviserId
,
bookId
,
channelId
,
rightsSettingId
,
homePage
);
nowItems
.
addAll
(
originalItems
);
}
//填充应用和作品
...
...
@@ -3032,12 +3081,17 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
}
@ParamLog
(
"获取原有配套资料"
)
private
List
<
RightsNowItem
>
getOriginalItems
(
Long
originalGroupId
,
Long
adviserId
,
Long
bookId
,
Long
channelId
,
Long
rightsSettingId
)
{
private
List
<
RightsNowItem
>
getOriginalItems
(
Long
originalGroupId
,
Long
adviserId
,
Long
bookId
,
Long
channelId
,
Long
rightsSettingId
,
boolean
homePage
)
{
List
<
RightsNowItem
>
nowItems
=
new
ArrayList
<>();
if
(
originalGroupId
==
null
||
rightsSettingId
==
null
)
{
return
nowItems
;
}
List
<
BookServeDTO
>
bookServeVOS
=
bookGroupBiz
.
getBookAndBookGroupServeIds
(
adviserId
,
bookId
,
channelId
);
List
<
BookServeDTO
>
bookServeVOS
=
new
ArrayList
<>();
if
(
homePage
){
bookServeVOS
=
bookGroupBiz
.
getBookAndBookGroupServeIdsFive
(
adviserId
,
bookId
,
channelId
);
}
else
{
bookServeVOS
=
bookGroupBiz
.
getBookAndBookGroupServeIds
(
adviserId
,
bookId
,
channelId
);
}
if
(!
ListUtils
.
isEmpty
(
bookServeVOS
))
{
for
(
BookServeDTO
vo
:
bookServeVOS
)
{
RightsNowItem
item
=
new
RightsNowItem
();
...
...
@@ -3449,7 +3503,8 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
*/
private
List
<
RightsNowItem
>
getOriginServeRightsNowItem
(
Long
bookId
,
Long
channelId
,
Long
adviserId
,
Boolean
fillCollect
,
Long
wechatUserId
){
List
<
RightsNowItem
>
itemList
=
new
ArrayList
<>();
List
<
BookServeDTO
>
bookServeVOS
=
bookGroupBiz
.
getBookAndBookGroupServeIds
(
adviserId
,
bookId
,
channelId
);
List
<
BookServeDTO
>
bookServeVOS
=
new
ArrayList
<>();
bookServeVOS
=
bookGroupBiz
.
getBookAndBookGroupServeIds
(
adviserId
,
bookId
,
channelId
);
if
(
fillCollect
&&
null
!=
wechatUserId
){
bookGroupBiz
.
fillCollect4Book
(
wechatUserId
,
bookServeVOS
);
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/facade/RightsSettingFacede.java
View file @
a802d072
...
...
@@ -233,7 +233,7 @@ public class RightsSettingFacede {
if
(
null
==
rightsSettingId
){
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"参数缺失!"
);
}
return
new
ResponseDto
<>(
rightsSettingBiz
.
getRightsItemGroups
(
rightsSettingId
,
adviserId
,
bookId
,
channelId
,
true
,
readType
,
wechatUserId
));
return
new
ResponseDto
<>(
rightsSettingBiz
.
getRightsItemGroups
(
rightsSettingId
,
adviserId
,
bookId
,
channelId
,
true
,
readType
,
wechatUserId
,
false
));
}
@ApiOperation
(
"根据书刊的分类获取对应的分类权益信息"
)
...
...
pcloud-service-book/src/main/resources/mapper/applet/AppletNews.xml
View file @
a802d072
...
...
@@ -342,7 +342,7 @@
n.pic1,
n.pic2,
n.pic3,
n.content,
--
n.content,
n.show_state showState,
n.create_time createTime,
n.first_classify firstClassify,
...
...
pcloud-service-book/src/main/resources/mapper/applet/ServeCollect.Mapper.xml
View file @
a802d072
...
...
@@ -183,6 +183,19 @@
and serve_type = 1
</update>
<select
id=
"getList4RightsSettingByWechatUserId"
parameterType=
"list"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from
serve_collect
where
is_delete = 0
and
wechat_user_id = #{wechatUserId}
</select>
<select
id=
"getList4RightsSetting"
parameterType=
"list"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
...
...
pcloud-service-book/src/main/resources/mapper/cultivate/Cultivate.xml
View file @
a802d072
...
...
@@ -17,6 +17,15 @@
id, wechat_user_id, energy, fish_ball, star, lighten, create_time,update_time,is_home
</sql>
<select
id=
"getRank"
resultType=
"int"
>
select count(1)+1 from cultivate where star>#{star}
</select>
<select
id=
"getAllCounts"
resultType=
"int"
>
select count(1) from cultivate
</select>
<insert
id=
"insert"
parameterType=
"com.pcloud.book.cultivate.entity.Cultivate"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into cultivate
(
...
...
pcloud-service-book/src/test/java/com.pcloud.book.test/ESBookAndAdviserBizTest.java
View file @
a802d072
...
...
@@ -5,6 +5,8 @@ import com.pcloud.book.BookApplication;
import
com.pcloud.book.es.biz.ESBookAndAdviserBiz
;
import
com.pcloud.book.es.biz.impl.IKAnalyzerUtil
;
import
com.pcloud.book.es.entity.ESBookAndAdviser
;
import
com.pcloud.book.group.dao.BookGroupServeDao
;
import
com.pcloud.book.group.vo.BookGroupServeCountVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.time.StopWatch
;
...
...
@@ -15,6 +17,10 @@ import org.springframework.boot.test.context.SpringBootTest;
import
org.springframework.data.domain.Page
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
java.util.ArrayList
;
import
java.util.List
;
@Slf4j
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringBootTest
(
classes
=
{
BookApplication
.
class
,
ESBookAndAdviserBizTest
.
class
})
...
...
@@ -23,6 +29,8 @@ public class ESBookAndAdviserBizTest {
@Autowired
private
ESBookAndAdviserBiz
esBookAndAdviserBiz
;
@Test
public
void
testes
()
{
StopWatch
sw
=
new
StopWatch
();
...
...
pcloud-service-book/src/test/java/com.pcloud.book.test/SlowSQLTest.java
0 → 100644
View file @
a802d072
package
com
.
pcloud
.
book
.
test
;
import
com.pcloud.book.BookApplication
;
import
com.pcloud.book.group.dao.BookGroupDao
;
import
com.pcloud.book.group.dao.BookGroupServeDao
;
import
com.pcloud.book.group.dto.BookGroupDTO
;
import
com.pcloud.book.group.vo.BookGroupServeCountVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.io.FileUtils
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.List
;
@Slf4j
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringBootTest
(
classes
=
{
BookApplication
.
class
})
public
class
SlowSQLTest
{
@Autowired
private
BookGroupServeDao
bookGroupServeDao
;
@Autowired
private
BookGroupDao
bookGroupDao
;
@Test
public
void
testBookGroupServeDao
(){
List
<
Long
>
bookIds
=
new
ArrayList
<>();
bookIds
.
add
(
4L
);
bookIds
.
add
(
5L
);
List
<
BookGroupServeCountVO
>
serveList4Applet
=
bookGroupServeDao
.
getServeList4Applet
(
bookIds
);
List
<
BookGroupServeCountVO
>
serveList4Applet1
=
bookGroupServeDao
.
getServeList4Applet
(
getTestBookIdList
());
System
.
out
.
println
(
1
);
}
@Test
public
void
testGetDTOByIds
(){
List
<
BookGroupDTO
>
dtoByIds
=
bookGroupDao
.
getDTOByIds
(
getTestBookIdList
());
}
public
static
List
<
Long
>
getTestBookIdList
(){
return
TestBookList
.
getBookIdList
();
}
}
pcloud-service-book/src/test/java/com.pcloud.book.test/TestBookList.java
0 → 100644
View file @
a802d072
package
com
.
pcloud
.
book
.
test
;
import
java.util.Arrays
;
import
java.util.List
;
public
class
TestBookList
{
private
static
List
<
Long
>
bookIdList
=
Arrays
.
asList
(
59L
,
125L
,
246L
,
457L
,
544L
,
680L
,
793L
,
1021L
,
1090L
,
1129L
,
1188L
,
1452L
,
1714L
,
1912L
,
2045L
,
2046L
,
2338L
,
2340L
,
2351L
,
2498L
,
2673L
,
2695L
,
3618L
,
4294L
,
5246L
,
5738L
,
6308L
,
6455L
,
6485L
,
6538L
,
9309L
,
9554L
,
9937L
,
9966L
,
10130L
,
10132L
,
10260L
,
10266L
,
10460L
,
10493L
,
10515L
,
10525L
,
10968L
,
11148L
,
11990L
,
12020L
,
12081L
,
12339L
,
12446L
,
12589L
,
12616L
,
12726L
,
14367L
,
14369L
,
14522L
,
14794L
,
15037L
,
15119L
,
15132L
,
15191L
,
15443L
,
15919L
,
17269L
,
17327L
,
17390L
,
18278L
,
18562L
,
18624L
,
19095L
,
19385L
,
20701L
,
21016L
,
21060L
,
21193L
,
22121L
,
22275L
,
23207L
,
24071L
,
24091L
,
24456L
,
24470L
,
24515L
,
24557L
,
25774L
,
25928L
,
27432L
,
27569L
,
28381L
,
29418L
,
29464L
,
29470L
,
29584L
,
29902L
,
30768L
,
31152L
,
31894L
,
32983L
,
33054L
,
33070L
,
33081L
,
33379L
,
33408L
,
33419L
,
33423L
,
33464L
,
33504L
,
33512L
,
33647L
,
33716L
,
33741L
,
33990L
,
34055L
,
34064L
,
34652L
,
34658L
,
34756L
,
35013L
,
35052L
,
35102L
,
35128L
,
35395L
,
35408L
,
35447L
,
35475L
,
35587L
,
35691L
,
35699L
,
35885L
,
35907L
,
35928L
,
36030L
,
36121L
,
36188L
,
36255L
,
36333L
,
36353L
,
36474L
,
36556L
,
36804L
,
36929L
,
36958L
,
37030L
,
37045L
,
37046L
,
37047L
,
37051L
,
37091L
,
37903L
,
37981L
,
38350L
,
38449L
,
38694L
,
39373L
,
39384L
,
39395L
,
39401L
,
39414L
,
39433L
,
39538L
,
39613L
,
39685L
,
39688L
,
39720L
,
39753L
,
40265L
,
40692L
,
40887L
,
40940L
,
40984L
,
40993L
,
41215L
,
41216L
,
41529L
,
41536L
,
41541L
,
41699L
,
41734L
,
42852L
,
43230L
,
44001L
,
44308L
,
45372L
,
46358L
,
46687L
,
46929L
,
47009L
,
47029L
,
48157L
,
48643L
,
49738L
,
50196L
,
50263L
,
50318L
,
50373L
,
50656L
,
51332L
,
51466L
,
52480L
,
53175L
,
53278L
,
53279L
,
53702L
,
53709L
,
54531L
,
54980L
,
55060L
,
55570L
,
55580L
,
55581L
,
55582L
,
55596L
,
55601L
,
55602L
,
55606L
,
55613L
,
55655L
,
56001L
,
56013L
,
56028L
,
56128L
,
57027L
,
57692L
,
57720L
,
59505L
,
60672L
,
61299L
,
61327L
,
61455L
,
61547L
,
61644L
,
61725L
,
61730L
,
61760L
,
61786L
,
61795L
,
61804L
,
61993L
,
62008L
,
62039L
,
63355L
,
63496L
,
65404L
,
65491L
,
67491L
,
67695L
,
67802L
,
67953L
,
68025L
,
68028L
,
68068L
,
68418L
,
68587L
,
68797L
,
68834L
,
69002L
,
69721L
,
69982L
,
71653L
,
72302L
,
72344L
,
72730L
,
72733L
,
72734L
,
72735L
,
74064L
,
74410L
,
74584L
,
74727L
,
74748L
,
75218L
,
75221L
,
75421L
,
75914L
,
76135L
,
76255L
,
76309L
,
76728L
,
76922L
,
77058L
,
77146L
,
77264L
,
77285L
,
77290L
,
80908L
,
81994L
,
82349L
,
82361L
,
82879L
,
83521L
,
84688L
,
84718L
,
84942L
,
85429L
,
85659L
,
85695L
,
85758L
,
85804L
,
85832L
,
85859L
,
85890L
,
85897L
,
85916L
,
85926L
,
85928L
,
85932L
,
85940L
,
85947L
,
86428L
,
86656L
,
86679L
,
86703L
,
86719L
,
86740L
,
88127L
,
88365L
,
88469L
,
88634L
,
88652L
,
89107L
,
89439L
,
91040L
,
91066L
,
91070L
,
91076L
,
91084L
,
91270L
,
91687L
,
91778L
,
92037L
,
92146L
,
92291L
,
92413L
,
92752L
,
92849L
,
93448L
,
93509L
,
93559L
,
93562L
,
93568L
,
93573L
,
93628L
,
93632L
,
93927L
,
93950L
,
94041L
,
94055L
,
94209L
,
94233L
,
94234L
,
94264L
,
94902L
,
94904L
,
95017L
,
95126L
,
95170L
,
95331L
,
95335L
,
95339L
,
95345L
,
95380L
,
95426L
,
95431L
,
95441L
,
95457L
,
95473L
,
95479L
,
95482L
,
95484L
,
95489L
,
95537L
,
95538L
,
95549L
,
95619L
,
95635L
,
95793L
,
96086L
,
96098L
,
96131L
,
96137L
,
96166L
,
96600L
,
97375L
,
97499L
,
97501L
,
97850L
,
97885L
,
98721L
,
98726L
,
98735L
,
98772L
,
98777L
,
98779L
,
98793L
,
98805L
,
98810L
,
98820L
,
98821L
,
98852L
,
98863L
,
98953L
,
98976L
,
98988L
,
99010L
,
99050L
,
99064L
,
99086L
,
99116L
,
99184L
,
99199L
,
99240L
,
99258L
,
99273L
,
99293L
,
99305L
,
99330L
,
99331L
,
99339L
,
99345L
,
99348L
,
99357L
,
99372L
,
99570L
,
99585L
,
99614L
,
100034L
,
100063L
,
100098L
,
100280L
,
101131L
,
101443L
,
101513L
,
101565L
,
101566L
,
101602L
,
101608L
,
101627L
,
101631L
,
101641L
,
101642L
,
101658L
,
102474L
,
102478L
,
103396L
,
104375L
,
104451L
,
104452L
,
104504L
,
104591L
,
104773L
,
105117L
,
105148L
,
105179L
,
105234L
,
105246L
,
105406L
,
105583L
,
105615L
,
105955L
,
106064L
,
106306L
,
106607L
,
107014L
,
107048L
,
107050L
,
107091L
,
107323L
,
107325L
,
107502L
,
109490L
,
110161L
,
110164L
,
110354L
,
110382L
,
110383L
,
110422L
,
110434L
,
110442L
,
110443L
,
110444L
,
110471L
,
110502L
,
110508L
,
110532L
,
110542L
,
110558L
,
110561L
,
110572L
,
110680L
,
110815L
,
110873L
,
110881L
,
110897L
,
111717L
,
111733L
,
111756L
,
111829L
,
111847L
,
111882L
,
112573L
,
112729L
,
112731L
,
112732L
,
113224L
,
113557L
,
113609L
,
113632L
,
113672L
,
113715L
,
114670L
,
114727L
,
114739L
,
114926L
,
115042L
,
115049L
,
115082L
,
115087L
,
115096L
,
115160L
,
115162L
,
115487L
,
115535L
,
115614L
,
116362L
,
116437L
,
116643L
,
116736L
,
116750L
,
116751L
,
116803L
,
116804L
,
116829L
,
116851L
,
117466L
,
118143L
,
118598L
,
119606L
,
120114L
,
120542L
,
120768L
,
120821L
,
120928L
,
120931L
,
120935L
,
121404L
,
121609L
,
121695L
,
121744L
,
121780L
,
121816L
,
121820L
,
122376L
,
122484L
,
122535L
,
122932L
,
123109L
,
123247L
,
123289L
,
123662L
,
123980L
,
125439L
,
125537L
,
125605L
,
125704L
,
125724L
,
125725L
,
125729L
,
125747L
,
125794L
,
125890L
,
125967L
,
125974L
,
125982L
,
125983L
,
125984L
,
126193L
,
126217L
,
126253L
,
126280L
,
126284L
,
126300L
,
126303L
,
126304L
,
126306L
,
126311L
,
126327L
,
126332L
,
126354L
,
126361L
,
126364L
,
126374L
,
126385L
,
126449L
,
126516L
,
126544L
,
126594L
,
126685L
,
126715L
,
126757L
,
126783L
,
126791L
,
126845L
,
126896L
,
126908L
,
126927L
,
126977L
,
127025L
,
127039L
,
127058L
,
127147L
,
127692L
,
128264L
,
128271L
,
128840L
,
129168L
,
129169L
,
129310L
,
129352L
,
129535L
,
129542L
,
129558L
,
129586L
,
129587L
,
129603L
,
129612L
,
129856L
,
129948L
,
129950L
,
130108L
,
130110L
,
130202L
,
130425L
,
130464L
,
130474L
,
130725L
,
131122L
,
131199L
,
131231L
,
131342L
,
131381L
,
131393L
,
131406L
,
131798L
,
132057L
,
132164L
,
132170L
,
132415L
,
132459L
,
132472L
,
132477L
,
132489L
,
132520L
,
132531L
,
132589L
,
132631L
,
132641L
,
132673L
,
132682L
,
132683L
,
132900L
,
133860L
,
133905L
,
133943L
,
133958L
,
134245L
,
134255L
,
134323L
,
134324L
,
134326L
,
134343L
,
134346L
,
134401L
,
134438L
,
134483L
,
134504L
,
134712L
,
135078L
,
135262L
,
135298L
,
135437L
,
135502L
,
135518L
,
135628L
,
135765L
,
136067L
,
136072L
,
136085L
,
136086L
,
136091L
,
136092L
,
136199L
,
136219L
,
136395L
,
136439L
,
136471L
,
136484L
,
136491L
,
136808L
,
136811L
,
136822L
,
136843L
,
136847L
,
136854L
,
136889L
,
136908L
,
136920L
,
138146L
,
138255L
,
138952L
,
138958L
,
139053L
,
139075L
,
139083L
,
139096L
,
139108L
,
139127L
,
139128L
,
139860L
,
140587L
,
141490L
,
142463L
,
142474L
,
142481L
,
142501L
,
142556L
,
143066L
,
143068L
,
143182L
,
143242L
,
144006L
,
144036L
,
144229L
,
144274L
,
144383L
,
144456L
,
144705L
,
145693L
,
145746L
,
145805L
,
145966L
,
146163L
,
146631L
,
146633L
,
146914L
,
147571L
,
147656L
,
148281L
,
148448L
,
148497L
,
148501L
,
148739L
,
149256L
,
149268L
,
149882L
,
149899L
,
150538L
,
150792L
,
150822L
,
150899L
,
150905L
,
150946L
,
151580L
,
151821L
,
152144L
,
152146L
,
152504L
,
152505L
,
152507L
,
152509L
,
152602L
,
199400L
,
199426L
,
199448L
,
199568L
,
199736L
,
199831L
,
200112L
,
200179L
,
200193L
,
200275L
,
200332L
,
200567L
,
200682L
,
200686L
,
200696L
,
200712L
,
200830L
,
200844L
,
201135L
,
201151L
,
201851L
,
202135L
,
202149L
,
202177L
,
202256L
,
202278L
,
202345L
,
202375L
,
202395L
,
202431L
,
202467L
,
202488L
,
202643L
,
202656L
,
202666L
,
202739L
,
203244L
,
203286L
,
203296L
,
203370L
,
203430L
,
203665L
,
203744L
,
203875L
,
203972L
,
204512L
,
204805L
,
205014L
,
205058L
,
205267L
,
205302L
,
205344L
,
205347L
,
205363L
,
205386L
,
205405L
,
205419L
,
205427L
,
205449L
,
205527L
,
205576L
,
205760L
,
205774L
,
205777L
,
205830L
,
205855L
,
205899L
,
205911L
,
205967L
,
206114L
,
206167L
,
206206L
,
206360L
,
206393L
,
206504L
,
206743L
,
206933L
,
206977L
,
207511L
,
207597L
,
207682L
,
207775L
,
207866L
,
207894L
,
207966L
,
208487L
,
208759L
,
208809L
,
208905L
,
208916L
,
209089L
,
209124L
,
209131L
,
209258L
,
209751L
,
209833L
,
209839L
,
209840L
,
209879L
,
209883L
,
210068L
,
210231L
,
210247L
,
210277L
,
210337L
,
210338L
,
210445L
,
210475L
,
210501L
,
210508L
,
210529L
,
210533L
,
210674L
,
210723L
,
210835L
,
210889L
,
210958L
,
211052L
,
211110L
,
211117L
,
211119L
,
211123L
,
211197L
,
211224L
,
211252L
,
211302L
,
211325L
,
211329L
,
211392L
,
211393L
,
211833L
,
211841L
,
212240L
,
212252L
,
212275L
,
212457L
,
212518L
,
212563L
,
212566L
,
212577L
,
212584L
,
212698L
,
212913L
,
213132L
,
213234L
,
213250L
,
213316L
,
213412L
,
213464L
,
213487L
,
213503L
,
213529L
,
213531L
,
213628L
,
213777L
,
213841L
,
213958L
,
213993L
,
214015L
,
214039L
,
214371L
,
214467L
,
214531L
,
214542L
,
214553L
,
214607L
,
214613L
,
214722L
,
214740L
,
214826L
,
214916L
,
215030L
,
215035L
,
215119L
,
215225L
,
215232L
,
215246L
,
215287L
,
215354L
,
215475L
,
215529L
,
215601L
,
215728L
,
215881L
,
216401L
,
216732L
,
216963L
,
217141L
,
217300L
,
217571L
,
217591L
,
217648L
,
217654L
,
217778L
,
217897L
,
218004L
,
218182L
,
218263L
,
218358L
,
218397L
,
218626L
,
218988L
,
219313L
,
219458L
,
219760L
,
219780L
,
219842L
,
219890L
,
219922L
,
219941L
,
219983L
,
220130L
,
220193L
,
220454L
,
220485L
,
220949L
,
221037L
,
221062L
,
221210L
,
221407L
,
222891L
,
224427L
,
224755L
,
225117L
,
225261L
,
225480L
,
225714L
,
226156L
,
226257L
,
226566L
,
226609L
,
226623L
,
226693L
,
226730L
,
226904L
,
226929L
,
227115L
,
227272L
,
227455L
,
227503L
,
227922L
,
227991L
,
228473L
,
230419L
,
231709L
,
232069L
,
232903L
,
233712L
,
233763L
,
233787L
,
233873L
,
233950L
,
234112L
,
234113L
,
234188L
,
234604L
,
234631L
,
235166L
,
235176L
,
235535L
,
235749L
,
236189L
,
236572L
,
236888L
,
236984L
,
237135L
,
237370L
,
237413L
,
237554L
,
237737L
,
237770L
,
237810L
,
237845L
,
237879L
,
237958L
,
238105L
,
238152L
,
238222L
,
238245L
,
238322L
,
238385L
,
238511L
,
238653L
,
238676L
,
238686L
,
238706L
,
238796L
,
238938L
,
239144L
,
239218L
,
239475L
,
239514L
,
239524L
,
239530L
,
240059L
,
240270L
,
240737L
,
240817L
,
240945L
,
241014L
,
241130L
,
242220L
,
242242L
,
242274L
,
242276L
,
242311L
,
242328L
,
242343L
,
242412L
,
242413L
,
242477L
,
242619L
,
242946L
,
243032L
,
243066L
,
243091L
,
243275L
,
243403L
,
243467L
,
243646L
,
243711L
,
243944L
,
244115L
,
244200L
,
244201L
,
244502L
,
244602L
,
244671L
,
244756L
,
244972L
,
244979L
,
245069L
,
245334L
,
246085L
,
246207L
,
247063L
,
247064L
,
247521L
,
247712L
,
247819L
,
251622L
,
252076L
,
252376L
,
252379L
,
252562L
,
252987L
,
253418L
,
254205L
,
254330L
,
254713L
,
254770L
,
254833L
,
254928L
,
254956L
,
255209L
,
255315L
,
255580L
,
255581L
,
255639L
,
255650L
,
255695L
,
255718L
,
255725L
,
255860L
,
256348L
,
256407L
,
256737L
,
257377L
,
257941L
,
258012L
,
258016L
,
258031L
,
258274L
,
258707L
,
258753L
,
258807L
,
258821L
,
258932L
,
258986L
,
258997L
,
259055L
,
259453L
,
259708L
,
266368L
,
267109L
,
268607L
,
268611L
,
268748L
,
268828L
,
269228L
,
269390L
,
269498L
,
269919L
,
270331L
,
270764L
,
271066L
,
271180L
,
271330L
,
271364L
,
271414L
,
272274L
,
272847L
,
273854L
,
273997L
,
274623L
,
275955L
,
276145L
,
276147L
,
276345L
,
276941L
,
277201L
,
277494L
,
277549L
,
278529L
,
278960L
,
279006L
,
279023L
,
279300L
,
279743L
,
280134L
,
280139L
,
280197L
,
280292L
,
280475L
,
280596L
,
280761L
,
280837L
,
280895L
,
280927L
,
280976L
,
281118L
,
281281L
,
281307L
,
281402L
,
281501L
,
281632L
,
281764L
,
281772L
,
282319L
,
283177L
,
283762L
,
283964L
,
284185L
,
287469L
,
290117L
,
291950L
,
292781L
,
293168L
,
293214L
,
293464L
,
293502L
,
295134L
,
296519L
,
297814L
,
297948L
,
298182L
,
298442L
,
298914L
,
298976L
,
299276L
,
299326L
,
300181L
,
301749L
,
304345L
,
305888L
,
306340L
,
310329L
,
315234L
,
315243L
,
316316L
,
317029L
,
317340L
,
318215L
,
321567L
,
322512L
,
322963L
,
324622L
,
324847L
,
324894L
,
325209L
,
326247L
,
326532L
,
326766L
,
327285L
,
327539L
,
327595L
,
327871L
,
328027L
,
328048L
,
328124L
,
328340L
,
328418L
,
328558L
,
328567L
,
328592L
,
328686L
,
328938L
,
329315L
,
329426L
,
329438L
,
329471L
,
329598L
,
333352L
,
334047L
,
334078L
,
334273L
,
334608L
,
334672L
,
335470L
,
336634L
,
337187L
,
337435L
,
337458L
,
337470L
,
337818L
,
337943L
,
338000L
,
338317L
,
338367L
,
338540L
,
338541L
,
338973L
,
339021L
,
339227L
,
339297L
,
339371L
,
339518L
,
339750L
,
340254L
,
340384L
,
341027L
,
341344L
,
344248L
,
344333L
,
344375L
,
346688L
,
347789L
,
372636L
,
372922L
,
373119L
,
373386L
,
373618L
,
373797L
,
373809L
,
373947L
,
374597L
,
374686L
,
374953L
,
375190L
,
375551L
,
375627L
,
375985L
,
376217L
,
376349L
,
376736L
,
377107L
,
377724L
,
377728L
,
377741L
,
377876L
,
377972L
,
377979L
,
378017L
,
378036L
,
378110L
,
378213L
,
378341L
,
378489L
,
379487L
,
380223L
,
380269L
,
380825L
,
381052L
,
381140L
,
381296L
,
381481L
,
381544L
,
381677L
,
382070L
,
382540L
,
382601L
,
383078L
,
383327L
,
383889L
,
384119L
,
384418L
,
384423L
,
384783L
,
386217L
,
386394L
,
386790L
,
387146L
,
387921L
,
388668L
,
388798L
,
388909L
,
389015L
,
389707L
,
390843L
,
391224L
,
393732L
,
394457L
,
394466L
,
395873L
,
397042L
,
397353L
,
421160L
,
424358L
,
425037L
,
425601L
,
425652L
,
425704L
,
426090L
,
426130L
,
426165L
,
426231L
,
426761L
,
440214L
,
440434L
,
441205L
,
441692L
,
441923L
,
442044L
,
443820L
,
444303L
,
444724L
,
444798L
,
445820L
,
445906L
,
445985L
,
446158L
,
446645L
,
446859L
,
446916L
,
446937L
,
447030L
,
447045L
,
447772L
,
448120L
,
449511L
,
451532L
,
451555L
,
451606L
,
451865L
,
451872L
,
452014L
,
452145L
,
452548L
,
452860L
,
453328L
,
453696L
,
453819L
,
453888L
,
454070L
,
454285L
,
454547L
,
454686L
,
454847L
,
455613L
,
455651L
,
455816L
,
456121L
,
456206L
,
456310L
,
456585L
,
459807L
,
459885L
,
459910L
,
459972L
,
460011L
,
460025L
,
460146L
,
460174L
,
460211L
,
460260L
,
460726L
,
460916L
,
460944L
,
461038L
,
461086L
,
461087L
,
461273L
,
461511L
,
461541L
,
461767L
,
461957L
,
461987L
,
462127L
,
462362L
,
462545L
,
462550L
,
462622L
,
462649L
,
462788L
,
462988L
,
463162L
,
463216L
,
464050L
,
464357L
,
465289L
,
466190L
,
466388L
,
466891L
,
468031L
,
468722L
,
469423L
,
469814L
,
470317L
,
471059L
,
471485L
,
471655L
,
473192L
,
474077L
,
474333L
,
474569L
,
474712L
,
474946L
,
474970L
,
475330L
,
477104L
,
477200L
,
477215L
,
477221L
,
477391L
,
477488L
,
477573L
,
477649L
,
477673L
,
477779L
,
478171L
,
478287L
,
478479L
,
479765L
,
480061L
,
480096L
,
481441L
,
481500L
,
481559L
,
481637L
,
481728L
,
481810L
,
481930L
,
482290L
,
482551L
,
482874L
,
483077L
,
483190L
,
483503L
,
483957L
,
484368L
,
484432L
,
484901L
,
484943L
,
485993L
,
486292L
,
486368L
,
487696L
,
488000L
,
489409L
,
490786L
,
492677L
,
492761L
,
493685L
,
493772L
,
495298L
,
495422L
,
498110L
,
499386L
,
500784L
,
501815L
,
502174L
,
502179L
,
502440L
,
502691L
,
502984L
,
503083L
,
503766L
,
507758L
,
507986L
,
509094L
,
510470L
,
510700L
,
511537L
,
511544L
,
512426L
,
512430L
,
522737L
,
523151L
,
523236L
,
524378L
,
525645L
,
525834L
,
527281L
,
527779L
,
528204L
,
528802L
,
529299L
,
529792L
,
530657L
,
531486L
,
531718L
,
531910L
,
532125L
,
532335L
,
532579L
,
532877L
,
533309L
,
533546L
,
534233L
,
534972L
,
535976L
,
538084L
,
539725L
,
539900L
,
540198L
,
540244L
,
540319L
,
540624L
,
541184L
,
541448L
,
541629L
,
541663L
,
543149L
,
543332L
,
543869L
,
544822L
,
545484L
,
545530L
,
546402L
,
546589L
,
546647L
,
547035L
,
547179L
,
547182L
,
547183L
,
547202L
,
547311L
,
547483L
,
547484L
,
547497L
,
547618L
,
547825L
,
547946L
,
548209L
,
548461L
,
548495L
,
548612L
,
549056L
,
550085L
,
550366L
,
552012L
,
552014L
,
552050L
,
552260L
,
553616L
,
553950L
,
554320L
,
554506L
,
554552L
,
554716L
,
555129L
,
555570L
,
555646L
,
555673L
,
555709L
,
556393L
,
556485L
,
557464L
,
557967L
,
558550L
,
558789L
,
558871L
,
559290L
,
559589L
,
560081L
,
560188L
,
560401L
,
560701L
,
560957L
,
561129L
,
561588L
,
561632L
,
562077L
,
562166L
,
562262L
,
562686L
,
563919L
,
564300L
,
565082L
,
565134L
,
565190L
,
565193L
,
565234L
,
565477L
,
565525L
,
565533L
,
565591L
,
565747L
,
566114L
,
566234L
,
566291L
,
566483L
,
566527L
,
566662L
,
566672L
,
566719L
,
566782L
,
566790L
,
567103L
,
567164L
,
567225L
,
567339L
,
567401L
,
567473L
,
567757L
,
568015L
,
568016L
,
568403L
,
568688L
,
577398L
,
577418L
,
577424L
,
577486L
,
577555L
,
578005L
,
578696L
,
579101L
,
579506L
,
579562L
,
579632L
,
579679L
,
580122L
,
580478L
,
581179L
,
581492L
,
581551L
,
581731L
,
581920L
,
582642L
,
583697L
,
584000L
,
584923L
,
585205L
,
585361L
,
585835L
,
585933L
,
588705L
,
588856L
,
601501L
,
601534L
,
601803L
,
602389L
,
602392L
,
602528L
,
602773L
,
604783L
,
605331L
,
605949L
,
606096L
,
606110L
,
606509L
,
606802L
,
607024L
,
607287L
,
607666L
,
608065L
,
608290L
,
608511L
,
608786L
,
608916L
,
609117L
,
609286L
,
610791L
,
611498L
,
611822L
,
612499L
,
613504L
,
614240L
,
614480L
,
616431L
,
618182L
,
619063L
,
619747L
,
621001L
,
621111L
,
623833L
,
636574L
,
637102L
,
638605L
,
638738L
,
638932L
,
639123L
,
639274L
,
639358L
,
639462L
,
640366L
,
640649L
,
640829L
,
641249L
,
641503L
,
641675L
,
642248L
,
642525L
,
642585L
,
642670L
,
642721L
,
642761L
,
643068L
,
643273L
,
643296L
,
643422L
,
643536L
,
643558L
,
643605L
,
643779L
,
643892L
,
643946L
,
644075L
,
644095L
,
644276L
,
644301L
,
644302L
,
644391L
,
644412L
,
644451L
,
644467L
,
644563L
,
644603L
,
644944L
,
645026L
,
645114L
,
645257L
,
645439L
,
646062L
,
646250L
,
646273L
,
649311L
,
651134L
,
651148L
,
652164L
,
652349L
,
652385L
,
652413L
,
652419L
,
652503L
,
652573L
,
653258L
,
653287L
,
653550L
,
653650L
,
654118L
,
654124L
,
654608L
,
654693L
,
654834L
,
655038L
,
655476L
,
655582L
,
656381L
,
656434L
,
656470L
,
656495L
,
656552L
,
656637L
,
656644L
,
656836L
,
656853L
,
656859L
,
657091L
,
657173L
,
657575L
,
658848L
,
659263L
,
660629L
,
661836L
,
662666L
,
663580L
,
663654L
,
663707L
,
663719L
,
663756L
,
663768L
,
663778L
,
663798L
,
663885L
,
663910L
,
663968L
,
664076L
,
664323L
,
664358L
,
664360L
,
664537L
,
665005L
,
665171L
,
665253L
,
665326L
,
665330L
,
665376L
,
665486L
,
665774L
,
665783L
,
665830L
,
665905L
,
665914L
,
666029L
,
666223L
,
666434L
,
666462L
,
666520L
,
666671L
,
667179L
,
667259L
,
667479L
,
667557L
,
667794L
,
668163L
,
668218L
,
668649L
,
668704L
,
670565L
,
670806L
,
671764L
,
671789L
,
671907L
,
672005L
,
672483L
,
672528L
,
672578L
,
672906L
,
673003L
,
673539L
,
673746L
,
673794L
,
673912L
,
674157L
,
674343L
,
674631L
,
683075L
,
683102L
,
683175L
,
683179L
,
683239L
,
683240L
,
683487L
,
683574L
,
683636L
,
683644L
,
683726L
,
683831L
,
683862L
,
683992L
,
684023L
,
684392L
,
684490L
,
684652L
,
684677L
,
684756L
,
684894L
,
684913L
,
684982L
,
685516L
,
685852L
,
685916L
,
686042L
,
686051L
,
686054L
,
690888L
,
690935L
,
691203L
,
691276L
,
691369L
,
691959L
,
693391L
,
694064L
,
694259L
,
694853L
,
696793L
,
696815L
,
697269L
,
697299L
,
697567L
,
697713L
,
698113L
,
710197L
,
711736L
,
712670L
,
713091L
,
713174L
,
714011L
,
714106L
,
714423L
,
714582L
,
714811L
,
715454L
,
715523L
,
715810L
,
715889L
,
716531L
,
717342L
,
717393L
,
717529L
,
717694L
,
717816L
,
717817L
,
718091L
,
718252L
,
718313L
,
718399L
,
718407L
,
718408L
,
718413L
,
718423L
,
718426L
,
718517L
,
718907L
,
718960L
,
719332L
,
719518L
,
719697L
,
719763L
,
719862L
,
719979L
,
720227L
,
720243L
,
720614L
,
721929L
,
723326L
,
723754L
,
724036L
,
724442L
,
724533L
,
724775L
,
724859L
,
725714L
,
726263L
,
726552L
,
726656L
,
726824L
,
727105L
,
727130L
,
727133L
,
727789L
,
728677L
,
728834L
,
728951L
,
729059L
,
729268L
,
729336L
,
729518L
,
729519L
,
729528L
,
729653L
,
729786L
,
729871L
,
729881L
,
729996L
,
730063L
,
730086L
,
730299L
,
732396L
,
734267L
,
735530L
,
735677L
,
735680L
,
735708L
,
735724L
,
735851L
,
735937L
,
736132L
,
736167L
,
736182L
,
736385L
,
736428L
,
736701L
,
736714L
,
736831L
,
737174L
,
738098L
,
739858L
,
739984L
,
739995L
,
740073L
,
740081L
,
740166L
,
740334L
,
740372L
,
740431L
,
740605L
,
740798L
,
740982L
,
741934L
,
742124L
,
742210L
,
743007L
,
743085L
,
743086L
,
743325L
,
743341L
,
743400L
,
743569L
,
743574L
,
743599L
,
743620L
,
743645L
,
743694L
,
743746L
,
743756L
,
743804L
,
743841L
,
743989L
,
744063L
,
744290L
,
744450L
,
744571L
,
754148L
,
754539L
,
758801L
,
758914L
,
758928L
,
758963L
,
759028L
,
759302L
,
759377L
,
759402L
,
759517L
,
759520L
,
759537L
,
759569L
,
759586L
,
763179L
,
763187L
,
763934L
,
764112L
,
765506L
,
765512L
,
765790L
,
765877L
,
766098L
,
766181L
,
766223L
,
766388L
,
766965L
,
766984L
,
767066L
,
767095L
,
767503L
,
767563L
,
767585L
,
767679L
,
767775L
,
776235L
,
776252L
,
776639L
,
776788L
,
777548L
,
777554L
,
777676L
,
777869L
,
778824L
,
779261L
,
779852L
,
780123L
,
780396L
,
780527L
,
781542L
,
781739L
,
781869L
,
790772L
,
790782L
,
790903L
,
790946L
,
791370L
,
791406L
,
791889L
,
792837L
,
792862L
,
799662L
,
800622L
,
800933L
,
801892L
,
802056L
,
802151L
,
802306L
,
802983L
,
815519L
,
815543L
,
828204L
,
828694L
,
828713L
,
829348L
,
829353L
,
829658L
,
829816L
,
830873L
,
830981L
,
831195L
,
831219L
,
831668L
,
831759L
,
833340L
,
833821L
,
833869L
,
833877L
,
834117L
,
835064L
,
835075L
,
835237L
,
835843L
,
836376L
,
837033L
,
837359L
,
837486L
,
837529L
,
837889L
,
838551L
,
839124L
,
839169L
,
839901L
,
839902L
,
839977L
,
840312L
,
840991L
,
841281L
,
842099L
,
842307L
,
843293L
,
843773L
,
844155L
,
844349L
,
848270L
,
848510L
,
849150L
,
849488L
,
849625L
,
851712L
,
851851L
,
852657L
,
852694L
,
853778L
,
854995L
,
854997L
,
855503L
,
855644L
,
856259L
,
856871L
,
856916L
,
857505L
,
857507L
,
857609L
,
858025L
,
858400L
,
858562L
,
858585L
,
858992L
,
859427L
,
859715L
,
860222L
,
860467L
,
861229L
,
861608L
,
861999L
,
862444L
,
863095L
,
863977L
,
864128L
,
864473L
,
864740L
,
864914L
,
864924L
,
864938L
,
865220L
,
865252L
,
865630L
,
865814L
,
866605L
,
866739L
,
867004L
,
867426L
,
867764L
,
867956L
,
868819L
,
869031L
,
869324L
,
869618L
,
870129L
,
871803L
,
871902L
,
871943L
,
871946L
,
872463L
,
873006L
,
873523L
,
874036L
,
874087L
,
875096L
,
875221L
,
877702L
,
878335L
,
878960L
,
879320L
,
880554L
,
881371L
,
881406L
,
881410L
,
881413L
,
881448L
,
883101L
,
883368L
,
885528L
,
886536L
,
886747L
,
888044L
,
890422L
,
890892L
,
891185L
,
1017676L
,
1017770L
,
1018065L
,
1018470L
,
1020921L
,
1021780L
,
1022198L
,
1023212L
,
1025548L
,
1025573L
,
1026983L
,
1028103L
,
1028718L
,
1029002L
,
1033736L
,
1033998L
,
1045905L
,
1048554L
,
1054574L
,
1056424L
,
1057011L
,
1059027L
,
1061430L
,
1067661L
,
1072185L
,
1080966L
,
1099953L
,
1110721L
,
1123786L
,
1124181L
,
1126269L
,
1126393L
,
1126482L
,
1126524L
,
1126591L
,
1126605L
,
1126752L
,
1126813L
,
1126936L
,
1126969L
,
1127394L
,
1127433L
,
1127548L
,
1127615L
,
1128133L
,
1128567L
,
1130621L
,
1131082L
,
1131383L
,
1132039L
,
1132305L
,
1132347L
,
1136956L
,
1137119L
,
1137344L
,
1138459L
,
1142855L
,
1149294L
,
1150573L
,
1150588L
,
1150768L
,
1152821L
,
1153408L
,
1154210L
,
1154244L
,
1159694L
,
1163003L
,
1163063L
,
1163345L
,
1163465L
,
1164156L
,
1166918L
,
1167736L
,
1168302L
,
1168357L
,
1170310L
,
1176081L
,
1176497L
,
1176809L
,
1178585L
,
1179226L
,
1179890L
,
1180146L
,
1181815L
,
1182393L
,
1183320L
,
1183963L
,
1184595L
,
1184948L
,
1185026L
,
1185141L
,
1185263L
,
1186184L
,
1186900L
,
1186937L
,
1189630L
,
1189917L
,
1190843L
,
1190852L
,
1194215L
,
1196493L
,
1198306L
,
1199072L
,
1200971L
,
1205932L
,
1210629L
,
1211538L
,
1213902L
,
1215500L
,
1215539L
,
1216340L
,
1220058L
,
1222890L
,
1225632L
,
1226359L
,
1226938L
,
1230351L
,
1231162L
,
1231715L
,
1235505L
,
1237655L
,
1241449L
,
1241515L
,
1244610L
,
1245052L
,
1591243L
,
1593545L
,
1593802L
,
1594781L
,
1598080L
,
1601356L
,
1603674L
,
1604117L
,
1604792L
,
1606153L
,
1609583L
,
1611882L
,
1615223L
,
1628034L
,
1637338L
,
1637360L
,
1637790L
,
1639080L
,
1639312L
,
1639682L
,
1640976L
,
1641485L
,
1641962L
,
1642410L
,
1648367L
,
1648378L
,
1648866L
,
1648983L
,
1649160L
,
1649308L
,
1649458L
,
1649519L
,
1649592L
,
1649732L
,
1650456L
,
1650468L
,
1651001L
,
1656748L
,
1657875L
,
1662105L
,
1663026L
,
1663555L
,
1664412L
,
1665909L
,
1668342L
,
1669082L
,
1669638L
,
1672213L
,
1672509L
,
1672752L
,
1672943L
,
1672999L
,
1673210L
,
1673218L
,
1673228L
,
1673310L
,
1673316L
,
1673590L
,
1673607L
,
1673746L
,
1673817L
,
1673994L
,
1674135L
,
1674143L
,
1674164L
,
1674578L
,
1674705L
,
1674856L
,
1676226L
,
1679045L
,
1681195L
,
1684713L
,
1684718L
,
1691212L
,
1692509L
,
1693345L
,
1695344L
,
1696336L
,
1698860L
,
1704620L
,
1736832L
,
1738641L
,
1740483L
,
1741039L
,
1742013L
,
1751728L
,
1756326L
,
1760212L
,
1765382L
,
1767703L
,
1777369L
,
1781677L
,
1784104L
,
1786884L
,
1787476L
,
1788649L
,
1794516L
,
1794687L
,
1796342L
,
1796796L
,
1796862L
,
1796930L
,
1797363L
,
1798803L
,
1798815L
,
1799601L
,
1801000L
,
1802918L
,
1803946L
,
1804515L
,
1806372L
,
1806606L
,
1807577L
,
1807588L
,
1809004L
,
1809467L
,
1809528L
,
1809618L
,
1810663L
,
1811767L
,
1814008L
,
1814520L
,
1815120L
,
1815577L
,
1818485L
,
1819926L
,
1820252L
,
1820844L
,
1821667L
,
1821803L
,
1822712L
,
1823045L
,
1824043L
,
1824634L
,
1825497L
,
1826000L
,
1826189L
,
1826438L
,
1828112L
,
1829918L
,
1831330L
,
1833389L
,
1834045L
,
1834108L
,
1834131L
,
1835518L
,
1835529L
,
1835975L
,
1836019L
,
1839293L
,
1841309L
,
1842341L
,
1843938L
,
1845166L
,
1847221L
,
1847406L
,
1848353L
,
1848423L
,
1848576L
,
1849096L
,
1849369L
,
1853701L
,
1857003L
,
1860456L
,
1866844L
,
1870770L
,
1876193L
,
1876522L
,
1880889L
,
1881500L
,
1883983L
,
1884555L
,
1884925L
,
1890821L
,
1893266L
,
1893278L
,
1893920L
,
1897105L
,
1900998L
,
1901077L
,
1901566L
,
1902056L
,
1904156L
,
1906231L
,
1907106L
,
1907313L
,
1907729L
,
1909027L
,
1909892L
,
1910518L
,
1910838L
,
1911155L
,
1911356L
,
1915094L
,
1915268L
,
1915509L
,
1916905L
,
1917142L
,
1917692L
,
1918563L
,
1918999L
,
1921794L
,
1922593L
,
1926634L
,
1926910L
,
1926911L
,
1928912L
,
1930277L
,
1932347L
,
1933948L
,
1936166L
,
1936170L
,
1938646L
,
1941287L
,
1944135L
,
1944240L
,
1944679L
,
1946461L
,
1946670L
,
1951556L
,
1951888L
,
1951913L
,
1952855L
,
1959439L
,
1970413L
,
1971298L
,
1972256L
,
1977763L
,
1980303L
,
1988475L
,
1988534L
,
1988978L
,
1989246L
,
1989906L
,
1992811L
,
1993227L
,
1997831L
,
1998308L
,
1999653L
,
1999656L
,
2000215L
,
2001428L
,
2002769L
,
2003368L
,
2003892L
,
2005595L
,
2006433L
,
2006816L
,
2006854L
,
2007225L
,
2007670L
,
2017211L
,
2018581L
,
2018857L
,
2029745L
,
2029891L
,
2030984L
,
2031392L
,
2031835L
,
2032472L
,
2032600L
,
2035428L
,
2035744L
,
2040105L
,
2040132L
,
2045175L
,
2048591L
,
2050070L
,
2050622L
,
2051544L
,
2052250L
,
2053536L
,
2057938L
,
2058449L
,
2058787L
,
2060901L
,
2061124L
,
2063719L
,
2067968L
,
2073008L
,
2075372L
,
2089787L
,
2090123L
,
2092963L
,
2093236L
,
2096895L
,
2099371L
,
2099927L
,
2101777L
,
2101852L
,
2103117L
,
2106281L
,
2106738L
,
2106797L
,
2107034L
,
2107118L
,
2107782L
,
2108849L
,
2109134L
,
2109653L
,
2111450L
,
2113282L
,
2115839L
,
2118297L
,
2118483L
,
2124200L
,
2125357L
,
2125564L
,
2126674L
,
2127529L
,
2127709L
,
2127758L
,
2128040L
,
2129288L
,
2130704L
,
2131390L
,
2133136L
,
2134926L
,
2137360L
,
2139573L
,
2143871L
,
2144572L
,
2145675L
,
2145798L
,
2150523L
,
2150840L
,
2153366L
,
2157897L
,
2158407L
,
2159267L
,
2159307L
,
2160600L
,
2161751L
,
2167061L
,
2171210L
,
2171382L
,
2176058L
,
2180319L
,
2182516L
,
2182569L
,
2182939L
,
2183031L
,
2183149L
,
2183433L
,
2186793L
,
2186960L
,
2187513L
,
2188208L
,
2191844L
,
2191849L
,
2192417L
,
2196861L
,
2197507L
,
2198291L
,
2198328L
,
2198509L
,
2198568L
,
2198642L
,
2199685L
,
2199727L
,
2201083L
,
2202186L
,
2203069L
,
2204173L
,
2204930L
,
2205266L
,
2207781L
,
2208002L
,
2208479L
,
2209587L
,
2209959L
,
2211768L
,
2212424L
,
2212597L
,
2213372L
,
2214663L
,
2215772L
,
2217411L
,
2218251L
,
2220059L
,
2221815L
,
2222909L
,
2223214L
,
2224084L
,
2224410L
,
2224782L
,
2224871L
,
2225749L
,
2226185L
,
2226275L
,
2226537L
,
2226950L
,
2227817L
,
2228301L
,
2231643L
,
2232016L
,
2232225L
,
2233634L
,
2234983L
,
2235003L
,
2236014L
,
2236653L
,
2237747L
,
2238889L
,
2240142L
,
2241802L
,
2243009L
,
2244024L
,
2251083L
,
2252453L
,
2253839L
,
2253971L
,
2254214L
,
2255610L
,
2256913L
,
2257459L
,
2258208L
,
2259449L
,
2260902L
,
2261592L
,
2261593L
,
2261896L
,
2264287L
,
2265277L
,
2265902L
,
2267254L
,
2267520L
,
2267789L
,
2268357L
,
2268746L
,
2268747L
,
2269511L
,
2269901L
,
2269925L
,
2269943L
,
2270731L
,
2270887L
,
2271038L
,
2271381L
,
2271443L
,
2272252L
,
2272395L
,
2272769L
,
2272976L
,
2273540L
,
2273725L
,
2273897L
,
2274334L
,
2274439L
,
2275278L
,
2277050L
,
2277597L
,
2278580L
,
2278840L
,
2278884L
,
2278981L
,
2279441L
,
2282316L
,
2288053L
,
2297302L
,
2299696L
,
2299751L
,
2300495L
,
2304686L
,
2306347L
,
2314043L
,
2315223L
,
2318364L
,
2318514L
,
2319241L
,
2319724L
,
2319988L
,
2320846L
,
2322137L
,
2322400L
,
2323051L
,
2325617L
,
2325794L
,
2327826L
,
2328495L
,
2329042L
,
2330320L
,
2330682L
,
2330932L
,
2331732L
,
2335364L
,
2337333L
,
2341014L
,
2341383L
,
2342398L
,
2346740L
,
2347342L
,
2349171L
,
2350242L
,
2351840L
,
2357040L
,
2364382L
,
2365642L
,
2366111L
,
2368506L
,
2368714L
,
2371565L
,
2372492L
,
2372697L
,
2375621L
,
2376269L
,
2376532L
,
2377107L
,
2377152L
,
2377690L
,
2378245L
,
2378809L
,
2379418L
,
2380233L
,
2380621L
,
2380746L
,
2380801L
,
2382548L
,
2383046L
,
2384823L
,
2384896L
,
2385560L
,
2385738L
,
2386418L
,
2387090L
,
2388317L
,
2388630L
,
2389464L
,
2390346L
,
2391902L
,
2392047L
,
2392391L
,
2394612L
,
2395890L
,
2395996L
,
2396674L
,
2397318L
,
2398758L
,
2398992L
,
2399980L
,
2402098L
,
2403682L
,
2404593L
,
2405451L
,
2406836L
,
2407532L
,
2410577L
,
2415403L
,
2418985L
,
2419674L
,
2419991L
,
2426163L
,
2426895L
,
2427351L
,
2427608L
,
2428011L
,
2428718L
,
2429135L
,
2429631L
,
2429972L
,
2430074L
,
2430136L
,
2430749L
,
2430784L
,
2436283L
,
2436289L
,
2436369L
,
2436507L
,
2436509L
,
2436839L
,
2436926L
,
2437407L
,
2437472L
,
2437658L
,
2438707L
,
2439537L
,
2443677L
,
2443855L
,
2446995L
,
2447168L
,
2447457L
,
2448479L
,
2448564L
,
2448794L
);
public
static
List
<
Long
>
getBookIdList
()
{
return
bookIdList
;
}
}
pcloud-service-book/src/test/test/BookKeywordWarehouseBizTest.java
View file @
a802d072
...
...
@@ -39,12 +39,20 @@ public class BookKeywordWarehouseBizTest {
@Resource
private
AdNewsBiz
adNewsBiz
;
@Resource
private
BookGroupServeDao
bookGroupServeDao
;
@Test
public
void
testQuartzAdNewsBiz
(){
adNewsBiz
.
sendAdNews
((
2L
));
}
@Test
public
void
testBookGroupServeDao
(){
bookGroupServeDao
.
}
@Test
public
void
addBookKeyword
()
{
AddBookKeywordRequestVO
vo
=
new
AddBookKeywordRequestVO
();
vo
.
setUserId
(
1L
);
...
...
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