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
8e8aea8a
Commit
8e8aea8a
authored
Feb 04, 2020
by
zhuyajie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
群列表
parent
884e2986
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
79 additions
and
69 deletions
+79
-69
GroupQrcodeBiz.java
...c/main/java/com/pcloud/book/group/biz/GroupQrcodeBiz.java
+1
-1
GroupQrcodeBizImpl.java
...va/com/pcloud/book/group/biz/impl/GroupQrcodeBizImpl.java
+33
-1
GroupQrcodeFacade.java
.../java/com/pcloud/book/group/facade/GroupQrcodeFacade.java
+5
-3
GroupQrcodeFacadeImpl.java
.../pcloud/book/group/facade/impl/GroupQrcodeFacadeImpl.java
+3
-2
GroupQrcodeBookVO.java
...main/java/com/pcloud/book/group/vo/GroupQrcodeBookVO.java
+26
-59
GroupQrcode.Mapper.xml
...ok/src/main/resources/mapper/group/GroupQrcode.Mapper.xml
+11
-3
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/GroupQrcodeBiz.java
View file @
8e8aea8a
...
...
@@ -202,7 +202,7 @@ public interface GroupQrcodeBiz {
* @param name
* @return
*/
PageBeanNew
<
GroupQrcodeBookVO
>
listQrcodeByPcloud
(
Integer
currentPage
,
Integer
numPerPage
,
String
name
);
PageBeanNew
<
GroupQrcodeBookVO
>
listQrcodeByPcloud
(
Integer
currentPage
,
Integer
numPerPage
,
String
name
,
Long
depLabelId
);
/**
* 切群之后要做的事
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/GroupQrcodeBizImpl.java
View file @
8e8aea8a
...
...
@@ -762,13 +762,45 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
}
@Override
public
PageBeanNew
<
GroupQrcodeBookVO
>
listQrcodeByPcloud
(
Integer
currentPage
,
Integer
numPerPage
,
String
name
)
{
public
PageBeanNew
<
GroupQrcodeBookVO
>
listQrcodeByPcloud
(
Integer
currentPage
,
Integer
numPerPage
,
String
name
,
Long
depLabelId
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"name"
,
name
);
paramMap
.
put
(
"depLabelId"
,
depLabelId
);
PageBeanNew
<
GroupQrcodeBookVO
>
pageBeanNew
=
groupQrcodeDao
.
listPageNew
(
new
PageParam
(
currentPage
,
numPerPage
),
paramMap
,
"listQrcodeByPcloud"
);
if
(
pageBeanNew
==
null
||
ListUtils
.
isEmpty
(
pageBeanNew
.
getRecordList
()))
{
return
new
PageBeanNew
<>(
currentPage
,
numPerPage
,
new
ArrayList
<>());
}
//标签
Map
<
Long
,
String
>
labelMap
=
new
HashMap
<>();
List
<
Long
>
labelIds
=
new
ArrayList
<>();
List
<
Long
>
proLabels
=
pageBeanNew
.
getRecordList
().
stream
().
filter
(
s
->
s
.
getProLabelId
()
!=
null
).
map
(
GroupQrcodeBookVO:
:
getProLabelId
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
Long
>
depLabels
=
pageBeanNew
.
getRecordList
().
stream
().
filter
(
s
->
s
.
getDepLabelId
()
!=
null
).
map
(
GroupQrcodeBookVO:
:
getDepLabelId
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
Long
>
purLabels
=
pageBeanNew
.
getRecordList
().
stream
().
filter
(
s
->
s
.
getPurLabelId
()
!=
null
).
map
(
GroupQrcodeBookVO:
:
getPurLabelId
).
distinct
().
collect
(
Collectors
.
toList
());
if
(!
ListUtils
.
isEmpty
(
proLabels
))
{
labelIds
.
addAll
(
proLabels
);
}
if
(!
ListUtils
.
isEmpty
(
depLabels
))
{
labelIds
.
addAll
(
depLabels
);
}
if
(!
ListUtils
.
isEmpty
(
purLabels
))
{
labelIds
.
addAll
(
purLabels
);
}
if
(!
ListUtils
.
isEmpty
(
labelIds
))
{
labelMap
=
labelConsr
.
getLabelName
(
labelIds
);
}
if
(!
MapUtils
.
isEmpty
(
labelMap
))
{
for
(
GroupQrcodeBookVO
qrcodeBookVO
:
pageBeanNew
.
getRecordList
())
{
if
(
null
!=
qrcodeBookVO
.
getProLabelId
()
&&
labelMap
.
containsKey
(
qrcodeBookVO
.
getProLabelId
()))
{
qrcodeBookVO
.
setProLabelName
(
labelMap
.
get
(
qrcodeBookVO
.
getProLabelId
()));
}
if
(
null
!=
qrcodeBookVO
.
getDepLabelId
()
&&
labelMap
.
containsKey
(
qrcodeBookVO
.
getDepLabelId
()))
{
qrcodeBookVO
.
setDepLabelName
(
labelMap
.
get
(
qrcodeBookVO
.
getDepLabelId
()));
}
if
(
null
!=
qrcodeBookVO
.
getPurLabelId
()
&&
labelMap
.
containsKey
(
qrcodeBookVO
.
getPurLabelId
()))
{
qrcodeBookVO
.
setPurLabelName
(
labelMap
.
get
(
qrcodeBookVO
.
getPurLabelId
()));
}
}
}
return
pageBeanNew
;
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/facade/GroupQrcodeFacade.java
View file @
8e8aea8a
...
...
@@ -76,14 +76,16 @@ public interface GroupQrcodeFacade {
@ApiOperation
(
value
=
"平台端查群二维码"
,
httpMethod
=
"GET"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"name"
,
value
=
"群名称"
,
dataType
=
"string"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"name"
,
value
=
"群名称"
,
dataType
=
"string"
,
required
=
false
,
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"
),
@ApiImplicitParam
(
name
=
"depLabelId"
,
value
=
"深度标签id"
,
dataType
=
"long"
,
required
=
false
,
paramType
=
"query"
)
})
@RequestMapping
(
value
=
"listQrcodeByPcloud"
,
method
=
RequestMethod
.
GET
)
ResponseDto
<
PageBeanNew
>
listQrcodeByPcloud
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
)
throws
PermissionException
;
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"depLabelId"
,
required
=
false
)
Long
depLabelId
)
throws
PermissionException
;
@ApiOperation
(
"根据类型获取当前群总人数"
)
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/facade/impl/GroupQrcodeFacadeImpl.java
View file @
8e8aea8a
...
...
@@ -142,9 +142,10 @@ public class GroupQrcodeFacadeImpl implements GroupQrcodeFacade {
@Override
public
ResponseDto
<
PageBeanNew
>
listQrcodeByPcloud
(
@RequestHeader
(
"token"
)
String
token
,
@RequestParam
(
value
=
"currentPage"
,
required
=
false
)
Integer
currentPage
,
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
)
throws
PermissionException
{
@RequestParam
(
value
=
"numPerPage"
,
required
=
false
)
Integer
numPerPage
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"depLabelId"
,
required
=
false
)
Long
depLabelId
)
throws
PermissionException
{
SessionUtil
.
getToken4Redis
(
token
);
PageBeanNew
<
GroupQrcodeBookVO
>
pageBeanNew
=
groupQrcodeBiz
.
listQrcodeByPcloud
(
currentPage
,
numPerPage
,
name
);
PageBeanNew
<
GroupQrcodeBookVO
>
pageBeanNew
=
groupQrcodeBiz
.
listQrcodeByPcloud
(
currentPage
,
numPerPage
,
name
,
depLabelId
);
return
new
ResponseDto
<>(
pageBeanNew
);
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/vo/GroupQrcodeBookVO.java
View file @
8e8aea8a
...
...
@@ -3,6 +3,7 @@ package com.pcloud.book.group.vo;
import
com.pcloud.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @描述:群和图书信息
...
...
@@ -10,6 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
* @创建时间:14:37 2019/7/4
* @版本:1.0
*/
@Data
public
class
GroupQrcodeBookVO
extends
BaseDto
{
@ApiModelProperty
(
"群标识"
)
...
...
@@ -30,63 +32,28 @@ public class GroupQrcodeBookVO extends BaseDto{
@ApiModelProperty
(
"书号"
)
private
String
isbn
;
public
Long
getGroupQrcodeId
()
{
return
groupQrcodeId
;
}
public
void
setGroupQrcodeId
(
Long
groupQrcodeId
)
{
this
.
groupQrcodeId
=
groupQrcodeId
;
}
public
String
getGroupName
()
{
return
groupName
;
}
public
void
setGroupName
(
String
groupName
)
{
this
.
groupName
=
groupName
;
}
public
String
getWxGroupId
()
{
return
wxGroupId
;
}
public
void
setWxGroupId
(
String
wxGroupId
)
{
this
.
wxGroupId
=
wxGroupId
;
}
public
Long
getBookId
()
{
return
bookId
;
}
public
void
setBookId
(
Long
bookId
)
{
this
.
bookId
=
bookId
;
}
public
String
getBookName
()
{
return
bookName
;
}
public
void
setBookName
(
String
bookName
)
{
this
.
bookName
=
bookName
;
}
public
String
getIsbn
()
{
return
isbn
;
}
public
void
setIsbn
(
String
isbn
)
{
this
.
isbn
=
isbn
;
}
@Override
public
String
toString
()
{
return
"GroupQrcodeBookVO{"
+
"groupQrcodeId="
+
groupQrcodeId
+
", groupName='"
+
groupName
+
'\''
+
", wxGroupId='"
+
wxGroupId
+
'\''
+
", bookId="
+
bookId
+
", bookName='"
+
bookName
+
'\''
+
", isbn='"
+
isbn
+
'\''
+
'}'
;
}
@ApiModelProperty
(
"专业标签ID"
)
private
Long
proLabelId
;
@ApiModelProperty
(
"专业标签名称"
)
private
String
proLabelName
;
@ApiModelProperty
(
"深度标签ID"
)
private
Long
depLabelId
;
@ApiModelProperty
(
"深度标签名称"
)
private
String
depLabelName
;
@ApiModelProperty
(
"目的标签ID"
)
private
Long
purLabelId
;
@ApiModelProperty
(
"目的标签名称"
)
private
String
purLabelName
;
@ApiModelProperty
(
"用户数量"
)
private
Integer
userNumber
;
@ApiModelProperty
(
"群分类介绍"
)
private
String
classifyIntroduce
;
}
pcloud-service-book/src/main/resources/mapper/group/GroupQrcode.Mapper.xml
View file @
8e8aea8a
...
...
@@ -760,11 +760,16 @@
SELECT
t.id groupQrcodeId,
t.group_name groupName,
t.weixin_group_id wxGroupId
t.weixin_group_id wxGroupId,
t.user_number userNumber,
bg.dep_label_id depLabelId,
bg.pro_label_id proLabelId,
bg.pur_label_id purLabelId,
t1.classify_introduce classifyIntroduce
FROM
book_group_qrcode t
INNER
JOIN book_group_classify t1 ON t.classify_id = t1.id
INNER JOIN book_group bg ON t1.book_id = bg.book_
id
LEFT
JOIN book_group_classify t1 ON t.classify_id = t1.id
LEFT JOIN book_group bg ON t1.book_group_id = bg.
id
WHERE
t.is_delete = 0
AND t1.is_delete = 0
...
...
@@ -772,6 +777,9 @@
<if
test=
"name != null"
>
AND t.group_name LIKE CONCAT('%', #{name}, '%')
</if>
<if
test=
"depLabelId != null"
>
AND bg.dep_label_id = #{depLabelId}
</if>
</select>
<select
id=
"getIdsByBookGroupId"
parameterType=
"long"
resultType=
"long"
>
...
...
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