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
9c328f63
Commit
9c328f63
authored
Aug 23, 2019
by
daixing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口,添加分页
parent
1352fdbe
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
68 additions
and
45 deletions
+68
-45
BookGroupBiz.java
...src/main/java/com/pcloud/book/group/biz/BookGroupBiz.java
+1
-1
BookGroupBizImpl.java
...java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
+25
-28
GroupQrcodeBizImpl.java
...va/com/pcloud/book/group/biz/impl/GroupQrcodeBizImpl.java
+1
-1
GroupQrcodeDao.java
...c/main/java/com/pcloud/book/group/dao/GroupQrcodeDao.java
+1
-1
GroupQrcodeDaoImpl.java
...va/com/pcloud/book/group/dao/impl/GroupQrcodeDaoImpl.java
+2
-6
BookGroupFacade.java
...in/java/com/pcloud/book/group/facade/BookGroupFacade.java
+8
-4
BookGroupFacadeImpl.java
...om/pcloud/book/group/facade/impl/BookGroupFacadeImpl.java
+6
-4
GroupStatisticVO.java
.../main/java/com/pcloud/book/group/vo/GroupStatisticVO.java
+10
-0
BookGroupClassify.Mapper.xml
.../main/resources/mapper/group/BookGroupClassify.Mapper.xml
+8
-0
GroupQrcode.Mapper.xml
...ok/src/main/resources/mapper/group/GroupQrcode.Mapper.xml
+6
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/BookGroupBiz.java
View file @
9c328f63
...
...
@@ -265,7 +265,7 @@ public interface BookGroupBiz {
/**
* 社群码分类统计
*/
List
<
GroupStatisticVO
>
getClassifyStatistic
(
Long
bookGroupId
,
Long
adviserId
);
PageBeanNew
<
GroupStatisticVO
>
getClassifyStatistic
(
Long
bookGroupId
,
Long
adviserId
,
Integer
currentPage
,
Integer
numPerPage
);
/**
* 社群码分类的微信群统计
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
View file @
9c328f63
...
...
@@ -1236,14 +1236,18 @@ public class BookGroupBizImpl implements BookGroupBiz {
}
@Override
public
List
<
GroupStatisticVO
>
getClassifyStatistic
(
Long
bookGroupId
,
Long
adviserId
)
{
List
<
ListClassifyVO
>
listClassifyVOS
=
bookGroupClassifyBiz
.
listAllClassify
(
bookGroupId
);
if
(
ListUtils
.
isEmpty
(
listClassifyVOS
)){
return
new
ArrayList
<>();
public
PageBeanNew
<
GroupStatisticVO
>
getClassifyStatistic
(
Long
bookGroupId
,
Long
adviserId
,
Integer
currentPage
,
Integer
numPerPage
)
{
PageParam
pageParam
=
new
PageParam
(
currentPage
,
numPerPage
);
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"bookGroupId"
,
bookGroupId
);
PageBeanNew
<
GroupStatisticVO
>
pageClassify
=
bookGroupClassifyDao
.
listPageNew
(
pageParam
,
paramMap
,
"pageClassify"
);
List
<
GroupStatisticVO
>
recordList
=
pageClassify
.
getRecordList
();
if
(
ListUtils
.
isEmpty
(
recordList
)){
return
new
PageBeanNew
<>();
}
List
<
Long
>
classifyIds
=
listClassifyVOS
.
stream
().
map
(
ListClassifyVO:
:
get
Id
).
collect
(
Collectors
.
toList
());
List
<
Long
>
classifyIds
=
recordList
.
stream
().
map
(
GroupStatisticVO:
:
getClassify
Id
).
collect
(
Collectors
.
toList
());
if
(
ListUtils
.
isEmpty
(
classifyIds
)){
return
new
ArrayList
<>();
return
new
PageBeanNew
<>();
}
Map
<
Long
,
ClickClassifyDTO
>
longClickClassifyDTOMap
=
bookGroupClassifyDao
.
mapClickClassify
(
classifyIds
);
GetGroupClassifyIncomeDTO
getGroupClassifyIncomeDTO
=
new
GetGroupClassifyIncomeDTO
();
...
...
@@ -1251,37 +1255,30 @@ public class BookGroupBizImpl implements BookGroupBiz {
getGroupClassifyIncomeDTO
.
setPartyId
(
adviserId
);
getGroupClassifyIncomeDTO
.
setRoleId
(
5L
);
Map
<
Long
,
BigDecimal
>
classifyIncome
=
bookConsr
.
getClassifyIncome
(
getGroupClassifyIncomeDTO
);
List
<
GroupStatisticVO
>
groupStatisticVOS
=
new
ArrayList
<>();
Map
<
Long
,
Long
>
mapMemberCount
=
wechatGroupConsr
.
getclassifyMemberCount
(
classifyIds
);
listClassifyVOS
.
forEach
(
e
->{
recordList
.
forEach
(
e
->{
GroupStatisticVO
groupStatisticVO
=
new
GroupStatisticVO
();
if
(
longClickClassifyDTOMap
.
get
(
e
.
getId
())
!=
null
){
Long
count
=
longClickClassifyDTOMap
.
get
(
e
.
getId
()).
getCount
()==
null
?
0L
:
longClickClassifyDTOMap
.
get
(
e
.
getId
()).
getCount
();
groupStatisticVO
.
setClickCount
(
count
);
}
groupStatisticVO
.
setClassifyId
(
e
.
getId
());
groupStatisticVO
.
setClassifyName
(
e
.
getClassify
());
groupStatisticVO
.
setCreatedTime
(
e
.
getCreatedTime
());
if
(
longClickClassifyDTOMap
.
get
(
e
.
getClassifyId
())
!=
null
){
Long
count
=
longClickClassifyDTOMap
.
get
(
e
.
getClassifyId
()).
getCount
()==
null
?
0L
:
longClickClassifyDTOMap
.
get
(
e
.
getClassifyId
()).
getCount
();
e
.
setClickCount
(
count
);
}
if
(
BigDecimal
.
ZERO
.
compareTo
(
e
.
getPrice
())
==
0
){
groupStatisticVO
.
setIsFree
(
1
);
e
.
setIsFree
(
1
);
}
else
{
groupStatisticVO
.
setIsFree
(
0
);
e
.
setIsFree
(
0
);
}
groupStatisticVO
.
setGroupPersonCount
(
e
.
getUserNumberTotal
().
longValue
());
if
(!
MapUtils
.
isEmpty
(
classifyIncome
)){
groupStatisticVO
.
setIncome
(
classifyIncome
.
get
(
e
.
get
Id
()));
e
.
setIncome
(
classifyIncome
.
get
(
e
.
getClassify
Id
()));
}
else
{
groupStatisticVO
.
setIncome
(
BigDecimal
.
ZERO
);
e
.
setIncome
(
BigDecimal
.
ZERO
);
}
if
(!
MapUtils
.
isEmpty
(
mapMemberCount
)){
groupStatisticVO
.
setInGroupPersonCount
(
mapMemberCount
.
get
(
e
.
get
Id
()));
e
.
setInGroupPersonCount
(
mapMemberCount
.
get
(
e
.
getClassify
Id
()));
}
else
{
groupStatisticVO
.
setInGroupPersonCount
(
0L
);
e
.
setInGroupPersonCount
(
0L
);
}
groupStatisticVOS
.
add
(
groupStatisticVO
);
});
return
groupStatisticVOS
;
return
pageClassify
;
}
@Override
...
...
@@ -1356,8 +1353,8 @@ public class BookGroupBizImpl implements BookGroupBiz {
productStaticUnderAppMapDTO
.
setAppIds
(
appClickStatistics
.
stream
().
map
(
ResourcesStatisticVO:
:
getRescourceId
).
collect
(
Collectors
.
toList
()));
productStaticUnderAppMapDTO
.
setPartyId
(
adviserId
);
productStaticUnderAppMapDTO
.
setRoleId
(
5L
);
Map
<
Long
,
List
<
com
.
pcloud
.
settlementcenter
.
record
.
dto
.
ResourcesStatisticVO
>>
productStaticUnderApp
=
settlementConsr
.
getProductStaticUnderApp
(
productStaticUnderAppMapDTO
);
Map
<
Long
,
List
<
StatisticsIncomeDto
>>
productStaticUnderAppMap
=
copy
(
productStaticUnderApp
,
bookGroupId
);
//
Map<Long, List<com.pcloud.settlementcenter.record.dto.ResourcesStatisticVO>> productStaticUnderApp = settlementConsr.getProductStaticUnderApp(productStaticUnderAppMapDTO);
//
Map<Long, List<StatisticsIncomeDto>> productStaticUnderAppMap = copy(productStaticUnderApp,bookGroupId);
appClickStatistics
.
forEach
(
e
->{
StatisticsIncomeDto
statisticsIncomeDto
=
new
StatisticsIncomeDto
();
statisticsIncomeDto
.
setAppId
(
e
.
getRescourceId
());
...
...
@@ -1367,7 +1364,7 @@ public class BookGroupBizImpl implements BookGroupBiz {
statisticsIncomeDto
.
setSaleCounts
(
e
.
getSaleCount
().
intValue
());
statisticsIncomeDto
.
setSaleMoney
(
e
.
getTotalSale
());
statisticsIncomeDto
.
setScanCounts
(
e
.
getBrowseCount
().
intValue
());
statisticsIncomeDto
.
setItemList
(
productStaticUnderAppMap
.
get
(
e
.
getRescourceId
()));
//
statisticsIncomeDto.setItemList(productStaticUnderAppMap.get(e.getRescourceId()));
appStatisticsIncomeDtos
.
add
(
statisticsIncomeDto
);
});
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/GroupQrcodeBizImpl.java
View file @
9c328f63
...
...
@@ -170,7 +170,7 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
@Override
public
List
<
ClassifyQrcodeVO
>
getQrcodeByClassify
(
Long
bookGroupId
,
Long
classifyId
)
{
List
<
ClassifyQrcodeVO
>
qrcodeByClassify
=
groupQrcodeDao
.
getQrcodeByClassify
(
bookGroupId
,
classifyId
);
List
<
ClassifyQrcodeVO
>
qrcodeByClassify
=
groupQrcodeDao
.
getQrcodeByClassify
(
classifyId
);
if
(
ListUtils
.
isEmpty
(
qrcodeByClassify
)){
return
new
ArrayList
<>();
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/GroupQrcodeDao.java
View file @
9c328f63
...
...
@@ -201,5 +201,5 @@ public interface GroupQrcodeDao extends BaseDao<GroupQrcode> {
/**
* 根据分类id获取分类下的群---不分页
*/
List
<
ClassifyQrcodeVO
>
getQrcodeByClassify
(
Long
bookGroupId
,
Long
classifyId
);
List
<
ClassifyQrcodeVO
>
getQrcodeByClassify
(
Long
classifyId
);
}
pcloud-service-book/src/main/java/com/pcloud/book/group/dao/impl/GroupQrcodeDaoImpl.java
View file @
9c328f63
...
...
@@ -191,11 +191,7 @@ public class GroupQrcodeDaoImpl extends BaseDaoImpl<GroupQrcode> implements Grou
}
@Override
public
List
<
ClassifyQrcodeVO
>
getQrcodeByClassify
(
Long
bookGroupId
,
Long
classifyId
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"bookGroupId"
,
bookGroupId
);
map
.
put
(
"classifyId"
,
classifyId
);
map
.
put
(
"changeNumber"
,
0
);
return
this
.
getSqlSession
().
selectList
(
this
.
getStatement
(
"listQrcodeByClassify"
),
map
);
public
List
<
ClassifyQrcodeVO
>
getQrcodeByClassify
(
Long
classifyId
)
{
return
this
.
getSqlSession
().
selectList
(
this
.
getStatement
(
"getQrcodeByClassify"
),
classifyId
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/facade/BookGroupFacade.java
View file @
9c328f63
...
...
@@ -277,11 +277,15 @@ public interface BookGroupFacade {
@ApiOperation
(
value
=
"社群码分类统计--pc"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"bookGroupId"
,
value
=
"bookGroupId"
,
required
=
true
,
dataType
=
"Long"
,
paramType
=
"query"
)
@ApiImplicitParam
(
name
=
"bookGroupId"
,
value
=
"bookGroupId"
,
required
=
true
,
dataType
=
"Long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"currentPage"
,
value
=
"currentPage"
,
required
=
true
,
dataType
=
"Integer"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"numPerPage"
,
value
=
"numPerPage"
,
required
=
true
,
dataType
=
"Integer"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"getClassifyStatistic"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
List
<
GroupStatisticVO
>>
getClassifyStatistic
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookGroupId"
,
required
=
true
)
Long
bookGroupId
)
throws
BizException
,
PermissionException
;
public
ResponseDto
<?>
getClassifyStatistic
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookGroupId"
,
required
=
true
)
Long
bookGroupId
,
@RequestParam
(
value
=
"currentPage"
,
required
=
true
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
true
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
;
@ApiOperation
(
value
=
"社群码分类下的微信群统计--pc"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
...
...
@@ -289,7 +293,7 @@ public interface BookGroupFacade {
@ApiImplicitParam
(
name
=
"classifyId"
,
value
=
"classifyId"
,
required
=
true
,
dataType
=
"Long"
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"getQrcodeStatistic"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
List
<
WxGroupStatisticVO
>
>
getQrcodeStatistic
(
@RequestHeader
(
"token"
)
String
token
,
public
ResponseDto
<
?
>
getQrcodeStatistic
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookGroupId"
,
required
=
true
)
Long
bookGroupId
,
@RequestParam
(
"classifyId"
)
Long
classifyId
)
throws
BizException
,
PermissionException
;
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/facade/impl/BookGroupFacadeImpl.java
View file @
9c328f63
...
...
@@ -401,17 +401,19 @@ public class BookGroupFacadeImpl implements BookGroupFacade {
@Override
@RequestMapping
(
value
=
"getClassifyStatistic"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
List
<
GroupStatisticVO
>>
getClassifyStatistic
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookGroupId"
,
required
=
true
)
Long
bookGroupId
)
throws
BizException
,
PermissionException
{
public
ResponseDto
<?>
getClassifyStatistic
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookGroupId"
,
required
=
true
)
Long
bookGroupId
,
@RequestParam
(
value
=
"currentPage"
,
required
=
true
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
true
)
Integer
numPerPage
)
throws
BizException
,
PermissionException
{
Map
<
String
,
Object
>
map
=
SessionUtil
.
getToken4Redis
(
token
);
Long
adviserId
=
(
Long
)
map
.
get
(
SessionUtil
.
PARTY_ID
);
List
<
GroupStatisticVO
>
groupQrcodeStatistic
=
bookGroupBiz
.
getClassifyStatistic
(
bookGroupId
,
adviserId
);
PageBeanNew
<
GroupStatisticVO
>
groupQrcodeStatistic
=
bookGroupBiz
.
getClassifyStatistic
(
bookGroupId
,
adviserId
,
currentPage
,
numPerPage
);
return
new
ResponseDto
<>(
groupQrcodeStatistic
);
}
@Override
@RequestMapping
(
value
=
"getQrcodeStatistic"
,
method
=
RequestMethod
.
GET
)
public
ResponseDto
<
List
<
WxGroupStatisticVO
>
>
getQrcodeStatistic
(
@RequestHeader
(
"token"
)
String
token
,
public
ResponseDto
<
?
>
getQrcodeStatistic
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"bookGroupId"
,
required
=
true
)
Long
bookGroupId
,
@RequestParam
(
"classifyId"
)
Long
classifyId
)
throws
BizException
,
PermissionException
{
Map
<
String
,
Object
>
map
=
SessionUtil
.
getToken4Redis
(
token
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/vo/GroupStatisticVO.java
View file @
9c328f63
...
...
@@ -24,6 +24,9 @@ public class GroupStatisticVO implements Serializable {
@ApiModelProperty
(
"是否免费,1-免费 0-收费"
)
private
Integer
isFree
;
@ApiModelProperty
(
"价格"
)
private
BigDecimal
price
;
@ApiModelProperty
(
"点击人数"
)
private
Long
clickCount
;
...
...
@@ -111,6 +114,13 @@ public class GroupStatisticVO implements Serializable {
this
.
createdTime
=
createdTime
;
}
public
BigDecimal
getPrice
()
{
return
price
;
}
public
void
setPrice
(
BigDecimal
price
)
{
this
.
price
=
price
;
}
@Override
public
String
toString
()
{
...
...
pcloud-service-book/src/main/resources/mapper/group/BookGroupClassify.Mapper.xml
View file @
9c328f63
...
...
@@ -849,4 +849,11 @@
group by c.id
order by c.id desc
</select>
<select
id=
"pageClassify"
parameterType=
"map"
resultType=
"com.pcloud.book.group.vo.GroupStatisticVO"
>
select bgc.id classifyId, bgc.classify classifyName, bgc.price price,sum(user_number) groupPersonCount, bgc.create_time createdTime
from book_group_classify bgc left join book_group_qrcode bgq on bgc.id = bgq.classify_id
group by bgc.id
where book_group_id = #{bookGroupId}
</select>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/group/GroupQrcode.Mapper.xml
View file @
9c328f63
...
...
@@ -499,4 +499,9 @@
#{item}
</foreach>
</select>
<select
id=
"getQrcodeByClassify"
parameterType=
"long"
resultType=
"com.pcloud.book.group.vo.ClassifyQrcodeVO"
>
select id, classify_id classifyId, group_name groupName, user_number userNumber, weixin_group_id weixinGroupId, create_time createdTime
from book_group_qrcode where classify_id = #{classifyId}
</select>
</mapper>
\ No newline at end of file
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