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
6ea7ac98
Commit
6ea7ac98
authored
Feb 16, 2022
by
郑勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: [1006602] 扫码接口优化
parent
70d20230
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
187 additions
and
14 deletions
+187
-14
BookConstant.java
...main/java/com/pcloud/book/book/constant/BookConstant.java
+9
-0
QrcodeSceneConsr.java
...va/com/pcloud/book/consumer/channel/QrcodeSceneConsr.java
+21
-0
ReaderConsr.java
...ain/java/com/pcloud/book/consumer/reader/ReaderConsr.java
+1
-1
ProductConsr.java
.../java/com/pcloud/book/consumer/resource/ProductConsr.java
+45
-0
TradeConsr.java
.../main/java/com/pcloud/book/consumer/trade/TradeConsr.java
+1
-1
WechatConsr.java
...ain/java/com/pcloud/book/consumer/wechat/WechatConsr.java
+2
-1
BookGroupBizImpl.java
...java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
+27
-0
ResourcePageBizImpl.java
...a/com/pcloud/book/group/biz/impl/ResourcePageBizImpl.java
+0
-0
BookGroupDao.java
...src/main/java/com/pcloud/book/group/dao/BookGroupDao.java
+2
-0
ResourcePageDao.java
.../main/java/com/pcloud/book/group/dao/ResourcePageDao.java
+4
-0
BookGroupClassifyDaoImpl.java
.../pcloud/book/group/dao/impl/BookGroupClassifyDaoImpl.java
+1
-1
BookGroupDaoImpl.java
...java/com/pcloud/book/group/dao/impl/BookGroupDaoImpl.java
+9
-0
GroupQrcodeDaoImpl.java
...va/com/pcloud/book/group/dao/impl/GroupQrcodeDaoImpl.java
+5
-5
ResourcePageDaoImpl.java
...a/com/pcloud/book/group/dao/impl/ResourcePageDaoImpl.java
+18
-0
BookBrowseRecordBizImpl.java
.../pcloud/book/record/biz/impl/BookBrowseRecordBizImpl.java
+1
-1
RightsSettingBizImpl.java
...oud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
+4
-4
BookGroupMapper.xml
...-book/src/main/resources/mapper/group/BookGroupMapper.xml
+10
-0
ResourcePageDao.xml
...-book/src/main/resources/mapper/group/ResourcePageDao.xml
+27
-0
No files found.
pcloud-facade-book/src/main/java/com/pcloud/book/book/constant/BookConstant.java
View file @
6ea7ac98
...
...
@@ -461,4 +461,13 @@ public class BookConstant {
public
static
final
String
SUPER_MERCHANT_LIST
=
CacheConstant
.
BOOK
+
"superMerchantList"
;
/**
* 资源配置sceneId查询
*/
public
static
final
String
RESOURCE_PAGE_BY_SCENE_ID
=
CacheConstant
.
BOOK
+
"resourcePageBySceneId"
;
/**
* 资源配置bookGroupId查询
*/
public
static
final
String
RESOURCE_PAGE_BY_BOOK_GROUP_ID
=
CacheConstant
.
BOOK
+
"resourcePageByBookGroupId"
;
}
pcloud-service-book/src/main/java/com/pcloud/book/consumer/channel/QrcodeSceneConsr.java
View file @
6ea7ac98
...
...
@@ -713,4 +713,25 @@ public class QrcodeSceneConsr {
LOGGER
.
error
(
"调用qrcodeSceneService.updateLandingPageType失败"
+
e
.
getMessage
(),
e
);
}
}
@ParamLog
(
"删除二维码解析地址"
)
public
void
deleteParseRedis
(
Long
sceneId
,
Long
bookGroupId
)
{
try
{
qrcodeSceneService
.
deleteParseRedis
(
null
,
sceneId
,
bookGroupId
);
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"调用qrcodeSceneService.updateLandingPageType失败"
+
e
.
getMessage
(),
e
);
}
}
@ParamLog
(
description
=
"获取二维码基本信息"
)
public
QrcodeSceneDto
getOnlySceneInfoById
(
Long
sceneId
)
throws
BizException
{
if
(
sceneId
==
null
)
return
null
;
try
{
return
ResponseHandleUtil
.
parseResponse
(
qrcodeSceneService
.
getOnlySceneInfoById
(
sceneId
),
QrcodeSceneDto
.
class
);
}
catch
(
BizException
e
)
{
LOGGER
.
error
(
"【二维码-渠道(消)】 获取二维码最最基本信息失败,<ERROR>.[getById]:"
+
e
.
getMessage
(),
e
);
}
return
null
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/consumer/reader/ReaderConsr.java
View file @
6ea7ac98
...
...
@@ -240,7 +240,7 @@ public class ReaderConsr {
public
Map
<
Long
,
AgentCity
>
getAgentPositionByAdviserIds
(
List
<
Long
>
advisers
)
{
LOGGER
.
info
(
"根据advisers查询出版社地理位置:{}"
,
advisers
);
Map
<
Long
,
AgentCity
>
map
=
CollUtil
.
newHashMap
(
0
);
Map
<
Long
,
AgentCity
>
map
=
new
HashMap
<>(
);
try
{
map
=
ResponseHandleUtil
.
parseMap
(
agentService
.
getAgentPositionByAdviserIds
(
advisers
),
Long
.
class
,
AgentCity
.
class
);
}
catch
(
Exception
e
)
{
...
...
pcloud-service-book/src/main/java/com/pcloud/book/consumer/resource/ProductConsr.java
View file @
6ea7ac98
...
...
@@ -138,6 +138,51 @@ public class ProductConsr {
}
}
/**
* 资源中心拉取商品最最基本信息
*/
public
Map
<
Long
,
ProductDto
>
getProductBasesByIds
(
List
<
Long
>
productIds
)
throws
BizException
{
LOGGER
.
info
(
"【资源中心(消)】获取商品最最基本信息,<START>.[productIds]="
+
productIds
+
"]"
);
if
(
productIds
==
null
||
productIds
.
isEmpty
())
{
return
null
;
}
Map
<
Long
,
ProductDto
>
productDtoMap
=
new
HashMap
<>();
productIds
=
productIds
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
Integer
size
=
productIds
.
size
();
if
(
productIds
.
size
()
>
1000
)
{
Integer
[]
queryCountArray
=
{
0
,
1
,
2
,
3
};
Integer
queryCount
=
4
;
//并发查询
List
<
Long
>
finalProductIds
=
productIds
;
Map
<
Long
,
ProductDto
>
finalProductDtoMap
=
productDtoMap
;
CompletableFuture
[]
completableFutures
=
Arrays
.
stream
(
queryCountArray
).
map
(
x
->
CompletableFuture
.
supplyAsync
(()
->
{
Integer
startIndex
=
size
/
queryCount
*
x
;
Integer
endIndex
=
size
/
queryCount
*
(
x
+
1
);
List
<
Long
>
queryList
=
finalProductIds
.
subList
(
startIndex
,
endIndex
);
Map
<
Long
,
ProductDto
>
productMap
=
ResponseHandleUtil
.
parseMapResponse
(
productService
.
getProductBasesByIds
(
queryList
),
Long
.
class
,
ProductDto
.
class
);
return
productMap
;
},
ThreadPoolUtils
.
EXPORT_THREAD_POOL
).
whenComplete
(((
productMap
,
throwable
)
->
{
finalProductDtoMap
.
putAll
(
productMap
);
}))).
toArray
(
CompletableFuture
[]::
new
);
try
{
CompletableFuture
.
allOf
(
completableFutures
).
get
();
}
catch
(
InterruptedException
|
ExecutionException
e
)
{
LOGGER
.
warn
(
"[getProBasesByIds] 填充信息失败,err:{}"
,
e
.
getMessage
(),
e
);
}
return
finalProductDtoMap
;
}
else
{
try
{
productDtoMap
=
ResponseHandleUtil
.
parseMapResponse
(
productService
.
getProductBasesByIds
(
productIds
),
Long
.
class
,
ProductDto
.
class
);
}
catch
(
BizException
e
)
{
LOGGER
.
warn
(
"调用:productService.getProductBasesByIds报错"
,
e
.
getMessage
(),
e
);
}
return
productDtoMap
;
}
}
/**
* 资源中心拉取商品基本信息
...
...
pcloud-service-book/src/main/java/com/pcloud/book/consumer/trade/TradeConsr.java
View file @
6ea7ac98
...
...
@@ -254,7 +254,7 @@ public class TradeConsr {
*/
public
Map
<
Long
,
OrderGroupFormDto
>
getOrderGroupForm4ES
(
List
<
Long
>
qrcodeIds
)
{
LOGGER
.
error
(
"根据群ID去交易中心查询群内订单统计信息.[getOrderGroupForm4ES] qrcodeIds:{}"
,
qrcodeIds
);
Map
<
Long
,
OrderGroupFormDto
>
map
=
CollUtil
.
newHashMap
(
0
);
Map
<
Long
,
OrderGroupFormDto
>
map
=
new
HashMap
<>(
);
if
(
CollUtil
.
isEmpty
(
qrcodeIds
))
{
return
map
;
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/consumer/wechat/WechatConsr.java
View file @
6ea7ac98
...
...
@@ -11,6 +11,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -38,7 +39,7 @@ public class WechatConsr {
public
Map
<
String
,
ESGroupBookQrcodeDTO
>
aggGroupMemberUser
(
List
<
String
>
wxGroupIds
)
{
log
.
info
(
"WechatConsr.aggGroupMemberUser 获取群成员城市及性别信息 wxGroupIds:{}"
,
wxGroupIds
);
Map
<
String
,
ESGroupBookQrcodeDTO
>
map
=
CollUtil
.
newHashMap
(
0
);
Map
<
String
,
ESGroupBookQrcodeDTO
>
map
=
new
HashMap
<>(
);
try
{
map
=
ResponseHandleUtil
.
parseMap
(
groupMemberService
.
aggGroupMemberUser
(
wxGroupIds
),
String
.
class
,
ESGroupBookQrcodeDTO
.
class
);
}
catch
(
Exception
e
)
{
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
View file @
6ea7ac98
...
...
@@ -676,6 +676,8 @@ public class BookGroupBizImpl implements BookGroupBiz {
if
(
JoinGroupTypeEnum
.
XIAORUI
.
getCode
().
equals
(
joinGroupType
))
{
this
.
createBookGroupAppletUrl
(
bookGroup
.
getId
(),
bookId
,
channelId
,
adviserId
);
}
//删除二维码解析缓存
qrcodeSceneConsr
.
deleteParseRedis
(
null
,
bookGroup
.
getId
());
return
bookGroup
;
}
...
...
@@ -1114,6 +1116,8 @@ public class BookGroupBizImpl implements BookGroupBiz {
bookGroupDao
.
update
(
bookGroup
);
//更新至超级搜索
searchProducer
.
update
(
bookGroup
.
getId
());
//删除二维码跳转解析
qrcodeSceneConsr
.
deleteParseRedis
(
null
,
bookGroup
.
getId
());
}
/**
...
...
@@ -1202,7 +1206,14 @@ public class BookGroupBizImpl implements BookGroupBiz {
@ParamLog
(
value
=
"根据书刊ID删除"
,
isAfterReturn
=
false
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
deleteByBookId
(
Long
bookId
,
Long
channelId
,
Long
adviserId
)
throws
BizException
{
List
<
BookGroupDTO
>
bookGroupDTOList
=
bookGroupDao
.
listBookGroup
(
bookId
,
channelId
,
adviserId
);
bookGroupDao
.
deleteByBookId
(
bookId
,
channelId
,
adviserId
);
if
(
CollUtil
.
isNotEmpty
(
bookGroupDTOList
)){
//删除二维码解析缓存
for
(
BookGroupDTO
bookGroupDTO
:
bookGroupDTOList
)
{
qrcodeSceneConsr
.
deleteParseRedis
(
null
,
bookGroupDTO
.
getId
());
}
}
}
/**
...
...
@@ -1212,7 +1223,14 @@ public class BookGroupBizImpl implements BookGroupBiz {
@ParamLog
(
value
=
"根据书刊ID恢复"
,
isAfterReturn
=
false
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
recoverByBookId
(
Long
bookId
,
Long
channelId
,
Long
adviserId
)
throws
BizException
{
List
<
BookGroupDTO
>
bookGroupDTOList
=
bookGroupDao
.
listBookGroup
(
bookId
,
channelId
,
adviserId
);
bookGroupDao
.
recoverByBookId
(
bookId
,
channelId
,
adviserId
);
if
(
CollUtil
.
isNotEmpty
(
bookGroupDTOList
)){
//删除二维码解析缓存
for
(
BookGroupDTO
bookGroupDTO
:
bookGroupDTOList
)
{
qrcodeSceneConsr
.
deleteParseRedis
(
null
,
bookGroupDTO
.
getId
());
}
}
}
/**
...
...
@@ -1237,6 +1255,8 @@ public class BookGroupBizImpl implements BookGroupBiz {
bookGroup
.
setBookId
(
bookId
);
bookGroup
.
setId
(
bookGroupId
);
long
result
=
bookGroupDao
.
linkBookGroup
(
bookGroup
);
//删除二维码解析缓存
qrcodeSceneConsr
.
deleteParseRedis
(
null
,
bookGroupId
);
if
(
result
<=
0
)
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"关联社群书失败!"
);
}
...
...
@@ -1982,6 +2002,8 @@ public class BookGroupBizImpl implements BookGroupBiz {
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"该社群码下已有分类!"
);
}
bookGroupDao
.
deleteByBookGroupId
(
bookGroupId
);
//删除二维码解析缓存
qrcodeSceneConsr
.
deleteParseRedis
(
null
,
bookGroupId
);
}
@Override
...
...
@@ -1994,6 +2016,8 @@ public class BookGroupBizImpl implements BookGroupBiz {
throw
new
BookBizException
(
BookBizException
.
ID_NOT_EXIST
,
"没有该数据!"
);
}
bookGroupDao
.
deleteByBookGroupId
(
bookGroupId
);
//删除二维码解析缓存
qrcodeSceneConsr
.
deleteParseRedis
(
null
,
bookGroupId
);
bookAppletSceneDao
.
deleteByBookGroupId
(
bookGroupId
);
//更新至超级搜索中
searchProducer
.
delete
(
bookGroupId
);
...
...
@@ -4740,6 +4764,8 @@ public class BookGroupBizImpl implements BookGroupBiz {
}
//删除旧数据
bookGroupDao
.
deleteByBookGroupId
(
oldBookGroupId
);
//删除二维码解析缓存
qrcodeSceneConsr
.
deleteParseRedis
(
null
,
oldBookGroupId
);
//插入转换记录表
QrChangeRecord
qrChangeRecord
=
QrChangeRecord
.
builder
().
oldBookGroupId
(
oldBookGroupId
).
newBookGroupId
(
newBookGroupId
).
build
();
bookGroupDao
.
insertQrChangeRecord
(
qrChangeRecord
);
...
...
@@ -5689,6 +5715,7 @@ public class BookGroupBizImpl implements BookGroupBiz {
this
.
createBookGroupAppletUrl
(
bookGroupId
,
bookGroupDTO
.
getBookId
(),
bookGroupDTO
.
getChannelId
(),
bookGroupDTO
.
getCreateUser
());
//修改joinGroupType
bookGroupDao
.
updateJoinGroupType
(
bookGroupId
,
JoinGroupTypeEnum
.
XIAORUI
.
getCode
());
qrcodeSceneConsr
.
deleteParseRedis
(
null
,
bookGroupId
);
}
bookGroupDao
.
updateBookGroupOpenWeapp
(
bookGroupId
,
openWeapp
);
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/ResourcePageBizImpl.java
View file @
6ea7ac98
This diff is collapsed.
Click to expand it.
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/BookGroupDao.java
View file @
6ea7ac98
...
...
@@ -391,6 +391,8 @@ public interface BookGroupDao extends BaseDao<BookGroup> {
List
<
BookGroupDTO
>
getDTOByBookIdList
(
Long
bookId
,
Long
channelId
,
Long
adviserId
);
List
<
BookGroupDTO
>
listBookGroup
(
Long
bookId
,
Long
channelId
,
Long
adviserId
);
List
<
BookQrcodeVO
>
listBookQrcodes
(
Long
bookId
,
Long
channelId
,
Long
adviserId
,
String
sceneName
,
List
<
Long
>
locationIds
);
List
<
BookQrcodeVO
>
listBookQrcodeVOByIds
(
List
<
Long
>
bookGroupIds
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/ResourcePageDao.java
View file @
6ea7ac98
...
...
@@ -92,6 +92,8 @@ public interface ResourcePageDao extends BaseDao<ResourcePage>{
* * @param null
*/
void
updateBookBySceneIds
(
List
<
Long
>
sceneIds
,
Long
bookId
,
Long
channelId
);
List
<
ResourcePage
>
getBySceneIds
(
List
<
Long
>
sceneIds
);
/**
*同一本书其他码下关闭小睿流程
* @author:zhuyajie
...
...
@@ -100,6 +102,8 @@ public interface ResourcePageDao extends BaseDao<ResourcePage>{
*/
void
setOtherPageRaysClose
(
Long
bookId
,
Long
channelId
,
Long
createUser
,
Long
sceneId
,
Long
bookGroupId
);
List
<
ResourcePage
>
getOtherPageRaysClose
(
Long
bookId
,
Long
channelId
,
Long
createUser
,
Long
sceneId
,
Long
bookGroupId
);
/**
* 书刊是否开启小睿
* @author:zhuyajie
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/impl/BookGroupClassifyDaoImpl.java
View file @
6ea7ac98
...
...
@@ -320,7 +320,7 @@ public class BookGroupClassifyDaoImpl extends BaseDaoImpl<BookGroupClassify> imp
@Override
public
List
<
BookAdviserInfo
>
getBookAndAdviserByClassifyIds
(
Set
<
Long
>
classifyIds
)
{
HashMap
<
String
,
Object
>
map
=
CollUtil
.
newHashMap
(
1
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>(
);
map
.
put
(
"classifyIds"
,
classifyIds
);
return
getSqlSession
().
selectList
(
"getBookAndAdviserByClassifyIds"
,
map
);
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/impl/BookGroupDaoImpl.java
View file @
6ea7ac98
...
...
@@ -528,6 +528,15 @@ public class BookGroupDaoImpl extends BaseDaoImpl<BookGroup> implements BookGrou
}
@Override
public
List
<
BookGroupDTO
>
listBookGroup
(
Long
bookId
,
Long
channelId
,
Long
adviserId
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"bookId"
,
bookId
);
paramMap
.
put
(
"channelId"
,
channelId
);
paramMap
.
put
(
"adviserId"
,
adviserId
);
return
super
.
getSqlSession
().
selectList
(
getStatement
(
"listBookGroup"
),
paramMap
);
}
@Override
public
List
<
BookQrcodeVO
>
listBookQrcodes
(
Long
bookId
,
Long
channelId
,
Long
adviserId
,
String
sceneName
,
List
<
Long
>
locationIds
)
{
Map
<
String
,
Object
>
paramMap
=
MapUtil
.
of
(
"bookId"
,
bookId
);
paramMap
.
put
(
"channelId"
,
channelId
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/impl/GroupQrcodeDaoImpl.java
View file @
6ea7ac98
...
...
@@ -334,7 +334,7 @@ public class GroupQrcodeDaoImpl extends BaseDaoImpl<GroupQrcode> implements Grou
@Override
public
List
<
ESBookGroupQrcode
>
selectPage
(
long
start
,
long
offset
)
{
HashMap
<
String
,
Object
>
map
=
CollUtil
.
newHashMap
(
2
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>(
);
map
.
put
(
"start"
,
start
);
map
.
put
(
"offset"
,
offset
);
return
getSessionTemplate
().
selectList
(
"selectPage"
,
map
);
...
...
@@ -342,14 +342,14 @@ public class GroupQrcodeDaoImpl extends BaseDaoImpl<GroupQrcode> implements Grou
@Override
public
String
getMediaId
(
Long
id
)
{
HashMap
<
String
,
Object
>
map
=
CollUtil
.
newHashMap
(
2
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>(
);
map
.
put
(
"id"
,
id
);
return
getSessionTemplate
().
selectOne
(
getStatement
(
"getMediaId"
),
map
);
}
@Override
public
void
updateMediaId
(
Long
id
,
String
mediaId
,
Date
date
)
{
HashMap
<
String
,
Object
>
map
=
CollUtil
.
newHashMap
(
2
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>(
);
map
.
put
(
"id"
,
id
);
map
.
put
(
"mediaId"
,
mediaId
);
map
.
put
(
"date"
,
date
);
...
...
@@ -358,7 +358,7 @@ public class GroupQrcodeDaoImpl extends BaseDaoImpl<GroupQrcode> implements Grou
@Override
public
List
<
GroupQrcodeDTO
>
getMigrateGroup
(
List
<
String
>
groups
)
{
HashMap
<
String
,
Object
>
map
=
CollUtil
.
newHashMap
(
1
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>(
);
map
.
put
(
"list"
,
groups
);
return
getSessionTemplate
().
selectList
(
getStatement
(
"getMigrateGroup"
),
map
);
}
...
...
@@ -370,7 +370,7 @@ public class GroupQrcodeDaoImpl extends BaseDaoImpl<GroupQrcode> implements Grou
@Override
public
void
removeMediaIdByIds
(
List
<
Long
>
ids
)
{
HashMap
<
String
,
Object
>
map
=
CollUtil
.
newHashMap
(
1
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>(
);
map
.
put
(
"list"
,
ids
);
getSessionTemplate
().
delete
(
getStatement
(
"removeMediaIdByIds"
),
map
);
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/impl/ResourcePageDaoImpl.java
View file @
6ea7ac98
...
...
@@ -82,6 +82,13 @@ public class ResourcePageDaoImpl extends BaseDaoImpl<ResourcePage> implements Re
}
@Override
public
List
<
ResourcePage
>
getBySceneIds
(
List
<
Long
>
sceneIds
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"sceneIds"
,
sceneIds
);
return
getSessionTemplate
().
selectList
(
getStatement
(
"getBySceneIds"
),
map
);
}
@Override
public
void
setOtherPageRaysClose
(
Long
bookId
,
Long
channelId
,
Long
createUser
,
Long
sceneId
,
Long
bookGroupId
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"bookId"
,
bookId
);
...
...
@@ -93,6 +100,17 @@ public class ResourcePageDaoImpl extends BaseDaoImpl<ResourcePage> implements Re
}
@Override
public
List
<
ResourcePage
>
getOtherPageRaysClose
(
Long
bookId
,
Long
channelId
,
Long
createUser
,
Long
sceneId
,
Long
bookGroupId
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"bookId"
,
bookId
);
map
.
put
(
"channelId"
,
channelId
);
map
.
put
(
"createUser"
,
createUser
);
map
.
put
(
"bookGroupId"
,
bookGroupId
);
map
.
put
(
"sceneId"
,
sceneId
);
return
getSessionTemplate
().
selectList
(
getStatement
(
"getOtherPageRaysClose"
),
map
);
}
@Override
public
Boolean
isOpenRaysBook
(
Long
bookId
,
Long
channelId
,
Long
adviserId
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"bookId"
,
bookId
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/record/biz/impl/BookBrowseRecordBizImpl.java
View file @
6ea7ac98
...
...
@@ -361,7 +361,7 @@ public class BookBrowseRecordBizImpl implements BookBrowseRecordBiz {
@Override
public
Map
<
String
,
String
>
getCitiesByIp
(
List
<
String
>
ips
)
{
Map
<
String
,
String
>
map
=
CollUtil
.
newHashMap
();
Map
<
String
,
String
>
map
=
new
HashMap
<>
();
List
<
IpData
>
ipData
=
ipDataMapper
.
listCityByIp
(
ips
);
if
(!
CollUtil
.
isEmpty
(
ipData
))
{
map
=
ipData
.
stream
().
collect
(
Collectors
.
toMap
(
IpData:
:
getIp
,
IpData:
:
getCity
));
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
View file @
6ea7ac98
...
...
@@ -1678,7 +1678,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if
(
null
!=
rightsSettingTitle
){
List
<
RightsNowItem
>
nowItems
=
null
;
if
(
hasPage
){
Map
<
String
,
Object
>
map
=
CollUtil
.
newHashMap
(
2
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>(
);
map
.
put
(
"rightsSettingTitleId"
,
rightsSettingTitle
.
getId
());
map
.
put
(
"types"
,
Collections
.
singletonList
(
RightsNowItemTypeNew
.
ONLINE_EXCL_COURSE
.
value
));
PageBeanNew
<
RightsNowItem
>
pageBeanNew
=
rightsNowItemDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
map
,
"getListByRightsSettingTitleId"
);
...
...
@@ -1708,7 +1708,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if
(
null
!=
rightsSettingTitle
){
List
<
RightsNowItem
>
nowItems
=
null
;
if
(
hasPage
){
Map
<
String
,
Object
>
map
=
CollUtil
.
newHashMap
(
2
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>(
);
map
.
put
(
"rightsSettingTitleId"
,
rightsSettingTitle
.
getId
());
map
.
put
(
"types"
,
Collections
.
singletonList
(
RightsNowItemTypeNew
.
ONLINE_COURSE
.
value
));
PageBeanNew
<
RightsNowItem
>
pageBeanNew
=
rightsNowItemDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
map
,
"getListByRightsSettingTitleId"
);
...
...
@@ -3420,7 +3420,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
List
<
RightsNowItem
>
nowItems
=
null
;
if
(
hasPage
){
Map
<
String
,
Object
>
map
=
CollUtil
.
newHashMap
(
2
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>(
);
map
.
put
(
"rightsSettingTitleId"
,
rightsSettingTitle
.
getId
());
map
.
put
(
"types"
,
Collections
.
singletonList
(
RightsNowItemTypeNew
.
GROUP_SERVICE
.
value
));
PageBeanNew
<
RightsNowItem
>
pageBeanNew
=
rightsNowItemDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
map
,
"getListByRightsSettingTitleId"
);
...
...
@@ -4033,7 +4033,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
// 查询书刊权益ID列表
List
<
Long
>
rightsSettingIds
=
rightsSettingDtos
.
stream
().
map
(
RightsSettingDto:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
CollUtil
.
isNotEmpty
(
rightsSettingIds
))
{
Map
<
String
,
Object
>
map
=
CollUtil
.
newHashMap
(
4
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>(
);
map
.
put
(
"list"
,
rightsSettingIds
);
map
.
put
(
"deepRead"
,
deepRead
);
map
.
put
(
"easyRead"
,
easyRead
);
...
...
pcloud-service-book/src/main/resources/mapper/group/BookGroupMapper.xml
View file @
6ea7ac98
...
...
@@ -156,6 +156,16 @@
and join_group_type != 4
</select>
<select
id=
"listBookGroup"
resultMap=
"BookGroupDTO"
parameterType=
"map"
>
select
<include
refid=
"Base_Column_List"
/>
from book_group
where is_delete = 0
and book_id = #{bookId,jdbcType=BIGINT}
and channel_id = #{channelId,jdbcType=BIGINT}
and create_user = #{adviserId,jdbcType=BIGINT}
</select>
<select
id=
"getDTOByBookIdsAnsAdviserIds"
resultMap=
"BookGroupDTO"
parameterType=
"map"
>
select
<include
refid=
"Base_Column_List"
/>
...
...
pcloud-service-book/src/main/resources/mapper/group/ResourcePageDao.xml
View file @
6ea7ac98
...
...
@@ -244,6 +244,17 @@
</foreach>
</update>
<select
id=
"getBySceneIds"
parameterType=
"map"
resultMap=
"ResourcePageMap"
>
select
<include
refid=
"Base_Column_List"
/>
from resource_page
WHERE
scene_id IN
<foreach
collection=
"sceneIds"
close=
")"
open=
"("
separator=
","
index=
"index"
item=
"item"
>
#{item}
</foreach>
</select>
<update
id=
"setOtherPageRaysClose"
parameterType=
"map"
>
UPDATE resource_page
SET open_rays = 0
...
...
@@ -259,6 +270,22 @@
</if>
</update>
<select
id=
"getOtherPageRaysClose"
parameterType=
"map"
resultMap=
"ResourcePageMap"
>
select
<include
refid=
"Base_Column_List"
/>
from resource_page
WHERE
book_id = #{bookId}
AND channel_id = #{channelId}
AND create_user = #{createUser}
<if
test=
"sceneId != null"
>
AND scene_id != #{sceneId}
</if>
<if
test=
"bookGroupId != null"
>
AND book_group_id != #{bookGroupId}
</if>
</select>
<select
id=
"isOpenRaysBook"
resultType=
"boolean"
parameterType=
"map"
>
SELECT
COUNT(1)
...
...
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