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
e2d79d94
Commit
e2d79d94
authored
Jan 20, 2020
by
温皓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1002111运营需求:编辑端也支持个人号读者群发
parent
22e9627f
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
173 additions
and
14 deletions
+173
-14
BookBiz.java
...-book/src/main/java/com/pcloud/book/book/biz/BookBiz.java
+3
-1
BookBizImpl.java
.../main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
+4
-1
BookFacade.java
...src/main/java/com/pcloud/book/book/facade/BookFacade.java
+15
-1
BookFacadeImpl.java
...java/com/pcloud/book/book/facade/impl/BookFacadeImpl.java
+17
-1
BookGroupBiz.java
...src/main/java/com/pcloud/book/group/biz/BookGroupBiz.java
+9
-1
BookGroupBizImpl.java
...java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
+27
-0
BookGroupCipherUserDao.java
...ava/com/pcloud/book/group/dao/BookGroupCipherUserDao.java
+1
-0
BookGroupCipherUserDaoImpl.java
...cloud/book/group/dao/impl/BookGroupCipherUserDaoImpl.java
+5
-0
UserSelectParamDTO.java
...in/java/com/pcloud/book/group/dto/UserSelectParamDTO.java
+5
-0
BookGroupFacade.java
...in/java/com/pcloud/book/group/facade/BookGroupFacade.java
+9
-0
BookGroupFacadeImpl.java
...om/pcloud/book/group/facade/impl/BookGroupFacadeImpl.java
+29
-0
SelfPushBiz.java
...k/src/main/java/com/pcloud/book/push/biz/SelfPushBiz.java
+1
-1
SelfPushBizImpl.java
...n/java/com/pcloud/book/push/biz/impl/SelfPushBizImpl.java
+2
-1
PushCheck.java
...k/src/main/java/com/pcloud/book/push/check/PushCheck.java
+2
-2
SelfPushFacade.java
...main/java/com/pcloud/book/push/facade/SelfPushFacade.java
+15
-5
Book.Mapper.xml
...rvice-book/src/main/resources/mapper/book/Book.Mapper.xml
+3
-0
BookGroupCipherUser.xml
...k/src/main/resources/mapper/group/BookGroupCipherUser.xml
+25
-0
SelfPushItemMapper.xml
...ook/src/main/resources/mapper/push/SelfPushItemMapper.xml
+1
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/BookBiz.java
View file @
e2d79d94
...
@@ -583,9 +583,10 @@ public interface BookBiz {
...
@@ -583,9 +583,10 @@ public interface BookBiz {
* @param currentPage
* @param currentPage
* @param numPerPage
* @param numPerPage
* @param name
* @param name
* @param adviserId
* @return
* @return
*/
*/
PageBeanNew
<
AdviserBookInfoDTO
>
getListPage4SelfBookGroup
(
Integer
currentPage
,
Integer
numPerPage
,
String
name
);
PageBeanNew
<
AdviserBookInfoDTO
>
getListPage4SelfBookGroup
(
Integer
currentPage
,
Integer
numPerPage
,
String
name
,
Long
adviserId
);
/**
/**
* 获取书籍标签
* 获取书籍标签
...
@@ -602,4 +603,5 @@ public interface BookBiz {
...
@@ -602,4 +603,5 @@ public interface BookBiz {
* 导出书刊收益--出版端
* 导出书刊收益--出版端
*/
*/
void
exportBookIncomeDetail
(
Map
<
String
,
Object
>
paramMap
,
Long
agentId
,
Long
partyId
,
String
systemCode
);
void
exportBookIncomeDetail
(
Map
<
String
,
Object
>
paramMap
,
Long
agentId
,
Long
partyId
,
String
systemCode
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
View file @
e2d79d94
...
@@ -1777,11 +1777,14 @@ public class BookBizImpl implements BookBiz {
...
@@ -1777,11 +1777,14 @@ public class BookBizImpl implements BookBiz {
}
}
@Override
@Override
public
PageBeanNew
<
AdviserBookInfoDTO
>
getListPage4SelfBookGroup
(
Integer
currentPage
,
Integer
numPerPage
,
String
name
)
{
public
PageBeanNew
<
AdviserBookInfoDTO
>
getListPage4SelfBookGroup
(
Integer
currentPage
,
Integer
numPerPage
,
String
name
,
Long
adviserId
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
if
(!
StringUtil
.
isEmpty
(
name
))
{
if
(!
StringUtil
.
isEmpty
(
name
))
{
paramMap
.
put
(
"name"
,
name
);
paramMap
.
put
(
"name"
,
name
);
}
}
if
(
adviserId
!=
null
)
{
paramMap
.
put
(
"adviserId"
,
adviserId
);
}
paramMap
.
put
(
"joinGroupType"
,
JoinGroupTypeEnum
.
ROBOT
.
getCode
());
paramMap
.
put
(
"joinGroupType"
,
JoinGroupTypeEnum
.
ROBOT
.
getCode
());
PageBeanNew
<
AdviserBookInfoDTO
>
pageBean
=
bookDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
,
"getListPage4BookGroup"
);
PageBeanNew
<
AdviserBookInfoDTO
>
pageBean
=
bookDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
,
"getListPage4BookGroup"
);
if
(
null
==
pageBean
||
ListUtils
.
isEmpty
(
pageBean
.
getRecordList
()))
{
if
(
null
==
pageBean
||
ListUtils
.
isEmpty
(
pageBean
.
getRecordList
()))
{
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/facade/BookFacade.java
View file @
e2d79d94
...
@@ -588,7 +588,7 @@ public interface BookFacade {
...
@@ -588,7 +588,7 @@ public interface BookFacade {
ResponseDto
<
PageBeanNew
>
listNoAuthGroupBook
(
@RequestHeader
(
"token"
)
String
token
,
ResponseDto
<
PageBeanNew
>
listNoAuthGroupBook
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
ListNoAuthGroupBookParam
listNoAuthGroupBookParam
)
throws
PermissionException
;
@RequestBody
ListNoAuthGroupBookParam
listNoAuthGroupBookParam
)
throws
PermissionException
;
@ApiOperation
(
"获取1v1社群书书刊列表"
)
@ApiOperation
(
"
平台端
获取1v1社群书书刊列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
),
...
@@ -651,4 +651,18 @@ public interface BookFacade {
...
@@ -651,4 +651,18 @@ public interface BookFacade {
@RequestParam
(
value
=
"templetId"
,
required
=
false
)
Long
templetId
,
@RequestParam
(
value
=
"templetId"
,
required
=
false
)
Long
templetId
,
@RequestParam
(
value
=
"secondTempletId"
,
required
=
false
)
Long
secondTempletId
)
@RequestParam
(
value
=
"secondTempletId"
,
required
=
false
)
Long
secondTempletId
)
throws
PermissionException
,
BizException
;
throws
PermissionException
,
BizException
;
@ApiOperation
(
"编辑端 获取1v1社群书书刊列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"name"
,
value
=
"书刊名称"
,
dataType
=
"String"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"当前页数"
,
dataType
=
"int"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"每页条数"
,
dataType
=
"int"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"getListPage4SelfBookGroupByAdvise"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBeanNew
<
AdviserBookInfoDTO
>>
getListPage4SelfBookGroupByAdvise
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/book/facade/impl/BookFacadeImpl.java
View file @
e2d79d94
...
@@ -824,7 +824,23 @@ public class BookFacadeImpl implements BookFacade {
...
@@ -824,7 +824,23 @@ public class BookFacadeImpl implements BookFacade {
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
}
PageBeanNew
<
AdviserBookInfoDTO
>
pageBean
=
bookBiz
.
getListPage4SelfBookGroup
(
currentPage
,
numPerPage
,
name
);
PageBeanNew
<
AdviserBookInfoDTO
>
pageBean
=
bookBiz
.
getListPage4SelfBookGroup
(
currentPage
,
numPerPage
,
name
,
null
);
return
new
ResponseDto
<>(
null
==
pageBean
?
new
PageBeanNew
<>()
:
pageBean
);
}
@Override
@RequestMapping
(
value
=
"getListPage4SelfBookGroupByAdvise"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
PageBeanNew
<
AdviserBookInfoDTO
>>
getListPage4SelfBookGroupByAdvise
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
if
(
currentPage
==
null
||
numPerPage
==
null
||
currentPage
<
0
||
numPerPage
<
0
)
{
throw
BookBizException
.
PAGE_PARAM_DELETION
;
}
PageBeanNew
<
AdviserBookInfoDTO
>
pageBean
=
bookBiz
.
getListPage4SelfBookGroup
(
currentPage
,
numPerPage
,
name
,
adviserId
);
return
new
ResponseDto
<>(
null
==
pageBean
?
new
PageBeanNew
<>()
:
pageBean
);
return
new
ResponseDto
<>(
null
==
pageBean
?
new
PageBeanNew
<>()
:
pageBean
);
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/BookGroupBiz.java
View file @
e2d79d94
...
@@ -643,13 +643,21 @@ public interface BookGroupBiz {
...
@@ -643,13 +643,21 @@ public interface BookGroupBiz {
List
<
AltAndCountDTO
>
getAltAndCountDTOListByAgentId
(
Long
agentId
);
List
<
AltAndCountDTO
>
getAltAndCountDTOListByAgentId
(
Long
agentId
);
/**
/**
* 个人号群发用户查询
*
平台端
个人号群发用户查询
* @param userSelectParamDTO
* @param userSelectParamDTO
* @return
* @return
*/
*/
PageBeanNew
<
UserBookInfoVO
>
listUser4SelfPush
(
UserSelectParamDTO
userSelectParamDTO
);
PageBeanNew
<
UserBookInfoVO
>
listUser4SelfPush
(
UserSelectParamDTO
userSelectParamDTO
);
/**
/**
* 编辑端 个人号群发用户查询
* @param userSelectParam
* @return
*/
PageBeanNew
<
UserBookInfoVO
>
listUser4SelfPushByAdvise
(
Map
<
String
,
Object
>
userSelectParam
);
/**
* 根据类型获取社群书id集合
* 根据类型获取社群书id集合
*/
*/
List
<
Long
>
getBookGroupIdsByJoinGroupType
(
Integer
joinGroupType
);
List
<
Long
>
getBookGroupIdsByJoinGroupType
(
Integer
joinGroupType
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
View file @
e2d79d94
...
@@ -3779,6 +3779,33 @@ public class BookGroupBizImpl implements BookGroupBiz {
...
@@ -3779,6 +3779,33 @@ public class BookGroupBizImpl implements BookGroupBiz {
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
countlist
.
size
(),
list
);
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
countlist
.
size
(),
list
);
}
}
@Override
public
PageBeanNew
<
UserBookInfoVO
>
listUser4SelfPushByAdvise
(
Map
<
String
,
Object
>
userSelectParam
)
{
Integer
currentPage
=
(
Integer
)
userSelectParam
.
get
(
"currentPage"
);
Integer
numPerPage
=
(
Integer
)
userSelectParam
.
get
(
"numPerPage"
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
//用户昵称id模糊查询
if
(!
StringUtil
.
isEmpty
((
CharSequence
)
userSelectParam
.
get
(
"userQuery"
)))
{
List
<
String
>
wxUserIds
=
wechatGroupConsr
.
getByUserQuery
((
String
)
userSelectParam
.
get
(
"userQuery"
));
if
(!
ListUtils
.
isEmpty
(
wxUserIds
))
{
map
.
put
(
"wxUserIds"
,
wxUserIds
);
}
else
{
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
0
,
new
ArrayList
<>());
}
}
map
.
put
(
"bookId"
,
userSelectParam
.
get
(
"bookId"
));
List
<
UserBookInfoVO
>
countlist
=
bookGroupCipherUserDao
.
listUser4SelfPushByAdvise
(
map
);
if
(
ListUtils
.
isEmpty
(
countlist
))
{
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
0
,
new
ArrayList
<>());
}
map
.
put
(
"pageNum"
,
currentPage
*
numPerPage
);
map
.
put
(
"numPerPage"
,
numPerPage
);
List
<
UserBookInfoVO
>
list
=
bookGroupCipherUserDao
.
listUser4SelfPushByAdvise
(
map
);
//填充个人号群发用户信息、扫码书刊信息
groupSet
.
setUserBookInfo4SelfPush
(
list
);
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
countlist
.
size
(),
list
);
}
@ParamLog
(
"根据类型获取社群书id集合"
)
@ParamLog
(
"根据类型获取社群书id集合"
)
@Override
@Override
public
List
<
Long
>
getBookGroupIdsByJoinGroupType
(
Integer
joinGroupType
)
{
public
List
<
Long
>
getBookGroupIdsByJoinGroupType
(
Integer
joinGroupType
)
{
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/BookGroupCipherUserDao.java
View file @
e2d79d94
...
@@ -134,6 +134,7 @@ public interface BookGroupCipherUserDao extends BaseDao<BookGroupCipherUser> {
...
@@ -134,6 +134,7 @@ public interface BookGroupCipherUserDao extends BaseDao<BookGroupCipherUser> {
*/
*/
public
List
<
UserBookInfoVO
>
listUser4SelfPush
(
Map
<
String
,
Object
>
map
);
public
List
<
UserBookInfoVO
>
listUser4SelfPush
(
Map
<
String
,
Object
>
map
);
public
List
<
UserBookInfoVO
>
listUser4SelfPushByAdvise
(
Map
<
String
,
Object
>
map
);
/**
/**
* 查小号的好友id
* 查小号的好友id
* @param altId
* @param altId
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/impl/BookGroupCipherUserDaoImpl.java
View file @
e2d79d94
...
@@ -153,6 +153,11 @@ public class BookGroupCipherUserDaoImpl extends BaseDaoImpl<BookGroupCipherUser>
...
@@ -153,6 +153,11 @@ public class BookGroupCipherUserDaoImpl extends BaseDaoImpl<BookGroupCipherUser>
}
}
@Override
@Override
public
List
<
UserBookInfoVO
>
listUser4SelfPushByAdvise
(
Map
<
String
,
Object
>
map
)
{
return
getSessionTemplate
().
selectList
(
getStatement
(
"listUser4SelfPushByBookGroupId"
),
map
);
}
@Override
public
List
<
String
>
getFriendIdListByBookAndRobot
(
String
altId
,
List
<
Long
>
bookIds
)
{
public
List
<
String
>
getFriendIdListByBookAndRobot
(
String
altId
,
List
<
Long
>
bookIds
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"bookIds"
,
bookIds
);
map
.
put
(
"bookIds"
,
bookIds
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/dto/UserSelectParamDTO.java
View file @
e2d79d94
...
@@ -43,4 +43,9 @@ public class UserSelectParamDTO {
...
@@ -43,4 +43,9 @@ public class UserSelectParamDTO {
* 深度标签id
* 深度标签id
*/
*/
private
Long
depLabelId
;
private
Long
depLabelId
;
/**
* 单本图书id
*/
private
Long
bookGroupId
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/facade/BookGroupFacade.java
View file @
e2d79d94
...
@@ -601,6 +601,15 @@ public interface BookGroupFacade {
...
@@ -601,6 +601,15 @@ public interface BookGroupFacade {
public
ResponseDto
<
PageBeanNew
<
UserBookInfoVO
>>
listUser4SelfPush
(
public
ResponseDto
<
PageBeanNew
<
UserBookInfoVO
>>
listUser4SelfPush
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
@ApiParam
UserSelectParamDTO
userSelectParamDTO
)
throws
PermissionException
;
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
@ApiParam
UserSelectParamDTO
userSelectParamDTO
)
throws
PermissionException
;
@ApiOperation
(
value
=
"编辑端,个人号群发-用户列表查询"
,
httpMethod
=
"GET"
)
@GetMapping
(
"listUser4SelfPushByAdvise"
)
public
ResponseDto
<
PageBeanNew
<
UserBookInfoVO
>>
listUser4SelfPushByAdvise
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"userQuery"
,
required
=
false
)
String
userQuery
,
@RequestParam
(
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
"numPerPage"
)
Integer
numPerPage
,
@RequestParam
(
"bookId"
)
Long
bookId
)
throws
PermissionException
;
@ApiOperation
(
"获取随机码"
)
@ApiOperation
(
"获取随机码"
)
@GetMapping
(
"getRandomCode"
)
@GetMapping
(
"getRandomCode"
)
ResponseDto
<?>
getRandomCode
(
ResponseDto
<?>
getRandomCode
(
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/facade/impl/BookGroupFacadeImpl.java
View file @
e2d79d94
...
@@ -950,6 +950,35 @@ public class BookGroupFacadeImpl implements BookGroupFacade {
...
@@ -950,6 +950,35 @@ public class BookGroupFacadeImpl implements BookGroupFacade {
return
new
ResponseDto
<>(
pageBeanNew
);
return
new
ResponseDto
<>(
pageBeanNew
);
}
}
@ApiOperation
(
value
=
"编辑端,个人号群发-用户列表查询"
,
httpMethod
=
"GET"
)
@GetMapping
(
"listUser4SelfPushByAdvise"
)
@Override
public
ResponseDto
<
PageBeanNew
<
UserBookInfoVO
>>
listUser4SelfPushByAdvise
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"userQuery"
,
required
=
false
)
String
userQuery
,
@RequestParam
(
"currentPage"
)
Integer
currentPage
,
@RequestParam
(
"numPerPage"
)
Integer
numPerPage
,
@RequestParam
(
"bookId"
)
Long
bookId
)
throws
PermissionException
{
SessionUtil
.
getToken4Redis
(
token
);
if
(
null
==
currentPage
||
null
==
numPerPage
)
{
throw
new
WechatGroupBizException
(
WechatGroupBizException
.
PARAM_IS_NULL
,
"缺少参数"
);
}
if
(
null
==
bookId
){
throw
new
WechatGroupBizException
(
WechatGroupBizException
.
PARAM_IS_NULL
,
"缺少图书Id"
);
}
Map
<
String
,
Object
>
userSelectParam
=
new
HashMap
<>();
userSelectParam
.
put
(
"currentPage"
,
currentPage
);
userSelectParam
.
put
(
"numPerPage"
,
numPerPage
);
userSelectParam
.
put
(
"bookId"
,
bookId
);
if
(!
StringUtil
.
isEmpty
(
userQuery
)){
userSelectParam
.
put
(
"userQuery"
,
userQuery
);
}
PageBeanNew
<
UserBookInfoVO
>
pageBeanNew
=
bookGroupBiz
.
listUser4SelfPushByAdvise
(
userSelectParam
);
return
new
ResponseDto
<>(
pageBeanNew
);
}
@ApiOperation
(
"获取随机码"
)
@ApiOperation
(
"获取随机码"
)
@GetMapping
(
"getRandomCode"
)
@GetMapping
(
"getRandomCode"
)
@Override
@Override
...
...
pcloud-service-book/src/main/java/com/pcloud/book/push/biz/SelfPushBiz.java
View file @
e2d79d94
...
@@ -34,7 +34,7 @@ public interface SelfPushBiz {
...
@@ -34,7 +34,7 @@ public interface SelfPushBiz {
* @param endTime
* @param endTime
* @return
* @return
*/
*/
PageBeanNew
<
SelfPushRecordDTO
>
listSelfPushRecord
(
Integer
currentPage
,
Integer
numPerPage
,
String
startTime
,
String
endTime
,
Integer
status
);
PageBeanNew
<
SelfPushRecordDTO
>
listSelfPushRecord
(
Integer
currentPage
,
Integer
numPerPage
,
String
startTime
,
String
endTime
,
Integer
status
,
Long
partyId
);
/**
/**
* 定时任务触发群发
* 定时任务触发群发
...
...
pcloud-service-book/src/main/java/com/pcloud/book/push/biz/impl/SelfPushBizImpl.java
View file @
e2d79d94
...
@@ -263,11 +263,12 @@ public class SelfPushBizImpl implements SelfPushBiz {
...
@@ -263,11 +263,12 @@ public class SelfPushBizImpl implements SelfPushBiz {
}
}
@Override
@Override
public
PageBeanNew
<
SelfPushRecordDTO
>
listSelfPushRecord
(
Integer
currentPage
,
Integer
numPerPage
,
String
startTime
,
String
endTime
,
Integer
status
)
{
public
PageBeanNew
<
SelfPushRecordDTO
>
listSelfPushRecord
(
Integer
currentPage
,
Integer
numPerPage
,
String
startTime
,
String
endTime
,
Integer
status
,
Long
partyId
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"startTime"
,
startTime
);
map
.
put
(
"startTime"
,
startTime
);
map
.
put
(
"endTime"
,
endTime
);
map
.
put
(
"endTime"
,
endTime
);
map
.
put
(
"pushStatus"
,
status
);
map
.
put
(
"pushStatus"
,
status
);
map
.
put
(
"partyId"
,
partyId
);
PageBeanNew
<
SelfPushRecordDTO
>
pageBeanNew
=
selfPushItemDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
map
,
"listSelfPushRecord"
);
PageBeanNew
<
SelfPushRecordDTO
>
pageBeanNew
=
selfPushItemDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
map
,
"listSelfPushRecord"
);
if
(
null
==
pageBeanNew
||
ListUtils
.
isEmpty
(
pageBeanNew
.
getRecordList
()))
{
if
(
null
==
pageBeanNew
||
ListUtils
.
isEmpty
(
pageBeanNew
.
getRecordList
()))
{
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
0
,
new
ArrayList
<>());
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
0
,
new
ArrayList
<>());
...
...
pcloud-service-book/src/main/java/com/pcloud/book/push/check/PushCheck.java
View file @
e2d79d94
...
@@ -297,8 +297,8 @@ public class PushCheck {
...
@@ -297,8 +297,8 @@ public class PushCheck {
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"自定义发送时间设置有误"
);
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"自定义发送时间设置有误"
);
}
}
}
}
if
(
StringUtil
.
isEmpty
(
addParamDTO
.
getAltId
())
||
ListUtils
.
isEmpty
(
addParamDTO
.
getUserIdList
()))
{
if
(
ListUtils
.
isEmpty
(
addParamDTO
.
getUserIdList
()))
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"
个人号或
群发好友为空"
);
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"群发好友为空"
);
}
}
if
(
ListUtils
.
isEmpty
(
addParamDTO
.
getPushItemList
()))
{
if
(
ListUtils
.
isEmpty
(
addParamDTO
.
getPushItemList
()))
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"发送消息为空"
);
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"发送消息为空"
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/push/facade/SelfPushFacade.java
View file @
e2d79d94
...
@@ -6,6 +6,7 @@ import com.pcloud.book.push.biz.SelfPushBiz;
...
@@ -6,6 +6,7 @@ import com.pcloud.book.push.biz.SelfPushBiz;
import
com.pcloud.book.push.check.PushCheck
;
import
com.pcloud.book.push.check.PushCheck
;
import
com.pcloud.book.push.dto.SelfPushAddParamDTO
;
import
com.pcloud.book.push.dto.SelfPushAddParamDTO
;
import
com.pcloud.book.push.dto.SelfPushRecordDTO
;
import
com.pcloud.book.push.dto.SelfPushRecordDTO
;
import
com.pcloud.common.core.constant.SystemCode
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.dto.ResponseDto
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.permission.PermissionException
;
import
com.pcloud.common.permission.PermissionException
;
...
@@ -47,9 +48,11 @@ public class SelfPushFacade {
...
@@ -47,9 +48,11 @@ public class SelfPushFacade {
pushCheck
.
selfPushParamCheck
(
addParamDTO
);
pushCheck
.
selfPushParamCheck
(
addParamDTO
);
Map
<
String
,
Object
>
map
=
SessionUtil
.
getToken4Redis
(
token
);
Map
<
String
,
Object
>
map
=
SessionUtil
.
getToken4Redis
(
token
);
Long
partyId
=
(
Long
)
map
.
get
(
SessionUtil
.
PARTY_ID
);
Long
partyId
=
(
Long
)
map
.
get
(
SessionUtil
.
PARTY_ID
);
String
isSystem
=
(
String
)
map
.
get
(
SessionUtil
.
IS_SYSTEM
);
if
(
partyId
==
0
){
if
(
"0"
.
equals
(
isSystem
))
{
String
isSystem
=
(
String
)
map
.
get
(
SessionUtil
.
IS_SYSTEM
);
partyId
=
(
Long
)
map
.
get
(
SessionUtil
.
MEMBER_ID
);
if
(
"0"
.
equals
(
isSystem
))
{
partyId
=
(
Long
)
map
.
get
(
SessionUtil
.
MEMBER_ID
);
}
}
}
selfPushBiz
.
createSelfPush
(
partyId
,
addParamDTO
);
selfPushBiz
.
createSelfPush
(
partyId
,
addParamDTO
);
return
new
ResponseDto
<>();
return
new
ResponseDto
<>();
...
@@ -80,11 +83,18 @@ public class SelfPushFacade {
...
@@ -80,11 +83,18 @@ public class SelfPushFacade {
@RequestParam
(
value
=
"startTime"
,
required
=
false
)
@ApiParam
(
"开始时间"
)
String
startTime
,
@RequestParam
(
value
=
"startTime"
,
required
=
false
)
@ApiParam
(
"开始时间"
)
String
startTime
,
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
@ApiParam
(
"结束时间"
)
String
endTime
,
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
@ApiParam
(
"结束时间"
)
String
endTime
,
@RequestParam
(
value
=
"status"
,
required
=
false
)
@ApiParam
(
"发送状态(1发送中2发送成功3发送失败)"
)
Integer
status
)
throws
PermissionException
{
@RequestParam
(
value
=
"status"
,
required
=
false
)
@ApiParam
(
"发送状态(1发送中2发送成功3发送失败)"
)
Integer
status
)
throws
PermissionException
{
SessionUtil
.
getToken4Redis
(
token
);
Map
<
String
,
Object
>
map
=
SessionUtil
.
getToken4Redis
(
token
);
if
(
null
==
currentPage
||
null
==
numPerPage
)
{
if
(
null
==
currentPage
||
null
==
numPerPage
)
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"缺少分页参数"
);
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"缺少分页参数"
);
}
}
PageBeanNew
<
SelfPushRecordDTO
>
pageBeanNew
=
selfPushBiz
.
listSelfPushRecord
(
currentPage
,
numPerPage
,
startTime
,
endTime
,
status
);
Long
partyId
=
(
Long
)
map
.
get
(
SessionUtil
.
PARTY_ID
);
if
(
partyId
==
0
){
String
isSystem
=
(
String
)
map
.
get
(
SessionUtil
.
IS_SYSTEM
);
if
(
"0"
.
equals
(
isSystem
))
{
partyId
=
(
Long
)
map
.
get
(
SessionUtil
.
MEMBER_ID
);
}
}
PageBeanNew
<
SelfPushRecordDTO
>
pageBeanNew
=
selfPushBiz
.
listSelfPushRecord
(
currentPage
,
numPerPage
,
startTime
,
endTime
,
status
,
partyId
);
return
new
ResponseDto
<>(
pageBeanNew
);
return
new
ResponseDto
<>(
pageBeanNew
);
}
}
}
}
pcloud-service-book/src/main/resources/mapper/book/Book.Mapper.xml
View file @
e2d79d94
...
@@ -1838,6 +1838,9 @@
...
@@ -1838,6 +1838,9 @@
AND
AND
(b.BOOK_NAME LIKE CONCAT('%', #{name},'%') OR b.ISBN LIKE CONCAT(#{name},'%'))
(b.BOOK_NAME LIKE CONCAT('%', #{name},'%') OR b.ISBN LIKE CONCAT(#{name},'%'))
</if>
</if>
<if
test=
"adviserId!=null"
>
AND a.ADVISER_ID = #{adviserId}
</if>
ORDER BY
ORDER BY
g.create_time DESC
g.create_time DESC
</select>
</select>
...
...
pcloud-service-book/src/main/resources/mapper/group/BookGroupCipherUser.xml
View file @
e2d79d94
...
@@ -422,6 +422,31 @@
...
@@ -422,6 +422,31 @@
</if>
</if>
</select>
</select>
<select
id=
"listUser4SelfPushByBookGroupId"
resultType=
"com.pcloud.book.group.vo.UserBookInfoVO"
parameterType=
"map"
>
SELECT
u.wx_user_id wxUserId,
u.alt_id altId
FROM
book_group_cipher_user u
LEFT JOIN book_group g ON u.book_group_id = g.id
WHERE
g.book_id = #{bookId}
<if
test=
"wxUserIds != null and wxUserIds.size>0"
>
AND u.wx_user_id IN
<foreach
collection=
"wxUserIds"
open=
"("
close=
")"
item=
"item"
separator=
","
>
#{item}
</foreach>
</if>
GROUP BY
u.wx_user_id
ORDER BY
u.create_time DESC,
u.id DESC
<if
test=
"pageNum>=0 and numPerPage>0"
>
LIMIT #{pageNum}, #{numPerPage}
</if>
</select>
<select
id=
"getScanBookInfoByUser"
parameterType=
"map"
resultType=
"com.pcloud.book.group.vo.UserBookInfoItemVO"
>
<select
id=
"getScanBookInfoByUser"
parameterType=
"map"
resultType=
"com.pcloud.book.group.vo.UserBookInfoItemVO"
>
SELECT
SELECT
u.book_group_id bookGroupId,
u.book_group_id bookGroupId,
...
...
pcloud-service-book/src/main/resources/mapper/push/SelfPushItemMapper.xml
View file @
e2d79d94
...
@@ -123,6 +123,7 @@
...
@@ -123,6 +123,7 @@
<if
test=
"pushStatus != null"
>
<if
test=
"pushStatus != null"
>
AND i.push_status = #{pushStatus}
AND i.push_status = #{pushStatus}
</if>
</if>
AND p.create_user = #{partyId}
ORDER BY
ORDER BY
i.create_time DESC, i.id DESC
i.create_time DESC, i.id DESC
</select>
</select>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment